public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* 3.3 PATCH: Fix Tru64 UNIX libstdc++-v3 bootstrap failure
@ 2002-11-15 11:02 Rainer Orth
       [not found] ` <3DD5468E.807@unitus.it>
  0 siblings, 1 reply; 2+ messages in thread
From: Rainer Orth @ 2002-11-15 11:02 UTC (permalink / raw)
  To: gcc-patches; +Cc: libstdc++

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
 {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 3.3 PATCH: Fix Tru64 UNIX libstdc++-v3 bootstrap failure
       [not found] ` <3DD5468E.807@unitus.it>
@ 2002-11-15 11:19   ` Rainer Orth
  0 siblings, 0 replies; 2+ messages in thread
From: Rainer Orth @ 2002-11-15 11:19 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: gcc-patches, libstdc++

Paolo Carlini writes:

> However, I'm still wondering why neither I neither Loren we are seeing 
> the problem on x86-linux and freebsd, respectively.

While Tru64 UNIX V5.1 only declares isatty in unistd.h, e.g. Solaris 9 has
a declaration in stdlib.h, too (though protected by __EXTENSIONS__, among
others).  Same on IRIX 6.5.  Maybe Linux and FreeBSD have similar
declarations?

	Rainer

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-11-15 19:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-15 11:02 3.3 PATCH: Fix Tru64 UNIX libstdc++-v3 bootstrap failure Rainer Orth
     [not found] ` <3DD5468E.807@unitus.it>
2002-11-15 11:19   ` Rainer Orth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).