aboutsummaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-06-07 14:06:56 +0000
committerUlrich Drepper <drepper@redhat.com>1998-06-07 14:06:56 +0000
commitc0fb8a563c1c49e5fbec9bc22deac618910a3ff4 (patch)
treee7db886672cef990feba6c4357ebece5a820d7cf /libio
parent737547be99fd9afffbdf3f7ac817da0a06fffc9e (diff)
downloadglibc-c0fb8a563c1c49e5fbec9bc22deac618910a3ff4.zip
glibc-c0fb8a563c1c49e5fbec9bc22deac618910a3ff4.tar.gz
glibc-c0fb8a563c1c49e5fbec9bc22deac618910a3ff4.tar.bz2
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')
-rw-r--r--libio/fgetc.c5
-rw-r--r--libio/fileops.c3
-rw-r--r--libio/fputc.c5
-rw-r--r--libio/freopen.c3
-rw-r--r--libio/freopen64.c5
-rw-r--r--libio/fseek.c5
-rw-r--r--libio/fseeko.c5
-rw-r--r--libio/fseeko64.c5
-rw-r--r--libio/ftello.c5
-rw-r--r--libio/ftello64.c5
-rw-r--r--libio/getc.c5
-rw-r--r--libio/getchar.c7
-rw-r--r--libio/iofclose.c3
-rw-r--r--libio/iofflush.c5
-rw-r--r--libio/iofgetpos.c5
-rw-r--r--libio/iofgetpos64.c5
-rw-r--r--libio/iofgets.c5
-rw-r--r--libio/iofputs.c5
-rw-r--r--libio/iofread.c5
-rw-r--r--libio/iofsetpos.c5
-rw-r--r--libio/iofsetpos64.c5
-rw-r--r--libio/ioftell.c5
-rw-r--r--libio/iofwrite.c5
-rw-r--r--libio/iogetdelim.c5
-rw-r--r--libio/iogets.c5
-rw-r--r--libio/ioputs.c5
-rw-r--r--libio/ioseekoff.c5
-rw-r--r--libio/ioseekpos.c5
-rw-r--r--libio/iosetbuffer.c5
-rw-r--r--libio/iosetvbuf.c5
-rw-r--r--libio/ioungetc.c5
-rw-r--r--libio/iovsprintf.c5
-rw-r--r--libio/iovsscanf.c3
-rw-r--r--libio/oldfileops.c3
-rw-r--r--libio/oldiofclose.c5
-rw-r--r--libio/peekc.c5
-rw-r--r--libio/putc.c5
-rw-r--r--libio/putchar.c5
-rw-r--r--libio/rewind.c5
39 files changed, 109 insertions, 78 deletions
diff --git a/libio/fgetc.c b/libio/fgetc.c
index 174e60f..094c5fe 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 e5ffb24..1219abe 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 22cdfab..3ec8b69 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 0452e7e..22f2434 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 78e994d..c521631 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 f2563d3..f928457 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 0ebdfa9..1836047 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 81c17b3..55699ae 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 7585eea..662b954 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 886591d..96eeb18 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 1dc53b5e..81a4b52 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 93194b3..fdc2ec3 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 7100425..f896e09 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 540c99d..724ff26 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 6afc323..5fed6c3 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 0cb79d6..8a7733b 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 91db09f..d61fb81 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 1a329bb..1805387 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 c83d2b6..3664006 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 a8d816f..cbf7734 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 534e0cf..13ce0fb 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 d8a1ce1..3a0e7a6 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 5bc525f..0f82797 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 50918b3..56524d6 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 a61699d..b36d29b 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 ab5e6aa..9ed8fe6 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 13086ee..b83e1ad 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 5b59ed7..c81c333 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 f140a9a..d615da5 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 65eeea5..02f4eef 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 07f38e7..abc27ff 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 3491958..a1ece2d 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 1917d63..923e829 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 7cf4fdf..251dc78 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 5f3e102..e256d57 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 0b3b514..8ad274e 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 3c35c36..72cd2a1 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 1e1dd13..143796d 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 bce2757..fb6afbc 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);
}