tidy-up: prefer ifdef/ifndef for single checks

Closes #18018
This commit is contained in:
Viktor Szakats 2025-07-25 14:31:16 +02:00
parent b2bccdc257
commit 89771d19d5
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
109 changed files with 319 additions and 324 deletions

View file

@ -331,10 +331,10 @@
#define CURL_CONC_MACROS(A,B) CURL_CONC_MACROS_(A,B)
/* curl uses its own printf() function internally. It understands the GNU
* format. Use this format, so that is matches the GNU format attribute we
* format. Use this format, so that it matches the GNU format attribute we
* use with the MinGW compiler, allowing it to verify them at compile-time.
*/
#ifdef __MINGW32__
#ifdef __MINGW32__
# undef CURL_FORMAT_CURL_OFF_T
# undef CURL_FORMAT_CURL_OFF_TU
# define CURL_FORMAT_CURL_OFF_T "lld"
@ -549,11 +549,11 @@
#ifndef SIZEOF_OFF_T
# if defined(__VMS) && !defined(__VAX)
# if defined(_LARGEFILE)
# ifdef _LARGEFILE
# define SIZEOF_OFF_T 8
# endif
# elif defined(__OS400__) && defined(__ILEC400__)
# if defined(_LARGE_FILES)
# ifdef _LARGE_FILES
# define SIZEOF_OFF_T 8
# endif
# elif defined(__MVS__) && defined(__IBMC__)
@ -932,7 +932,7 @@ endings either CRLF or LF so 't' is appropriate.
/* for systems that do not detect this in configure */
#ifndef CURL_SA_FAMILY_T
# if defined(HAVE_SA_FAMILY_T)
# ifdef HAVE_SA_FAMILY_T
# define CURL_SA_FAMILY_T sa_family_t
# elif defined(HAVE_ADDRESS_FAMILY)
# define CURL_SA_FAMILY_T ADDRESS_FAMILY
@ -1003,7 +1003,7 @@ int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf,
#endif
#if defined(USE_UNIX_SOCKETS) && defined(_WIN32)
# if !defined(UNIX_PATH_MAX)
# ifndef UNIX_PATH_MAX
/* Replicating logic present in afunix.h
(distributed with newer Windows 10 SDK versions only) */
# define UNIX_PATH_MAX 108