configure.in: Create compatibility code in bits/libc-lock.h file.

* configure.in: Create compatibility code in bits/libc-lock.h file.


        * 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.

From-SVN: r15931
This commit is contained in:
Jeff Law 1997-10-16 09:30:26 -06:00
parent 022abf9081
commit 1510f52e3e
7 changed files with 47 additions and 2 deletions

View 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

View 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

View 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
}
;;

View 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

View 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

View 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

View 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