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.gz |
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 @@ -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 @@ -40,7 +40,8 @@ _IO_fputs (str, fp) result = EOF; else result = 1; - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; } diff --git a/libio/iofread.c b/libio/iofread.c index c83d2b638c..36640065d5 100644 --- a/libio/iofread.c +++ b/libio/iofread.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 @@ -40,7 +40,8 @@ _IO_fread (buf, size, count, fp) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); bytes_read = _IO_sgetn (fp, (char *) buf, bytes_requested); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return bytes_requested == bytes_read ? count : bytes_read / size; } diff --git a/libio/iofsetpos.c b/libio/iofsetpos.c index a8d816f5a3..cbf77347e7 100644 --- a/libio/iofsetpos.c +++ b/libio/iofsetpos.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 @@ -47,7 +47,8 @@ _IO_fsetpos (fp, posp) } else result = 0; - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; } diff --git a/libio/iofsetpos64.c b/libio/iofsetpos64.c index 534e0cf3ca..13ce0fb3cb 100644 --- a/libio/iofsetpos64.c +++ b/libio/iofsetpos64.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 @@ -48,7 +48,8 @@ _IO_fsetpos64 (fp, posp) } else result = 0; - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; #else __set_errno (ENOSYS); diff --git a/libio/ioftell.c b/libio/ioftell.c index d8a1ce1d24..3a0e7a6bc3 100644 --- a/libio/ioftell.c +++ b/libio/ioftell.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_ftell (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/iofwrite.c b/libio/iofwrite.c index 5bc525ffc7..0f82797ecf 100644 --- a/libio/iofwrite.c +++ b/libio/iofwrite.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 @@ -40,7 +40,8 @@ _IO_fwrite (buf, size, count, fp) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); written = _IO_sputn (fp, (const char *) buf, request); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); /* Many traditional implementations return 0 if size==0 && count > 0, but ANSI requires us to return count in this case. */ if (written == request) diff --git a/libio/iogetdelim.c b/libio/iogetdelim.c index 50918b3e8d..56524d6840 100644 --- a/libio/iogetdelim.c +++ b/libio/iogetdelim.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1994, 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 @@ -115,7 +115,8 @@ _IO_getdelim (lineptr, n, delimiter, fp) result = cur_len; unlock_return: - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; } diff --git a/libio/iogets.c b/libio/iogets.c index a61699d694..b36d29ba6c 100644 --- a/libio/iogets.c +++ b/libio/iogets.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 @@ -65,7 +65,8 @@ _IO_gets (buf) buf[count] = 0; retval = buf; unlock_return: - _IO_cleanup_region_end (1); + _IO_funlockfile (_IO_stdin); + _IO_cleanup_region_end (0); return retval; } diff --git a/libio/ioputs.c b/libio/ioputs.c index ab5e6aaa4c..9ed8fe60a2 100644 --- a/libio/ioputs.c +++ b/libio/ioputs.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 @@ -40,7 +40,8 @@ _IO_puts (str) result = len + 1; else result = EOF; - _IO_cleanup_region_end (1); + _IO_funlockfile (_IO_stdout); + _IO_cleanup_region_end (0); return result; } diff --git a/libio/ioseekoff.c b/libio/ioseekoff.c index 13086ee912..b83e1ad797 100644 --- a/libio/ioseekoff.c +++ b/libio/ioseekoff.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 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 @@ -49,6 +49,7 @@ _IO_seekoff (fp, offset, dir, mode) } retval = _IO_SEEKOFF (fp, offset, dir, mode); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return retval; } diff --git a/libio/ioseekpos.c b/libio/ioseekpos.c index 5b59ed7d99..c81c333676 100644 --- a/libio/ioseekpos.c +++ b/libio/ioseekpos.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 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 @@ -43,6 +43,7 @@ _IO_seekpos (fp, pos, mode) _IO_free_backup_area (fp); retval = _IO_SEEKPOS (fp, pos, mode); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return retval; } diff --git a/libio/iosetbuffer.c b/libio/iosetbuffer.c index f140a9ad04..d615da570c 100644 --- a/libio/iosetbuffer.c +++ b/libio/iosetbuffer.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 @@ _IO_setbuffer (fp, buf, size) if (!buf) size = 0; (void) _IO_SETBUF (fp, buf, size); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); } #ifdef weak_alias diff --git a/libio/iosetvbuf.c b/libio/iosetvbuf.c index 65eeea51a6..02f4eefb5e 100644 --- a/libio/iosetvbuf.c +++ b/libio/iosetvbuf.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 @@ -91,7 +91,8 @@ _IO_setvbuf (fp, buf, mode, size) } result = _IO_SETBUF (fp, buf, size) == NULL ? EOF : 0; unlock_return: - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; } diff --git a/libio/ioungetc.c b/libio/ioungetc.c index 07f38e747b..abc27ffb33 100644 --- a/libio/ioungetc.c +++ b/libio/ioungetc.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 @@ -37,7 +37,8 @@ _IO_ungetc (c, fp) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); result = _IO_sputbackc (fp, (unsigned char) c); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; } diff --git a/libio/iovsprintf.c b/libio/iovsprintf.c index 34919588ce..a1ece2da47 100644 --- a/libio/iovsprintf.c +++ b/libio/iovsprintf.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1993, 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 @@ -44,11 +44,8 @@ _IO_vsprintf (string, format, args) _IO_init (&sf._sbf._f, 0); _IO_JUMPS (&sf._sbf._f) = &_IO_str_jumps; _IO_str_init_static (&sf._sbf._f, string, -1, string); - _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, &sf); - _IO_flockfile (&sf._sbf._f); ret = _IO_vfprintf (&sf._sbf._f, format, args); _IO_putc_unlocked ('\0', &sf._sbf._f); - _IO_cleanup_region_end (1); return ret; } diff --git a/libio/iovsscanf.c b/libio/iovsscanf.c index 1917d63e6d..923e8290a4 100644 --- a/libio/iovsscanf.c +++ b/libio/iovsscanf.c @@ -41,10 +41,7 @@ _IO_vsscanf (string, format, args) _IO_init (&sf._sbf._f, 0); _IO_JUMPS (&sf._sbf._f) = &_IO_str_jumps; _IO_str_init_static (&sf._sbf._f, (char*)string, 0, NULL); - _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, &sf); - _IO_flockfile (&sf._sbf._f); ret = _IO_vfscanf (&sf._sbf._f, format, args, NULL); - _IO_cleanup_region_end (1); return ret; } diff --git a/libio/oldfileops.c b/libio/oldfileops.c index 7cf4fdf22c..251dc78c6c 100644 --- a/libio/oldfileops.c +++ b/libio/oldfileops.c @@ -426,7 +426,8 @@ _IO_old_file_sync (fp) fp->_old_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/oldiofclose.c b/libio/oldiofclose.c index 5f3e1020d8..e256d57ac2 100644 --- a/libio/oldiofclose.c +++ b/libio/oldiofclose.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 @@ -44,7 +44,8 @@ _IO_old_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/peekc.c b/libio/peekc.c index 0b3b5140c2..8ad274e558 100644 --- a/libio/peekc.c +++ b/libio/peekc.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 @@ _IO_peekc_locked (fp) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); result = _IO_peekc_unlocked (fp); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); return result; } diff --git a/libio/putc.c b/libio/putc.c index 3c35c365f0..72cd2a1a05 100644 --- a/libio/putc.c +++ b/libio/putc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -31,7 +31,8 @@ _IO_putc (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/putchar.c b/libio/putchar.c index 1e1dd13762..143796d20c 100644 --- a/libio/putchar.c +++ b/libio/putchar.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -30,6 +30,7 @@ putchar (c) _IO_stdout); _IO_flockfile (_IO_stdout); result = _IO_putc_unlocked (c, _IO_stdout); - _IO_cleanup_region_end (1); + _IO_funlockfile (_IO_stdout); + _IO_cleanup_region_end (0); return result; } diff --git a/libio/rewind.c b/libio/rewind.c index bce27575fd..fb6afbc77a 100644 --- a/libio/rewind.c +++ b/libio/rewind.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 @@ -34,5 +34,6 @@ rewind (fp) _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp); _IO_flockfile (fp); _IO_rewind (fp); - _IO_cleanup_region_end (1); + _IO_funlockfile (fp); + _IO_cleanup_region_end (0); } |