genericopenlibs/cppstdlib/stl/stlport/stl/_ios.c
branchRCL_3
changeset 3 18f64da82512
parent 0 e4d67989cc36
child 45 4b03adbd26ca
--- a/genericopenlibs/cppstdlib/stl/stlport/stl/_ios.c	Tue Feb 02 02:01:42 2010 +0200
+++ b/genericopenlibs/cppstdlib/stl/stlport/stl/_ios.c	Sat Feb 20 00:31:00 2010 +0200
@@ -110,7 +110,17 @@
   this->imbue(locale());
   this->tie(0);
   this->_M_set_exception_mask(ios_base::goodbit);
-  this->_M_clear_nothrow(__sb != 0 ? ios_base::goodbit : ios_base::badbit);
+  /*
+    this->_M_clear_nothrow(__sb != 0 ? ios_base::goodbit : ios_base::badbit);
+	
+  The ternary expression above, throws an undefined reference link error (for goodbit and badbit)
+  when compiled with GCCE 4.3.2. Replacing ternary statement with an if-else block fixes this.
+  */
+  if(__sb != 0) {
+	this->_M_clear_nothrow(ios_base::goodbit);
+  } else {
+	this->_M_clear_nothrow(ios_base::badbit);
+  }
   ios_base::flags(ios_base::skipws | ios_base::dec);
   ios_base::width(0);
   ios_base::precision(6);