Git init
[external/curl.git] / lib / config-win32.h
1 #ifndef __LIB_CONFIG_WIN32_H
2 #define __LIB_CONFIG_WIN32_H
3
4 /* ================================================================ */
5 /*    lib/config-win32.h - Hand crafted config file for Windows     */
6 /* ================================================================ */
7
8 /* ---------------------------------------------------------------- */
9 /*                          HEADER FILES                            */
10 /* ---------------------------------------------------------------- */
11
12 /* Define if you have the <arpa/inet.h> header file.  */
13 /* #define HAVE_ARPA_INET_H 1 */
14
15 /* Define if you have the <assert.h> header file.  */
16 #define HAVE_ASSERT_H 1
17
18 /* Define if you have the <crypto.h> header file.  */
19 /* #define HAVE_CRYPTO_H 1 */
20
21 /* Define if you have the <err.h> header file.  */
22 /* #define HAVE_ERR_H 1 */
23
24 /* Define if you have the <fcntl.h> header file.  */
25 #define HAVE_FCNTL_H 1
26
27 /* Define if you have the <getopt.h> header file.  */
28 /* #define HAVE_GETOPT_H 1 */
29
30 /* Define if you have the <io.h> header file.  */
31 #define HAVE_IO_H 1
32
33 /* Define if you have the <limits.h> header file.  */
34 #define HAVE_LIMITS_H 1
35
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
39 #endif
40
41 /* Define if you have the <netdb.h> header file.  */
42 /* #define HAVE_NETDB_H 1 */
43
44 /* Define if you have the <netinet/in.h> header file.  */
45 /* #define HAVE_NETINET_IN_H 1 */
46
47 /* Define if you have the <process.h> header file.  */
48 #ifndef __SALFORDC__
49 #define HAVE_PROCESS_H 1
50 #endif
51
52 /* Define if you have the <signal.h> header file. */
53 #define HAVE_SIGNAL_H 1
54
55 /* Define if you have the <sgtty.h> header file.  */
56 /* #define HAVE_SGTTY_H 1 */
57
58 /* Define if you have the <ssl.h> header file.  */
59 /* #define HAVE_SSL_H 1 */
60
61 /* Define if you have the <stdlib.h> header file.  */
62 #define HAVE_STDLIB_H 1
63
64 /* Define if you have the <sys/param.h> header file.  */
65 /* #define HAVE_SYS_PARAM_H 1 */
66
67 /* Define if you have the <sys/select.h> header file.  */
68 /* #define HAVE_SYS_SELECT_H 1 */
69
70 /* Define if you have the <sys/socket.h> header file.  */
71 /* #define HAVE_SYS_SOCKET_H 1 */
72
73 /* Define if you have the <sys/sockio.h> header file.  */
74 /* #define HAVE_SYS_SOCKIO_H 1 */
75
76 /* Define if you have the <sys/stat.h> header file.  */
77 #define HAVE_SYS_STAT_H 1
78
79 /* Define if you have the <sys/time.h> header file */
80 /* #define HAVE_SYS_TIME_H 1 */
81
82 /* Define if you have the <sys/types.h> header file.  */
83 #define HAVE_SYS_TYPES_H 1
84
85 /* Define if you have the <sys/utime.h> header file.  */
86 #ifndef __BORLANDC__
87 #define HAVE_SYS_UTIME_H 1
88 #endif
89
90 /* Define if you have the <termio.h> header file.  */
91 /* #define HAVE_TERMIO_H 1 */
92
93 /* Define if you have the <termios.h> header file.  */
94 /* #define HAVE_TERMIOS_H 1 */
95
96 /* Define if you have the <time.h> header file.  */
97 #define HAVE_TIME_H 1
98
99 /* Define if you have the <unistd.h> header file.  */
100 #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
101     defined(__POCC__)
102 #define HAVE_UNISTD_H 1
103 #endif
104
105 /* Define if you have the <windows.h> header file.  */
106 #define HAVE_WINDOWS_H 1
107
108 /* Define if you have the <winsock.h> header file.  */
109 #define HAVE_WINSOCK_H 1
110
111 /* Define if you have the <winsock2.h> header file.  */
112 #ifndef __SALFORDC__
113 #define HAVE_WINSOCK2_H 1
114 #endif
115
116 /* Define if you have the <ws2tcpip.h> header file.  */
117 #ifndef __SALFORDC__
118 #define HAVE_WS2TCPIP_H 1
119 #endif
120
121 /* ---------------------------------------------------------------- */
122 /*                        OTHER HEADER INFO                         */
123 /* ---------------------------------------------------------------- */
124
125 /* Define if sig_atomic_t is an available typedef. */
126 #define HAVE_SIG_ATOMIC_T 1
127
128 /* Define if you have the ANSI C header files.  */
129 #define STDC_HEADERS 1
130
131 /* Define if you can safely include both <sys/time.h> and <time.h>.  */
132 /* #define TIME_WITH_SYS_TIME 1 */
133
134 /* ---------------------------------------------------------------- */
135 /*                             FUNCTIONS                            */
136 /* ---------------------------------------------------------------- */
137
138 /* Define if you have the closesocket function.  */
139 #define HAVE_CLOSESOCKET 1
140
141 /* Define if you don't have vprintf but do have _doprnt.  */
142 /* #define HAVE_DOPRNT 1 */
143
144 /* Define if you have the gethostbyaddr function.  */
145 #define HAVE_GETHOSTBYADDR 1
146
147 /* Define if you have the gethostname function.  */
148 #define HAVE_GETHOSTNAME 1
149
150 /* Define if you have the getpass function.  */
151 /* #define HAVE_GETPASS 1 */
152
153 /* Define if you have the getservbyname function.  */
154 #define HAVE_GETSERVBYNAME 1
155
156 /* Define if you have the getprotobyname function.  */
157 #define HAVE_GETPROTOBYNAME
158
159 /* Define if you have the gettimeofday function.  */
160 /* #define HAVE_GETTIMEOFDAY 1 */
161
162 /* Define if you have the inet_addr function.  */
163 #define HAVE_INET_ADDR 1
164
165 /* Define if you have the ioctlsocket function. */
166 #define HAVE_IOCTLSOCKET 1
167
168 /* Define if you have a working ioctlsocket FIONBIO function. */
169 #define HAVE_IOCTLSOCKET_FIONBIO 1
170
171 /* Define if you have the perror function.  */
172 #define HAVE_PERROR 1
173
174 /* Define if you have the RAND_screen function when using SSL  */
175 #define HAVE_RAND_SCREEN 1
176
177 /* Define if you have the `RAND_status' function when using SSL. */
178 #define HAVE_RAND_STATUS 1
179
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
183
184 /* Define if you have the select function.  */
185 #define HAVE_SELECT 1
186
187 /* Define if you have the setvbuf function.  */
188 #define HAVE_SETVBUF 1
189
190 /* Define if you have the socket function.  */
191 #define HAVE_SOCKET 1
192
193 /* Define if you have the strcasecmp function.  */
194 /* #define HAVE_STRCASECMP 1 */
195
196 /* Define if you have the strdup function.  */
197 #define HAVE_STRDUP 1
198
199 /* Define if you have the strftime function.  */
200 #define HAVE_STRFTIME 1
201
202 /* Define if you have the stricmp function. */
203 #define HAVE_STRICMP 1
204
205 /* Define if you have the strncasecmp function. */
206 /* #define HAVE_STRNCASECMP 1 */
207
208 /* Define if you have the strnicmp function. */
209 #define HAVE_STRNICMP 1
210
211 /* Define if you have the strstr function.  */
212 #define HAVE_STRSTR 1
213
214 /* Define if you have the strtoll function.  */
215 #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__POCC__)
216 #define HAVE_STRTOLL 1
217 #endif
218
219 /* Define if you have the tcgetattr function.  */
220 /* #define HAVE_TCGETATTR 1 */
221
222 /* Define if you have the tcsetattr function.  */
223 /* #define HAVE_TCSETATTR 1 */
224
225 /* Define if you have the utime function */
226 #ifndef __BORLANDC__
227 #define HAVE_UTIME 1
228 #endif
229
230 /* Define to the type qualifier of arg 1 for getnameinfo. */
231 #define GETNAMEINFO_QUAL_ARG1 const
232
233 /* Define to the type of arg 1 for getnameinfo. */
234 #define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
235
236 /* Define to the type of arg 2 for getnameinfo. */
237 #define GETNAMEINFO_TYPE_ARG2 socklen_t
238
239 /* Define to the type of args 4 and 6 for getnameinfo. */
240 #define GETNAMEINFO_TYPE_ARG46 DWORD
241
242 /* Define to the type of arg 7 for getnameinfo. */
243 #define GETNAMEINFO_TYPE_ARG7 int
244
245 /* Define if you have the recv function. */
246 #define HAVE_RECV 1
247
248 /* Define to the type of arg 1 for recv. */
249 #define RECV_TYPE_ARG1 SOCKET
250
251 /* Define to the type of arg 2 for recv. */
252 #define RECV_TYPE_ARG2 char *
253
254 /* Define to the type of arg 3 for recv. */
255 #define RECV_TYPE_ARG3 int
256
257 /* Define to the type of arg 4 for recv. */
258 #define RECV_TYPE_ARG4 int
259
260 /* Define to the function return type for recv. */
261 #define RECV_TYPE_RETV int
262
263 /* Define if you have the recvfrom function. */
264 #define HAVE_RECVFROM 1
265
266 /* Define to the type of arg 1 for recvfrom. */
267 #define RECVFROM_TYPE_ARG1 SOCKET
268
269 /* Define to the type pointed by arg 2 for recvfrom. */
270 #define RECVFROM_TYPE_ARG2 char
271
272 /* Define to the type of arg 3 for recvfrom. */
273 #define RECVFROM_TYPE_ARG3 int
274
275 /* Define to the type of arg 4 for recvfrom. */
276 #define RECVFROM_TYPE_ARG4 int
277
278 /* Define to the type pointed by arg 5 for recvfrom. */
279 #define RECVFROM_TYPE_ARG5 struct sockaddr
280
281 /* Define to the type pointed by arg 6 for recvfrom. */
282 #define RECVFROM_TYPE_ARG6 int
283
284 /* Define to the function return type for recvfrom. */
285 #define RECVFROM_TYPE_RETV int
286
287 /* Define if you have the send function. */
288 #define HAVE_SEND 1
289
290 /* Define to the type of arg 1 for send. */
291 #define SEND_TYPE_ARG1 SOCKET
292
293 /* Define to the type qualifier of arg 2 for send. */
294 #define SEND_QUAL_ARG2 const
295
296 /* Define to the type of arg 2 for send. */
297 #define SEND_TYPE_ARG2 char *
298
299 /* Define to the type of arg 3 for send. */
300 #define SEND_TYPE_ARG3 int
301
302 /* Define to the type of arg 4 for send. */
303 #define SEND_TYPE_ARG4 int
304
305 /* Define to the function return type for send. */
306 #define SEND_TYPE_RETV int
307
308 /* ---------------------------------------------------------------- */
309 /*                       TYPEDEF REPLACEMENTS                       */
310 /* ---------------------------------------------------------------- */
311
312 /* Define this if in_addr_t is not an available 'typedefed' type */
313 #define in_addr_t unsigned long
314
315 /* Define as the return type of signal handlers (int or void).  */
316 #define RETSIGTYPE void
317
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__) || \
322       defined(__MINGW32__)
323 #  elif defined(_WIN64)
324 #    define _SSIZE_T_DEFINED
325 #    define ssize_t __int64
326 #  else
327 #    define _SSIZE_T_DEFINED
328 #    define ssize_t int
329 #  endif
330 #endif
331
332 /* ---------------------------------------------------------------- */
333 /*                            TYPE SIZES                            */
334 /* ---------------------------------------------------------------- */
335
336 /* The size of `int', as computed by sizeof. */
337 #define SIZEOF_INT 4
338
339 /* The size of `long double', as computed by sizeof. */
340 #define SIZEOF_LONG_DOUBLE 16
341
342 /* The size of `long long', as computed by sizeof. */
343 /* #define SIZEOF_LONG_LONG 8 */
344
345 /* The size of `short', as computed by sizeof. */
346 #define SIZEOF_SHORT 2
347
348 /* The size of `size_t', as computed by sizeof. */
349 #if defined(_WIN64)
350 #  define SIZEOF_SIZE_T 8
351 #else
352 #  define SIZEOF_SIZE_T 4
353 #endif
354
355 /* ---------------------------------------------------------------- */
356 /*                          STRUCT RELATED                          */
357 /* ---------------------------------------------------------------- */
358
359 /* Define this if you have struct sockaddr_storage */
360 #ifndef __SALFORDC__
361 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
362 #endif
363
364 /* Define this if you have struct timeval */
365 #define HAVE_STRUCT_TIMEVAL 1
366
367 /* ---------------------------------------------------------------- */
368 /*                        Watt-32 tcp/ip SPECIFIC                   */
369 /* ---------------------------------------------------------------- */
370
371 #ifdef USE_WATT32
372   #include <tcp.h>
373   #undef byte
374   #undef word
375   #undef USE_WINSOCK
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
384   #define HAVE_NETDB_H
385   #define HAVE_ARPA_INET_H
386   #define HAVE_FREEADDRINFO
387   #define SOCKET int
388 #endif
389
390
391 /* ---------------------------------------------------------------- */
392 /*                        COMPILER SPECIFIC                         */
393 /* ---------------------------------------------------------------- */
394
395 /* Undef keyword 'const' if it does not work.  */
396 /* #undef const */
397
398 /* Windows should not have HAVE_GMTIME_R defined */
399 /* #undef HAVE_GMTIME_R */
400
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
404 #endif
405
406 /* Define if the compiler supports the 'long long' data type. */
407 #if defined(__MINGW32__) || defined(__WATCOMC__)
408 #define HAVE_LONGLONG 1
409 #endif
410
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
415 #endif
416
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
422 #  else
423 #    define SIZEOF_TIME_T 4
424 #  endif
425 #endif
426
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
434 #endif
435
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
442 #endif
443
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
448 #  endif
449 #  ifndef WINVER
450 #    define WINVER VS2008_DEFAULT_TARGET
451 #  endif
452 #  if (_WIN32_WINNT < VS2008_MINIMUM_TARGET) || (WINVER < VS2008_MINIMUM_TARGET)
453 #    error VS2008 does not support Windows build targets prior to Windows 2000
454 #  endif
455 #endif
456
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
462 #  endif
463 #  ifndef WINVER
464 #    define WINVER 0x0500
465 #  endif
466 #endif
467
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
486 #  endif
487 #endif
488
489 #if defined(__POCC__)
490 #  ifndef _MSC_VER
491 #    error Microsoft extensions /Ze compiler option is required
492 #  endif
493 #  ifndef __POCC__OLDNAMES
494 #    error Compatibility names /Go compiler option is required
495 #  endif
496 #endif
497
498 /* ---------------------------------------------------------------- */
499 /*                        LARGE FILE SUPPORT                        */
500 /* ---------------------------------------------------------------- */
501
502 #if defined(_MSC_VER) && !defined(_WIN32_WCE)
503 #  if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
504 #    define USE_WIN32_LARGE_FILES
505 #  else
506 #    define USE_WIN32_SMALL_FILES
507 #  endif
508 #endif
509
510 #if defined(__MINGW32__) && !defined(USE_WIN32_LARGE_FILES)
511 #  define USE_WIN32_LARGE_FILES
512 #endif
513
514 #if defined(__WATCOMC__) && !defined(USE_WIN32_LARGE_FILES)
515 #  define USE_WIN32_LARGE_FILES
516 #endif
517
518 #if defined(__POCC__)
519 #  undef USE_WIN32_LARGE_FILES
520 #endif
521
522 #if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES)
523 #  define USE_WIN32_SMALL_FILES
524 #endif
525
526 /* ---------------------------------------------------------------- */
527 /*                       DNS RESOLVER SPECIALTY                     */
528 /* ---------------------------------------------------------------- */
529
530 /*
531  * Undefine both USE_ARES and USE_THREADS_WIN32 for synchronous DNS
532  */
533
534 /* Define USE_ARES to enable c-ares asynchronous DNS lookups */
535 /* #define USE_ARES 1 */
536
537 /* Define USE_THREADS_WIN32 to enable threaded asynchronous DNS lookups */
538 #define USE_THREADS_WIN32 1
539
540 #if defined(USE_ARES) && defined(USE_THREADS_WIN32)
541 #  error "Only one DNS lookup specialty may be defined at most"
542 #endif
543
544 /* ---------------------------------------------------------------- */
545 /*                           LDAP SUPPORT                           */
546 /* ---------------------------------------------------------------- */
547
548 #if defined(CURL_HAS_NOVELL_LDAPSDK) || defined(CURL_HAS_MOZILLA_LDAPSDK)
549 #undef CURL_LDAP_WIN
550 #define HAVE_LDAP_SSL_H 1
551 #define HAVE_LDAP_URL_PARSE 1
552 #elif defined(CURL_HAS_OPENLDAP_LDAPSDK)
553 #undef CURL_LDAP_WIN
554 #define HAVE_LDAP_URL_PARSE 1
555 #else
556 #undef HAVE_LDAP_URL_PARSE
557 #define CURL_LDAP_WIN 1
558 #endif
559
560 #if defined(__WATCOMC__) && defined(CURL_LDAP_WIN)
561 #if __WATCOMC__ < 1280
562 #define WINBERAPI  __declspec(cdecl)
563 #define WINLDAPAPI __declspec(cdecl)
564 #endif
565 #endif
566
567 #if defined(__POCC__) && defined(CURL_LDAP_WIN)
568 #  define CURL_DISABLE_LDAP 1
569 #endif
570
571 /* ---------------------------------------------------------------- */
572 /*                       ADDITIONAL DEFINITIONS                     */
573 /* ---------------------------------------------------------------- */
574
575 /* Define cpu-machine-OS */
576 #undef 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"
583 #else
584 #define OS "unknown-pc-win32"
585 #endif
586
587 /* Name of package */
588 #define PACKAGE "curl"
589
590 #if defined(__POCC__) || (USE_IPV6)
591 #  define ENABLE_IPV6 1
592 #endif
593
594 #endif /* __LIB_CONFIG_WIN32_H */