Commit 56e6ce93 authored by Martin Storsjo's avatar Martin Storsjo Committed by Alexandre Julliard

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: 's avatarMartin Storsjo <martin@martin.st> Signed-off-by: 's avatarPiotr Caban <piotr@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 37624027
...@@ -163,8 +163,16 @@ typedef struct { ...@@ -163,8 +163,16 @@ typedef struct {
} MSVCRT___lc_time_data; } MSVCRT___lc_time_data;
typedef struct MSVCRT_threadlocaleinfostruct { typedef struct MSVCRT_threadlocaleinfostruct {
#if _MSVCR_VER >= 140
unsigned short *pctype;
int mb_cur_max;
unsigned int lc_codepage;
#endif
int refcount; int refcount;
#if _MSVCR_VER < 140
unsigned int lc_codepage; unsigned int lc_codepage;
#endif
unsigned int lc_collate_cp; unsigned int lc_collate_cp;
MSVCRT_ulong lc_handle[6]; MSVCRT_ulong lc_handle[6];
MSVCRT_LC_ID lc_id[6]; MSVCRT_LC_ID lc_id[6];
...@@ -175,14 +183,18 @@ typedef struct MSVCRT_threadlocaleinfostruct { ...@@ -175,14 +183,18 @@ typedef struct MSVCRT_threadlocaleinfostruct {
int *wrefcount; int *wrefcount;
} lc_category[6]; } lc_category[6];
int lc_clike; int lc_clike;
#if _MSVCR_VER < 140
int mb_cur_max; int mb_cur_max;
#endif
int *lconv_intl_refcount; int *lconv_intl_refcount;
int *lconv_num_refcount; int *lconv_num_refcount;
int *lconv_mon_refcount; int *lconv_mon_refcount;
struct MSVCRT_lconv *lconv; struct MSVCRT_lconv *lconv;
int *ctype1_refcount; int *ctype1_refcount;
unsigned short *ctype1; unsigned short *ctype1;
#if _MSVCR_VER < 140
unsigned short *pctype; unsigned short *pctype;
#endif
unsigned char *pclmap; unsigned char *pclmap;
unsigned char *pcumap; unsigned char *pcumap;
MSVCRT___lc_time_data *lc_time_curr; MSVCRT___lc_time_data *lc_time_curr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment