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