diff options
author | Jeff Law <law@gcc.gnu.org> | 1997-10-16 09:30:26 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-10-16 09:30:26 -0600 |
commit | 1510f52e3e34d9ea54d94845199733c9afa1ea16 (patch) | |
tree | 75ddb85fa604b6bb3a46198f987764bedf5ddda8 /libio | |
parent | 022abf9081128cf821b4953d81fee765121061b4 (diff) | |
download | gcc-1510f52e3e34d9ea54d94845199733c9afa1ea16.tar.gz |
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
Diffstat (limited to 'libio')
-rw-r--r-- | libio/ChangeLog | 25 | ||||
-rw-r--r-- | libio/config/linuxlibc1.mt | 7 | ||||
-rw-r--r-- | libio/configure.in | 3 | ||||
-rw-r--r-- | libio/filedoalloc.c | 2 | ||||
-rw-r--r-- | libio/iofclose.c | 4 | ||||
-rw-r--r-- | libio/iovsprintf.c | 4 | ||||
-rw-r--r-- | libio/iovsscanf.c | 4 |
7 files changed, 47 insertions, 2 deletions
diff --git a/libio/ChangeLog b/libio/ChangeLog index 1c2003fce20..0ee838da096 100644 --- a/libio/ChangeLog +++ b/libio/ChangeLog @@ -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 diff --git a/libio/config/linuxlibc1.mt b/libio/config/linuxlibc1.mt index eaed5dabf08..378a9c92ef0 100644 --- a/libio/config/linuxlibc1.mt +++ b/libio/config/linuxlibc1.mt @@ -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 diff --git a/libio/configure.in b/libio/configure.in index ac94747f563..2fc3a962afa 100644 --- a/libio/configure.in +++ b/libio/configure.in @@ -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 } ;; diff --git a/libio/filedoalloc.c b/libio/filedoalloc.c index f1b781e8a0f..5c62280c14b 100644 --- a/libio/filedoalloc.c +++ b/libio/filedoalloc.c @@ -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 diff --git a/libio/iofclose.c b/libio/iofclose.c index 35f4a8b5691..b6f18e58c2c 100644 --- a/libio/iofclose.c +++ b/libio/iofclose.c @@ -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 diff --git a/libio/iovsprintf.c b/libio/iovsprintf.c index 34919588ce1..7b82591974d 100644 --- a/libio/iovsprintf.c +++ b/libio/iovsprintf.c @@ -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 diff --git a/libio/iovsscanf.c b/libio/iovsscanf.c index 21600f53efb..0db195c8c58 100644 --- a/libio/iovsscanf.c +++ b/libio/iovsscanf.c @@ -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 |