aboutsummaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
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);
}