#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/* ---------------------------------------------------------------- */31/* HEADER FILES */32/* ---------------------------------------------------------------- */3334/* Define if you have the <arpa/inet.h> header file. */35/* #define HAVE_ARPA_INET_H 1 */3637#ifndef UNDER_CE3839/* Define if you have the <fcntl.h> header file. */40#define HAVE_FCNTL_H 1 /* exists on __MINGW32CE__ */4142/* Define if you have the <io.h> header file. */43#define HAVE_IO_H 1 /* exists on __MINGW32CE__ */4445/* Define if you have the <locale.h> header file. */46#define HAVE_LOCALE_H 14748#endif4950/* Define if you have the <netdb.h> header file. */51/* #define HAVE_NETDB_H 1 */5253/* Define if you have the <netinet/in.h> header file. */54/* #define HAVE_NETINET_IN_H 1 */5556/* Define to 1 if you have the <stdbool.h> header file. */57#ifndef UNDER_CE58#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__)59#define HAVE_STDBOOL_H 1 /* exists on __MINGW32CE__ */60#endif61#endif6263/* Define to 1 if you have the <stdint.h> header file. */64#if (defined(_MSC_VER) && (_MSC_VER >= 1600)) || defined(__MINGW32__)65#define HAVE_STDINT_H 166#endif6768/* Define if you have the <sys/param.h> header file. */69#ifdef __MINGW32__70#define HAVE_SYS_PARAM_H 171#endif7273/* Define if you have the <sys/select.h> header file. */74/* #define HAVE_SYS_SELECT_H 1 */7576/* Define if you have the <sys/socket.h> header file. */77/* #define HAVE_SYS_SOCKET_H 1 */7879/* Define if you have the <sys/sockio.h> header file. */80/* #define HAVE_SYS_SOCKIO_H 1 */8182/* Define if you have the <sys/stat.h> header file. */83#define HAVE_SYS_STAT_H 18485/* Define if you have the <sys/time.h> header file. */86#ifdef __MINGW32__87#define HAVE_SYS_TIME_H 188#endif8990/* Define if you have the <sys/types.h> header file. */91#define HAVE_SYS_TYPES_H 19293/* Define if you have the <sys/utime.h> header file. */94#define HAVE_SYS_UTIME_H 19596/* Define if you have the <termio.h> header file. */97/* #define HAVE_TERMIO_H 1 */9899/* Define if you have the <termios.h> header file. */100/* #define HAVE_TERMIOS_H 1 */101102/* Define if you have the <unistd.h> header file. */103#ifdef __MINGW32__104#define HAVE_UNISTD_H 1105#endif106107/* Define to 1 if you have the <libgen.h> header file. */108#ifdef __MINGW32__109#define HAVE_LIBGEN_H 1110#endif111112/* ---------------------------------------------------------------- */113/* OTHER HEADER INFO */114/* ---------------------------------------------------------------- */115116/* Define if you have the ANSI C header files. */117#define STDC_HEADERS 1118119/* Define to 1 if bool is an available type. */120#ifndef UNDER_CE121#if (defined(_MSC_VER) && (_MSC_VER >= 1800)) || defined(__MINGW32__)122#define HAVE_BOOL_T 1 /* exists on __MINGW32CE__ */123#endif124#endif125126/* ---------------------------------------------------------------- */127/* FUNCTIONS */128/* ---------------------------------------------------------------- */129130/* Define if you have the closesocket function. */131#define HAVE_CLOSESOCKET 1132133/* Define if you have the ftruncate function. */134#ifdef __MINGW32__135#define HAVE_FTRUNCATE 1136#endif137138/* Define to 1 if you have the `getpeername' function. */139#define HAVE_GETPEERNAME 1140141/* Define to 1 if you have the getsockname function. */142#define HAVE_GETSOCKNAME 1143144/* Define if you have the gethostname function. */145#define HAVE_GETHOSTNAME 1146147/* Define if you have the gettimeofday function. */148#ifdef __MINGW32__149#define HAVE_GETTIMEOFDAY 1150#endif151152/* Define if you have the ioctlsocket function. */153#define HAVE_IOCTLSOCKET 1154155/* Define if you have a working ioctlsocket FIONBIO function. */156#define HAVE_IOCTLSOCKET_FIONBIO 1157158/* Define if you have the select function. */159#define HAVE_SELECT 1160161#ifndef UNDER_CE162/* Define if you have the setlocale function. */163#define HAVE_SETLOCALE 1164165/* Define if you have the setmode function. */166#define HAVE_SETMODE 1167168/* Define if you have the _setmode function. */169#define HAVE__SETMODE 1170#endif171172/* Define if you have the socket function. */173#define HAVE_SOCKET 1174175/* Define if you have the strdup function. */176#define HAVE_STRDUP 1177178/* Define if you have the utime function. */179#define HAVE_UTIME 1180181/* Define if you have the recv function. */182#define HAVE_RECV 1183184/* Define to the type of arg 1 for recv. */185#define RECV_TYPE_ARG1 SOCKET186187/* Define to the type of arg 2 for recv. */188#define RECV_TYPE_ARG2 char *189190/* Define to the type of arg 3 for recv. */191#define RECV_TYPE_ARG3 int192193/* Define to the type of arg 4 for recv. */194#define RECV_TYPE_ARG4 int195196/* Define to the function return type for recv. */197#define RECV_TYPE_RETV int198199/* Define if you have the send function. */200#define HAVE_SEND 1201202/* Define to the type of arg 1 for send. */203#define SEND_TYPE_ARG1 SOCKET204205/* Define to the type qualifier of arg 2 for send. */206#define SEND_QUAL_ARG2 const207208/* Define to the type of arg 2 for send. */209#define SEND_TYPE_ARG2 char *210211/* Define to the type of arg 3 for send. */212#define SEND_TYPE_ARG3 int213214/* Define to the type of arg 4 for send. */215#define SEND_TYPE_ARG4 int216217/* Define to the function return type for send. */218#define SEND_TYPE_RETV int219220/* Define to 1 if you have the snprintf function. */221#if (defined(_MSC_VER) && (_MSC_VER >= 1900)) || defined(__MINGW32__)222#define HAVE_SNPRINTF 1223#endif224225/* Vista */226#if (defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x600) && !defined(UNDER_CE)227/* Define to 1 if you have an IPv6 capable working inet_ntop function. */228#define HAVE_INET_NTOP 1229/* Define to 1 if you have an IPv6 capable working inet_pton function. */230#define HAVE_INET_PTON 1231#endif232233/* Define to 1 if you have the `basename' function. */234#ifdef __MINGW32__235#define HAVE_BASENAME 1236#endif237238/* Define to 1 if you have the signal function. */239#ifndef UNDER_CE240#define HAVE_SIGNAL 1241#endif242243/* ---------------------------------------------------------------- */244/* TYPEDEF REPLACEMENTS */245/* ---------------------------------------------------------------- */246247/* Define if ssize_t is not an available 'typedefed' type. */248#ifndef _SSIZE_T_DEFINED249# ifdef __MINGW32__250# elif defined(_WIN64)251# define _SSIZE_T_DEFINED252# define ssize_t __int64253# else254# define _SSIZE_T_DEFINED255# define ssize_t int256# endif257#endif258259/* ---------------------------------------------------------------- */260/* TYPE SIZES */261/* ---------------------------------------------------------------- */262263/* Define to the size of `int', as computed by sizeof. */264#define SIZEOF_INT 4265266/* Define to the size of `long long', as computed by sizeof. */267/* #define SIZEOF_LONG_LONG 8 */268269/* Define to the size of `long', as computed by sizeof. */270#define SIZEOF_LONG 4271272/* Define to the size of `size_t', as computed by sizeof. */273#ifdef _WIN64274# define SIZEOF_SIZE_T 8275#else276# define SIZEOF_SIZE_T 4277#endif278279/* Define to the size of `curl_off_t', as computed by sizeof. */280#define SIZEOF_CURL_OFF_T 8281282/* ---------------------------------------------------------------- */283/* COMPILER SPECIFIC */284/* ---------------------------------------------------------------- */285286/* Define to nothing if compiler does not support 'const' qualifier. */287/* #define const */288289/* Define to nothing if compiler does not support 'volatile' qualifier. */290/* #define volatile */291292/* Windows should not have HAVE_GMTIME_R defined */293/* #undef HAVE_GMTIME_R */294295/* Define if the compiler supports the 'long long' data type. */296#if defined(_MSC_VER) || defined(__MINGW32__)297#define HAVE_LONGLONG 1298#endif299300/* Default to 64-bit time_t unless _USE_32BIT_TIME_T is defined */301#if defined(_MSC_VER) || defined(__MINGW32__)302# ifndef _USE_32BIT_TIME_T303# define SIZEOF_TIME_T 8304# else305# define SIZEOF_TIME_T 4306# endif307#endif308309#ifndef UNDER_CE310311/* Define some minimum and default build targets for Visual Studio */312#ifdef _MSC_VER313/* Officially, Microsoft's Windows SDK versions 6.X does not support Windows3142000 as a supported build target. VS2008 default installations provides315an embedded Windows SDK v6.0A along with the claim that Windows 2000 is a316valid build target for VS2008. Popular belief is that binaries built with317VS2008 using Windows SDK versions v6.X and Windows 2000 as a build target318are functional. */319# define VS2008_MIN_TARGET 0x0500320321/* The minimum build target for VS2012 is Vista unless Update 1 is installed322and the v110_xp toolset is chosen. */323# ifdef _USING_V110_SDK71_324# define VS2012_MIN_TARGET 0x0501325# else326# define VS2012_MIN_TARGET 0x0600327# endif328329/* VS2008 default build target is Windows Vista. We override default target330to be Windows XP. */331# define VS2008_DEF_TARGET 0x0501332333/* VS2012 default build target is Windows Vista unless Update 1 is installed334and the v110_xp toolset is chosen. */335# ifdef _USING_V110_SDK71_336# define VS2012_DEF_TARGET 0x0501337# else338# define VS2012_DEF_TARGET 0x0600339# endif340#endif341342/* VS2008 default target settings and minimum build target check. */343#if defined(_MSC_VER) && (_MSC_VER <= 1600)344# ifndef _WIN32_WINNT345# define _WIN32_WINNT VS2008_DEF_TARGET346# endif347# ifndef WINVER348# define WINVER VS2008_DEF_TARGET349# endif350# if (_WIN32_WINNT < VS2008_MIN_TARGET) || (WINVER < VS2008_MIN_TARGET)351# error VS2008 does not support Windows build targets prior to Windows 2000352# endif353#endif354355/* VS2012 default target settings and minimum build target check. */356#if defined(_MSC_VER) && (_MSC_VER >= 1700)357# ifndef _WIN32_WINNT358# define _WIN32_WINNT VS2012_DEF_TARGET359# endif360# ifndef WINVER361# define WINVER VS2012_DEF_TARGET362# endif363# if (_WIN32_WINNT < VS2012_MIN_TARGET) || (WINVER < VS2012_MIN_TARGET)364# ifdef _USING_V110_SDK71_365# error VS2012 does not support Windows build targets prior to Windows XP366# else367# error VS2012 does not support Windows build targets prior to Windows \368Vista369# endif370# endif371#endif372373#endif /* UNDER_CE */374375/* Windows XP is required for freeaddrinfo, getaddrinfo */376#ifndef UNDER_CE377#define HAVE_FREEADDRINFO 1378#define HAVE_GETADDRINFO 1379#define HAVE_GETADDRINFO_THREADSAFE 1380#endif381382/* ---------------------------------------------------------------- */383/* STRUCT RELATED */384/* ---------------------------------------------------------------- */385386/* Define if you have struct sockaddr_storage. */387#define HAVE_STRUCT_SOCKADDR_STORAGE 1388389/* Define if you have struct timeval. */390#define HAVE_STRUCT_TIMEVAL 1391392/* Define if struct sockaddr_in6 has the sin6_scope_id member. */393#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1394395/* ---------------------------------------------------------------- */396/* LARGE FILE SUPPORT */397/* ---------------------------------------------------------------- */398399#ifndef UNDER_CE400401#if defined(_MSC_VER) || defined(__MINGW32__)402# define USE_WIN32_LARGE_FILES403/* Number of bits in a file offset, on hosts where this is settable. */404# ifdef __MINGW32__405# ifndef _FILE_OFFSET_BITS406# define _FILE_OFFSET_BITS 64407# endif408# endif409#endif410411/* Define to the size of `off_t', as computed by sizeof. */412#if defined(__MINGW32__) && \413defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)414# define SIZEOF_OFF_T 8415#else416# define SIZEOF_OFF_T 4417#endif418419#endif /* UNDER_CE */420421/* ---------------------------------------------------------------- */422/* DNS RESOLVER SPECIALTY */423/* ---------------------------------------------------------------- */424425/*426* Undefine both USE_ARES and USE_THREADS_WIN32 for synchronous DNS.427*/428429/* Define to enable c-ares asynchronous DNS lookups. */430/* #define USE_ARES 1 */431432/* Default define to enable threaded asynchronous DNS lookups. */433#if !defined(USE_SYNC_DNS) && !defined(USE_ARES) && \434!defined(USE_THREADS_WIN32)435# define USE_THREADS_WIN32 1436#endif437438#if defined(USE_ARES) && defined(USE_THREADS_WIN32)439# error "Only one DNS lookup specialty may be defined at most"440#endif441442/* ---------------------------------------------------------------- */443/* LDAP SUPPORT */444/* ---------------------------------------------------------------- */445446#ifdef CURL_HAS_OPENLDAP_LDAPSDK447#undef USE_WIN32_LDAP448#define HAVE_LDAP_URL_PARSE 1449#elif !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)450#undef HAVE_LDAP_URL_PARSE451#define HAVE_LDAP_SSL 1452#define USE_WIN32_LDAP 1453#endif454455/* Define to use the Windows crypto library. */456#ifndef CURL_WINDOWS_UWP457#define USE_WIN32_CRYPTO458#endif459460/* Define to use Unix sockets. */461#ifndef UNDER_CE462#define USE_UNIX_SOCKETS463#endif464465/* ---------------------------------------------------------------- */466/* ADDITIONAL DEFINITIONS */467/* ---------------------------------------------------------------- */468469/* Define cpu-machine-OS */470#ifndef CURL_OS471# ifdef UNDER_CE472# ifdef _M_ARM473# define CURL_OS "arm-pc-win32ce"474# else475# define CURL_OS "i386-pc-win32ce"476# endif477# else /* !UNDER_CE */478# if defined(_M_IX86) || defined(__i386__) /* x86 (MSVC or gcc) */479# define CURL_OS "i386-pc-win32"480# elif defined(_M_X64) || defined(__x86_64__) /* x86_64 (VS2005+ or gcc) */481# define CURL_OS "x86_64-pc-win32"482# elif defined(_M_IA64) || defined(__ia64__) /* Itanium */483# define CURL_OS "ia64-pc-win32"484# elif defined(_M_ARM_NT) || defined(__arm__) /* ARMv7-Thumb2 */485# define CURL_OS "thumbv7a-pc-win32"486# elif defined(_M_ARM64) || defined(__aarch64__) /* ARM64 (Windows 10) */487# define CURL_OS "aarch64-pc-win32"488# else489# define CURL_OS "unknown-pc-win32"490# endif491# endif /* UNDER_CE */492#endif /* !CURL_OS */493494/* ---------------------------------------------------------------- */495/* Windows CE */496/* ---------------------------------------------------------------- */497498#ifdef UNDER_CE499500#ifndef UNICODE501#define UNICODE502#endif503504#ifndef _UNICODE505#define _UNICODE506#endif507508#define CURL_DISABLE_FILE 1509#define CURL_DISABLE_TELNET 1510#define CURL_DISABLE_LDAP 1511512#ifndef _MSC_VER513extern int stat(const char *path, struct stat *buffer);514#endif515516#endif /* UNDER_CE */517518#endif /* HEADER_CURL_CONFIG_WIN32_H */519520521