Skip to content

Commit 9dedcb6

Browse files
committed
[VCRUNTIME][CRT] Change WCHAR_MIN/WCHAR_MAX to match native headers
This avoids conflicting definitions with MS CRT headers.
1 parent 53d3cc5 commit 9dedcb6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sdk/include/crt/wchar.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ extern "C" {
2525
#endif
2626

2727
#ifndef WCHAR_MIN
28-
#define WCHAR_MIN 0
28+
#define WCHAR_MIN 0x0000
2929
#endif
3030
#ifndef WCHAR_MAX
31-
#define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */
31+
#define WCHAR_MAX 0xffff /* UINT16_MAX */
3232
#endif
3333

3434
#ifndef WEOF

sdk/include/vcruntime/stdint.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ __MINGW_EXTENSION typedef unsigned long long uintmax_t;
158158
#endif
159159

160160
#ifndef WCHAR_MIN /* also in wchar.h */
161-
#define WCHAR_MIN 0
161+
#define WCHAR_MIN 0x0000
162162
#endif
163163
#ifndef WCHAR_MAX
164-
#define WCHAR_MAX ((wchar_t)-1) /* UINT16_MAX */
164+
#define WCHAR_MAX 0xffff /* UINT16_MAX */
165165
#endif
166166

167167
/*

0 commit comments

Comments
 (0)