_wctype is a global variable exported from CRT library and therefore has to
be always accessed by the import symbol via __MINGW_IMP_SYMBOL(_wctype).

There is no CRT function which could return pointer to this variable.

_wctype variable is present since msvcr70.dll and also since Windows Server
2003 version of msvcrt.dll. It is present also in UCRT. For older versions
there is no fallback or emulation.
---
 mingw-w64-headers/crt/ctype.h  | 4 ----
 mingw-w64-headers/crt/wchar.h  | 4 ----
 mingw-w64-headers/crt/wctype.h | 4 ----
 3 files changed, 12 deletions(-)

diff --git a/mingw-w64-headers/crt/ctype.h b/mingw-w64-headers/crt/ctype.h
index 1fb3fbba20d4..d4f3ce26d3f2 100644
--- a/mingw-w64-headers/crt/ctype.h
+++ b/mingw-w64-headers/crt/ctype.h
@@ -36,12 +36,8 @@ extern "C" {
 #define _CRT_WCTYPEDATA_DEFINED
 #ifndef _CTYPE_DISABLE_MACROS
 #if !defined(_wctype) && defined(_CRT_USE_WINAPI_FAMILY_DESKTOP_APP)
-#ifdef _MSVCRT_
-  extern const unsigned short *_wctype;
-#else
   extern const unsigned short ** __MINGW_IMP_SYMBOL(_wctype);
 #define _wctype (* __MINGW_IMP_SYMBOL(_wctype))
-#endif
 #endif
 
   _CRTIMP const wctype_t * __cdecl __pwctype_func(void);
diff --git a/mingw-w64-headers/crt/wchar.h b/mingw-w64-headers/crt/wchar.h
index c219e1fee9a8..8f183c16f106 100644
--- a/mingw-w64-headers/crt/wchar.h
+++ b/mingw-w64-headers/crt/wchar.h
@@ -167,12 +167,8 @@ _CRTIMP FILE *__cdecl __acrt_iob_func(unsigned index);
 #define _CRT_WCTYPEDATA_DEFINED
 #ifndef _CTYPE_DISABLE_MACROS
 #if !defined(_wctype) && defined(_CRT_USE_WINAPI_FAMILY_DESKTOP_APP)
-#ifdef _MSVCRT_
-  extern const unsigned short *_wctype;
-#else
   extern const unsigned short ** __MINGW_IMP_SYMBOL(_wctype);
 #define _wctype (* __MINGW_IMP_SYMBOL(_wctype))
-#endif
 #endif
 
   _CRTIMP const wctype_t * __cdecl __pwctype_func(void);
diff --git a/mingw-w64-headers/crt/wctype.h b/mingw-w64-headers/crt/wctype.h
index a9c8afeebc70..b45ba26c9e53 100644
--- a/mingw-w64-headers/crt/wctype.h
+++ b/mingw-w64-headers/crt/wctype.h
@@ -59,12 +59,8 @@ extern "C" {
 #define _CRT_WCTYPEDATA_DEFINED
 #ifndef _CTYPE_DISABLE_MACROS
 #if !defined(_wctype) && defined(_CRT_USE_WINAPI_FAMILY_DESKTOP_APP)
-#ifdef _MSVCRT_
-  extern const unsigned short *_wctype;
-#else
   extern const unsigned short ** __MINGW_IMP_SYMBOL(_wctype);
 #define _wctype (* __MINGW_IMP_SYMBOL(_wctype))
-#endif
 #endif
 
   _CRTIMP const wctype_t * __cdecl __pwctype_func(void);
-- 
2.20.1



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to