3 * Time-stamp: "2006-10-14 14:55:09 bkorb"
5 * Last Committed: $Date: 2007/04/28 22:19:23 $
7 #ifndef WINDOWS_CONFIG_HACKERY
8 #define WINDOWS_CONFIG_HACKERY 1
11 * The definitions below have been stolen from NTP's config.h for Windows.
12 * However, they may be kept here in order to keep libopts independent from
16 # define __windows__ 4
20 * Miscellaneous functions that Microsoft maps
23 * #define inline __inline
24 * #define vsnprintf _vsnprintf
26 #define snprintf _snprintf
28 * #define stricmp _stricmp
29 * #define strcasecmp _stricmp
30 * #define isascii __isascii
31 * #define finite _finite
33 * #define srandom srand
37 #define SIZEOF_CHARP 4
39 #define SIZEOF_SHORT 2
41 typedef unsigned long uintptr_t;
44 * # define HAVE_NET_IF_H
45 * # define QSORT_USES_VOID_P
46 * # define HAVE_SETVBUF
47 * # define HAVE_VSPRINTF
48 * # define HAVE_SNPRINTF
49 * # define HAVE_VSNPRINTF
50 * # define HAVE_PROTOTYPES /* from ntpq.mak * /
51 * # define HAVE_MEMMOVE
52 * # define HAVE_TERMIOS_H
53 * # define HAVE_ERRNO_H
54 * # define HAVE_STDARG_H
55 * # define HAVE_NO_NICE
56 * # define HAVE_MKTIME
57 * # define TIME_WITH_SYS_TIME
58 * # define HAVE_IO_COMPLETION_PORT
59 * # define ISC_PLATFORM_NEEDNTOP
60 * # define ISC_PLATFORM_NEEDPTON
61 * # define NEED_S_CHAR_TYPEDEF
62 * # define USE_PROTOTYPES /* for ntp_types.h * /
64 * #define ULONG_CONST(a) a ## UL
67 #define HAVE_LIMITS_H 1
70 #define HAVE_FCNTL_H 1
73 * VS.NET's version of wspiapi.h has a bug in it
74 * where it assigns a value to a variable inside
75 * an if statement. It should be comparing them.
76 * We prevent inclusion since we are not using this
77 * code so we don't have to see the warning messages
83 /* Prevent inclusion of winsock.h in windows.h */
88 #ifndef __RPCASYNC_H__
89 #define __RPCASYNC_H__
92 /* Include Windows headers */
98 * Compatibility declarations for Windows, assuming SYS_WINNT
101 #define strdup _strdup
102 #define stat _stat /* struct stat from <sys/stat.h> */
103 #define unlink _unlink
104 #define fchmod( _x, _y );
105 #define ssize_t SSIZE_T
116 #define O_RDWR _O_RDWR
117 #define O_RDONLY _O_RDONLY
118 #define O_EXCL _O_EXCL
121 # define S_IFREG _S_IFREG
122 # define S_ISREG(mode) (((mode) & S_IFREG) == S_IFREG)
126 # define S_IFDIR _S_IFDIR
127 # define S_ISDIR(mode) (((mode) & S_IFDIR) == S_IFDIR)
130 #endif /* WINDOWS_CONFIG_HACKERY */