From: Marc Hoersken Date: Fri, 26 Aug 2022 19:16:47 +0000 (+0200) Subject: lib: add required Win32 setup definitions in setup-win32.h X-Git-Tag: curl-7_86_0~292 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0c68e2545ca69e0d25a6b5ef0f7816e61c160bd8;p=thirdparty%2Fcurl.git lib: add required Win32 setup definitions in setup-win32.h Assisted-by: Jay Satiro Reviewed-by: Marcel Raad Follow up to #9312 Closes #9375 --- diff --git a/CMake/CurlTests.c b/CMake/CurlTests.c index e55e3a6292..0ea7a541f0 100644 --- a/CMake/CurlTests.c +++ b/CMake/CurlTests.c @@ -539,17 +539,6 @@ main() { #ifdef HAVE_WIN32_WINNT /* includes start */ #ifdef WIN32 -/* - * Don't 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 "../lib/setup-win32.h" #endif /* includes end */ diff --git a/lib/setup-win32.h b/lib/setup-win32.h index c16928db90..e54f9d7980 100644 --- a/lib/setup-win32.h +++ b/lib/setup-win32.h @@ -42,6 +42,17 @@ # if defined(_UNICODE) && !defined(UNICODE) # define UNICODE # endif +/* + * Don't 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 # include # ifdef HAVE_WINSOCK2_H