tidy-up: curl_setup.h, curl_setup_once.h, config-win32ce.h

- drop unused `LIBIDN_REQUIRED_VERSION` macro.
  Unused since 9c91ec7781

- 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 to 7d7346519d #1542 (2017)
  Follow-up to c2aeb1b3ba #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:
Viktor Szakats 2025-01-11 00:36:10 +01:00
parent de3e662ce1
commit b9840814ad
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201
3 changed files with 34 additions and 43 deletions

View File

@ -264,11 +264,11 @@
/* ---------------------------------------------------------------- */
#ifndef UNICODE
# define UNICODE
#define UNICODE
#endif
#ifndef _UNICODE
# define _UNICODE
#define _UNICODE
#endif
#define CURL_DISABLE_FILE 1

View File

@ -122,8 +122,8 @@
#endif
/* Compatibility */
#if defined(ENABLE_IPV6)
# define USE_IPV6 1
#ifdef ENABLE_IPV6
#define USE_IPV6 1
#endif
/*
@ -139,10 +139,8 @@
#ifdef _WIN32_WCE
# include "config-win32ce.h"
#else
# ifdef _WIN32
#elif defined(_WIN32)
# include "config-win32.h"
# endif
#endif
#ifdef macintosh
@ -519,11 +517,11 @@
#endif
#ifndef struct_stat
# define struct_stat struct stat
#define struct_stat struct stat
#endif
#ifndef LSEEK_ERROR
# define LSEEK_ERROR (off_t)-1
#define LSEEK_ERROR (off_t)-1
#endif
#ifndef SIZEOF_TIME_T
@ -694,9 +692,9 @@
/*
* MSVC threads support requires a multi-threaded runtime library.
* _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)
#if defined(_MSC_VER) && !defined(_MT) /* available in _MSC_VER <= 1400 */
# undef USE_THREADS_POSIX
# undef USE_THREADS_WIN32
#endif
@ -739,8 +737,6 @@
#error "libidn2 cannot be enabled with WinIDN or AppleIDN, choose one."
#endif
#define LIBIDN_REQUIRED_VERSION "0.4.1"
#if defined(USE_GNUTLS) || defined(USE_OPENSSL) || defined(USE_MBEDTLS) || \
defined(USE_WOLFSSL) || defined(USE_SCHANNEL) || defined(USE_SECTRANSP) || \
defined(USE_BEARSSL) || defined(USE_RUSTLS)
@ -788,10 +784,6 @@
# 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)
#define USE_SSH
#endif
@ -855,7 +847,7 @@
*/
#ifndef Curl_nop_stmt
# define Curl_nop_stmt do { } while(0)
#define Curl_nop_stmt do { } while(0)
#endif
/*
@ -955,7 +947,7 @@ int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf,
#define UNITTEST static
#endif
#if defined(USE_NGHTTP2)
#ifdef USE_NGHTTP2
#define USE_HTTP2
#endif

View File

@ -24,7 +24,6 @@
*
***************************************************************************/
/*
* Inclusion of common header files.
*/