Merging r37048, r37051, r37052, r37055 from the-real-msvc branch
[reactos.git] / reactos / base / applications / network / 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
8 typedef float f4byte_t;
9 typedef double f8byte_t;
10 typedef long uid_t; // SunOS 5.5
11
12 #define __P(x) x
13
14 /* utmp.h */
15 #define UT_LINESIZE 8
16 #define UT_HOSTSIZE 16
17
18 /* stat.h */
19 #define S_ISREG(mode) (((mode)&0xF000) == 0x8000)
20 #define S_ISDIR(mode) (((mode)&0xF000) == 0x4000)
21
22 #undef MIN //take care of windows default
23 #undef MAX //take care of windows default
24 #define MIN(a, b) ((a) <= (b) ? (a) : (b))
25 #define MAX(a, b) ((a) > (b) ? (a) : (b))
26
27 #define bcopy(s1, s2, n) memmove(s2, s1, n)
28 #define bcmp(s1, s2, n) (memcmp(s1, s2, n) != 0)
29 #define bzero(s, n) memset(s, 0, n)
30
31 #define index(s, c) strchr(s, c)
32 #define rindex(s, c) strrchr(s, c)
33
34 void netfinger(char *);
35
36 #endif