This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Check __cplusplus in addition to _ISOMAC


When compiling for C++, only include <wctype/wctype.h> and nothing else.

Any comments?

H.J.
---
	* include/wctype.h: Check __cplusplus in addition to _ISOMAC.
---
 include/wctype.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/wctype.h b/include/wctype.h
index a71b103..74f9f47 100644
--- a/include/wctype.h
+++ b/include/wctype.h
@@ -1,6 +1,6 @@
 #ifndef _WCTYPE_H
 
-#ifndef _ISOMAC
+#if !defined _ISOMAC && !defined __cplusplus
 /* We try to get wint_t from <stddef.h>, but not all GCC versions define it
    there.  So define it ourselves if it remains undefined.  */
 # define __need_wint_t
@@ -38,7 +38,7 @@ libc_hidden_proto (towupper)
 
 #include <wctype/wctype.h>
 
-#ifndef _ISOMAC
+#if !defined _ISOMAC && !defined __cplusplus
 /* Internal interfaces.  */
 extern int __iswspace (wint_t __wc);
 extern int __iswctype (wint_t __wc, wctype_t __desc);
-- 
2.9.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]