]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
windows: drop dupe macros, detect `CURL_OS` for WinCE ARM, indentation
authorViktor Szakats <commit@vsz.me>
Thu, 16 Jan 2025 14:31:54 +0000 (15:31 +0100)
committerViktor Szakats <commit@vsz.me>
Fri, 17 Jan 2025 11:56:43 +0000 (12:56 +0100)
- setup-win32: drop duplicate `WIN32_LEAN_AND_MEAN` and `NOGDI` macros
  (set earlier in `curl_setup.h`)

- config-win32ce: detect ARM for `CURL_OS` macro.
  Based on: https://cegcc.sourceforge.net/docs/details.html
  It should also apply to MSVC. (untested)

- indentation.

Closes #16029

lib/config-win32ce.h
lib/curl_sspi.h
lib/setup-win32.h
lib/vtls/schannel.c
tests/libtest/lib556.c

index 6012ceb511b2b67b1fd08d96c7c460c32089f7dd..71f893ce88933f161f9e437aff704dc9d5d86950 100644 (file)
 
 /* Define cpu-machine-OS */
 #ifndef CURL_OS
+#ifdef _M_ARM
+#define CURL_OS "arm-pc-win32ce"
+#else
 #define CURL_OS "i386-pc-win32ce"
 #endif
+#endif
 
 /* ---------------------------------------------------------------- */
 /*                            Windows CE                            */
index 535a1ff650a53186df6e63340e675a18f0688044..ac39afa253e81bd4ec21c6d9dd88e4751b4a87f0 100644 (file)
@@ -81,27 +81,27 @@ extern PSecurityFunctionTable Curl_pSecFn;
 #endif
 
 #ifndef SEC_I_SIGNATURE_NEEDED
-# define SEC_I_SIGNATURE_NEEDED               ((HRESULT)0x0009035CL)
+#define SEC_I_SIGNATURE_NEEDED                ((HRESULT)0x0009035CL)
 #endif
 
 #ifndef CRYPT_E_REVOKED
-# define CRYPT_E_REVOKED                      ((HRESULT)0x80092010L)
+#define CRYPT_E_REVOKED                       ((HRESULT)0x80092010L)
 #endif
 
 #ifndef CRYPT_E_NO_REVOCATION_DLL
-# define CRYPT_E_NO_REVOCATION_DLL            ((HRESULT)0x80092011L)
+#define CRYPT_E_NO_REVOCATION_DLL             ((HRESULT)0x80092011L)
 #endif
 
 #ifndef CRYPT_E_NO_REVOCATION_CHECK
-# define CRYPT_E_NO_REVOCATION_CHECK          ((HRESULT)0x80092012L)
+#define CRYPT_E_NO_REVOCATION_CHECK           ((HRESULT)0x80092012L)
 #endif
 
 #ifndef CRYPT_E_REVOCATION_OFFLINE
-# define CRYPT_E_REVOCATION_OFFLINE           ((HRESULT)0x80092013L)
+#define CRYPT_E_REVOCATION_OFFLINE            ((HRESULT)0x80092013L)
 #endif
 
 #ifndef CRYPT_E_NOT_IN_REVOCATION_DATABASE
-# define CRYPT_E_NOT_IN_REVOCATION_DATABASE   ((HRESULT)0x80092014L)
+#define CRYPT_E_NOT_IN_REVOCATION_DATABASE    ((HRESULT)0x80092014L)
 #endif
 
 #ifdef UNICODE
index a297bdcff467e947a10054fa70eb2108b7c34db3..70d83ad8e96fd9029b4bdcdbd495313a2f644cc2 100644 (file)
 #  if defined(_UNICODE) && !defined(UNICODE)
 #    error "_UNICODE is defined but UNICODE is not defined"
 #  endif
-/*
- * Do not include unneeded stuff in Windows headers to avoid compiler
- * warnings and macro clashes.
- * Make sure to define this macro before including any Windows headers.
- */
-#  ifndef WIN32_LEAN_AND_MEAN
-#    define WIN32_LEAN_AND_MEAN
-#  endif
-#  ifndef NOGDI
-#    define NOGDI
-#  endif
 #  include <winsock2.h>
 #  include <ws2tcpip.h>
 #  include <windows.h>
index 93348f05e26383abb09e8076694a37f36acee9fb..8441b467d27362f347f4697adf10aa2a5e7b9780 100644 (file)
  */
 
 #ifndef CALG_SHA_256
-#  define CALG_SHA_256 0x0000800c
+#define CALG_SHA_256 0x0000800c
 #endif
 
 #ifndef PKCS12_NO_PERSIST_KEY
index 36f845ff7a40fdd765010aaa49ea38ae7642d314..31818dc8a2f0a83c49fe215468dbe23935010ab3 100644 (file)
 
 /* For Windows, mainly (may be moved in a config file?) */
 #ifndef STDIN_FILENO
-  #define STDIN_FILENO 0
+#define STDIN_FILENO 0
 #endif
 #ifndef STDOUT_FILENO
-  #define STDOUT_FILENO 1
+#define STDOUT_FILENO 1
 #endif
 #ifndef STDERR_FILENO
-  #define STDERR_FILENO 2
+#define STDERR_FILENO 2
 #endif
 
 CURLcode test(char *URL)