mirror of git://git.musl-libc.org/musl
improve iswdigit macro to diagnose errors
this is analogous to commit 2ca55a93f2
for the macros in ctype.h.
This commit is contained in:
parent
7fe273b2c1
commit
d0040e239e
|
@ -175,7 +175,7 @@ wctype_t wctype(const char *);
|
|||
|
||||
#ifndef __cplusplus
|
||||
#undef iswdigit
|
||||
#define iswdigit(a) ((unsigned)(a)-'0' < 10)
|
||||
#define iswdigit(a) (0 ? iswdigit(a) : ((unsigned)(a)-'0') < 10)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ wctype_t wctype(const char *);
|
|||
|
||||
#ifndef __cplusplus
|
||||
#undef iswdigit
|
||||
#define iswdigit(a) (((unsigned)(a)-L'0') < 10)
|
||||
#define iswdigit(a) (0 ? iswdigit(a) : ((unsigned)(a)-'0') < 10)
|
||||
#endif
|
||||
|
||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
||||
|
|
Loading…
Reference in New Issue