This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: libio build fails with glibc 2.1.94 installed
On Fri, 22 Sep 2000, Ulrich Drepper wrote:
> "Joseph S. Myers" <jsm28@cam.ac.uk> writes:
> > On i686-pc-linux-gnu with glibc 2.1.94 installed, a bootstrap of current
> > GCC CVS fails in libio:
>
> Yes, it's a bug in iostream.cc AFAIK. We have to use < > instead of "
> " for the libio headers.
How about the appended patch? It corrects the libio.h includes, but also
updates the local libio.h. Additionally it fixes a missing _IO_fpos_t to
_IO_off_t conversion, to fix the libio testsuite if run on glibc-2.2.
OK to commit?
Franz.
* stdstreams.cc: Include <libio.h>, not "libio.h".
* iolibio.h: Likewise.
(_IO_pos_BAD): Use _IO_off_t instead of _IO_fpos_t.
* libio.h (_IO_USER_LOCK): Define.
Index: iolibio.h
===================================================================
RCS file: /cvs/gcc/egcs/libio/iolibio.h,v
retrieving revision 1.3
diff -u -p -r1.3 iolibio.h
--- iolibio.h 1998/02/24 20:09:50 1.3
+++ iolibio.h 2000/09/22 22:16:04
@@ -1,4 +1,4 @@
-#include "libio.h"
+#include <libio.h>
/* These emulate stdio functionality, but with a different name
(_IO_ungetc instead of ungetc), and using _IO_FILE instead of FILE. */
@@ -38,7 +38,11 @@ extern int _IO_obstack_vprintf __P ((str
_IO_va_list));
extern int _IO_obstack_printf __P ((struct obstack *, const char *, ...));
#ifndef _IO_pos_BAD
-#define _IO_pos_BAD ((_IO_fpos_t)(-1))
+# if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
+# define _IO_pos_BAD ((_IO_off64_t) -1)
+# else
+# define _IO_pos_BAD ((_IO_off_t) -1)
+# endif
#endif
#define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN))
#define _IO_fseek(__fp, __offset, __whence) \
Index: libio.h
===================================================================
RCS file: /cvs/gcc/egcs/libio/libio.h,v
retrieving revision 1.15
diff -u -p -r1.15 libio.h
--- libio.h 1999/12/22 09:01:59 1.15
+++ libio.h 2000/09/22 22:16:05
@@ -136,6 +136,7 @@
#define _IO_IS_APPENDING 0x1000
#define _IO_IS_FILEBUF 0x2000
#define _IO_BAD_SEEN 0x4000
+#define _IO_USER_LOCK 0x8000
/* These are "formatting flags" matching the iostream fmtflags enum values.
*/
#define _IO_SKIPWS 01
Index: stdstreams.cc
===================================================================
RCS file: /cvs/gcc/egcs/libio/stdstreams.cc,v
retrieving revision 1.2
diff -u -p -r1.2 stdstreams.cc
--- stdstreams.cc 1999/09/04 15:08:50 1.2
+++ stdstreams.cc 2000/09/22 22:16:05
@@ -36,7 +36,7 @@ the executable file might be covered by
// then we don't need to, since in that case stdin/stdout/stderr
// are identical to _IO_stdin/_IO_stdout/_IO_stderr.
-#include "libio.h"
+#include <libio.h>
#ifdef _STDIO_USES_IOSTREAM
#define CIN_SBUF _IO_stdin_
Index: iolibio.h
===================================================================
RCS file: /cvs/gcc/egcs/libio/iolibio.h,v
retrieving revision 1.3
diff -u -p -r1.3 iolibio.h
--- iolibio.h 1998/02/24 20:09:50 1.3
+++ iolibio.h 2000/09/22 22:16:04
@@ -1,4 +1,4 @@
-#include "libio.h"
+#include <libio.h>
/* These emulate stdio functionality, but with a different name
(_IO_ungetc instead of ungetc), and using _IO_FILE instead of FILE. */
@@ -38,7 +38,11 @@ extern int _IO_obstack_vprintf __P ((str
_IO_va_list));
extern int _IO_obstack_printf __P ((struct obstack *, const char *, ...));
#ifndef _IO_pos_BAD
-#define _IO_pos_BAD ((_IO_fpos_t)(-1))
+# if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
+# define _IO_pos_BAD ((_IO_off64_t) -1)
+# else
+# define _IO_pos_BAD ((_IO_off_t) -1)
+# endif
#endif
#define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN))
#define _IO_fseek(__fp, __offset, __whence) \
Index: libio.h
===================================================================
RCS file: /cvs/gcc/egcs/libio/libio.h,v
retrieving revision 1.15
diff -u -p -r1.15 libio.h
--- libio.h 1999/12/22 09:01:59 1.15
+++ libio.h 2000/09/22 22:16:05
@@ -136,6 +136,7 @@
#define _IO_IS_APPENDING 0x1000
#define _IO_IS_FILEBUF 0x2000
#define _IO_BAD_SEEN 0x4000
+#define _IO_USER_LOCK 0x8000
/* These are "formatting flags" matching the iostream fmtflags enum values. */
#define _IO_SKIPWS 01
Index: stdstreams.cc
===================================================================
RCS file: /cvs/gcc/egcs/libio/stdstreams.cc,v
retrieving revision 1.2
diff -u -p -r1.2 stdstreams.cc
--- stdstreams.cc 1999/09/04 15:08:50 1.2
+++ stdstreams.cc 2000/09/22 22:16:05
@@ -36,7 +36,7 @@ the executable file might be covered by
// then we don't need to, since in that case stdin/stdout/stderr
// are identical to _IO_stdin/_IO_stdout/_IO_stderr.
-#include "libio.h"
+#include <libio.h>
#ifdef _STDIO_USES_IOSTREAM
#define CIN_SBUF _IO_stdin_