1 #ifndef __SRC_CONFIG_WIN32_H
2 #define __SRC_CONFIG_WIN32_H
4 /* ================================================================ */
5 /* src/config-win32.h - Hand crafted config file for windows */
6 /* ================================================================ */
8 /* ---------------------------------------------------------------- */
10 /* ---------------------------------------------------------------- */
12 /* Define if you have the <fcntl.h> header file. */
13 #define HAVE_FCNTL_H 1
15 /* Define if you have the <io.h> header file. */
18 /* Define if you have the <limits.h> header file. */
19 #define HAVE_LIMITS_H 1
21 /* Define if you have the <locale.h> header file. */
22 #define HAVE_LOCALE_H 1
24 /* Define if you need the malloc.h header file even with stdlib.h */
25 #if !defined(__SALFORDC__) && !defined(__POCC__)
26 #define NEED_MALLOC_H 1
29 /* Define if you have the <signal.h> header file. */
30 #define HAVE_SIGNAL_H 1
32 /* Define if you have the <stdlib.h> header file. */
33 #define HAVE_STDLIB_H 1
35 /* Define if you have the <sys/time.h> header file */
36 /* #define HAVE_SYS_TIME_H 1 */
38 /* Define if you have the <sys/types.h> header file. */
39 #define HAVE_SYS_TYPES_H 1
41 /* Define if you have the <sys/utime.h> header file. */
43 #define HAVE_SYS_UTIME_H 1
46 /* Define if you have the <time.h> header file. */
49 /* Define if you have the <unistd.h> header file. */
50 #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
52 #define HAVE_UNISTD_H 1
55 /* Define if you have the <windows.h> header file. */
56 #define HAVE_WINDOWS_H 1
58 /* Define if you have the <winsock.h> header file. */
59 #define HAVE_WINSOCK_H 1
61 /* Define if you have the <winsock2.h> header file. */
63 #define HAVE_WINSOCK2_H 1
66 /* Define if you have the <ws2tcpip.h> header file. */
68 #define HAVE_WS2TCPIP_H 1
71 /* ---------------------------------------------------------------- */
72 /* OTHER HEADER INFO */
73 /* ---------------------------------------------------------------- */
75 /* Define if sig_atomic_t is an available typedef. */
76 #define HAVE_SIG_ATOMIC_T 1
78 /* Define if you have the ANSI C header files. */
79 #define STDC_HEADERS 1
81 /* Define if you can safely include both <sys/time.h> and <time.h>. */
82 /* #define TIME_WITH_SYS_TIME 1 */
84 /* ---------------------------------------------------------------- */
86 /* ---------------------------------------------------------------- */
88 /* Define if you have the ftruncate function. */
89 #define HAVE_FTRUNCATE 1
91 /* Define if you have the ioctlsocket function. */
92 #define HAVE_IOCTLSOCKET 1
94 /* Define if you have a working ioctlsocket FIONBIO function. */
95 #define HAVE_IOCTLSOCKET_FIONBIO 1
97 /* Define if you have the setlocale function. */
98 #define HAVE_SETLOCALE 1
100 /* Define if you have the setmode function. */
101 #define HAVE_SETMODE 1
103 /* Define if you have the strcasecmp function. */
104 /* #define HAVE_STRCASECMP 1 */
106 /* Define if you have the strdup function. */
107 #define HAVE_STRDUP 1
109 /* Define if you have the stricmp function. */
110 #define HAVE_STRICMP 1
112 /* Define if you have the strncasecmp function. */
113 /* #define HAVE_STRNCASECMP 1 */
115 /* Define if you have the strnicmp function. */
116 #define HAVE_STRNICMP 1
118 /* Define if you have the utime function */
123 /* Define if you have the recv function. */
126 /* Define to the type of arg 1 for recv. */
127 #define RECV_TYPE_ARG1 SOCKET
129 /* Define to the type of arg 2 for recv. */
130 #define RECV_TYPE_ARG2 char *
132 /* Define to the type of arg 3 for recv. */
133 #define RECV_TYPE_ARG3 int
135 /* Define to the type of arg 4 for recv. */
136 #define RECV_TYPE_ARG4 int
138 /* Define to the function return type for recv. */
139 #define RECV_TYPE_RETV int
141 /* Define if you have the recvfrom function. */
142 #define HAVE_RECVFROM 1
144 /* Define to the type of arg 1 for recvfrom. */
145 #define RECVFROM_TYPE_ARG1 SOCKET
147 /* Define to the type pointed by arg 2 for recvfrom. */
148 #define RECVFROM_TYPE_ARG2 char
150 /* Define to the type of arg 3 for recvfrom. */
151 #define RECVFROM_TYPE_ARG3 int
153 /* Define to the type of arg 4 for recvfrom. */
154 #define RECVFROM_TYPE_ARG4 int
156 /* Define to the type pointed by arg 5 for recvfrom. */
157 #define RECVFROM_TYPE_ARG5 struct sockaddr
159 /* Define to the type pointed by arg 6 for recvfrom. */
160 #define RECVFROM_TYPE_ARG6 int
162 /* Define to the function return type for recvfrom. */
163 #define RECVFROM_TYPE_RETV int
165 /* Define if you have the send function. */
168 /* Define to the type of arg 1 for send. */
169 #define SEND_TYPE_ARG1 SOCKET
171 /* Define to the type qualifier of arg 2 for send. */
172 #define SEND_QUAL_ARG2 const
174 /* Define to the type of arg 2 for send. */
175 #define SEND_TYPE_ARG2 char *
177 /* Define to the type of arg 3 for send. */
178 #define SEND_TYPE_ARG3 int
180 /* Define to the type of arg 4 for send. */
181 #define SEND_TYPE_ARG4 int
183 /* Define to the function return type for send. */
184 #define SEND_TYPE_RETV int
186 /* ---------------------------------------------------------------- */
187 /* TYPEDEF REPLACEMENTS */
188 /* ---------------------------------------------------------------- */
190 /* Define this if in_addr_t is not an available 'typedefed' type */
191 #define in_addr_t unsigned long
193 /* Define as the return type of signal handlers (int or void). */
194 #define RETSIGTYPE void
196 /* Define ssize_t if it is not an available 'typedefed' type */
197 #ifndef _SSIZE_T_DEFINED
198 # if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
199 defined(__POCC__) || \
201 # elif defined(_WIN64)
202 # define _SSIZE_T_DEFINED
203 # define ssize_t __int64
205 # define _SSIZE_T_DEFINED
210 /* ---------------------------------------------------------------- */
212 /* ---------------------------------------------------------------- */
214 /* The size of `int', as computed by sizeof. */
217 /* The size of `long double', as computed by sizeof. */
218 #define SIZEOF_LONG_DOUBLE 16
220 /* The size of `long long', as computed by sizeof. */
221 /* #define SIZEOF_LONG_LONG 8 */
223 /* The size of `short', as computed by sizeof. */
224 #define SIZEOF_SHORT 2
226 /* ---------------------------------------------------------------- */
228 /* ---------------------------------------------------------------- */
230 /* Define this if you have struct sockaddr_storage */
232 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
235 /* Define this if you have struct timeval */
236 #define HAVE_STRUCT_TIMEVAL 1
238 /* Define this if struct sockaddr_in6 has the sin6_scope_id member */
239 #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
241 /* ---------------------------------------------------------------- */
242 /* Watt-32 tcp/ip SPECIFIC */
243 /* ---------------------------------------------------------------- */
250 #undef HAVE_WINSOCK_H
251 #undef HAVE_WINSOCK2_H
252 #undef HAVE_WS2TCPIP_H
253 #define HAVE_GETADDRINFO
254 #define HAVE_GETNAMEINFO
255 #define HAVE_SYS_IOCTL_H
256 #define HAVE_SYS_SOCKET_H
257 #define HAVE_NETINET_IN_H
259 #define HAVE_ARPA_INET_H
260 #define HAVE_FREEADDRINFO
265 /* ---------------------------------------------------------------- */
266 /* COMPILER SPECIFIC */
267 /* ---------------------------------------------------------------- */
269 /* Undef keyword 'const' if it does not work. */
272 /* Windows should not have HAVE_GMTIME_R defined */
273 /* #undef HAVE_GMTIME_R */
275 /* Define if the compiler supports C99 variadic macro style. */
276 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
277 #define HAVE_VARIADIC_MACROS_C99 1
280 /* Define if the compiler supports the 'long long' data type. */
281 #if defined(__MINGW32__) || defined(__WATCOMC__)
282 #define HAVE_LONGLONG 1
285 /* Define to avoid VS2005 complaining about portable C functions */
286 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
287 #define _CRT_SECURE_NO_DEPRECATE 1
288 #define _CRT_NONSTDC_NO_DEPRECATE 1
291 /* VS2005 and later dafault size for time_t is 64-bit, unless */
292 /* _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */
293 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
294 # ifndef _USE_32BIT_TIME_T
295 # define SIZEOF_TIME_T 8
297 # define SIZEOF_TIME_T 4
301 /* Officially, Microsoft's Windows SDK versions 6.X do not support Windows
302 2000 as a supported build target. VS2008 default installations provide an
303 embedded Windows SDK v6.0A along with the claim that Windows 2000 is a
304 valid build target for VS2008. Popular belief is that binaries built using
305 Windows SDK versions 6.X and Windows 2000 as a build target are functional */
306 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
307 # define VS2008_MINIMUM_TARGET 0x0500
310 /* When no build target is specified VS2008 default build target is Windows
311 Vista, which leaves out even Winsows XP. If no build target has been given
312 for VS2008 we will target the minimum Officially supported build target,
313 which happens to be Windows XP. */
314 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
315 # define VS2008_DEFAULT_TARGET 0x0501
318 /* VS2008 default target settings and minimum build target check */
319 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
320 # ifndef _WIN32_WINNT
321 # define _WIN32_WINNT VS2008_DEFAULT_TARGET
324 # define WINVER VS2008_DEFAULT_TARGET
326 # if (_WIN32_WINNT < VS2008_MINIMUM_TARGET) || (WINVER < VS2008_MINIMUM_TARGET)
327 # error VS2008 does not support Windows build targets prior to Windows 2000
331 /* When no build target is specified Pelles C 5.00 and later default build
332 target is Windows Vista. We override default target to be Windows 2000. */
333 #if defined(__POCC__) && (__POCC__ >= 500)
334 # ifndef _WIN32_WINNT
335 # define _WIN32_WINNT 0x0500
338 # define WINVER 0x0500
342 /* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
343 quite convoluted, compiler dependent and even build target dependent. */
344 #if defined(HAVE_WS2TCPIP_H)
345 # if defined(__POCC__)
346 # define HAVE_FREEADDRINFO 1
347 # define HAVE_GETADDRINFO 1
348 # define HAVE_GETADDRINFO_THREADSAFE 1
349 # define HAVE_GETNAMEINFO 1
350 # elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
351 # define HAVE_FREEADDRINFO 1
352 # define HAVE_GETADDRINFO 1
353 # define HAVE_GETADDRINFO_THREADSAFE 1
354 # define HAVE_GETNAMEINFO 1
355 # elif defined(_MSC_VER) && (_MSC_VER >= 1200)
356 # define HAVE_FREEADDRINFO 1
357 # define HAVE_GETADDRINFO 1
358 # define HAVE_GETADDRINFO_THREADSAFE 1
359 # define HAVE_GETNAMEINFO 1
363 #if defined(__POCC__)
365 # error Microsoft extensions /Ze compiler option is required
367 # ifndef __POCC__OLDNAMES
368 # error Compatibility names /Go compiler option is required
372 /* ---------------------------------------------------------------- */
373 /* LARGE FILE SUPPORT */
374 /* ---------------------------------------------------------------- */
376 #if defined(_MSC_VER) && !defined(_WIN32_WCE)
377 # if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
378 # define USE_WIN32_LARGE_FILES
380 # define USE_WIN32_SMALL_FILES
384 #if defined(__MINGW32__) && !defined(USE_WIN32_LARGE_FILES)
385 # define USE_WIN32_LARGE_FILES
388 #if defined(__WATCOMC__) && !defined(USE_WIN32_LARGE_FILES)
389 # define USE_WIN32_LARGE_FILES
392 #if defined(__POCC__)
393 # undef USE_WIN32_LARGE_FILES
396 #if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES)
397 # define USE_WIN32_SMALL_FILES
400 /* ---------------------------------------------------------------- */
401 /* ADDITIONAL DEFINITIONS */
402 /* ---------------------------------------------------------------- */
404 /* Define cpu-machine-OS */
406 #define OS "i386-pc-win32"
409 /* Define to 1 if you want the built-in manual */
412 #if defined(__POCC__)
413 # define ENABLE_IPV6 1
416 #endif /* __SRC_CONFIG_WIN32_H */