Re: [PATCH v2] ctype.h: remove duplicate isdigit() helper

2020-10-27 Thread Miguel Ojeda
On Tue, Oct 27, 2020 at 11:37 PM Arnd Bergmann wrote: > > Sounds good, I'll take that. Are the clang and icc version numbers > the actual ones we should list here, or is this just an example? Actual ones -- well, the best approximation I could get from the available versions in Compiler Explorer

Re: [PATCH v2] ctype.h: remove duplicate isdigit() helper

2020-10-27 Thread Arnd Bergmann
On Tue, Oct 27, 2020 at 10:47 AM Miguel Ojeda wrote: > > On Tue, Oct 27, 2020 at 12:57 AM Arnd Bergmann wrote: > > > > +#ifdef __has_builtin > > +#define has_builtin(x) __has_builtin(x) > > +#else > > +#define has_builtin(x) (0) > > +#endif > > Could this be > > #ifndef __has_builtin > #

Re: [PATCH v2] ctype.h: remove duplicate isdigit() helper

2020-10-27 Thread Miguel Ojeda
On Tue, Oct 27, 2020 at 12:57 AM Arnd Bergmann wrote: > > +#ifdef __has_builtin > +#define has_builtin(x) __has_builtin(x) > +#else > +#define has_builtin(x) (0) > +#endif Could this be #ifndef __has_builtin # define __has_builtin(x) 0 #endif ? i.e. mimicking what we do for

[PATCH v2] ctype.h: remove duplicate isdigit() helper

2020-10-26 Thread Arnd Bergmann
From: Arnd Bergmann gcc warns a few thousand times about the isdigit() shadow: include/linux/ctype.h:26:19: warning: declaration of 'isdigit' shadows a built-in function [-Wshadow] As there is already a compiler builtin, just use that, and make it clear we do that by defining a macro.