1 #ifndef __LIB_CONFIG_WIN32_H
2 #define __LIB_CONFIG_WIN32_H
4 /* ================================================================ */
5 /* lib/config-win32.h - Hand crafted config file for Windows */
6 /* ================================================================ */
8 /* ---------------------------------------------------------------- */
10 /* ---------------------------------------------------------------- */
12 /* Define if you have the <arpa/inet.h> header file. */
13 /* #define HAVE_ARPA_INET_H 1 */
15 /* Define if you have the <assert.h> header file. */
16 #define HAVE_ASSERT_H 1
18 /* Define if you have the <crypto.h> header file. */
19 /* #define HAVE_CRYPTO_H 1 */
21 /* Define if you have the <err.h> header file. */
22 /* #define HAVE_ERR_H 1 */
24 /* Define if you have the <fcntl.h> header file. */
25 #define HAVE_FCNTL_H 1
27 /* Define if you have the <getopt.h> header file. */
28 /* #define HAVE_GETOPT_H 1 */
30 /* Define if you have the <io.h> header file. */
33 /* Define if you have the <limits.h> header file. */
34 #define HAVE_LIMITS_H 1
36 /* Define if you need the malloc.h header file even with stdlib.h */
37 #if !defined(__SALFORDC__) && !defined(__POCC__)
38 #define NEED_MALLOC_H 1
41 /* Define if you have the <netdb.h> header file. */
42 /* #define HAVE_NETDB_H 1 */
44 /* Define if you have the <netinet/in.h> header file. */
45 /* #define HAVE_NETINET_IN_H 1 */
47 /* Define if you have the <process.h> header file. */
49 #define HAVE_PROCESS_H 1
52 /* Define if you have the <signal.h> header file. */
53 #define HAVE_SIGNAL_H 1
55 /* Define if you have the <sgtty.h> header file. */
56 /* #define HAVE_SGTTY_H 1 */
58 /* Define if you have the <ssl.h> header file. */
59 /* #define HAVE_SSL_H 1 */
61 /* Define if you have the <stdlib.h> header file. */
62 #define HAVE_STDLIB_H 1
64 /* Define if you have the <sys/param.h> header file. */
65 /* #define HAVE_SYS_PARAM_H 1 */
67 /* Define if you have the <sys/select.h> header file. */
68 /* #define HAVE_SYS_SELECT_H 1 */
70 /* Define if you have the <sys/socket.h> header file. */
71 /* #define HAVE_SYS_SOCKET_H 1 */
73 /* Define if you have the <sys/sockio.h> header file. */
74 /* #define HAVE_SYS_SOCKIO_H 1 */
76 /* Define if you have the <sys/stat.h> header file. */
77 #define HAVE_SYS_STAT_H 1
79 /* Define if you have the <sys/time.h> header file */
80 /* #define HAVE_SYS_TIME_H 1 */
82 /* Define if you have the <sys/types.h> header file. */
83 #define HAVE_SYS_TYPES_H 1
85 /* Define if you have the <sys/utime.h> header file. */
87 #define HAVE_SYS_UTIME_H 1
90 /* Define if you have the <termio.h> header file. */
91 /* #define HAVE_TERMIO_H 1 */
93 /* Define if you have the <termios.h> header file. */
94 /* #define HAVE_TERMIOS_H 1 */
96 /* Define if you have the <time.h> header file. */
99 /* Define if you have the <unistd.h> header file. */
100 #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
102 #define HAVE_UNISTD_H 1
105 /* Define if you have the <windows.h> header file. */
106 #define HAVE_WINDOWS_H 1
108 /* Define if you have the <winsock.h> header file. */
109 #define HAVE_WINSOCK_H 1
111 /* Define if you have the <winsock2.h> header file. */
113 #define HAVE_WINSOCK2_H 1
116 /* Define if you have the <ws2tcpip.h> header file. */
118 #define HAVE_WS2TCPIP_H 1
121 /* ---------------------------------------------------------------- */
122 /* OTHER HEADER INFO */
123 /* ---------------------------------------------------------------- */
125 /* Define if sig_atomic_t is an available typedef. */
126 #define HAVE_SIG_ATOMIC_T 1
128 /* Define if you have the ANSI C header files. */
129 #define STDC_HEADERS 1
131 /* Define if you can safely include both <sys/time.h> and <time.h>. */
132 /* #define TIME_WITH_SYS_TIME 1 */
134 /* ---------------------------------------------------------------- */
136 /* ---------------------------------------------------------------- */
138 /* Define if you have the closesocket function. */
139 #define HAVE_CLOSESOCKET 1
141 /* Define if you don't have vprintf but do have _doprnt. */
142 /* #define HAVE_DOPRNT 1 */
144 /* Define if you have the gethostbyaddr function. */
145 #define HAVE_GETHOSTBYADDR 1
147 /* Define if you have the gethostname function. */
148 #define HAVE_GETHOSTNAME 1
150 /* Define if you have the getpass function. */
151 /* #define HAVE_GETPASS 1 */
153 /* Define if you have the getservbyname function. */
154 #define HAVE_GETSERVBYNAME 1
156 /* Define if you have the getprotobyname function. */
157 #define HAVE_GETPROTOBYNAME
159 /* Define if you have the gettimeofday function. */
160 /* #define HAVE_GETTIMEOFDAY 1 */
162 /* Define if you have the inet_addr function. */
163 #define HAVE_INET_ADDR 1
165 /* Define if you have the ioctlsocket function. */
166 #define HAVE_IOCTLSOCKET 1
168 /* Define if you have a working ioctlsocket FIONBIO function. */
169 #define HAVE_IOCTLSOCKET_FIONBIO 1
171 /* Define if you have the perror function. */
172 #define HAVE_PERROR 1
174 /* Define if you have the RAND_screen function when using SSL */
175 #define HAVE_RAND_SCREEN 1
177 /* Define if you have the `RAND_status' function when using SSL. */
178 #define HAVE_RAND_STATUS 1
180 /* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function.
181 This is present in OpenSSL versions after 0.9.6b */
182 #define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
184 /* Define if you have the select function. */
185 #define HAVE_SELECT 1
187 /* Define if you have the setvbuf function. */
188 #define HAVE_SETVBUF 1
190 /* Define if you have the socket function. */
191 #define HAVE_SOCKET 1
193 /* Define if you have the strcasecmp function. */
194 /* #define HAVE_STRCASECMP 1 */
196 /* Define if you have the strdup function. */
197 #define HAVE_STRDUP 1
199 /* Define if you have the strftime function. */
200 #define HAVE_STRFTIME 1
202 /* Define if you have the stricmp function. */
203 #define HAVE_STRICMP 1
205 /* Define if you have the strncasecmp function. */
206 /* #define HAVE_STRNCASECMP 1 */
208 /* Define if you have the strnicmp function. */
209 #define HAVE_STRNICMP 1
211 /* Define if you have the strstr function. */
212 #define HAVE_STRSTR 1
214 /* Define if you have the strtoll function. */
215 #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__POCC__)
216 #define HAVE_STRTOLL 1
219 /* Define if you have the tcgetattr function. */
220 /* #define HAVE_TCGETATTR 1 */
222 /* Define if you have the tcsetattr function. */
223 /* #define HAVE_TCSETATTR 1 */
225 /* Define if you have the utime function */
230 /* Define to the type qualifier of arg 1 for getnameinfo. */
231 #define GETNAMEINFO_QUAL_ARG1 const
233 /* Define to the type of arg 1 for getnameinfo. */
234 #define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
236 /* Define to the type of arg 2 for getnameinfo. */
237 #define GETNAMEINFO_TYPE_ARG2 socklen_t
239 /* Define to the type of args 4 and 6 for getnameinfo. */
240 #define GETNAMEINFO_TYPE_ARG46 DWORD
242 /* Define to the type of arg 7 for getnameinfo. */
243 #define GETNAMEINFO_TYPE_ARG7 int
245 /* Define if you have the recv function. */
248 /* Define to the type of arg 1 for recv. */
249 #define RECV_TYPE_ARG1 SOCKET
251 /* Define to the type of arg 2 for recv. */
252 #define RECV_TYPE_ARG2 char *
254 /* Define to the type of arg 3 for recv. */
255 #define RECV_TYPE_ARG3 int
257 /* Define to the type of arg 4 for recv. */
258 #define RECV_TYPE_ARG4 int
260 /* Define to the function return type for recv. */
261 #define RECV_TYPE_RETV int
263 /* Define if you have the recvfrom function. */
264 #define HAVE_RECVFROM 1
266 /* Define to the type of arg 1 for recvfrom. */
267 #define RECVFROM_TYPE_ARG1 SOCKET
269 /* Define to the type pointed by arg 2 for recvfrom. */
270 #define RECVFROM_TYPE_ARG2 char
272 /* Define to the type of arg 3 for recvfrom. */
273 #define RECVFROM_TYPE_ARG3 int
275 /* Define to the type of arg 4 for recvfrom. */
276 #define RECVFROM_TYPE_ARG4 int
278 /* Define to the type pointed by arg 5 for recvfrom. */
279 #define RECVFROM_TYPE_ARG5 struct sockaddr
281 /* Define to the type pointed by arg 6 for recvfrom. */
282 #define RECVFROM_TYPE_ARG6 int
284 /* Define to the function return type for recvfrom. */
285 #define RECVFROM_TYPE_RETV int
287 /* Define if you have the send function. */
290 /* Define to the type of arg 1 for send. */
291 #define SEND_TYPE_ARG1 SOCKET
293 /* Define to the type qualifier of arg 2 for send. */
294 #define SEND_QUAL_ARG2 const
296 /* Define to the type of arg 2 for send. */
297 #define SEND_TYPE_ARG2 char *
299 /* Define to the type of arg 3 for send. */
300 #define SEND_TYPE_ARG3 int
302 /* Define to the type of arg 4 for send. */
303 #define SEND_TYPE_ARG4 int
305 /* Define to the function return type for send. */
306 #define SEND_TYPE_RETV int
308 /* ---------------------------------------------------------------- */
309 /* TYPEDEF REPLACEMENTS */
310 /* ---------------------------------------------------------------- */
312 /* Define this if in_addr_t is not an available 'typedefed' type */
313 #define in_addr_t unsigned long
315 /* Define as the return type of signal handlers (int or void). */
316 #define RETSIGTYPE void
318 /* Define ssize_t if it is not an available 'typedefed' type */
319 #ifndef _SSIZE_T_DEFINED
320 # if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
321 defined(__POCC__) || \
323 # elif defined(_WIN64)
324 # define _SSIZE_T_DEFINED
325 # define ssize_t __int64
327 # define _SSIZE_T_DEFINED
332 /* ---------------------------------------------------------------- */
334 /* ---------------------------------------------------------------- */
336 /* The size of `int', as computed by sizeof. */
339 /* The size of `long double', as computed by sizeof. */
340 #define SIZEOF_LONG_DOUBLE 16
342 /* The size of `long long', as computed by sizeof. */
343 /* #define SIZEOF_LONG_LONG 8 */
345 /* The size of `short', as computed by sizeof. */
346 #define SIZEOF_SHORT 2
348 /* The size of `size_t', as computed by sizeof. */
350 # define SIZEOF_SIZE_T 8
352 # define SIZEOF_SIZE_T 4
355 /* ---------------------------------------------------------------- */
357 /* ---------------------------------------------------------------- */
359 /* Define this if you have struct sockaddr_storage */
361 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
364 /* Define this if you have struct timeval */
365 #define HAVE_STRUCT_TIMEVAL 1
367 /* ---------------------------------------------------------------- */
368 /* Watt-32 tcp/ip SPECIFIC */
369 /* ---------------------------------------------------------------- */
376 #undef HAVE_WINSOCK_H
377 #undef HAVE_WINSOCK2_H
378 #undef HAVE_WS2TCPIP_H
379 #define HAVE_GETADDRINFO
380 #define HAVE_GETNAMEINFO
381 #define HAVE_SYS_IOCTL_H
382 #define HAVE_SYS_SOCKET_H
383 #define HAVE_NETINET_IN_H
385 #define HAVE_ARPA_INET_H
386 #define HAVE_FREEADDRINFO
391 /* ---------------------------------------------------------------- */
392 /* COMPILER SPECIFIC */
393 /* ---------------------------------------------------------------- */
395 /* Undef keyword 'const' if it does not work. */
398 /* Windows should not have HAVE_GMTIME_R defined */
399 /* #undef HAVE_GMTIME_R */
401 /* Define if the compiler supports C99 variadic macro style. */
402 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
403 #define HAVE_VARIADIC_MACROS_C99 1
406 /* Define if the compiler supports the 'long long' data type. */
407 #if defined(__MINGW32__) || defined(__WATCOMC__)
408 #define HAVE_LONGLONG 1
411 /* Define to avoid VS2005 complaining about portable C functions */
412 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
413 #define _CRT_SECURE_NO_DEPRECATE 1
414 #define _CRT_NONSTDC_NO_DEPRECATE 1
417 /* VS2005 and later dafault size for time_t is 64-bit, unless */
418 /* _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */
419 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
420 # ifndef _USE_32BIT_TIME_T
421 # define SIZEOF_TIME_T 8
423 # define SIZEOF_TIME_T 4
427 /* Officially, Microsoft's Windows SDK versions 6.X do not support Windows
428 2000 as a supported build target. VS2008 default installations provide an
429 embedded Windows SDK v6.0A along with the claim that Windows 2000 is a
430 valid build target for VS2008. Popular belief is that binaries built using
431 Windows SDK versions 6.X and Windows 2000 as a build target are functional */
432 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
433 # define VS2008_MINIMUM_TARGET 0x0500
436 /* When no build target is specified VS2008 default build target is Windows
437 Vista, which leaves out even Winsows XP. If no build target has been given
438 for VS2008 we will target the minimum Officially supported build target,
439 which happens to be Windows XP. */
440 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
441 # define VS2008_DEFAULT_TARGET 0x0501
444 /* VS2008 default target settings and minimum build target check */
445 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
446 # ifndef _WIN32_WINNT
447 # define _WIN32_WINNT VS2008_DEFAULT_TARGET
450 # define WINVER VS2008_DEFAULT_TARGET
452 # if (_WIN32_WINNT < VS2008_MINIMUM_TARGET) || (WINVER < VS2008_MINIMUM_TARGET)
453 # error VS2008 does not support Windows build targets prior to Windows 2000
457 /* When no build target is specified Pelles C 5.00 and later default build
458 target is Windows Vista. We override default target to be Windows 2000. */
459 #if defined(__POCC__) && (__POCC__ >= 500)
460 # ifndef _WIN32_WINNT
461 # define _WIN32_WINNT 0x0500
464 # define WINVER 0x0500
468 /* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
469 quite convoluted, compiler dependent and even build target dependent. */
470 #if defined(HAVE_WS2TCPIP_H)
471 # if defined(__POCC__)
472 # define HAVE_FREEADDRINFO 1
473 # define HAVE_GETADDRINFO 1
474 # define HAVE_GETADDRINFO_THREADSAFE 1
475 # define HAVE_GETNAMEINFO 1
476 # elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
477 # define HAVE_FREEADDRINFO 1
478 # define HAVE_GETADDRINFO 1
479 # define HAVE_GETADDRINFO_THREADSAFE 1
480 # define HAVE_GETNAMEINFO 1
481 # elif defined(_MSC_VER) && (_MSC_VER >= 1200)
482 # define HAVE_FREEADDRINFO 1
483 # define HAVE_GETADDRINFO 1
484 # define HAVE_GETADDRINFO_THREADSAFE 1
485 # define HAVE_GETNAMEINFO 1
489 #if defined(__POCC__)
491 # error Microsoft extensions /Ze compiler option is required
493 # ifndef __POCC__OLDNAMES
494 # error Compatibility names /Go compiler option is required
498 /* ---------------------------------------------------------------- */
499 /* LARGE FILE SUPPORT */
500 /* ---------------------------------------------------------------- */
502 #if defined(_MSC_VER) && !defined(_WIN32_WCE)
503 # if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
504 # define USE_WIN32_LARGE_FILES
506 # define USE_WIN32_SMALL_FILES
510 #if defined(__MINGW32__) && !defined(USE_WIN32_LARGE_FILES)
511 # define USE_WIN32_LARGE_FILES
514 #if defined(__WATCOMC__) && !defined(USE_WIN32_LARGE_FILES)
515 # define USE_WIN32_LARGE_FILES
518 #if defined(__POCC__)
519 # undef USE_WIN32_LARGE_FILES
522 #if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES)
523 # define USE_WIN32_SMALL_FILES
526 /* ---------------------------------------------------------------- */
527 /* DNS RESOLVER SPECIALTY */
528 /* ---------------------------------------------------------------- */
531 * Undefine both USE_ARES and USE_THREADS_WIN32 for synchronous DNS
534 /* Define USE_ARES to enable c-ares asynchronous DNS lookups */
535 /* #define USE_ARES 1 */
537 /* Define USE_THREADS_WIN32 to enable threaded asynchronous DNS lookups */
538 #define USE_THREADS_WIN32 1
540 #if defined(USE_ARES) && defined(USE_THREADS_WIN32)
541 # error "Only one DNS lookup specialty may be defined at most"
544 /* ---------------------------------------------------------------- */
546 /* ---------------------------------------------------------------- */
548 #if defined(CURL_HAS_NOVELL_LDAPSDK) || defined(CURL_HAS_MOZILLA_LDAPSDK)
550 #define HAVE_LDAP_SSL_H 1
551 #define HAVE_LDAP_URL_PARSE 1
552 #elif defined(CURL_HAS_OPENLDAP_LDAPSDK)
554 #define HAVE_LDAP_URL_PARSE 1
556 #undef HAVE_LDAP_URL_PARSE
557 #define CURL_LDAP_WIN 1
560 #if defined(__WATCOMC__) && defined(CURL_LDAP_WIN)
561 #if __WATCOMC__ < 1280
562 #define WINBERAPI __declspec(cdecl)
563 #define WINLDAPAPI __declspec(cdecl)
567 #if defined(__POCC__) && defined(CURL_LDAP_WIN)
568 # define CURL_DISABLE_LDAP 1
571 /* ---------------------------------------------------------------- */
572 /* ADDITIONAL DEFINITIONS */
573 /* ---------------------------------------------------------------- */
575 /* Define cpu-machine-OS */
577 #if defined(_M_IX86) || defined(__i386__) /* x86 (MSVC or gcc) */
578 #define OS "i386-pc-win32"
579 #elif defined(_M_IA64) /* Itanium */
580 #define OS "ia64-pc-win32"
581 #elif defined(_M_X64) /* AMD64/EM64T - Not defined until MSVC 2005 */
582 #define OS "amd64-pc-win32"
584 #define OS "unknown-pc-win32"
587 /* Name of package */
588 #define PACKAGE "curl"
590 #if defined(__POCC__) || (USE_IPV6)
591 # define ENABLE_IPV6 1
594 #endif /* __LIB_CONFIG_WIN32_H */