tidy-up: curl_setup.h, curl_setup_once.h, config-win32ce.h
- drop unused `LIBIDN_REQUIRED_VERSION` macro. Unused since9c91ec7781- drop compatibility error for `CURL_WANTS_CA_BUNDLE_ENV`. This macro was once set by `Makefile.mk` and Watcom makefiles. They are no longer supported, making the compatibility message moot. Follow-up to7d7346519d#1542 (2017) Follow-up toc2aeb1b3ba#1538 (2017) - document last MSVC supporting the `!_MT` condition Ref: https://stackoverflow.com/questions/2278919/are-the-time-functions-of-msvc-thread-safe - flatten an `#if` tree, prefer `#ifdef`. - fix/adjust indentation, whitespace. Closes #15967
This commit is contained in:
parent
de3e662ce1
commit
b9840814ad
@ -264,11 +264,11 @@
|
|||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
|
|
||||||
#ifndef UNICODE
|
#ifndef UNICODE
|
||||||
# define UNICODE
|
#define UNICODE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _UNICODE
|
#ifndef _UNICODE
|
||||||
# define _UNICODE
|
#define _UNICODE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CURL_DISABLE_FILE 1
|
#define CURL_DISABLE_FILE 1
|
||||||
|
|||||||
@ -104,26 +104,26 @@
|
|||||||
* Make sure to define this macro before including any Windows headers.
|
* Make sure to define this macro before including any Windows headers.
|
||||||
*/
|
*/
|
||||||
# ifndef WIN32_LEAN_AND_MEAN
|
# ifndef WIN32_LEAN_AND_MEAN
|
||||||
# define WIN32_LEAN_AND_MEAN
|
# define WIN32_LEAN_AND_MEAN
|
||||||
# endif
|
# endif
|
||||||
# ifndef NOGDI
|
# ifndef NOGDI
|
||||||
# define NOGDI
|
# define NOGDI
|
||||||
# endif
|
# endif
|
||||||
/* Detect Windows App environment which has a restricted access
|
/* Detect Windows App environment which has a restricted access
|
||||||
* to the Win32 APIs. */
|
* to the Win32 APIs. */
|
||||||
# if (defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602)) || \
|
# if (defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0602)) || \
|
||||||
defined(WINAPI_FAMILY)
|
defined(WINAPI_FAMILY)
|
||||||
# include <winapifamily.h>
|
# include <winapifamily.h>
|
||||||
# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
|
# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && \
|
||||||
!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||||
# define CURL_WINDOWS_UWP
|
# define CURL_WINDOWS_UWP
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Compatibility */
|
/* Compatibility */
|
||||||
#if defined(ENABLE_IPV6)
|
#ifdef ENABLE_IPV6
|
||||||
# define USE_IPV6 1
|
#define USE_IPV6 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -139,10 +139,8 @@
|
|||||||
|
|
||||||
#ifdef _WIN32_WCE
|
#ifdef _WIN32_WCE
|
||||||
# include "config-win32ce.h"
|
# include "config-win32ce.h"
|
||||||
#else
|
#elif defined(_WIN32)
|
||||||
# ifdef _WIN32
|
# include "config-win32.h"
|
||||||
# include "config-win32.h"
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef macintosh
|
#ifdef macintosh
|
||||||
@ -179,7 +177,7 @@
|
|||||||
|
|
||||||
#ifdef NEED_THREAD_SAFE
|
#ifdef NEED_THREAD_SAFE
|
||||||
# ifndef _THREAD_SAFE
|
# ifndef _THREAD_SAFE
|
||||||
# define _THREAD_SAFE
|
# define _THREAD_SAFE
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -191,14 +189,14 @@
|
|||||||
|
|
||||||
#ifdef NEED_REENTRANT
|
#ifdef NEED_REENTRANT
|
||||||
# ifndef _REENTRANT
|
# ifndef _REENTRANT
|
||||||
# define _REENTRANT
|
# define _REENTRANT
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Solaris needs this to get a POSIX-conformant getpwuid_r */
|
/* Solaris needs this to get a POSIX-conformant getpwuid_r */
|
||||||
#if defined(sun) || defined(__sun)
|
#if defined(sun) || defined(__sun)
|
||||||
# ifndef _POSIX_PTHREAD_SEMANTICS
|
# ifndef _POSIX_PTHREAD_SEMANTICS
|
||||||
# define _POSIX_PTHREAD_SEMANTICS 1
|
# define _POSIX_PTHREAD_SEMANTICS 1
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -449,9 +447,9 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#ifdef __TANDEM /* for ns*-tandem-nsk systems */
|
#ifdef __TANDEM /* for ns*-tandem-nsk systems */
|
||||||
# if ! defined __LP64
|
# if ! defined __LP64
|
||||||
# include <floss.h> /* FLOSS is only used for 32-bit builds. */
|
# include <floss.h> /* FLOSS is only used for 32-bit builds. */
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef STDC_HEADERS /* no standard C headers! */
|
#ifndef STDC_HEADERS /* no standard C headers! */
|
||||||
@ -519,11 +517,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef struct_stat
|
#ifndef struct_stat
|
||||||
# define struct_stat struct stat
|
#define struct_stat struct stat
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef LSEEK_ERROR
|
#ifndef LSEEK_ERROR
|
||||||
# define LSEEK_ERROR (off_t)-1
|
#define LSEEK_ERROR (off_t)-1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SIZEOF_TIME_T
|
#ifndef SIZEOF_TIME_T
|
||||||
@ -594,8 +592,8 @@
|
|||||||
# endif
|
# endif
|
||||||
# define CURL_UINT64_SUFFIX CURL_SUFFIX_CURL_OFF_TU
|
# define CURL_UINT64_SUFFIX CURL_SUFFIX_CURL_OFF_TU
|
||||||
# define CURL_UINT64_C(val) CURL_CONC_MACROS(val,CURL_UINT64_SUFFIX)
|
# define CURL_UINT64_C(val) CURL_CONC_MACROS(val,CURL_UINT64_SUFFIX)
|
||||||
# define FMT_PRId64 CURL_FORMAT_CURL_OFF_T
|
# define FMT_PRId64 CURL_FORMAT_CURL_OFF_T
|
||||||
# define FMT_PRIu64 CURL_FORMAT_CURL_OFF_TU
|
# define FMT_PRIu64 CURL_FORMAT_CURL_OFF_TU
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FMT_OFF_T CURL_FORMAT_CURL_OFF_T
|
#define FMT_OFF_T CURL_FORMAT_CURL_OFF_T
|
||||||
@ -694,9 +692,9 @@
|
|||||||
/*
|
/*
|
||||||
* MSVC threads support requires a multi-threaded runtime library.
|
* MSVC threads support requires a multi-threaded runtime library.
|
||||||
* _beginthreadex() is not available in single-threaded ones.
|
* _beginthreadex() is not available in single-threaded ones.
|
||||||
|
* Single-threaded option was last available in VS2005: _MSC_VER <= 1400
|
||||||
*/
|
*/
|
||||||
|
#if defined(_MSC_VER) && !defined(_MT) /* available in _MSC_VER <= 1400 */
|
||||||
#if defined(_MSC_VER) && !defined(_MT)
|
|
||||||
# undef USE_THREADS_POSIX
|
# undef USE_THREADS_POSIX
|
||||||
# undef USE_THREADS_WIN32
|
# undef USE_THREADS_WIN32
|
||||||
#endif
|
#endif
|
||||||
@ -739,8 +737,6 @@
|
|||||||
#error "libidn2 cannot be enabled with WinIDN or AppleIDN, choose one."
|
#error "libidn2 cannot be enabled with WinIDN or AppleIDN, choose one."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LIBIDN_REQUIRED_VERSION "0.4.1"
|
|
||||||
|
|
||||||
#if defined(USE_GNUTLS) || defined(USE_OPENSSL) || defined(USE_MBEDTLS) || \
|
#if defined(USE_GNUTLS) || defined(USE_OPENSSL) || defined(USE_MBEDTLS) || \
|
||||||
defined(USE_WOLFSSL) || defined(USE_SCHANNEL) || defined(USE_SECTRANSP) || \
|
defined(USE_WOLFSSL) || defined(USE_SCHANNEL) || defined(USE_SECTRANSP) || \
|
||||||
defined(USE_BEARSSL) || defined(USE_RUSTLS)
|
defined(USE_BEARSSL) || defined(USE_RUSTLS)
|
||||||
@ -788,10 +784,6 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CURL_WANTS_CA_BUNDLE_ENV
|
|
||||||
#error "No longer supported. Set CURLOPT_CAINFO at runtime instead."
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(USE_LIBSSH2) || defined(USE_LIBSSH) || defined(USE_WOLFSSH)
|
#if defined(USE_LIBSSH2) || defined(USE_LIBSSH) || defined(USE_WOLFSSH)
|
||||||
#define USE_SSH
|
#define USE_SSH
|
||||||
#endif
|
#endif
|
||||||
@ -855,7 +847,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef Curl_nop_stmt
|
#ifndef Curl_nop_stmt
|
||||||
# define Curl_nop_stmt do { } while(0)
|
#define Curl_nop_stmt do { } while(0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -955,7 +947,7 @@ int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf,
|
|||||||
#define UNITTEST static
|
#define UNITTEST static
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(USE_NGHTTP2)
|
#ifdef USE_NGHTTP2
|
||||||
#define USE_HTTP2
|
#define USE_HTTP2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,6 @@
|
|||||||
*
|
*
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Inclusion of common header files.
|
* Inclusion of common header files.
|
||||||
*/
|
*/
|
||||||
@ -106,8 +105,8 @@
|
|||||||
|
|
||||||
#ifndef HAVE_STRUCT_TIMEVAL
|
#ifndef HAVE_STRUCT_TIMEVAL
|
||||||
struct timeval {
|
struct timeval {
|
||||||
long tv_sec;
|
long tv_sec;
|
||||||
long tv_usec;
|
long tv_usec;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -228,8 +227,8 @@ struct timeval {
|
|||||||
|
|
||||||
#ifndef HAVE_BOOL_T
|
#ifndef HAVE_BOOL_T
|
||||||
typedef enum {
|
typedef enum {
|
||||||
bool_false = 0,
|
bool_false = 0,
|
||||||
bool_true = 1
|
bool_true = 1
|
||||||
} bool;
|
} bool;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -392,7 +391,7 @@ typedef unsigned int bit;
|
|||||||
#ifdef __VMS
|
#ifdef __VMS
|
||||||
#define argv_item_t __char_ptr32
|
#define argv_item_t __char_ptr32
|
||||||
#elif defined(_UNICODE)
|
#elif defined(_UNICODE)
|
||||||
#define argv_item_t wchar_t *
|
#define argv_item_t wchar_t *
|
||||||
#else
|
#else
|
||||||
#define argv_item_t char *
|
#define argv_item_t char *
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user