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