W dniu 18.10.2018 o 19:51, Martin Storsjö pisze: > Signed-off-by: Martin Storsjö <mar...@martin.st> > --- > This fixes a testcase like this: > > #include <stdio.h> > #include <locale.h> > #include <ctype.h> > > int main(int argc, char const *argv[]) > { > _locale_t loc = _create_locale(LC_ALL, "C"); > int ret = _isdigit_l('3', loc); > printf ("%d\n", ret); > return 0; > } > --- > mingw-w64-headers/crt/crtdefs.h | 6 ++++++ > mingw-w64-headers/crt/ctype.h | 5 +++++ > 2 files changed, 11 insertions(+) > > diff --git a/mingw-w64-headers/crt/crtdefs.h b/mingw-w64-headers/crt/crtdefs.h > index 20ba574..84c0455 100644 > --- a/mingw-w64-headers/crt/crtdefs.h > +++ b/mingw-w64-headers/crt/crtdefs.h > @@ -442,6 +442,11 @@ typedef struct tagLC_ID { > #ifndef _THREADLOCALEINFO > #define _THREADLOCALEINFO > typedef struct threadlocaleinfostruct { > +#ifdef __MSVCRT_VERSION__ >= 0x1400
This gives warning. Maybe we should use #if __MSVCRT_VERSION__ >= 0x1400 instead? > + const unsigned short *_locale_pctype; > + int _locale_mb_cur_max; > + unsigned int _locale_lc_codepage; > +#else > int refcount; > unsigned int lc_codepage; > unsigned int lc_collate_cp; > @@ -465,6 +470,7 @@ typedef struct threadlocaleinfostruct { > const unsigned char *pclmap; > const unsigned char *pcumap; > struct __lc_time_data *lc_time_curr; > +#endif > } threadlocinfo; > #endif /* _THREADLOCALEINFO */ > > diff --git a/mingw-w64-headers/crt/ctype.h b/mingw-w64-headers/crt/ctype.h > index a85ad96..e6449b3 100644 > --- a/mingw-w64-headers/crt/ctype.h > +++ b/mingw-w64-headers/crt/ctype.h > @@ -209,8 +209,13 @@ _CRTIMP int __cdecl ___mb_cur_max_func(void); > #endif > > #define __chvalidchk(a,b) (__PCTYPE_FUNC[(unsigned char)(a)] & (b)) > +#ifdef __MSVCRT_VERSION__ >= 0x1400 And here also. Regards, Mateusz _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public