This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

3.3 PATCH: Fix Tru64 UNIX libstdc++-v3 bootstrap failure


Current mainline libstdc++-v3 failed to bootstrap on alpha-dec-osf5.1:

/vol/gnu/src/gcc/gcc-dist/libstdc++-v3/src/ios.cc: In static member function `
   static void std::ios_base::Init::_S_ios_create(bool)':
/vol/gnu/src/gcc/gcc-dist/libstdc++-v3/src/ios.cc:161: error: `isatty' 
   undeclared (first use this function)
/vol/gnu/src/gcc/gcc-dist/libstdc++-v3/src/ios.cc:161: error: (Each undeclared 
   identifier is reported only once for each function it appears in.)

While isatty was found by configure (_GLIBCPP_HAVE_ISATTY is defined in
c++config.h), ios.cc didn't include unistd.h and thus had no declaration of
the function.  The following trivial patch fixes this.

Ok for mainline?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Fri Nov 15 17:09:34 2002  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* src/ios.cc [_GLIBCPP_HAVE_UNISTD_H]: Include unistd.h.

Index: src/ios.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/src/ios.cc,v
retrieving revision 1.32
diff -u -p -r1.32 ios.cc
--- src/ios.cc	15 Nov 2002 08:06:35 -0000	1.32
+++ src/ios.cc	15 Nov 2002 18:53:23 -0000
@@ -38,6 +38,9 @@
 #include <fstream>
 #include <bits/atomicity.h>
 #include <ext/stdio_filebuf.h>
+#ifdef _GLIBCPP_HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 namespace __gnu_cxx
 {


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