finger client for reactos
[reactos.git] / rosapps / net / finger / various.h
1 // Various things you need when porting BSD and GNU utilities to
2 // Win32.
3
4 #ifndef VARIOUS_H
5 #define VARIOUS_H
6
7 /* types.h */
8 typedef unsigned char u_char;
9 typedef unsigned int u_int;
10 typedef float f4byte_t;
11 typedef double f8byte_t;
12 //typedef __int16 s2byte_t;
13 //typedef __int32 s4byte_t;
14 //typedef __int64 s8byte_t;
15 //typedef unsigned __int16 u2byte_t;
16 //typedef unsigned __int32 u4byte_t;
17 //typedef unsigned __int64 u8byte_t;
18 //typedef __int32 quad_t;
19 //typedef unsigned __int32 u_quad_t;
20 //typedef unsigned __int16 u_int16_t;
21 //typedef unsigned __int32 u_int32_t;
22
23 typedef long uid_t; // SunOS 5.5
24
25 #define __P(x) x
26 #define __STDC__ 1
27
28 /* utmp.h */
29 #define UT_LINESIZE 8
30 #define UT_HOSTSIZE 16
31
32 /* stat.h */
33 #define S_ISREG(mode) (((mode)&0xF000) == 0x8000)
34 #define S_ISDIR(mode) (((mode)&0xF000) == 0x4000)
35
36 #define MIN(a, b) ((a) <= (b) ? (a) : (b))
37 #define MAX(a, b) ((a) > (b) ? (a) : (b))
38
39 #define bcopy(s1, s2, n) memmove(s2, s1, n)
40 #define bcmp(s1, s2, n) (memcmp(s1, s2, n) != 0)
41 #define bzero(s, n) memset(s, 0, n)
42
43 #define index(s, c) strchr(s, c)
44 #define rindex(s, c) strrchr(s, c)
45
46 //#ifndef _WINSOCKAPI_
47 //struct timeval {
48 // long tv_sec; /* seconds */
49 // long tv_usec; /* and microseconds */
50 //};
51 //#endif
52
53 #endif