5 * Time-stamp: "2006-10-14 14:55:09 bkorb"
7 * Last Committed: $Date: 2007/06/24 15:51:26 $
9 #ifndef WINDOWS_CONFIG_HACKERY
10 #define WINDOWS_CONFIG_HACKERY 1
13 * The definitions below have been stolen from NTP's config.h for Windows.
14 * However, they may be kept here in order to keep libopts independent from
18 # define __windows__ 4
22 * Miscellaneous functions that Microsoft maps
25 * #define inline __inline
26 * #define vsnprintf _vsnprintf
28 #define snprintf _snprintf
30 * #define stricmp _stricmp
31 * #define strcasecmp _stricmp
32 * #define isascii __isascii
33 * #define finite _finite
35 * #define srandom srand
39 #define SIZEOF_CHARP 4
41 #define SIZEOF_SHORT 2
43 typedef unsigned long uintptr_t;
46 * # define HAVE_NET_IF_H
47 * # define QSORT_USES_VOID_P
48 * # define HAVE_SETVBUF
49 * # define HAVE_VSPRINTF
50 * # define HAVE_SNPRINTF
51 * # define HAVE_VSNPRINTF
52 * # define HAVE_PROTOTYPES /* from ntpq.mak * /
53 * # define HAVE_MEMMOVE
54 * # define HAVE_TERMIOS_H
55 * # define HAVE_ERRNO_H
56 * # define HAVE_STDARG_H
57 * # define HAVE_NO_NICE
58 * # define HAVE_MKTIME
59 * # define TIME_WITH_SYS_TIME
60 * # define HAVE_IO_COMPLETION_PORT
61 * # define ISC_PLATFORM_NEEDNTOP
62 * # define ISC_PLATFORM_NEEDPTON
63 * # define NEED_S_CHAR_TYPEDEF
64 * # define USE_PROTOTYPES /* for ntp_types.h * /
66 * #define ULONG_CONST(a) a ## UL
69 #define HAVE_LIMITS_H 1
72 #define HAVE_FCNTL_H 1
75 * VS.NET's version of wspiapi.h has a bug in it
76 * where it assigns a value to a variable inside
77 * an if statement. It should be comparing them.
78 * We prevent inclusion since we are not using this
79 * code so we don't have to see the warning messages
85 /* Prevent inclusion of winsock.h in windows.h */
90 #ifndef __RPCASYNC_H__
91 #define __RPCASYNC_H__
94 /* Include Windows headers */
100 * Compatibility declarations for Windows, assuming SYS_WINNT
103 #define strdup _strdup
104 #define stat _stat /* struct stat from <sys/stat.h> */
105 #define unlink _unlink
106 #define fchmod( _x, _y );
107 #define ssize_t SSIZE_T
118 #define O_RDWR _O_RDWR
119 #define O_RDONLY _O_RDONLY
120 #define O_EXCL _O_EXCL
123 # define S_IFREG _S_IFREG
124 # define S_ISREG(mode) (((mode) & S_IFREG) == S_IFREG)
128 # define S_IFDIR _S_IFDIR
129 # define S_ISDIR(mode) (((mode) & S_IFDIR) == S_IFDIR)
132 #endif /* WINDOWS_CONFIG_HACKERY */