This is the mail archive of the mailing list for the libstdc++ project.

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

[libstdc++] Patch: std_cwctype and iswblank

Currently std_cwctype.h uses iswblank, which AFAIK is a GNU extension,
and this causes compilation of anything including cwctype to fail on 
non-GNU OSs.

Shouldn't the platform-specific specific extensions, including the GNU
ones, be guarded?

  $ cat
  #include <cwctype>

  $ /usr/local/gcc-3.0/bin/gcc -v
  Reading specs from
  Configured with: ../../gcc-3.0/configure --enable-shared --enable-threads
  --prefix=/usr/local/gcc-3.0 -v --enable-languages=c++,f77,java
  Thread model: posix
  gcc version 3.0

  $ /usr/local/gcc-3.0/bin/gcc -c
  In file included from /usr/local/gcc-3.0/include/g++-v3/cwctype:31,
  /usr/local/gcc-3.0/include/g++-v3/bits/std_cwctype.h:69: `iswblank' not

2001-06-19  Mumit Khan  <>

	* include/c_std/bits/std_cwctype.h (iswblank): Conditionally use.

Index: include/c_std/bits/std_cwctype.h
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/c_std/bits/std_cwctype.h,v
retrieving revision 1.5
diff -u -3 -p -r1.5 std_cwctype.h
--- std_cwctype.h	2001/06/08 23:22:26	1.5
+++ std_cwctype.h	2001/06/19 23:25:28
@@ -66,7 +66,9 @@ namespace std
   using ::iswalnum;
   using ::iswalpha;
+#ifdef _GNU_SOURCE
   using ::iswblank;
   using ::iswcntrl;
   using ::iswdigit;
   using ::iswgraph;


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