diff options
| author | Ulrich Drepper <drepper@redhat.com> | 1998-06-07 14:06:56 +0000 |
|---|---|---|
| committer | Ulrich Drepper <drepper@redhat.com> | 1998-06-07 14:06:56 +0000 |
| commit | c0fb8a563c1c49e5fbec9bc22deac618910a3ff4 (patch) | |
| tree | e7db886672cef990feba6c4357ebece5a820d7cf /libio | |
| parent | 737547be99fd9afffbdf3f7ac817da0a06fffc9e (diff) | |
| download | glibc-c0fb8a563c1c49e5fbec9bc22deac618910a3ff4.tar.xz glibc-c0fb8a563c1c49e5fbec9bc22deac618910a3ff4.zip | |
Update.
1998-06-07 13:32 Ulrich Drepper <drepper@cygnus.com>
* libc.map: Add _dl_profile.
* elf/dl-reloc.c (_dl_relocate_object): Take extra argument, pass
this to ELF_DYNAMIC_RELOCATE.
Always allocate array for relocation result if LD_PROFILE is defined.
* elf/ldsodefs.h: Adjust prototypes.
* elf/dl-open.c (_dl_open): Call relocation function with extra
argument.
* elf/rtld.c: Likewise.
* elf/dl-profile.c (_dl_mcount): Don't mark as internal function.
Correct loop condition.
* elf/dynamic-link.h: Don't examine _dl_profile variable, pass
consider_profile to runtime setup function.
* sysdeps/i386/dl-machine.h (elf_machine_runtime_setup): Use
_dl_runtime_profile for all shared objects if LD_PROFILE is defined.
* elf/dl-support.c: Define __libc_stack_end.
* elf/rtld.c: Likewise.
* sysdeps/generic/libc-start.c: Store last stack address in
__libc_stack_end.
* sysdeps/i386/dl-machine.h (_dl_start_user): Store stack address.
* sysdeps/i386/elf/start.s: Call __libc_start_main with extra argument.
* elf/elf.h: Include <features.h>, not <sys/cdefs.h>.
Include <stdint.h>, not <inttypes.h>.
* elf/sprof.c: Implement flat profiling.
* libio/fgetc.c: Call _IO_cleanup_region_end with 0 and call
_IO_funlockfile explicitly.
* libio/fileops.c: Likewise.
* libio/fputc.c: Likewise.
* libio/freopen.c: Likewise.
* libio/freopen64.c: Likewise.
* libio/fseek.c: Likewise.
* libio/fseeko.c: Likewise.
* libio/fseeko64.c: Likewise.
* libio/ftello.c: Likewise.
* libio/ftello64.c: Likewise.
* libio/getc.c: Likewise.
* libio/getchar.c: Likewise.
* libio/iofclose.c: Likewise.
* libio/iofflush.c: Likewise.
* libio/iofgetpos.c: Likewise.
* libio/iofgetpos64.c: Likewise.
* libio/iofgets.c: Likewise.
* libio/iofputs.c: Likewise.
* libio/iofread.c: Likewise.
* libio/iofsetpos.c: Likewise.
* libio/iofsetpos64.c: Likewise.
* libio/ioftell.c: Likewise.
* libio/iofwrite.c: Likewise.
* libio/iogetdelim.c: Likewise.
* libio/iogets.c: Likewise.
* libio/ioputs.c: Likewise.
* libio/ioseekoff.c: Likewise.
* libio/ioseekpos.c: Likewise.
* libio/iosetbuffer.c: Likewise.
* libio/iosetvbuf.c: Likewise.
* libio/ioungetc.c: Likewise.
* libio/iovsprintf.c: Likewise.
* libio/iovsscanf.c: Likewise.
* libio/oldfileops.c: Likewise.
* libio/oldiofclose.c: Likewise.
* libio/peekc.c: Likewise.
* libio/putc.c: Likewise.
* libio/putchar.c: Likewise.
* libio/rewind.c: Likewise.
* malloc/mtrace.c: Pretty print.
* misc/mntent.h (struct mentent): Make string elements const char *.
* nis/nis_printf.c: Optimize I/O a little bit.
* signal/Makefile (distribute): Add sigset-cvt-mask.h.
* sysdeps/generic/sigset-cvt-mask.h: New file.
* sysdeps/unix/sysv/linux/sigset-cvt-mask.h: New file.
* sysdeps/unix/sysv/sysv4/sigset-cvt-mask.h: New file.
* sysdeps/posix/sigvec.c: Rewrite the use definitions from
sigset-cvt-mask.h to do the dirty work.
Patches by Joe Keane.
* sysdeps/posix/mkstemp.c: Save one precious byte of rodata.
* sysdeps/unix/sysv/linux/i386/sysdep.h: Rewrite PSEUDO etc to make
syscall_error label in case of PIC anonymous.
* sysdeps/unix/sysv/linux/i386/i686/sysdep.h: Likewise.
* sysdeps/unix/sysv/linux/i386/clone.S: Adapt for this change.
* sysdeps/unix/sysv/linux/i386/mmap.S: Adapt for this change.
* sysdeps/unix/sysv/linux/i386/s_pread64.S: Adapt for this change.
* sysdeps/unix/sysv/linux/i386/s_pwrite64.S: Adapt for this change.
* sysdeps/unix/sysv/linux/i386/socket.S: Adapt for this change.
* sysdeps/unix/sysv/linux/i386/syscall.S: Adapt for this change.
Diffstat (limited to 'libio')
39 files changed, 109 insertions, 78 deletions
diff --git a/libio/fgetc.c b/libio/fgetc.c index 174e60fa3f..094c5fe62f 100644 --- a/libio/fgetc.c +++ b/libio/fgetc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -35,6 +35,7 @@ fgetc (fp) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); result = _IO_getc_unlocked (fp); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; } diff --git a/libio/fileops.c b/libio/fileops.c index e5ffb245aa..1219abea5d 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -460,7 +460,8 @@ _IO_file_sync (fp) fp->_offset = _IO_pos_BAD; /* FIXME: Cleanup - can this be shared? */ /* setg(base(), ptr, ptr); */ - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return retval; } diff --git a/libio/fputc.c b/libio/fputc.c index 22cdfab9a8..3ec8b693e9 100644 --- a/libio/fputc.c +++ b/libio/fputc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -36,6 +36,7 @@ fputc (c, fp) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); result = _IO_putc_unlocked (c, fp); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; } diff --git a/libio/freopen.c b/libio/freopen.c index 0452e7e6bb..22f2434ecb 100644 --- a/libio/freopen.c +++ b/libio/freopen.c @@ -54,6 +54,7 @@ freopen (filename, mode, fp) else #endif result = _IO_freopen (filename, mode, fp); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; } diff --git a/libio/freopen64.c b/libio/freopen64.c index 78e994df46..c5216317a2 100644 --- a/libio/freopen64.c +++ b/libio/freopen64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -40,7 +40,8 @@ freopen64 (filename, mode, fp) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); result = _IO_freopen64 (filename, mode, fp); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; #else __set_errno (ENOSYS); diff --git a/libio/fseek.c b/libio/fseek.c index f2563d33f2..f9284574c7 100644 --- a/libio/fseek.c +++ b/libio/fseek.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -37,6 +37,7 @@ fseek (fp, offset, whence) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); result = _IO_fseek (fp, offset, whence); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; } diff --git a/libio/fseeko.c b/libio/fseeko.c index 0ebdfa937e..1836047012 100644 --- a/libio/fseeko.c +++ b/libio/fseeko.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -37,6 +37,7 @@ fseeko (fp, offset, whence) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); result = _IO_fseek (fp, offset, whence); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; } diff --git a/libio/fseeko64.c b/libio/fseeko64.c index 81c17b398c..55699ae938 100644 --- a/libio/fseeko64.c +++ b/libio/fseeko64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -39,7 +39,8 @@ fseeko64 (fp, offset, whence) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); result = _IO_fseek (fp, offset, whence); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; #else __set_errno (ENOSYS); diff --git a/libio/ftello.c b/libio/ftello.c index 7585eea9ec..662b954c54 100644 --- a/libio/ftello.c +++ b/libio/ftello.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -37,7 +37,8 @@ ftello (fp) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); if (pos == _IO_pos_BAD) { #ifdef EIO diff --git a/libio/ftello64.c b/libio/ftello64.c index 886591dca9..96eeb184a4 100644 --- a/libio/ftello64.c +++ b/libio/ftello64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -38,7 +38,8 @@ ftello64 (fp) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); if (pos == _IO_pos_BAD) { #ifdef EIO diff --git a/libio/getc.c b/libio/getc.c index 1dc53b5ed6..81a4b52c83 100644 --- a/libio/getc.c +++ b/libio/getc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -37,7 +37,8 @@ _IO_getc (fp) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); result = _IO_getc_unlocked (fp); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; } diff --git a/libio/getchar.c b/libio/getchar.c index 93194b3912..fdc2ec3a87 100644 --- a/libio/getchar.c +++ b/libio/getchar.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -33,8 +33,9 @@ getchar () { int result; _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, stdin); - _IO_flockfile (stdin); + _IO_flockfile (_IO_stdin); result = _IO_getc_unlocked (stdin); - _IO_cleanup_region_end (1); + _IO_funlockfile (_IO_stdin); + _IO_cleanup_region_end (0); return result; } diff --git a/libio/iofclose.c b/libio/iofclose.c index 7100425556..f896e09b7e 100644 --- a/libio/iofclose.c +++ b/libio/iofclose.c @@ -43,7 +43,8 @@ _IO_new_fclose (fp) else status = fp->_flags & _IO_ERR_SEEN ? -1 : 0; _IO_FINISH (fp); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); if (fp != _IO_stdin && fp != _IO_stdout && fp != _IO_stderr) { fp->_IO_file_flags = 0; diff --git a/libio/iofflush.c b/libio/iofflush.c index 540c99d535..724ff26ac8 100644 --- a/libio/iofflush.c +++ b/libio/iofflush.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -39,7 +39,8 @@ _IO_fflush (fp) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); result = _IO_SYNC (fp) ? EOF : 0; - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; } } diff --git a/libio/iofgetpos.c b/libio/iofgetpos.c index 6afc323136..5fed6c3685 100644 --- a/libio/iofgetpos.c +++ b/libio/iofgetpos.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -36,7 +36,8 @@ _IO_fgetpos (fp, posp) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); if (pos == _IO_pos_BAD) { /* ANSI explicitly requires setting errno to a positive value on diff --git a/libio/iofgetpos64.c b/libio/iofgetpos64.c index 0cb79d6619..8a7733bfb5 100644 --- a/libio/iofgetpos64.c +++ b/libio/iofgetpos64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -37,7 +37,8 @@ _IO_fgetpos64 (fp, posp) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); pos = _IO_seekoff (fp, 0, _IO_seek_cur, 0); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); if (pos == _IO_pos_BAD) { /* ANSI explicitly requires setting errno to a positive value on diff --git a/libio/iofgets.c b/libio/iofgets.c index 91db09f342..d61fb81481 100644 --- a/libio/iofgets.c +++ b/libio/iofgets.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU IO Library. This library is free software; you can redistribute it and/or @@ -54,7 +54,8 @@ _IO_fgets (buf, n, fp) result = buf; } fp->_IO_file_flags |= old_error; - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; } diff --git a/libio/iofputs.c b/libio/iofputs.c index 1a329bbe26..1805387303 100644 --- a/libio/iofputs.c +++ b/libio/iofputs.c |
