about summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-10-14 12:30:50 -0400
committerRich Felker <dalias@aerifal.cx>2014-10-14 12:30:50 -0400
commita60457c84a4b59ab564d7f4abb660a70283ba98d (patch)
treee49bb4c5d616870725f23bc8741b0074d8f2361b /include
parentab9672ae73248f51e30f4553c4b8878525e46383 (diff)
downloadmusl-a60457c84a4b59ab564d7f4abb660a70283ba98d.tar.gz
musl-a60457c84a4b59ab564d7f4abb660a70283ba98d.tar.xz
musl-a60457c84a4b59ab564d7f4abb660a70283ba98d.zip
suppress macro definitions of ctype functions under C++
based on patch by Sergey Dmitrouk.
Diffstat (limited to 'include')
-rw-r--r--include/ctype.h2
-rw-r--r--include/wchar.h3
-rw-r--r--include/wctype.h2
3 files changed, 7 insertions, 0 deletions
diff --git a/include/ctype.h b/include/ctype.h
index a6f44df2..a7d5db5d 100644
--- a/include/ctype.h
+++ b/include/ctype.h
@@ -22,6 +22,7 @@ int   isxdigit(int);
 int   tolower(int);
 int   toupper(int);
 
+#ifndef __cplusplus
 static __inline int __isspace(int _c)
 {
 	return _c == ' ' || (unsigned)_c-'\t' < 5;
@@ -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 52da6395..ad727a86 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -172,9 +172,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 3ac24f13..3da12195 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)