5 * Time-stamp: "2009-07-22 18:53:59 bkorb"
8 * This file is part of AutoGen.
10 * AutoGen copyright (c) 1992-2009 by Bruce Korb - all rights reserved
12 * AutoGen is free software: you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation, either version 3 of the License, or
15 * (at your option) any later version.
17 * AutoGen is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 * See the GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License along
23 * with this program. If not, see <http://www.gnu.org/licenses/>.
25 #ifndef WINDOWS_CONFIG_HACKERY
26 #define WINDOWS_CONFIG_HACKERY 1
29 * The definitions below have been stolen from NTP's config.h for Windows.
30 * However, they may be kept here in order to keep libopts independent from
34 # define __windows__ 4
38 * Miscellaneous functions that Microsoft maps
41 * #define inline __inline
42 * #define vsnprintf _vsnprintf
44 #define snprintf _snprintf
46 * #define stricmp _stricmp
47 * #define strcasecmp _stricmp
48 * #define isascii __isascii
49 * #define finite _finite
51 * #define srandom srand
55 #define SIZEOF_CHARP 4
57 #define SIZEOF_SHORT 2
59 typedef unsigned long uintptr_t;
62 * # define HAVE_NET_IF_H
63 * # define QSORT_USES_VOID_P
64 * # define HAVE_SETVBUF
65 * # define HAVE_VSPRINTF
66 * # define HAVE_SNPRINTF
67 * # define HAVE_VSNPRINTF
68 * # define HAVE_PROTOTYPES /* from ntpq.mak * /
69 * # define HAVE_MEMMOVE
70 * # define HAVE_TERMIOS_H
71 * # define HAVE_ERRNO_H
72 * # define HAVE_STDARG_H
73 * # define HAVE_NO_NICE
74 * # define HAVE_MKTIME
75 * # define TIME_WITH_SYS_TIME
76 * # define HAVE_IO_COMPLETION_PORT
77 * # define ISC_PLATFORM_NEEDNTOP
78 * # define ISC_PLATFORM_NEEDPTON
79 * # define NEED_S_CHAR_TYPEDEF
80 * # define USE_PROTOTYPES /* for ntp_types.h * /
82 * #define ULONG_CONST(a) a ## UL
85 #define HAVE_LIMITS_H 1
88 #define HAVE_FCNTL_H 1
91 * VS.NET's version of wspiapi.h has a bug in it
92 * where it assigns a value to a variable inside
93 * an if statement. It should be comparing them.
94 * We prevent inclusion since we are not using this
95 * code so we don't have to see the warning messages
101 /* Prevent inclusion of winsock.h in windows.h */
106 #ifndef __RPCASYNC_H__
107 #define __RPCASYNC_H__
110 /* Include Windows headers */
112 #include <winsock2.h>
116 * Compatibility declarations for Windows, assuming SYS_WINNT
119 #define strdup _strdup
120 #define stat _stat /* struct stat from <sys/stat.h> */
121 #define unlink _unlink
122 #define fchmod( _x, _y );
123 #define ssize_t SSIZE_T
134 #define O_RDWR _O_RDWR
135 #define O_RDONLY _O_RDONLY
136 #define O_EXCL _O_EXCL
139 # define S_IFREG _S_IFREG
140 # define S_ISREG(mode) (((mode) & S_IFREG) == S_IFREG)
144 # define S_IFDIR _S_IFDIR
145 # define S_ISDIR(mode) (((mode) & S_IFDIR) == S_IFDIR)
148 #endif /* WINDOWS_CONFIG_HACKERY */