This is the mail archive of the gcc-bugs@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]

Re: libio build fails with glibc 2.1.94 installed


On Wed, Sep 20, 2000 at 12:39:29PM +0100, Joseph S. Myers wrote:
> On i686-pc-linux-gnu with glibc 2.1.94 installed, a bootstrap of current
> GCC CVS fails in libio:
> 
> /home/jsm28/src/gcc-build/gcc/g++ -B/home/jsm28/src/gcc-build/gcc/ \
>  -nostdinc++ -isystem /home/jsm28/src/gcc-cvs/libstdc++ -isystem \
>  /home/jsm28/src/gcc-cvs/libstdc++/std -isystem \
>  /home/jsm28/src/gcc-cvs/libstdc++/stl -isystem \
>  /home/jsm28/src/gcc-cvs/libio -isystem \
>  /home/jsm28/src/gcc-build/i686-pc-linux-gnu/libio \
>  -L/home/jsm28/src/gcc-build/i686-pc-linux-gnu/libstdc++ \
>  -B/opt/gcc/snapshot/i686-pc-linux-gnu/bin/ \
>  -B/opt/gcc/snapshot/i686-pc-linux-gnu/lib/ -isystem \
>  /opt/gcc/snapshot/i686-pc-linux-gnu/include -c -g -O2 -fvtable-thunks \
>  -D_GNU_SOURCE -fno-implicit-templates -I. -I../../../gcc-cvs/libio \
>  -nostdinc++ -D_IO_MTSAFE_IO ../../../gcc-cvs/libio/iostream.cc
> ../../../gcc-cvs/libio/iostream.cc: In member function `istream &istream::get 
>    (char &)':
> ../../../gcc-cvs/libio/iostream.cc:74: `_IO_USER_LOCK' undeclared (first use
>    this function)
> ../../../gcc-cvs/libio/iostream.cc:74: (Each undeclared identifier is reported
>    only once for each function it appears in.)
> make[2]: *** [iostream.o] Error 1
> make[2]: Leaving directory `/home/jsm28/src/gcc-build/i686-pc-linux-gnu/libio'
> make[1]: *** [all-target-libio] Error 2
> make[1]: Leaving directory `/home/jsm28/src/gcc-build'
> make: *** [bootstrap] Error 2
> 
> Configuration: ../gcc-cvs/configure --prefix=/opt/gcc/snapshot \
>  --disable-shared --enable-threads=posix --with-system-zlib
> 

Here are my patches. My second patch is for "make check".



H.J.
2000-09-06  H.J. Lu  (hjl@gnu.org)

	* libio.h (_IO_USER_LOCK): New. Defined for glibc 2.2.
	(_IO_flockfile): Likewise.
	(_IO_funlockfile): Likewise.

Index: libio/libio.h
===================================================================
RCS file: /work/cvs/gnu/glibc/libio/libio.h,v
retrieving revision 1.1.1.4
retrieving revision 1.1.1.5
diff -u -p -r1.1.1.4 -r1.1.1.5
--- libio/libio.h	2000/08/16 00:55:39	1.1.1.4
+++ libio/libio.h	2000/09/03 18:03:38	1.1.1.5
@@ -133,6 +133,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
@@ -441,6 +442,10 @@ extern int _IO_ftrylockfile (_IO_FILE *)
 
 #ifdef _IO_MTSAFE_IO
 # define _IO_peekc(_fp) _IO_peekc_locked (_fp)
+# define _IO_flockfile(_fp) \
+  if (((_fp)->_flags & _IO_USER_LOCK) == 0) _IO_flockfile (_fp)
+# define _IO_funlockfile(_fp) \
+  if (((_fp)->_flags & _IO_USER_LOCK) == 0) _IO_funlockfile (_fp)
 #else
 # define _IO_peekc(_fp) _IO_peekc_unlocked (_fp)
 # define _IO_flockfile(_fp) /**/
2000-07-17  H.J. Lu  (hjl@gnu.org)

	* libio.h (_IO_pos_BAD): Cast to _IO_off_t not _IO_fpos_t for
	glibc 2.2.

Index: libio/iolibio.h
===================================================================
RCS file: /work/cvs/gnu/egcs/libio/iolibio.h,v
retrieving revision 1.1.1.3
diff -u -p -r1.1.1.3 iolibio.h
--- libio/iolibio.h	1998/02/28 03:57:33	1.1.1.3
+++ libio/iolibio.h	2000/07/18 06:52:53
@@ -38,7 +38,7 @@ 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))
+#define _IO_pos_BAD ((_IO_off_t)(-1))
 #endif
 #define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN))
 #define _IO_fseek(__fp, __offset, __whence) \

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