Jacek Caban : include: Avoid macro redefinition when wchar.h is included after stdint.h.

Alexandre Julliard julliard at winehq.org
Tue Oct 22 16:57:01 CDT 2019


Module: wine
Branch: master
Commit: bd7132e3123c54c4dc338e9de158da3615fc0c0f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=bd7132e3123c54c4dc338e9de158da3615fc0c0f

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Oct 22 15:54:08 2019 +0200

include: Avoid macro redefinition when wchar.h is included after stdint.h.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/msvcrt/wchar.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h
index 7761f5a7b2..7f8141a453 100644
--- a/include/msvcrt/wchar.h
+++ b/include/msvcrt/wchar.h
@@ -26,8 +26,10 @@ extern "C" {
 #endif
 #endif
 
-#define WCHAR_MIN 0
-#define WCHAR_MAX ((wchar_t)-1)
+#ifndef WCHAR_MIN  /* also in stdint.h */
+#define WCHAR_MIN 0U
+#define WCHAR_MAX 0xffffU
+#endif
 
 #ifndef DECLSPEC_ALIGN
 # if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS)




More information about the wine-cvs mailing list