* 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
+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 <drepper@cygnus.com>
* configure.in: Create compatibility code in bits/libc-lock.h file.
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
weak_alias (_IO_vsscanf, __vsscanf)
weak_alias (_IO_vsscanf, vsscanf)
#else
-#ifdef __ELF__
+#ifdef __linux__
#pragma weak vsscanf = _IO_vsscanf
#endif
#endif
# 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