From: Jay Satiro Date: Mon, 29 Aug 2022 07:59:23 +0000 (-0400) Subject: setup-win32: no longer define UNICODE/_UNICODE implicitly X-Git-Tag: curl-7_86_0~290 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2ae81e680b8d6f8b9eb36fd1a2e223783526dbdd;p=thirdparty%2Fcurl.git setup-win32: no longer define UNICODE/_UNICODE implicitly - If UNICODE or _UNICODE is defined but the other isn't then error instead of implicitly defining it. As Marcel pointed out it is too late at this point to make such a define because Windows headers may already be included, so likely it never worked. We never noticed because build systems that can make Windows Unicode builds always define both. If one is defined but not the other then something went wrong during the build configuration. Bug: https://github.com/curl/curl/pull/9375#discussion_r956545272 Reported-by: Marcel Raad Closes https://github.com/curl/curl/pull/9384 --- diff --git a/lib/setup-win32.h b/lib/setup-win32.h index e54f9d7980..bc5f8efc3c 100644 --- a/lib/setup-win32.h +++ b/lib/setup-win32.h @@ -37,10 +37,10 @@ #ifdef HAVE_WINDOWS_H # if defined(UNICODE) && !defined(_UNICODE) -# define _UNICODE +# error "UNICODE is defined but _UNICODE is not defined" # endif # if defined(_UNICODE) && !defined(UNICODE) -# define UNICODE +# error "_UNICODE is defined but UNICODE is not defined" # endif /* * Don't include unneeded stuff in Windows headers to avoid compiler