Module: wine
Branch: master
Commit: 56e6ce93b8b4c35ee4bef0b6be75c05ebf6d7763
URL: https://source.winehq.org/git/wine.git/?a=commit;h=56e6ce93b8b4c35ee4bef0b6…
Author: Martin Storsjo <martin(a)martin.st>
Date: Wed Oct 2 23:12:32 2019 +0300
msvcrt: Fix the layout of threadlocaleinfostruct for ucrt.
In ucrt, this struct has a different layout, with only three fields
exposed in headers (which can be used by inline functions).
This fixes use of some ctype.h functions like e.g. _isdigit_l
from applications that use ucrt (both with MSVC and mingw-w64).
Signed-off-by: Martin Storsjo <martin(a)martin.st>
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/msvcrt/msvcrt.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h
index 552b48aa53..6e0e338a20 100644
--- a/dlls/msvcrt/msvcrt.h
+++ b/dlls/msvcrt/msvcrt.h
@@ -163,8 +163,16 @@ typedef struct {
} MSVCRT___lc_time_data;
typedef struct MSVCRT_threadlocaleinfostruct {
+#if _MSVCR_VER >= 140
+ unsigned short *pctype;
+ int mb_cur_max;
+ unsigned int lc_codepage;
+#endif
+
int refcount;
+#if _MSVCR_VER < 140
unsigned int lc_codepage;
+#endif
unsigned int lc_collate_cp;
MSVCRT_ulong lc_handle[6];
MSVCRT_LC_ID lc_id[6];
@@ -175,14 +183,18 @@ typedef struct MSVCRT_threadlocaleinfostruct {
int *wrefcount;
} lc_category[6];
int lc_clike;
+#if _MSVCR_VER < 140
int mb_cur_max;
+#endif
int *lconv_intl_refcount;
int *lconv_num_refcount;
int *lconv_mon_refcount;
struct MSVCRT_lconv *lconv;
int *ctype1_refcount;
unsigned short *ctype1;
+#if _MSVCR_VER < 140
unsigned short *pctype;
+#endif
unsigned char *pclmap;
unsigned char *pcumap;
MSVCRT___lc_time_data *lc_time_curr;