Moved S_ISREG define to setup as suggested by Dan.
[platform/upstream/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 /* ---------------------------------------------------------------- */
349 /*                          STRUCT RELATED                          */
350 /* ---------------------------------------------------------------- */
351
352 /* Define this if you have struct sockaddr_storage */
353 #ifndef __SALFORDC__
354 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
355 #endif
356
357 /* Define this if you have struct timeval */
358 #define HAVE_STRUCT_TIMEVAL 1
359
360 /* ---------------------------------------------------------------- */
361 /*                        Watt-32 tcp/ip SPECIFIC                   */
362 /* ---------------------------------------------------------------- */
363
364 #ifdef USE_WATT32
365   #include <tcp.h>
366   #undef byte
367   #undef word
368   #undef USE_WINSOCK
369   #undef HAVE_WINSOCK_H
370   #undef HAVE_WINSOCK2_H
371   #undef HAVE_WS2TCPIP_H
372   #define HAVE_GETADDRINFO
373   #define HAVE_GETNAMEINFO
374   #define HAVE_SYS_IOCTL_H
375   #define HAVE_SYS_SOCKET_H
376   #define HAVE_NETINET_IN_H
377   #define HAVE_NETDB_H
378   #define HAVE_ARPA_INET_H
379   #define HAVE_FREEADDRINFO
380   #define SOCKET int
381 #endif
382
383
384 /* ---------------------------------------------------------------- */
385 /*                        COMPILER SPECIFIC                         */
386 /* ---------------------------------------------------------------- */
387
388 /* Undef keyword 'const' if it does not work.  */
389 /* #undef const */
390
391 /* Windows should not have HAVE_GMTIME_R defined */
392 /* #undef HAVE_GMTIME_R */
393
394 /* Define if the compiler supports C99 variadic macro style. */
395 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
396 #define HAVE_VARIADIC_MACROS_C99 1
397 #endif
398
399 /* Define if the compiler supports the 'long long' data type. */
400 #if defined(__MINGW32__) || defined(__WATCOMC__)
401 #define HAVE_LONGLONG 1
402 #endif
403
404 /* Define to avoid VS2005 complaining about portable C functions */
405 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
406 #define _CRT_SECURE_NO_DEPRECATE 1
407 #define _CRT_NONSTDC_NO_DEPRECATE 1
408 #endif
409
410 /* VS2005 and later dafault size for time_t is 64-bit, unless */
411 /* _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */
412 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
413 #  ifndef _USE_32BIT_TIME_T
414 #    define SIZEOF_TIME_T 8
415 #  else
416 #    define SIZEOF_TIME_T 4
417 #  endif
418 #endif
419
420 /* Officially, Microsoft's Windows SDK versions 6.X do not support Windows
421    2000 as a supported build target. VS2008 default installations provide an
422    embedded Windows SDK v6.0A along with the claim that Windows 2000 is a
423    valid build target for VS2008. Popular belief is that binaries built using
424    Windows SDK versions 6.X and Windows 2000 as a build target are functional */
425 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
426 #  define VS2008_MINIMUM_TARGET 0x0500
427 #endif
428
429 /* When no build target is specified VS2008 default build target is Windows
430    Vista, which leaves out even Winsows XP. If no build target has been given
431    for VS2008 we will target the minimum Officially supported build target,
432    which happens to be Windows XP. */
433 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
434 #  define VS2008_DEFAULT_TARGET  0x0501
435 #endif
436
437 /* VS2008 default target settings and minimum build target check */
438 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
439 #  ifndef _WIN32_WINNT
440 #    define _WIN32_WINNT VS2008_DEFAULT_TARGET
441 #  endif
442 #  ifndef WINVER
443 #    define WINVER VS2008_DEFAULT_TARGET
444 #  endif
445 #  if (_WIN32_WINNT < VS2008_MINIMUM_TARGET) || (WINVER < VS2008_MINIMUM_TARGET)
446 #    error VS2008 does not support Windows build targets prior to Windows 2000
447 #  endif
448 #endif
449
450 /* When no build target is specified Pelles C 5.00 and later default build
451    target is Windows Vista. We override default target to be Windows 2000. */
452 #if defined(__POCC__) && (__POCC__ >= 500)
453 #  ifndef _WIN32_WINNT
454 #    define _WIN32_WINNT 0x0500
455 #  endif
456 #  ifndef WINVER
457 #    define WINVER 0x0500
458 #  endif
459 #endif
460
461 /* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
462    quite convoluted, compiler dependent and even build target dependent. */
463 #if defined(HAVE_WS2TCPIP_H)
464 #  if defined(__POCC__)
465 #    define HAVE_FREEADDRINFO           1
466 #    define HAVE_GETADDRINFO            1
467 #    define HAVE_GETADDRINFO_THREADSAFE 1
468 #    define HAVE_GETNAMEINFO            1
469 #  elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
470 #    define HAVE_FREEADDRINFO           1
471 #    define HAVE_GETADDRINFO            1
472 #    define HAVE_GETADDRINFO_THREADSAFE 1
473 #    define HAVE_GETNAMEINFO            1
474 #  elif defined(_MSC_VER) && (_MSC_VER >= 1200)
475 #    define HAVE_FREEADDRINFO           1
476 #    define HAVE_GETADDRINFO            1
477 #    define HAVE_GETADDRINFO_THREADSAFE 1
478 #    define HAVE_GETNAMEINFO            1
479 #  endif
480 #endif
481
482 #if defined(__POCC__)
483 #  ifndef _MSC_VER
484 #    error Microsoft extensions /Ze compiler option is required
485 #  endif
486 #  ifndef __POCC__OLDNAMES
487 #    error Compatibility names /Go compiler option is required
488 #  endif
489 #endif
490
491 /* ---------------------------------------------------------------- */
492 /*                        LARGE FILE SUPPORT                        */
493 /* ---------------------------------------------------------------- */
494
495 #if defined(_MSC_VER) && !defined(_WIN32_WCE)
496 #  if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
497 #    define USE_WIN32_LARGE_FILES
498 #  else
499 #    define USE_WIN32_SMALL_FILES
500 #  endif
501 #endif
502
503 #if defined(__MINGW32__) && !defined(USE_WIN32_LARGE_FILES)
504 #  define USE_WIN32_LARGE_FILES
505 #endif
506
507 #if defined(__WATCOMC__) && !defined(USE_WIN32_LARGE_FILES)
508 #  define USE_WIN32_LARGE_FILES
509 #endif
510
511 #if defined(__POCC__)
512 #  undef USE_WIN32_LARGE_FILES
513 #endif
514
515 #if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES)
516 #  define USE_WIN32_SMALL_FILES
517 #endif
518
519 /* ---------------------------------------------------------------- */
520 /*                       DNS RESOLVER SPECIALTY                     */
521 /* ---------------------------------------------------------------- */
522
523 /*
524  * Undefine both USE_ARES and USE_THREADS_WIN32 for synchronous DNS
525  */
526
527 /* Define USE_ARES to enable c-ares asynchronous DNS lookups */
528 /* #define USE_ARES 1 */
529
530 /* Define USE_THREADS_WIN32 to enable threaded asynchronous DNS lookups */
531 #define USE_THREADS_WIN32 1
532
533 #if defined(USE_ARES) && defined(USE_THREADS_WIN32)
534 #  error "Only one DNS lookup specialty may be defined at most"
535 #endif
536
537 /* ---------------------------------------------------------------- */
538 /*                           LDAP SUPPORT                           */
539 /* ---------------------------------------------------------------- */
540
541 #if defined(CURL_HAS_NOVELL_LDAPSDK) || defined(CURL_HAS_MOZILLA_LDAPSDK)
542 #undef CURL_LDAP_WIN
543 #define HAVE_LDAP_SSL_H 1
544 #define HAVE_LDAP_URL_PARSE 1
545 #elif defined(CURL_HAS_OPENLDAP_LDAPSDK)
546 #undef CURL_LDAP_WIN
547 #define HAVE_LDAP_URL_PARSE 1
548 #else
549 #undef HAVE_LDAP_URL_PARSE
550 #define CURL_LDAP_WIN 1
551 #endif
552
553 #if defined(__WATCOMC__) && defined(CURL_LDAP_WIN)
554 #if __WATCOMC__ < 1280
555 #define WINBERAPI  __declspec(cdecl)
556 #define WINLDAPAPI __declspec(cdecl)
557 #endif
558 #endif
559
560 #if defined(__POCC__) && defined(CURL_LDAP_WIN)
561 #  define CURL_DISABLE_LDAP 1
562 #endif
563
564 /* ---------------------------------------------------------------- */
565 /*                       ADDITIONAL DEFINITIONS                     */
566 /* ---------------------------------------------------------------- */
567
568 /* Define cpu-machine-OS */
569 #undef OS
570 #if defined(_M_IX86) || defined(__i386__) /* x86 (MSVC or gcc) */
571 #define OS "i386-pc-win32"
572 #elif defined(_M_IA64) /* Itanium */
573 #define OS "ia64-pc-win32"
574 #elif defined(_M_X64) /* AMD64/EM64T - Not defined until MSVC 2005 */
575 #define OS "amd64-pc-win32"
576 #else
577 #define OS "unknown-pc-win32"
578 #endif
579
580 /* Name of package */
581 #define PACKAGE "curl"
582
583 #if defined(__POCC__) || (USE_IPV6)
584 #  define ENABLE_IPV6 1
585 #endif
586
587 #endif /* __LIB_CONFIG_WIN32_H */