88d0118496be0026f482dd1b0608907d5a2bc3b9
[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 need the malloc.h header file even with stdlib.h  */
34 #ifndef __SALFORDC__
35 #define NEED_MALLOC_H 1
36 #endif
37
38 /* Define if you have the <netdb.h> header file.  */
39 /* #define HAVE_NETDB_H 1 */
40
41 /* Define if you have the <netinet/in.h> header file.  */
42 /* #define HAVE_NETINET_IN_H 1 */
43
44 /* Define if you have the <process.h> header file.  */
45 #ifndef __SALFORDC__
46 #define HAVE_PROCESS_H 1
47 #endif
48
49 /* Define if you have the <signal.h> header file. */
50 #define HAVE_SIGNAL_H 1
51
52 /* Define if you have the <sgtty.h> header file.  */
53 /* #define HAVE_SGTTY_H 1 */
54
55 /* Define if you have the <ssl.h> header file.  */
56 /* #define HAVE_SSL_H 1 */
57
58 /* Define if you have the <stdlib.h> header file.  */
59 #define HAVE_STDLIB_H 1
60
61 /* Define if you have the <sys/param.h> header file.  */
62 /* #define HAVE_SYS_PARAM_H 1 */
63
64 /* Define if you have the <sys/select.h> header file.  */
65 /* #define HAVE_SYS_SELECT_H 1 */
66
67 /* Define if you have the <sys/socket.h> header file.  */
68 /* #define HAVE_SYS_SOCKET_H 1 */
69
70 /* Define if you have the <sys/sockio.h> header file.  */
71 /* #define HAVE_SYS_SOCKIO_H 1 */
72
73 /* Define if you have the <sys/stat.h> header file.  */
74 #define HAVE_SYS_STAT_H 1
75
76 /* Define if you have the <sys/time.h> header file */
77 /* #define HAVE_SYS_TIME_H 1 */
78
79 /* Define if you have the <sys/types.h> header file.  */
80 #define HAVE_SYS_TYPES_H 1
81
82 /* Define if you have the <sys/utime.h> header file */
83 #ifndef __BORLANDC__
84 #define HAVE_SYS_UTIME_H 1
85 #endif
86
87 /* Define if you have the <termio.h> header file.  */
88 /* #define HAVE_TERMIO_H 1 */
89
90 /* Define if you have the <termios.h> header file.  */
91 /* #define HAVE_TERMIOS_H 1 */
92
93 /* Define if you have the <time.h> header file.  */
94 #define HAVE_TIME_H 1
95
96 /* Define if you have the <unistd.h> header file.  */
97 #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
98     defined(__POCC__)
99 #define HAVE_UNISTD_H 1
100 #endif
101
102 /* Define if you have the <windows.h> header file.  */
103 #define HAVE_WINDOWS_H 1
104
105 /* Define if you have the <winsock.h> header file.  */
106 #define HAVE_WINSOCK_H 1
107
108 #ifndef __SALFORDC__
109 /* Define if you have the <winsock2.h> header file.  */
110 #define HAVE_WINSOCK2_H 1
111
112 /* Define if you have the <ws2tcpip.h> header file.  */
113 #define HAVE_WS2TCPIP_H 1
114 #endif
115
116 /* ---------------------------------------------------------------- */
117 /*                        OTHER HEADER INFO                         */
118 /* ---------------------------------------------------------------- */
119
120 /* Define if sig_atomic_t is an available typedef. */
121 #define HAVE_SIG_ATOMIC_T 1
122
123 /* Define if you have the ANSI C header files.  */
124 #define STDC_HEADERS 1
125
126 /* Define if you can safely include both <sys/time.h> and <time.h>.  */
127 /* #define TIME_WITH_SYS_TIME 1 */
128
129 /* ---------------------------------------------------------------- */
130 /*                             FUNCTIONS                            */
131 /* ---------------------------------------------------------------- */
132
133 /* Define if you have the closesocket function.  */
134 #define HAVE_CLOSESOCKET 1
135
136 /* Define if you don't have vprintf but do have _doprnt.  */
137 /* #define HAVE_DOPRNT 1 */
138
139 /* Define if you have the gethostbyaddr function.  */
140 #define HAVE_GETHOSTBYADDR 1
141
142 /* Define if you have the gethostname function.  */
143 #define HAVE_GETHOSTNAME 1
144
145 /* Define if you have the getpass function.  */
146 /* #define HAVE_GETPASS 1 */
147
148 /* Define if you have the getservbyname function.  */
149 #define HAVE_GETSERVBYNAME 1
150
151 /* Define if you have the getprotobyname function.  */
152 #define HAVE_GETPROTOBYNAME
153
154 /* Define if you have the gettimeofday function.  */
155 /* #define HAVE_GETTIMEOFDAY 1 */
156
157 /* Define if you have the inet_addr function.  */
158 #define HAVE_INET_ADDR 1
159
160 /* Define if you have the ioctlsocket function.  */
161 #define HAVE_IOCTLSOCKET 1
162
163 /* Define if you have the perror function.  */
164 #define HAVE_PERROR 1
165
166 /* Define if you have the RAND_screen function when using SSL  */
167 #define HAVE_RAND_SCREEN 1
168
169 /* Define if you have the `RAND_status' function when using SSL. */
170 #define HAVE_RAND_STATUS 1
171
172 /* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function.
173    This is present in OpenSSL versions after 0.9.6b */
174 #define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
175
176 /* Define if you have the select function.  */
177 #define HAVE_SELECT 1
178
179 /* Define if you have the setvbuf function.  */
180 #define HAVE_SETVBUF 1
181
182 /* Define if you have the socket function.  */
183 #define HAVE_SOCKET 1
184
185 /* Define if you have the strcasecmp function.  */
186 /* #define HAVE_STRCASECMP 1 */
187
188 /* Define if you have the strdup function.  */
189 #define HAVE_STRDUP 1
190
191 /* Define if you have the strftime function.  */
192 #define HAVE_STRFTIME 1
193
194 /* Define if you have the stricmp function. */
195 #define HAVE_STRICMP 1
196
197 /* Define if you have the strncasecmp function. */
198 /* #define HAVE_STRNCASECMP 1 */
199
200 /* Define if you have the strnicmp function. */
201 #define HAVE_STRNICMP 1
202
203 /* Define if you have the strstr function.  */
204 #define HAVE_STRSTR 1
205
206 /* Define if you have the strtoll function.  */
207 #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__POCC__)
208 #define HAVE_STRTOLL 1
209 #endif
210
211 /* Define if you have the tcgetattr function.  */
212 /* #define HAVE_TCGETATTR 1 */
213
214 /* Define if you have the tcsetattr function.  */
215 /* #define HAVE_TCSETATTR 1 */
216
217 /* Define if you have the utime function */
218 #ifndef __BORLANDC__
219 #define HAVE_UTIME 1
220 #endif
221
222 /* Define to the type qualifier of arg 1 for getnameinfo. */
223 #define GETNAMEINFO_QUAL_ARG1 const
224
225 /* Define to the type of arg 1 for getnameinfo. */
226 #define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
227
228 /* Define to the type of arg 2 for getnameinfo. */
229 #define GETNAMEINFO_TYPE_ARG2 socklen_t
230
231 /* Define to the type of args 4 and 6 for getnameinfo. */
232 #define GETNAMEINFO_TYPE_ARG46 DWORD
233
234 /* Define to the type of arg 7 for getnameinfo. */
235 #define GETNAMEINFO_TYPE_ARG7 int
236
237 /* Define if you have the recv function. */
238 #define HAVE_RECV 1
239
240 /* Define to the type of arg 1 for recv. */
241 #define RECV_TYPE_ARG1 SOCKET
242
243 /* Define to the type of arg 2 for recv. */
244 #define RECV_TYPE_ARG2 char *
245
246 /* Define to the type of arg 3 for recv. */
247 #define RECV_TYPE_ARG3 int
248
249 /* Define to the type of arg 4 for recv. */
250 #define RECV_TYPE_ARG4 int
251
252 /* Define to the function return type for recv. */
253 #define RECV_TYPE_RETV int
254
255 /* Define if you have the recvfrom function. */
256 #define HAVE_RECVFROM 1
257
258 /* Define to the type of arg 1 for recvfrom. */
259 #define RECVFROM_TYPE_ARG1 SOCKET
260
261 /* Define to the type pointed by arg 2 for recvfrom. */
262 #define RECVFROM_TYPE_ARG2 char
263
264 /* Define to the type of arg 3 for recvfrom. */
265 #define RECVFROM_TYPE_ARG3 int
266
267 /* Define to the type of arg 4 for recvfrom. */
268 #define RECVFROM_TYPE_ARG4 int
269
270 /* Define to the type pointed by arg 5 for recvfrom. */
271 #define RECVFROM_TYPE_ARG5 struct sockaddr
272
273 /* Define to the type pointed by arg 6 for recvfrom. */
274 #define RECVFROM_TYPE_ARG6 int
275
276 /* Define to the function return type for recvfrom. */
277 #define RECVFROM_TYPE_RETV int
278
279 /* Define if you have the send function. */
280 #define HAVE_SEND 1
281
282 /* Define to the type of arg 1 for send. */
283 #define SEND_TYPE_ARG1 SOCKET
284
285 /* Define to the type qualifier of arg 2 for send. */
286 #define SEND_QUAL_ARG2 const
287
288 /* Define to the type of arg 2 for send. */
289 #define SEND_TYPE_ARG2 char *
290
291 /* Define to the type of arg 3 for send. */
292 #define SEND_TYPE_ARG3 int
293
294 /* Define to the type of arg 4 for send. */
295 #define SEND_TYPE_ARG4 int
296
297 /* Define to the function return type for send. */
298 #define SEND_TYPE_RETV int
299
300 /* ---------------------------------------------------------------- */
301 /*                       TYPEDEF REPLACEMENTS                       */
302 /* ---------------------------------------------------------------- */
303
304 /* Define this if in_addr_t is not an available 'typedefed' type */
305 #define in_addr_t unsigned long
306
307 /* Define as the return type of signal handlers (int or void).  */
308 #define RETSIGTYPE void
309
310 #ifndef _SSIZE_T_DEFINED
311 #if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__) || \
312     defined(__MINGW32__)
313 #elif defined(_WIN64)
314 #define ssize_t __int64
315 #else
316 #define ssize_t int
317 #endif
318 #define _SSIZE_T_DEFINED
319 #endif
320
321 /* ---------------------------------------------------------------- */
322 /*                            TYPE SIZES                            */
323 /* ---------------------------------------------------------------- */
324
325 /* The number of bytes in a long double.  */
326 #define SIZEOF_LONG_DOUBLE 16
327
328 /* The number of bytes in a long long.  */
329 /* #define SIZEOF_LONG_LONG 8 */
330
331 /* ---------------------------------------------------------------- */
332 /*                          STRUCT RELATED                          */
333 /* ---------------------------------------------------------------- */
334
335 /* Define this if you have struct sockaddr_storage */
336 #ifndef __SALFORDC__
337 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
338 #endif
339
340 /* Define this if you have struct timeval */
341 #define HAVE_STRUCT_TIMEVAL 1
342
343 /* ---------------------------------------------------------------- */
344 /*                        COMPILER SPECIFIC                         */
345 /* ---------------------------------------------------------------- */
346
347 /* Undef keyword 'const' if it does not work.  */
348 /* #undef const */
349
350 /* Windows should not have HAVE_GMTIME_R defined */
351 /* #undef HAVE_GMTIME_R */
352
353 /* Define if the compiler supports C99 variadic macro style. */
354 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
355 #define HAVE_VARIADIC_MACROS_C99 1
356 #endif
357
358 /* Define if the compiler supports the 'long long' data type. */
359 #if defined(__MINGW32__) || defined(__WATCOMC__)
360 #define HAVE_LONGLONG 1
361 #endif
362
363 /* Define to avoid VS2005 complaining about portable C functions */
364 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
365 #define _CRT_SECURE_NO_DEPRECATE 1
366 #define _CRT_NONSTDC_NO_DEPRECATE 1
367 #endif
368
369 /* VS2005 and later dafault size for time_t is 64-bit, unless */
370 /* _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */
371 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
372 #  ifndef _USE_32BIT_TIME_T
373 #    define SIZEOF_TIME_T 8
374 #  else
375 #    define SIZEOF_TIME_T 4
376 #  endif
377 #endif
378
379 /* VS2008 does not support Windows build targets prior to WinXP, */
380 /* so, if no build target has been defined we will target WinXP. */
381 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
382 #  ifndef _WIN32_WINNT
383 #    define _WIN32_WINNT 0x0501
384 #  endif
385 #  ifndef WINVER
386 #    define WINVER 0x0501
387 #  endif
388 #  if (_WIN32_WINNT < 0x0501) || (WINVER < 0x0501)
389 #    error VS2008 does not support Windows build targets prior to WinXP
390 #  endif
391 #endif
392
393 /* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is quite */
394 /* convoluted, compiler dependant and in some cases even build target dependat. */
395 #if defined(HAVE_WS2TCPIP_H)
396 #  if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
397 #    define HAVE_FREEADDRINFO 1
398 #    define HAVE_GETADDRINFO  1
399 #    define HAVE_GETNAMEINFO  1
400 #  elif defined(_MSC_VER) && (_MSC_VER >= 1200)
401 #    define HAVE_FREEADDRINFO 1
402 #    define HAVE_GETADDRINFO  1
403 #    define HAVE_GETNAMEINFO  1
404 #  endif
405 #endif
406
407 /* ---------------------------------------------------------------- */
408 /*                        LARGE FILE SUPPORT                        */
409 /* ---------------------------------------------------------------- */
410
411 #if defined(_MSC_VER) && !defined(_WIN32_WCE)
412 #  if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
413 #    define USE_WIN32_LARGE_FILES
414 #  else
415 #    define USE_WIN32_SMALL_FILES
416 #  endif
417 #endif
418
419 #if defined(__MINGW32__) && !defined(USE_WIN32_LARGE_FILES)
420 #  define USE_WIN32_LARGE_FILES
421 #endif
422
423 #if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES)
424 #  define USE_WIN32_SMALL_FILES
425 #endif
426
427 /* ---------------------------------------------------------------- */
428 /*                           LDAP SUPPORT                           */
429 /* ---------------------------------------------------------------- */
430
431 #if defined(CURL_HAS_NOVELL_LDAPSDK) || defined(CURL_HAS_MOZILLA_LDAPSDK)
432 #undef CURL_LDAP_HYBRID
433 #undef CURL_LDAP_WIN
434 #define HAVE_LDAP_SSL_H 1
435 #define HAVE_LDAP_URL_PARSE 1
436 #elif defined(CURL_HAS_OPENLDAP_LDAPSDK)
437 #undef CURL_LDAP_HYBRID
438 #undef CURL_LDAP_WIN
439 #define HAVE_LDAP_URL_PARSE 1
440 #else
441 #undef CURL_LDAP_HYBRID
442 #undef HAVE_LDAP_URL_PARSE
443 #define CURL_LDAP_WIN 1
444 #endif
445
446 /* ---------------------------------------------------------------- */
447 /*                       ADDITIONAL DEFINITIONS                     */
448 /* ---------------------------------------------------------------- */
449
450 /* Define cpu-machine-OS */
451 #undef OS
452 #if defined(_M_IX86) || defined(__i386__) /* x86 (MSVC or gcc) */
453 #define OS "i386-pc-win32"
454 #elif defined(_M_IA64) /* Itanium */
455 #define OS "ia64-pc-win32"
456 #elif defined(_M_X64) /* AMD64/EM64T - Not defined until MSVC 2005 */
457 #define OS "amd64-pc-win32"
458 #else
459 #define OS "unknown-pc-win32"
460 #endif
461
462 /* Name of package */
463 #define PACKAGE "curl"
464
465
466 #endif /* __LIB_CONFIG_WIN32_H */