OSDN Git Service

* configure.in: Create compatibility code in bits/libc-lock.h file.
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Oct 1997 15:30:26 +0000 (15:30 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Oct 1997 15:30:26 +0000 (15:30 +0000)
        * libio.h (_IO_LOCK_T): Handle glibc 2 when _IO_MTSAFE_IO is
        not defined.

        * filedoalloc.c (_IO_file_doallocate): Don't call
        _IO_cleanup_registration_needed if __linux__ is defined.

        * iofclose.c (fclose): Make it weak alias of _IO_fclose if
        __ELF__ is defined.

        * iovsprintf.c (vsprintf): Make it weak alias of _IO_vsprintf
        if __ELF__ is defined.

        * iovsscanf.c (vsscanf): Make it weak alias of _IO_vsscanf if
        __ELF__ is defined.

        * config/linuxlibc1.mt (MT_CFLAGS): Defined as -D_G_HAVE_MMAP.
        (IO_OBJECTS): Add filedoalloc.o fileops.o genops.o iofclose.o
        iovsprintf.o iovsscanf.o strops.o.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@15931 138bc75d-0d04-0410-961f-82ee72b054a4

libio/ChangeLog
libio/config/linuxlibc1.mt
libio/configure.in
libio/filedoalloc.c
libio/iofclose.c
libio/iovsprintf.c
libio/iovsscanf.c

index 1c2003f..0ee838d 100644 (file)
@@ -1,3 +1,28 @@
+1997-10-15  Ulrich Drepper  <drepper@cygnus.com>
+
+       * configure.in: Create compatibility code in bits/libc-lock.h file.
+
+Thu Oct  9 07:08:41 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
+
+       * libio.h (_IO_LOCK_T): Handle glibc 2 when _IO_MTSAFE_IO is
+       not defined.
+
+       * filedoalloc.c (_IO_file_doallocate): Don't call
+       _IO_cleanup_registration_needed if __linux__ is defined.
+
+       * iofclose.c (fclose): Make it weak alias of _IO_fclose if
+       __ELF__ is defined.
+
+       * iovsprintf.c (vsprintf): Make it weak alias of _IO_vsprintf
+       if __ELF__ is defined.
+
+       * iovsscanf.c (vsscanf): Make it weak alias of _IO_vsscanf if
+       __ELF__ is defined.
+
+       * config/linuxlibc1.mt (MT_CFLAGS): Defined as -D_G_HAVE_MMAP.
+       (IO_OBJECTS): Add filedoalloc.o fileops.o genops.o iofclose.o
+       iovsprintf.o iovsscanf.o strops.o.
+
 Fri Oct  3 10:13:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
 
        * iostream.cc, libio.h: Convert other uses of #ifdef
index eaed5da..378a9c9 100644 (file)
@@ -9,7 +9,9 @@
 LIBIO_INCLUDE=
 
 # We have those in libc.a.
-IO_OBJECTS=iogetc.o ioputc.o iofeof.o ioferror.o
+IO_OBJECTS=iogetc.o ioputc.o iofeof.o ioferror.o \
+       filedoalloc.o fileops.o genops.o iofclose.o \
+       iovsprintf.o iovsscanf.o strops.o
 STDIO_WRAP_OBJECTS=
 OSPRIM_OBJECTS=
 STDIO_OBJECTS=
@@ -19,3 +21,6 @@ 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
+
+# A bad kludge
+MT_CFLAGS=-D_G_HAVE_MMAP
index ac94747..2fc3a96 100644 (file)
@@ -54,6 +54,9 @@ case "${target}" in
        rm -fr bits
         mkdir bits
         echo "#include <libc-lock.h>" > bits/libc-lock.h
+       echo 'asm (".weak _pthread_cleanup_pop_restore");' >> bits/libc-lock.h
+       echo 'asm (".weak _pthread_cleanup_push_defer");' >> bits/libc-lock.h
+
         echo "#include <stdio-lock.h>" > bits/stdio-lock.h
       }
     ;;
index f1b781e..5c62280 100644 (file)
@@ -75,7 +75,7 @@ _IO_file_doallocate (fp)
   char *p;
   struct stat st;
 
-#ifndef _LIBC
+#if !defined(_LIBC) && !defined(__linux__)
   /* If _IO_cleanup_registration_needed is non-zero, we should call the
      function it points to.  This is to make sure _IO_cleanup gets called
      on exit.  We call it from _IO_file_doallocate, since that is likely
index 35f4a8b..b6f18e5 100644 (file)
@@ -55,4 +55,8 @@ _IO_fclose (fp)
 
 #ifdef weak_alias
 weak_alias (_IO_fclose, fclose)
+#else
+#ifdef __linux__
+#pragma weak fclose = _IO_fclose
+#endif
 #endif
index 3491958..7b82591 100644 (file)
@@ -54,4 +54,8 @@ _IO_vsprintf (string, format, args)
 
 #ifdef weak_alias
 weak_alias (_IO_vsprintf, vsprintf)
+#else
+#ifdef __linux__
+#pragma weak vsprintf = _IO_vsprintf
+#endif
 #endif
index 21600f5..0db195c 100644 (file)
@@ -51,4 +51,8 @@ _IO_vsscanf (string, format, args)
 #ifdef weak_alias
 weak_alias (_IO_vsscanf, __vsscanf)
 weak_alias (_IO_vsscanf, vsscanf)
+#else
+#ifdef __ELF__
+#pragma weak vsscanf = _IO_vsscanf
+#endif
 #endif