https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9dedcb67e958078f380f9fd8beac0e05486055b1

commit 9dedcb67e958078f380f9fd8beac0e05486055b1
Author:     Timo Kreuzer <[email protected]>
AuthorDate: Fri Oct 11 18:43:07 2024 +0200
Commit:     Timo Kreuzer <[email protected]>
CommitDate: Sat Nov 16 20:01:49 2024 +0200

    [VCRUNTIME][CRT] Change WCHAR_MIN/WCHAR_MAX to match native headers
    
    This avoids conflicting definitions with MS CRT headers.
---
 sdk/include/crt/wchar.h        | 4 ++--
 sdk/include/vcruntime/stdint.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sdk/include/crt/wchar.h b/sdk/include/crt/wchar.h
index c558279ed47..b4930959ce6 100644
--- a/sdk/include/crt/wchar.h
+++ b/sdk/include/crt/wchar.h
@@ -25,10 +25,10 @@ extern "C" {
 #endif
 
 #ifndef WCHAR_MIN
-#define WCHAR_MIN 0
+#define WCHAR_MIN 0x0000
 #endif
 #ifndef WCHAR_MAX
-#define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */
+#define WCHAR_MAX 0xffff /* UINT16_MAX */
 #endif
 
 #ifndef WEOF
diff --git a/sdk/include/vcruntime/stdint.h b/sdk/include/vcruntime/stdint.h
index a73ded330a8..1c3a0507706 100644
--- a/sdk/include/vcruntime/stdint.h
+++ b/sdk/include/vcruntime/stdint.h
@@ -158,10 +158,10 @@ __MINGW_EXTENSION typedef unsigned long long   uintmax_t;
 #endif
 
 #ifndef WCHAR_MIN  /* also in wchar.h */
-#define WCHAR_MIN 0
+#define WCHAR_MIN 0x0000
 #endif
 #ifndef WCHAR_MAX
-#define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */
+#define WCHAR_MAX 0xffff /* UINT16_MAX */
 #endif
 
 /*

Reply via email to