[PATCHv2] msvcrt: Fix the layout of threadlocaleinfostruct for ucrt
Martin Storsjo
martin at martin.st
Wed Oct 2 15:12:32 CDT 2019
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 at martin.st>
---
Removed the C++ style comments, as suggested by Piotr.
---
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;
--
2.17.1
More information about the wine-devel
mailing list