#ifndef HEADER_CURL_CONFIG_WIN32_H1#define HEADER_CURL_CONFIG_WIN32_H2/***************************************************************************3* _ _ ____ _4* Project ___| | | | _ \| |5* / __| | | | |_) | |6* | (__| |_| | _ <| |___7* \___|\___/|_| \_\_____|8*9* Copyright (C) Daniel Stenberg, <[email protected]>, et al.10*11* This software is licensed as described in the file COPYING, which12* you should have received as part of this distribution. The terms13* are also available at https://curl.se/docs/copyright.html.14*15* You may opt to use, copy, modify, merge, publish, distribute and/or sell16* copies of the Software, and permit persons to whom the Software is17* furnished to do so, under the terms of the COPYING file.18*19* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY20* KIND, either express or implied.21*22* SPDX-License-Identifier: curl23*24***************************************************************************/2526/* ================================================================ */27/* Hand crafted config file for Windows */28/* ================================================================ */2930#ifndef UNDER_CE3132/* Define some minimum and default build targets for Visual Studio */33#ifdef _MSC_VER34/* VS2012 default target settings and minimum build target check. */35# if _MSC_VER >= 170036/* The minimum and default build targets for VS2012 are Vista and 8,37respectively, unless Update 1 is installed and the v110_xp toolset38is chosen. */39# ifdef _USING_V110_SDK71_40# define VS2012_MIN_TARGET 0x0501 /* XP */41# define VS2012_DEF_TARGET 0x0501 /* XP */42# else43# define VS2012_MIN_TARGET 0x0600 /* Vista */44# define VS2012_DEF_TARGET 0x0602 /* 8 */45# endif4647# ifndef _WIN32_WINNT48# define _WIN32_WINNT VS2012_DEF_TARGET49# endif50# ifndef WINVER51# define WINVER VS2012_DEF_TARGET52# endif53# if (_WIN32_WINNT < VS2012_MIN_TARGET) || (WINVER < VS2012_MIN_TARGET)54# ifdef _USING_V110_SDK71_55# error VS2012 does not support build targets prior to Windows XP56# else57# error VS2012 does not support build targets prior to Windows Vista58# endif59# endif60/* Default target settings and minimum build target check for61VS2008 and VS2010 */62# else63# define VS2008_MIN_TARGET 0x0501 /* XP */64/* VS2008 default build target is Windows Vista (0x0600).65We override default target to be Windows XP. */66# define VS2008_DEF_TARGET 0x0501 /* XP */6768# ifndef _WIN32_WINNT69# define _WIN32_WINNT VS2008_DEF_TARGET70# endif71# ifndef WINVER72# define WINVER VS2008_DEF_TARGET73# endif74# if (_WIN32_WINNT < VS2008_MIN_TARGET) || (WINVER < VS2008_MIN_TARGET)75# error VS2008 does not support build targets prior to Windows XP76# endif77# endif78#endif /* _MSC_VER */7980#endif /* UNDER_CE */8182/* ---------------------------------------------------------------- */83/* HEADER FILES */84/* ---------------------------------------------------------------- */8586/* Define if you have the <arpa/inet.h> header file. */87/* #define HAVE_ARPA_INET_H 1 */8889#ifndef UNDER_CE9091/* Define if you have the <fcntl.h> header file. */92#define HAVE_FCNTL_H 1 /* exists on __MINGW32CE__ */9394/* Define if you have the <io.h> header file. */95#define HAVE_IO_H 1 /* exists on __MINGW32CE__ */9697/* Define if you have the <locale.h> header file. */98#define HAVE_LOCALE_H 199100#endif101102/* Define if you have the <netdb.h> header file. */103/* #define HAVE_NETDB_H 1 */104105/* Define if you have the <netinet/in.h> header file. */106/* #define HAVE_NETINET_IN_H 1 */107108/* Define to 1 if you have the <stdbool.h> header file. */109#ifndef UNDER_CE110#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__)111#define HAVE_STDBOOL_H 1 /* exists on __MINGW32CE__ */112#endif113#endif114115/* Define to 1 if you have the <stdint.h> header file. */116#if (defined(_MSC_VER) && (_MSC_VER >= 1600)) || defined(__MINGW32__)117#define HAVE_STDINT_H 1118#endif119120/* Define if you have the <sys/param.h> header file. */121#ifdef __MINGW32__122#define HAVE_SYS_PARAM_H 1123#endif124125/* Define if you have the <sys/select.h> header file. */126/* #define HAVE_SYS_SELECT_H 1 */127128/* Define if you have the <sys/sockio.h> header file. */129/* #define HAVE_SYS_SOCKIO_H 1 */130131/* Define if you have the <sys/types.h> header file. */132#define HAVE_SYS_TYPES_H 1133134/* Define if you have the <sys/utime.h> header file. */135#define HAVE_SYS_UTIME_H 1136137/* Define if you have the <termio.h> header file. */138/* #define HAVE_TERMIO_H 1 */139140/* Define if you have the <termios.h> header file. */141/* #define HAVE_TERMIOS_H 1 */142143/* Define if you have the <unistd.h> header file. */144#ifdef __MINGW32__145#define HAVE_UNISTD_H 1146#endif147148/* Define to 1 if you have the <libgen.h> header file. */149#ifdef __MINGW32__150#define HAVE_LIBGEN_H 1151#endif152153/* ---------------------------------------------------------------- */154/* OTHER HEADER INFO */155/* ---------------------------------------------------------------- */156157/* Define if you have the ANSI C header files. */158#define STDC_HEADERS 1159160/* Define to 1 if bool is an available type. */161#ifndef UNDER_CE162#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__)163#define HAVE_BOOL_T 1 /* exists on __MINGW32CE__ */164#endif165#endif166167/* ---------------------------------------------------------------- */168/* FUNCTIONS */169/* ---------------------------------------------------------------- */170171/* Define if you have the closesocket function. */172#define HAVE_CLOSESOCKET 1173174/* Define if you have the ftruncate function. */175#ifdef __MINGW32__176#define HAVE_FTRUNCATE 1177#endif178179/* Define to 1 if you have the `getpeername' function. */180#define HAVE_GETPEERNAME 1181182/* Define to 1 if you have the getsockname function. */183#define HAVE_GETSOCKNAME 1184185/* Define if you have the gethostname function. */186#define HAVE_GETHOSTNAME 1187188/* Define if you have the gettimeofday function. */189#ifdef __MINGW32__190#define HAVE_GETTIMEOFDAY 1191#endif192193/* Define if you have the ioctlsocket function. */194#define HAVE_IOCTLSOCKET 1195196/* Define if you have a working ioctlsocket FIONBIO function. */197#define HAVE_IOCTLSOCKET_FIONBIO 1198199/* Define if you have the select function. */200#define HAVE_SELECT 1201202#ifndef UNDER_CE203/* Define if you have the setlocale function. */204#define HAVE_SETLOCALE 1205206/* Define if you have the setmode function. */207#define HAVE_SETMODE 1208209/* Define if you have the _setmode function. */210#define HAVE__SETMODE 1211#endif212213/* Define if you have the socket function. */214#define HAVE_SOCKET 1215216/* Define if you have the strdup function. */217#define HAVE_STRDUP 1218219/* Define if you have the utime function. */220#define HAVE_UTIME 1221222/* Define if you have the recv function. */223#define HAVE_RECV 1224225/* Define to the type of arg 1 for recv. */226#define RECV_TYPE_ARG1 SOCKET227228/* Define to the type of arg 2 for recv. */229#define RECV_TYPE_ARG2 char *230231/* Define to the type of arg 3 for recv. */232#define RECV_TYPE_ARG3 int233234/* Define to the type of arg 4 for recv. */235#define RECV_TYPE_ARG4 int236237/* Define to the function return type for recv. */238#define RECV_TYPE_RETV int239240/* Define if you have the send function. */241#define HAVE_SEND 1242243/* Define to the type of arg 1 for send. */244#define SEND_TYPE_ARG1 SOCKET245246/* Define to the type qualifier of arg 2 for send. */247#define SEND_QUAL_ARG2 const248249/* Define to the type of arg 2 for send. */250#define SEND_TYPE_ARG2 char *251252/* Define to the type of arg 3 for send. */253#define SEND_TYPE_ARG3 int254255/* Define to the type of arg 4 for send. */256#define SEND_TYPE_ARG4 int257258/* Define to the function return type for send. */259#define SEND_TYPE_RETV int260261/* Define to 1 if you have the snprintf function. */262#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || defined(__MINGW32__)263#define HAVE_SNPRINTF 1264#endif265266/* Must always use local implementations on Windows. */267/* Define to 1 if you have an IPv6 capable working inet_ntop function. */268/* #undef HAVE_INET_NTOP */269/* Define to 1 if you have an IPv6 capable working inet_pton function. */270/* #undef HAVE_INET_PTON */271272/* Define to 1 if you have the `basename' function. */273#ifdef __MINGW32__274#define HAVE_BASENAME 1275#endif276277/* Define to 1 if you have the signal function. */278#ifndef UNDER_CE279#define HAVE_SIGNAL 1280#endif281282/* ---------------------------------------------------------------- */283/* TYPEDEF REPLACEMENTS */284/* ---------------------------------------------------------------- */285286/* Define if ssize_t is not an available 'typedefed' type. */287#ifndef _SSIZE_T_DEFINED288# ifdef __MINGW32__289# elif defined(_WIN64)290# define _SSIZE_T_DEFINED291# define ssize_t __int64292# else293# define _SSIZE_T_DEFINED294# define ssize_t int295# endif296#endif297298/* ---------------------------------------------------------------- */299/* TYPE SIZES */300/* ---------------------------------------------------------------- */301302/* Define to the size of `int', as computed by sizeof. */303#define SIZEOF_INT 4304305/* Define to the size of `long long', as computed by sizeof. */306/* #define SIZEOF_LONG_LONG 8 */307308/* Define to the size of `long', as computed by sizeof. */309#define SIZEOF_LONG 4310311/* Define to the size of `size_t', as computed by sizeof. */312#ifdef _WIN64313# define SIZEOF_SIZE_T 8314#else315# define SIZEOF_SIZE_T 4316#endif317318/* Define to the size of `curl_off_t', as computed by sizeof. */319#define SIZEOF_CURL_OFF_T 8320321/* ---------------------------------------------------------------- */322/* COMPILER SPECIFIC */323/* ---------------------------------------------------------------- */324325/* Define to nothing if compiler does not support 'const' qualifier. */326/* #define const */327328/* Define to nothing if compiler does not support 'volatile' qualifier. */329/* #define volatile */330331/* Windows should not have HAVE_GMTIME_R defined */332/* #undef HAVE_GMTIME_R */333334/* Define if the compiler supports the 'long long' data type. */335#if defined(_MSC_VER) || defined(__MINGW32__)336#define HAVE_LONGLONG 1337#endif338339/* Default to 64-bit time_t unless _USE_32BIT_TIME_T is defined */340#if defined(_MSC_VER) || defined(__MINGW32__)341# ifndef _USE_32BIT_TIME_T342# define SIZEOF_TIME_T 8343# else344# define SIZEOF_TIME_T 4345# endif346#endif347348/* Windows XP is required for freeaddrinfo, getaddrinfo */349#ifndef UNDER_CE350#define HAVE_FREEADDRINFO 1351#define HAVE_GETADDRINFO 1352#define HAVE_GETADDRINFO_THREADSAFE 1353#endif354355/* ---------------------------------------------------------------- */356/* STRUCT RELATED */357/* ---------------------------------------------------------------- */358359/* Define if you have struct sockaddr_storage. */360#define HAVE_STRUCT_SOCKADDR_STORAGE 1361362/* Define if you have struct timeval. */363#define HAVE_STRUCT_TIMEVAL 1364365/* Define if struct sockaddr_in6 has the sin6_scope_id member. */366#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1367368/* ---------------------------------------------------------------- */369/* LARGE FILE SUPPORT */370/* ---------------------------------------------------------------- */371372#ifndef UNDER_CE373374#if defined(_MSC_VER) || defined(__MINGW32__)375# define USE_WIN32_LARGE_FILES376/* Number of bits in a file offset, on hosts where this is settable. */377# ifdef __MINGW32__378# ifndef _FILE_OFFSET_BITS379# define _FILE_OFFSET_BITS 64380# endif381# endif382#endif383384/* Define to the size of `off_t', as computed by sizeof. */385#if defined(__MINGW32__) && \386defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)387# define SIZEOF_OFF_T 8388#else389# define SIZEOF_OFF_T 4390#endif391392#endif /* UNDER_CE */393394/* ---------------------------------------------------------------- */395/* DNS RESOLVER SPECIALTY */396/* ---------------------------------------------------------------- */397398/*399* Undefine both USE_ARES and USE_THREADS_WIN32 for synchronous DNS.400*/401402/* Define to enable c-ares asynchronous DNS lookups. */403/* #define USE_ARES 1 */404405/* Default define to enable threaded asynchronous DNS lookups. */406#if !defined(USE_SYNC_DNS) && !defined(USE_ARES) && \407!defined(USE_THREADS_WIN32)408# define USE_THREADS_WIN32 1409#endif410411#if defined(USE_ARES) && defined(USE_THREADS_WIN32)412# error "Only one DNS lookup specialty may be defined at most"413#endif414415/* ---------------------------------------------------------------- */416/* LDAP SUPPORT */417/* ---------------------------------------------------------------- */418419#ifdef CURL_HAS_OPENLDAP_LDAPSDK420#undef USE_WIN32_LDAP421#define HAVE_LDAP_URL_PARSE 1422#elif !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)423#undef HAVE_LDAP_URL_PARSE424#define HAVE_LDAP_SSL 1425#define USE_WIN32_LDAP 1426#endif427428/* Define to use the Windows crypto library. */429#ifndef CURL_WINDOWS_UWP430#define USE_WIN32_CRYPTO431#endif432433/* Define to use Unix sockets. */434#ifndef UNDER_CE435#define USE_UNIX_SOCKETS436#endif437438/* ---------------------------------------------------------------- */439/* ADDITIONAL DEFINITIONS */440/* ---------------------------------------------------------------- */441442/* Define cpu-machine-OS */443#ifndef CURL_OS444# ifdef UNDER_CE445# ifdef _M_ARM446# define CURL_OS "arm-pc-win32ce"447# else448# define CURL_OS "i386-pc-win32ce"449# endif450# else /* !UNDER_CE */451# if defined(_M_IX86) || defined(__i386__) /* x86 (MSVC or gcc) */452# define CURL_OS "i386-pc-win32"453# elif defined(_M_X64) || defined(__x86_64__) /* x86_64 (VS2005+ or gcc) */454# define CURL_OS "x86_64-pc-win32"455# elif defined(_M_IA64) || defined(__ia64__) /* Itanium */456# define CURL_OS "ia64-pc-win32"457# elif defined(_M_ARM_NT) || defined(__arm__) /* ARMv7-Thumb2 */458# define CURL_OS "thumbv7a-pc-win32"459# elif defined(_M_ARM64) || defined(__aarch64__) /* ARM64 (Windows 10) */460# define CURL_OS "aarch64-pc-win32"461# else462# define CURL_OS "unknown-pc-win32"463# endif464# endif /* UNDER_CE */465#endif /* !CURL_OS */466467/* ---------------------------------------------------------------- */468/* Windows CE */469/* ---------------------------------------------------------------- */470471#ifdef UNDER_CE472473#ifndef UNICODE474#define UNICODE475#endif476477#ifndef _UNICODE478#define _UNICODE479#endif480481#define CURL_DISABLE_FILE 1482#define CURL_DISABLE_TELNET 1483#define CURL_DISABLE_LDAP 1484485#ifndef _MSC_VER486/* !checksrc! disable BANNEDFUNC 1 */487extern int stat(const char *path, struct stat *buffer);488#endif489490#endif /* UNDER_CE */491492#endif /* HEADER_CURL_CONFIG_WIN32_H */493494495