Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/pkg
Path: blob/main/external/curl/lib/config-win32.h
2065 views
1
#ifndef HEADER_CURL_CONFIG_WIN32_H
2
#define HEADER_CURL_CONFIG_WIN32_H
3
/***************************************************************************
4
* _ _ ____ _
5
* Project ___| | | | _ \| |
6
* / __| | | | |_) | |
7
* | (__| |_| | _ <| |___
8
* \___|\___/|_| \_\_____|
9
*
10
* Copyright (C) Daniel Stenberg, <[email protected]>, et al.
11
*
12
* This software is licensed as described in the file COPYING, which
13
* you should have received as part of this distribution. The terms
14
* are also available at https://curl.se/docs/copyright.html.
15
*
16
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
17
* copies of the Software, and permit persons to whom the Software is
18
* furnished to do so, under the terms of the COPYING file.
19
*
20
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
21
* KIND, either express or implied.
22
*
23
* SPDX-License-Identifier: curl
24
*
25
***************************************************************************/
26
27
/* ================================================================ */
28
/* Hand crafted config file for Windows */
29
/* ================================================================ */
30
31
/* ---------------------------------------------------------------- */
32
/* HEADER FILES */
33
/* ---------------------------------------------------------------- */
34
35
/* Define if you have the <arpa/inet.h> header file. */
36
/* #define HAVE_ARPA_INET_H 1 */
37
38
#ifndef UNDER_CE
39
40
/* Define if you have the <fcntl.h> header file. */
41
#define HAVE_FCNTL_H 1 /* exists on __MINGW32CE__ */
42
43
/* Define if you have the <io.h> header file. */
44
#define HAVE_IO_H 1 /* exists on __MINGW32CE__ */
45
46
/* Define if you have the <locale.h> header file. */
47
#define HAVE_LOCALE_H 1
48
49
#endif
50
51
/* Define if you have the <netdb.h> header file. */
52
/* #define HAVE_NETDB_H 1 */
53
54
/* Define if you have the <netinet/in.h> header file. */
55
/* #define HAVE_NETINET_IN_H 1 */
56
57
/* Define to 1 if you have the <stdbool.h> header file. */
58
#ifndef UNDER_CE
59
#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__)
60
#define HAVE_STDBOOL_H 1 /* exists on __MINGW32CE__ */
61
#endif
62
#endif
63
64
/* Define to 1 if you have the <stdint.h> header file. */
65
#if (defined(_MSC_VER) && (_MSC_VER >= 1600)) || defined(__MINGW32__)
66
#define HAVE_STDINT_H 1
67
#endif
68
69
/* Define if you have the <sys/param.h> header file. */
70
#ifdef __MINGW32__
71
#define HAVE_SYS_PARAM_H 1
72
#endif
73
74
/* Define if you have the <sys/select.h> header file. */
75
/* #define HAVE_SYS_SELECT_H 1 */
76
77
/* Define if you have the <sys/socket.h> header file. */
78
/* #define HAVE_SYS_SOCKET_H 1 */
79
80
/* Define if you have the <sys/sockio.h> header file. */
81
/* #define HAVE_SYS_SOCKIO_H 1 */
82
83
/* Define if you have the <sys/stat.h> header file. */
84
#define HAVE_SYS_STAT_H 1
85
86
/* Define if you have the <sys/time.h> header file. */
87
#ifdef __MINGW32__
88
#define HAVE_SYS_TIME_H 1
89
#endif
90
91
/* Define if you have the <sys/types.h> header file. */
92
#define HAVE_SYS_TYPES_H 1
93
94
/* Define if you have the <sys/utime.h> header file. */
95
#define HAVE_SYS_UTIME_H 1
96
97
/* Define if you have the <termio.h> header file. */
98
/* #define HAVE_TERMIO_H 1 */
99
100
/* Define if you have the <termios.h> header file. */
101
/* #define HAVE_TERMIOS_H 1 */
102
103
/* Define if you have the <unistd.h> header file. */
104
#ifdef __MINGW32__
105
#define HAVE_UNISTD_H 1
106
#endif
107
108
/* Define to 1 if you have the <libgen.h> header file. */
109
#ifdef __MINGW32__
110
#define HAVE_LIBGEN_H 1
111
#endif
112
113
/* ---------------------------------------------------------------- */
114
/* OTHER HEADER INFO */
115
/* ---------------------------------------------------------------- */
116
117
/* Define if you have the ANSI C header files. */
118
#define STDC_HEADERS 1
119
120
/* Define to 1 if bool is an available type. */
121
#ifndef UNDER_CE
122
#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__)
123
#define HAVE_BOOL_T 1 /* exists on __MINGW32CE__ */
124
#endif
125
#endif
126
127
/* ---------------------------------------------------------------- */
128
/* FUNCTIONS */
129
/* ---------------------------------------------------------------- */
130
131
/* Define if you have the closesocket function. */
132
#define HAVE_CLOSESOCKET 1
133
134
/* Define if you have the ftruncate function. */
135
#ifdef __MINGW32__
136
#define HAVE_FTRUNCATE 1
137
#endif
138
139
/* Define to 1 if you have the `getpeername' function. */
140
#define HAVE_GETPEERNAME 1
141
142
/* Define to 1 if you have the getsockname function. */
143
#define HAVE_GETSOCKNAME 1
144
145
/* Define if you have the gethostname function. */
146
#define HAVE_GETHOSTNAME 1
147
148
/* Define if you have the gettimeofday function. */
149
#ifdef __MINGW32__
150
#define HAVE_GETTIMEOFDAY 1
151
#endif
152
153
/* Define if you have the ioctlsocket function. */
154
#define HAVE_IOCTLSOCKET 1
155
156
/* Define if you have a working ioctlsocket FIONBIO function. */
157
#define HAVE_IOCTLSOCKET_FIONBIO 1
158
159
/* Define if you have the select function. */
160
#define HAVE_SELECT 1
161
162
#ifndef UNDER_CE
163
/* Define if you have the setlocale function. */
164
#define HAVE_SETLOCALE 1
165
166
/* Define if you have the setmode function. */
167
#define HAVE_SETMODE 1
168
169
/* Define if you have the _setmode function. */
170
#define HAVE__SETMODE 1
171
#endif
172
173
/* Define if you have the socket function. */
174
#define HAVE_SOCKET 1
175
176
/* Define if you have the strdup function. */
177
#define HAVE_STRDUP 1
178
179
/* Define if you have the utime function. */
180
#define HAVE_UTIME 1
181
182
/* Define if you have the recv function. */
183
#define HAVE_RECV 1
184
185
/* Define to the type of arg 1 for recv. */
186
#define RECV_TYPE_ARG1 SOCKET
187
188
/* Define to the type of arg 2 for recv. */
189
#define RECV_TYPE_ARG2 char *
190
191
/* Define to the type of arg 3 for recv. */
192
#define RECV_TYPE_ARG3 int
193
194
/* Define to the type of arg 4 for recv. */
195
#define RECV_TYPE_ARG4 int
196
197
/* Define to the function return type for recv. */
198
#define RECV_TYPE_RETV int
199
200
/* Define if you have the send function. */
201
#define HAVE_SEND 1
202
203
/* Define to the type of arg 1 for send. */
204
#define SEND_TYPE_ARG1 SOCKET
205
206
/* Define to the type qualifier of arg 2 for send. */
207
#define SEND_QUAL_ARG2 const
208
209
/* Define to the type of arg 2 for send. */
210
#define SEND_TYPE_ARG2 char *
211
212
/* Define to the type of arg 3 for send. */
213
#define SEND_TYPE_ARG3 int
214
215
/* Define to the type of arg 4 for send. */
216
#define SEND_TYPE_ARG4 int
217
218
/* Define to the function return type for send. */
219
#define SEND_TYPE_RETV int
220
221
/* Define to 1 if you have the snprintf function. */
222
#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || defined(__MINGW32__)
223
#define HAVE_SNPRINTF 1
224
#endif
225
226
/* Vista */
227
#if (defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600) && !defined(UNDER_CE)
228
/* Define to 1 if you have an IPv6 capable working inet_ntop function. */
229
#define HAVE_INET_NTOP 1
230
/* Define to 1 if you have an IPv6 capable working inet_pton function. */
231
#define HAVE_INET_PTON 1
232
#endif
233
234
/* Define to 1 if you have the `basename' function. */
235
#ifdef __MINGW32__
236
#define HAVE_BASENAME 1
237
#endif
238
239
/* Define to 1 if you have the signal function. */
240
#ifndef UNDER_CE
241
#define HAVE_SIGNAL 1
242
#endif
243
244
/* ---------------------------------------------------------------- */
245
/* TYPEDEF REPLACEMENTS */
246
/* ---------------------------------------------------------------- */
247
248
/* Define if ssize_t is not an available 'typedefed' type. */
249
#ifndef _SSIZE_T_DEFINED
250
# ifdef __MINGW32__
251
# elif defined(_WIN64)
252
# define _SSIZE_T_DEFINED
253
# define ssize_t __int64
254
# else
255
# define _SSIZE_T_DEFINED
256
# define ssize_t int
257
# endif
258
#endif
259
260
/* ---------------------------------------------------------------- */
261
/* TYPE SIZES */
262
/* ---------------------------------------------------------------- */
263
264
/* Define to the size of `int', as computed by sizeof. */
265
#define SIZEOF_INT 4
266
267
/* Define to the size of `long long', as computed by sizeof. */
268
/* #define SIZEOF_LONG_LONG 8 */
269
270
/* Define to the size of `long', as computed by sizeof. */
271
#define SIZEOF_LONG 4
272
273
/* Define to the size of `size_t', as computed by sizeof. */
274
#ifdef _WIN64
275
# define SIZEOF_SIZE_T 8
276
#else
277
# define SIZEOF_SIZE_T 4
278
#endif
279
280
/* Define to the size of `curl_off_t', as computed by sizeof. */
281
#define SIZEOF_CURL_OFF_T 8
282
283
/* ---------------------------------------------------------------- */
284
/* COMPILER SPECIFIC */
285
/* ---------------------------------------------------------------- */
286
287
/* Define to nothing if compiler does not support 'const' qualifier. */
288
/* #define const */
289
290
/* Define to nothing if compiler does not support 'volatile' qualifier. */
291
/* #define volatile */
292
293
/* Windows should not have HAVE_GMTIME_R defined */
294
/* #undef HAVE_GMTIME_R */
295
296
/* Define if the compiler supports the 'long long' data type. */
297
#if defined(_MSC_VER) || defined(__MINGW32__)
298
#define HAVE_LONGLONG 1
299
#endif
300
301
/* Default to 64-bit time_t unless _USE_32BIT_TIME_T is defined */
302
#if defined(_MSC_VER) || defined(__MINGW32__)
303
# ifndef _USE_32BIT_TIME_T
304
# define SIZEOF_TIME_T 8
305
# else
306
# define SIZEOF_TIME_T 4
307
# endif
308
#endif
309
310
#ifndef UNDER_CE
311
312
/* Define some minimum and default build targets for Visual Studio */
313
#ifdef _MSC_VER
314
/* Officially, Microsoft's Windows SDK versions 6.X does not support Windows
315
2000 as a supported build target. VS2008 default installations provides
316
an embedded Windows SDK v6.0A along with the claim that Windows 2000 is a
317
valid build target for VS2008. Popular belief is that binaries built with
318
VS2008 using Windows SDK versions v6.X and Windows 2000 as a build target
319
are functional. */
320
# define VS2008_MIN_TARGET 0x0500
321
322
/* The minimum build target for VS2012 is Vista unless Update 1 is installed
323
and the v110_xp toolset is chosen. */
324
# ifdef _USING_V110_SDK71_
325
# define VS2012_MIN_TARGET 0x0501
326
# else
327
# define VS2012_MIN_TARGET 0x0600
328
# endif
329
330
/* VS2008 default build target is Windows Vista. We override default target
331
to be Windows XP. */
332
# define VS2008_DEF_TARGET 0x0501
333
334
/* VS2012 default build target is Windows Vista unless Update 1 is installed
335
and the v110_xp toolset is chosen. */
336
# ifdef _USING_V110_SDK71_
337
# define VS2012_DEF_TARGET 0x0501
338
# else
339
# define VS2012_DEF_TARGET 0x0600
340
# endif
341
#endif
342
343
/* VS2008 default target settings and minimum build target check. */
344
#if defined(_MSC_VER) && (_MSC_VER <= 1600)
345
# ifndef _WIN32_WINNT
346
# define _WIN32_WINNT VS2008_DEF_TARGET
347
# endif
348
# ifndef WINVER
349
# define WINVER VS2008_DEF_TARGET
350
# endif
351
# if (_WIN32_WINNT < VS2008_MIN_TARGET) || (WINVER < VS2008_MIN_TARGET)
352
# error VS2008 does not support Windows build targets prior to Windows 2000
353
# endif
354
#endif
355
356
/* VS2012 default target settings and minimum build target check. */
357
#if defined(_MSC_VER) && (_MSC_VER >= 1700)
358
# ifndef _WIN32_WINNT
359
# define _WIN32_WINNT VS2012_DEF_TARGET
360
# endif
361
# ifndef WINVER
362
# define WINVER VS2012_DEF_TARGET
363
# endif
364
# if (_WIN32_WINNT < VS2012_MIN_TARGET) || (WINVER < VS2012_MIN_TARGET)
365
# ifdef _USING_V110_SDK71_
366
# error VS2012 does not support Windows build targets prior to Windows XP
367
# else
368
# error VS2012 does not support Windows build targets prior to Windows \
369
Vista
370
# endif
371
# endif
372
#endif
373
374
#endif /* UNDER_CE */
375
376
/* Windows XP is required for freeaddrinfo, getaddrinfo */
377
#ifndef UNDER_CE
378
#define HAVE_FREEADDRINFO 1
379
#define HAVE_GETADDRINFO 1
380
#define HAVE_GETADDRINFO_THREADSAFE 1
381
#endif
382
383
/* ---------------------------------------------------------------- */
384
/* STRUCT RELATED */
385
/* ---------------------------------------------------------------- */
386
387
/* Define if you have struct sockaddr_storage. */
388
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
389
390
/* Define if you have struct timeval. */
391
#define HAVE_STRUCT_TIMEVAL 1
392
393
/* Define if struct sockaddr_in6 has the sin6_scope_id member. */
394
#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
395
396
/* ---------------------------------------------------------------- */
397
/* LARGE FILE SUPPORT */
398
/* ---------------------------------------------------------------- */
399
400
#ifndef UNDER_CE
401
402
#if defined(_MSC_VER) || defined(__MINGW32__)
403
# define USE_WIN32_LARGE_FILES
404
/* Number of bits in a file offset, on hosts where this is settable. */
405
# ifdef __MINGW32__
406
# ifndef _FILE_OFFSET_BITS
407
# define _FILE_OFFSET_BITS 64
408
# endif
409
# endif
410
#endif
411
412
/* Define to the size of `off_t', as computed by sizeof. */
413
#if defined(__MINGW32__) && \
414
defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
415
# define SIZEOF_OFF_T 8
416
#else
417
# define SIZEOF_OFF_T 4
418
#endif
419
420
#endif /* UNDER_CE */
421
422
/* ---------------------------------------------------------------- */
423
/* DNS RESOLVER SPECIALTY */
424
/* ---------------------------------------------------------------- */
425
426
/*
427
* Undefine both USE_ARES and USE_THREADS_WIN32 for synchronous DNS.
428
*/
429
430
/* Define to enable c-ares asynchronous DNS lookups. */
431
/* #define USE_ARES 1 */
432
433
/* Default define to enable threaded asynchronous DNS lookups. */
434
#if !defined(USE_SYNC_DNS) && !defined(USE_ARES) && \
435
!defined(USE_THREADS_WIN32)
436
# define USE_THREADS_WIN32 1
437
#endif
438
439
#if defined(USE_ARES) && defined(USE_THREADS_WIN32)
440
# error "Only one DNS lookup specialty may be defined at most"
441
#endif
442
443
/* ---------------------------------------------------------------- */
444
/* LDAP SUPPORT */
445
/* ---------------------------------------------------------------- */
446
447
#ifdef CURL_HAS_OPENLDAP_LDAPSDK
448
#undef USE_WIN32_LDAP
449
#define HAVE_LDAP_URL_PARSE 1
450
#elif !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
451
#undef HAVE_LDAP_URL_PARSE
452
#define HAVE_LDAP_SSL 1
453
#define USE_WIN32_LDAP 1
454
#endif
455
456
/* Define to use the Windows crypto library. */
457
#ifndef CURL_WINDOWS_UWP
458
#define USE_WIN32_CRYPTO
459
#endif
460
461
/* Define to use Unix sockets. */
462
#ifndef UNDER_CE
463
#define USE_UNIX_SOCKETS
464
#endif
465
466
/* ---------------------------------------------------------------- */
467
/* ADDITIONAL DEFINITIONS */
468
/* ---------------------------------------------------------------- */
469
470
/* Define cpu-machine-OS */
471
#ifndef CURL_OS
472
# ifdef UNDER_CE
473
# ifdef _M_ARM
474
# define CURL_OS "arm-pc-win32ce"
475
# else
476
# define CURL_OS "i386-pc-win32ce"
477
# endif
478
# else /* !UNDER_CE */
479
# if defined(_M_IX86) || defined(__i386__) /* x86 (MSVC or gcc) */
480
# define CURL_OS "i386-pc-win32"
481
# elif defined(_M_X64) || defined(__x86_64__) /* x86_64 (VS2005+ or gcc) */
482
# define CURL_OS "x86_64-pc-win32"
483
# elif defined(_M_IA64) || defined(__ia64__) /* Itanium */
484
# define CURL_OS "ia64-pc-win32"
485
# elif defined(_M_ARM_NT) || defined(__arm__) /* ARMv7-Thumb2 */
486
# define CURL_OS "thumbv7a-pc-win32"
487
# elif defined(_M_ARM64) || defined(__aarch64__) /* ARM64 (Windows 10) */
488
# define CURL_OS "aarch64-pc-win32"
489
# else
490
# define CURL_OS "unknown-pc-win32"
491
# endif
492
# endif /* UNDER_CE */
493
#endif /* !CURL_OS */
494
495
/* ---------------------------------------------------------------- */
496
/* Windows CE */
497
/* ---------------------------------------------------------------- */
498
499
#ifdef UNDER_CE
500
501
#ifndef UNICODE
502
#define UNICODE
503
#endif
504
505
#ifndef _UNICODE
506
#define _UNICODE
507
#endif
508
509
#define CURL_DISABLE_FILE 1
510
#define CURL_DISABLE_TELNET 1
511
#define CURL_DISABLE_LDAP 1
512
513
#ifndef _MSC_VER
514
extern int stat(const char *path, struct stat *buffer);
515
#endif
516
517
#endif /* UNDER_CE */
518
519
#endif /* HEADER_CURL_CONFIG_WIN32_H */
520
521