diff --git a/include/ctype.h b/include/ctype.h index a6f44df..eef574b 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -27,6 +27,7 @@ static __inline int __isspace(int _c) return _c == ' ' || (unsigned)_c-'\t' < 5; } +#ifndef __cplusplus #define isalpha(a) ((((unsigned)(a)|32)-'a') < 26) #define isdigit(a) (((unsigned)(a)-'0') < 10) #define islower(a) (((unsigned)(a)-'a') < 26) @@ -34,6 +35,7 @@ static __inline int __isspace(int _c) #define isprint(a) (((unsigned)(a)-0x20) < 0x5f) #define isgraph(a) (((unsigned)(a)-0x21) < 0x5e) #define isspace(a) __isspace(a) +#endif #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ diff --git a/include/wchar.h b/include/wchar.h index 9fd967c..8cfb584 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -176,9 +176,12 @@ int iswctype(wint_t, wctype_t); wint_t towlower(wint_t); wint_t towupper(wint_t); wctype_t wctype(const char *); + +#ifndef __cplusplus #undef iswdigit #define iswdigit(a) ((unsigned)(a)-'0' < 10) #endif +#endif #ifdef __cplusplus } diff --git a/include/wctype.h b/include/wctype.h index 3ac24f1..3da1219 100644 --- a/include/wctype.h +++ b/include/wctype.h @@ -43,8 +43,10 @@ wint_t towupper(wint_t); wctrans_t wctrans(const char *); wctype_t wctype(const char *); +#ifndef __cplusplus #undef iswdigit #define iswdigit(a) (((unsigned)(a)-L'0') < 10) +#endif #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)