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