From 1181d2d55377707551ac43b20ca7ebb4e253dddc Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 23 Oct 1997 01:17:58 +0000 Subject: [PATCH] libio.h (_IO_LOCK_T): Handle glibc 2 when _IO_MTSAFE_IO is not defined. * libio.h (_IO_LOCK_T): Handle glibc 2 when _IO_MTSAFE_IO is not defined. * iovsscanf.c (vsscanf): Make it weak alias of _IO_vsscanf if __linux__ is defined instead of __ELF__ * config/linuxlibc1.mt (USER_INCLUDES): Add libio.h. OK'd by Ulrich. From-SVN: r16151 --- libio/ChangeLog | 10 ++++++++++ libio/config/linuxlibc1.mt | 2 +- libio/iovsscanf.c | 2 +- libio/libio.h | 10 ++++++---- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/libio/ChangeLog b/libio/ChangeLog index 0ee838da096b..6da6b9c5b911 100644 --- a/libio/ChangeLog +++ b/libio/ChangeLog @@ -1,3 +1,13 @@ +Wed Oct 22 19:19:32 1997 H.J. Lu (hjl@gnu.ai.mit.edu) + + * libio.h (_IO_LOCK_T): Handle glibc 2 when _IO_MTSAFE_IO is + not defined. + + * iovsscanf.c (vsscanf): Make it weak alias of _IO_vsscanf if + __linux__ is defined instead of __ELF__ + + * config/linuxlibc1.mt (USER_INCLUDES): Add libio.h. + 1997-10-15 Ulrich Drepper * configure.in: Create compatibility code in bits/libc-lock.h file. diff --git a/libio/config/linuxlibc1.mt b/libio/config/linuxlibc1.mt index 378a9c92ef04..09c4c83804e9 100644 --- a/libio/config/linuxlibc1.mt +++ b/libio/config/linuxlibc1.mt @@ -20,7 +20,7 @@ STDIO_OBJECTS= USER_INCLUDES=PlotFile.h SFile.h builtinbuf.h editbuf.h fstream.h \ indstream.h iomanip.h iostream.h istream.h ostream.h \ parsestream.h pfstream.h procbuf.h stdiostream.h stream.h \ - streambuf.h strfile.h strstream.h + streambuf.h strfile.h strstream.h libio.h # A bad kludge MT_CFLAGS=-D_G_HAVE_MMAP diff --git a/libio/iovsscanf.c b/libio/iovsscanf.c index 0db195c8c586..beb0bc3a6b22 100644 --- a/libio/iovsscanf.c +++ b/libio/iovsscanf.c @@ -52,7 +52,7 @@ _IO_vsscanf (string, format, args) weak_alias (_IO_vsscanf, __vsscanf) weak_alias (_IO_vsscanf, vsscanf) #else -#ifdef __ELF__ +#ifdef __linux__ #pragma weak vsscanf = _IO_vsscanf #endif #endif diff --git a/libio/libio.h b/libio/libio.h index 98d98c3249b4..eeee6ceeb0be 100644 --- a/libio/libio.h +++ b/libio/libio.h @@ -157,15 +157,17 @@ struct _IO_jump_t; struct _IO_FILE; # endif #else /* XXX This will go away as soon as comthread is finished. */ -# ifdef __linux__ +# if defined __GLIBC__ && __GLIBC__ >= 2 +# define _IO_LOCK_T void * +# else +# ifdef __linux__ struct _IO_lock_t { void *ptr; short int field1; short int field2; }; -# define _IO_LOCK_T struct _IO_lock_t -# else -typedef void _IO_lock_t; +# define _IO_LOCK_T struct _IO_lock_t +# endif # endif #endif -- 2.43.5