[libstdc++] Don't access fpos_t.__state on uClibc w/o wchar support

Bernardo Innocenti bernie@develer.com
Mon Sep 22 17:47:00 GMT 2003


Don't access __state member of fpos_t when building on uClibc with
wchar support disabled.

2003-09-22  Bernardo Innocenti  <bernie@develer.com>

	* config/os/gnu-linux/fpos.h: Don't access fpos_t.__state on uClibc
	with disabled wchar support.


diff -Nru gcc-3.4-20030917.orig/libstdc++-v3/config/os/gnu-linux/fpos.h gcc-3.4-20030917/libstdc++-v3/config/os/gnu-linux/fpos.h
--- gcc-3.4-20030917.orig/libstdc++-v3/config/os/gnu-linux/fpos.h	2003-07-05 06:05:31.000000000 +0200
+++ gcc-3.4-20030917/libstdc++-v3/config/os/gnu-linux/fpos.h	2003-09-19 21:15:36.000000000 +0200
@@ -117,6 +117,7 @@
       { return !(*this == __pos); }
     };
 
+#if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_WCHAR__)
   template<>
     inline mbstate_t
     fpos<mbstate_t>::state() const { return _M_pos.__state; }
@@ -132,6 +133,7 @@
       _M_pos.__pos = __off;
       _M_pos.__state = __st;
     }
+#endif /* !__UCLIBC__ || __UCLIBC_HAS_WCHAR__ */
 
   /// 27.2, paragraph 10 about fpos/char_traits circularity
   typedef fpos<mbstate_t> 		streampos;


-- 
  // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/

Please don't send Word attachments - http://www.gnu.org/philosophy/no-word-attachments.html





More information about the Libstdc++ mailing list