Message ID | 20170511141756.GA26086@intel.com |
---|---|
State | New |
Headers | show |
On Thu, May 11, 2017 at 10:17 AM, H.J. Lu <hongjiu.lu@intel.com> wrote: > When compiling for C++, only include <wctype/wctype.h> and nothing else. > > Any comments? This is about to be superseded by the _ISOMAC-testsuite patch. One of its effects is to make __cplusplus imply _ISOMAC. I plan to commit that patch later today, unless an unexpected problem turns up in the tests I'm running now. zw
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);