mirror of
https://git.musl-libc.org/git/musl
synced 2025-01-08 07:42:09 +03:00
suppress macro definitions of ctype functions under C++
based on patch by Sergey Dmitrouk.
This commit is contained in:
parent
ab9672ae73
commit
a60457c84a
@ -22,6 +22,7 @@ int isxdigit(int);
|
|||||||
int tolower(int);
|
int tolower(int);
|
||||||
int toupper(int);
|
int toupper(int);
|
||||||
|
|
||||||
|
#ifndef __cplusplus
|
||||||
static __inline int __isspace(int _c)
|
static __inline int __isspace(int _c)
|
||||||
{
|
{
|
||||||
return _c == ' ' || (unsigned)_c-'\t' < 5;
|
return _c == ' ' || (unsigned)_c-'\t' < 5;
|
||||||
@ -34,6 +35,7 @@ static __inline int __isspace(int _c)
|
|||||||
#define isprint(a) (((unsigned)(a)-0x20) < 0x5f)
|
#define isprint(a) (((unsigned)(a)-0x20) < 0x5f)
|
||||||
#define isgraph(a) (((unsigned)(a)-0x21) < 0x5e)
|
#define isgraph(a) (((unsigned)(a)-0x21) < 0x5e)
|
||||||
#define isspace(a) __isspace(a)
|
#define isspace(a) __isspace(a)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
||||||
|
@ -172,9 +172,12 @@ int iswctype(wint_t, wctype_t);
|
|||||||
wint_t towlower(wint_t);
|
wint_t towlower(wint_t);
|
||||||
wint_t towupper(wint_t);
|
wint_t towupper(wint_t);
|
||||||
wctype_t wctype(const char *);
|
wctype_t wctype(const char *);
|
||||||
|
|
||||||
|
#ifndef __cplusplus
|
||||||
#undef iswdigit
|
#undef iswdigit
|
||||||
#define iswdigit(a) ((unsigned)(a)-'0' < 10)
|
#define iswdigit(a) ((unsigned)(a)-'0' < 10)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@ -43,8 +43,10 @@ wint_t towupper(wint_t);
|
|||||||
wctrans_t wctrans(const char *);
|
wctrans_t wctrans(const char *);
|
||||||
wctype_t wctype(const char *);
|
wctype_t wctype(const char *);
|
||||||
|
|
||||||
|
#ifndef __cplusplus
|
||||||
#undef iswdigit
|
#undef iswdigit
|
||||||
#define iswdigit(a) (((unsigned)(a)-L'0') < 10)
|
#define iswdigit(a) (((unsigned)(a)-L'0') < 10)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
|
||||||
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
|| defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||||
|
Loading…
Reference in New Issue
Block a user