On Wednesday 13 May 2026 09:00:07 Kirill Makurin wrote:
> Pali Rohár <[email protected]> wrote:
> > On Monday 11 May 2026 14:06:49 Kirill Makurin wrote:
> >> diff --git a/mingw-w64-headers/crt/ctype.h b/mingw-w64-headers/crt/ctype.h
> >> index 86f7f86d7..827f6e41a 100644
> >> --- a/mingw-w64-headers/crt/ctype.h
> >> +++ b/mingw-w64-headers/crt/ctype.h
> >> @@ -44,10 +44,6 @@ _CRTIMP int __cdecl isxdigit(int _C);
> >>  _CRTIMP int __cdecl tolower(int _C);
> >>  _CRTIMP int __cdecl toupper(int _C);
> >>
> >> -#if !defined(_CTYPE_DISABLE_MACROS) && !defined(__cplusplus)
> >> -#define __chvalidchk(a,b) (__PCTYPE_FUNC[(unsigned char)(a)] & (b))
> >> -#endif /* !_CTYPE_DISABLE_MACROS && !__cplusplus */
> >> -
> >
> > It is really needed to remove __chvalidchk macro? It seems to be
> > available in MS UCRT headers and also usage of __PCTYPE_FUNC should be
> > fine. mingw-w64 defines it as function call to __pctype_func() which in
> > mingw-w64 is available for all builds. Seems that it does not have those
> > issues with ABI. And moreover there is no function __chvalidchk, so
> > there is no replacement for it.
> 
> My understanding is that `__chvalidchk` is just a helper macro used to 
> implement macro versions of ctype.h functions and does not really have any 
> other purpose. IIRC, it is not documented, and so should not be used directly 
> by users. It should not introduce any breakage in user code.
> 
> - Kirill Makurin

Well, if is not used then ok. Problem is that lot of MS stuff is
undocumented but ready for using and part of API/ABI. And some times
hard to figure out what is safe to remove and what not. I bet that if
something is exported (from header file as macro; or from library as
symbol) then there can be some user of it...


_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to