Update.
2003-08-29 Jakub Jelinek <jakub@redhat.com>
* libio/Makefile: Compile fputc.c, fputwc.c, freopen64.c, freopen.c,
fseek.c, fseeko64.c, fseeko.c, ftello64.c, ftello.c, fwide.c, getc.c,
getchar.c, getwc.c, getwchar.c, iofclose.c, iofflush.c, iofgetpos64.c,
iofgetpos.c, iofgets.c, iofgetws.c, iofputs.c, iofputws.c, iofread.c,
iofsetpos64.c, iofsetpos.c, ioftell.c, iofwrite.c, iogetdelim.c,
iogetline.c, iogets.c, iogetwline.c, ioputs.c, ioseekoff.c,
ioseekpos.c, iosetbuffer.c, iosetvbuf.c, ioungetc.c, ioungetwc.c,
oldfileops.c, oldiofclose.c, oldiofgetpos64.c, oldiofgetpos.c,
oldiofsetpos64.c, oldiofsetpos.c, peekc.c, putc.c, putchar.c, putwc.c,
putwchar.c and rewind.c with exceptions.
* sysdeps/generic/bits/stdio-lock.h (_IO_acquire_lock,
_IO_release_lock): Define.
* libio/fileops.c (_IO_new_file_underflow): Use it.
* libio/fputc.c (fputc): Likewise.
* libio/fputwc.c (fputwc): Likewise.
* libio/freopen64.c (freopen64):
* libio/freopen.c (freopen): Likewise.
* libio/fseek.c (fseek): Likewise.
* libio/fseeko64.c (fseeko64): Likewise.
* libio/fseeko.c (fseeko): Likewise.
* libio/ftello64.c (ftello64): Likewise.
* libio/ftello.c (ftello): Likewise.
* libio/fwide.c (fwide): Likewise.
* libio/getc.c (_IO_getc): Likewise.
* libio/getchar.c (getchar): Likewise.
* libio/getwc.c (_IO_getwc): Likewise.
* libio/getwchar.c (getwchar): Likewise.
* libio/iofclose.c (_IO_new_fclose):
* libio/iofflush.c (_IO_fflush): Likewise.
* libio/iofgetpos64.c (_IO_new_fgetpos64): Likewise.
* libio/iofgetpos.c (_IO_new_fgetpos): Likewise.
* libio/iofgets.c (_IO_fgets): Likewise.
* libio/iofgetws.c (fgetws): Likewise.
* libio/iofputs.c (_IO_fputs):
* libio/iofputws.c (_IO_fputs): Likewise.
* libio/iofread.c (_IO_fread): Likewise.
* libio/iofsetpos64.c (_IO_new_fsetpos64): Likewise.
* libio/iofsetpos.c (_IO_new_fsetpos): Likewise.
* libio/ioftell.c (_IO_ftell): Likewise.
* libio/iofwrite.c (_IO_fwrite): Likewise.
* libio/iogetdelim.c (_IO_getdelim): Likewise.
* libio/iogets.c (_IO_gets): Likewise.
* libio/ioputs.c (_IO_puts): Likewise.
* libio/ioseekoff.c (_IO_seekoff): Likewise.
* libio/ioseekpos.c (_IO_seekpos): Likewise.
* libio/iosetbuffer.c (_IO_setbuffer): Likewise.
* libio/iosetvbuf.c (_IO_setvbuf): Likewise.
* libio/ioungetc.c (_IO_ungetc): Likewise.
* libio/ioungetwc.c (ungetwc): Likewise.
* libio/oldiofclose.c (_IO_old_fclose): Likewise.
* libio/oldiofgetpos64.c (_IO_old_fgetpos64): Likewise.
* libio/oldiofgetpos.c (_IO_old_fgetpos): Likewise.
* libio/oldiofsetpos64.c (_IO_old_fsetpos64): Likewise.
* libio/oldiofsetpos.c (_IO_old_fsetpos): Likewise.
* libio/peekc.c (_IO_peekc_locked): Likewise.
* libio/putc.c (_IO_putc): Likewise.
* libio/putchar.c (putchar): Likewise.
* libio/putwc.c (putwc): Likewise.
* libio/putwchar.c (putwchar): Likewise.
* libio/rewind.c (rewind): Likewise.
* libio/wfileops.c (_IO_wfile_underflow): Likewise.
2003-08-29 21:58:49 +02:00
|
|
|
/* Copyright (C) 1993,96,97,98,2002,2003 Free Software Foundation, Inc.
|
2001-07-06 06:58:11 +02:00
|
|
|
This file is part of the GNU C Library.
|
Sat Nov 18 16:46:01 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* libio/Makefile, libio/cleanup.c, libio/clearerr.c, libio/feof.c,
libio/ferror.c, libio/fgetc.c, libio/filedoalloc.c, libio/fileno.c,
libio/fileops.c, libio/fputc.c, libio/freopen.c, libio/fseek.c,
libio/genops.c, libio/getc.c, libio/getchar.c, libio/iofclose.c,
libio/iofdopen.c, libio/iofflush.c, libio/iofgetpos.c, libio/iofgets.c,
libio/iofopen.c, libio/iofprintf.c, libio/iofputs.c, libio/iofread.c,
libio/iofscanf.c, libio/iofsetpos.c, libio/ioftell.c, libio/iofwrite.c,
libio/iogetdelim.c, libio/iogetline.c, libio/iogets.c, libio/iolibio.h,
libio/iopadn.c, libio/ioprims.c, libio/ioputs.c, libio/ioseekoff.c,
libio/ioseekpos.c, libio/iosetbuffer.c, libio/iosetvbuf.c,
libio/iosprintf.c, libio/ioungetc.c, libio/iovsprintf.c,
libio/iovsscanf.c, libio/libio.h, libio/libioP.h, libio/putc.c,
libio/putchar.c, libio/rewind.c, libio/setbuf.c, libio/setlinebuf.c,
libio/stdfiles.c, libio/stdio.c, libio/stdio.h, libio/strfile.h,
libio/strops.c, libio/vasprintf.c, libio/vscanf.c, libio/vsnprintf.c:
New files. Slightly modified version from Linux libc.
* libio/memstream.c, libio/vdprintf.c: New files for functions not
(yet) part of GNU libio.
* libio/iofopncook.c: Implementation of `fopencookie', mainly written
by Per Bothner.
* stdio-common/getline.c: Adapted to libio.
* stdio-common/snprintf.c: Adapted to libio.
* stdio-common/vfprintf.c: Adapted to libio.
* stdio-common/vfscanf.c: Adapted to libio.
* sysdeps/posix/tempname.c: Adapted to libio.
1995-11-20 04:48:11 +01:00
|
|
|
|
2001-07-06 06:58:11 +02:00
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
Sat Nov 18 16:46:01 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* libio/Makefile, libio/cleanup.c, libio/clearerr.c, libio/feof.c,
libio/ferror.c, libio/fgetc.c, libio/filedoalloc.c, libio/fileno.c,
libio/fileops.c, libio/fputc.c, libio/freopen.c, libio/fseek.c,
libio/genops.c, libio/getc.c, libio/getchar.c, libio/iofclose.c,
libio/iofdopen.c, libio/iofflush.c, libio/iofgetpos.c, libio/iofgets.c,
libio/iofopen.c, libio/iofprintf.c, libio/iofputs.c, libio/iofread.c,
libio/iofscanf.c, libio/iofsetpos.c, libio/ioftell.c, libio/iofwrite.c,
libio/iogetdelim.c, libio/iogetline.c, libio/iogets.c, libio/iolibio.h,
libio/iopadn.c, libio/ioprims.c, libio/ioputs.c, libio/ioseekoff.c,
libio/ioseekpos.c, libio/iosetbuffer.c, libio/iosetvbuf.c,
libio/iosprintf.c, libio/ioungetc.c, libio/iovsprintf.c,
libio/iovsscanf.c, libio/libio.h, libio/libioP.h, libio/putc.c,
libio/putchar.c, libio/rewind.c, libio/setbuf.c, libio/setlinebuf.c,
libio/stdfiles.c, libio/stdio.c, libio/stdio.h, libio/strfile.h,
libio/strops.c, libio/vasprintf.c, libio/vscanf.c, libio/vsnprintf.c:
New files. Slightly modified version from Linux libc.
* libio/memstream.c, libio/vdprintf.c: New files for functions not
(yet) part of GNU libio.
* libio/iofopncook.c: Implementation of `fopencookie', mainly written
by Per Bothner.
* stdio-common/getline.c: Adapted to libio.
* stdio-common/snprintf.c: Adapted to libio.
* stdio-common/vfprintf.c: Adapted to libio.
* stdio-common/vfscanf.c: Adapted to libio.
* sysdeps/posix/tempname.c: Adapted to libio.
1995-11-20 04:48:11 +01:00
|
|
|
|
2001-07-06 06:58:11 +02:00
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
1997-08-20 05:53:21 +02:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 06:58:11 +02:00
|
|
|
Lesser General Public License for more details.
|
Sat Nov 18 16:46:01 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* libio/Makefile, libio/cleanup.c, libio/clearerr.c, libio/feof.c,
libio/ferror.c, libio/fgetc.c, libio/filedoalloc.c, libio/fileno.c,
libio/fileops.c, libio/fputc.c, libio/freopen.c, libio/fseek.c,
libio/genops.c, libio/getc.c, libio/getchar.c, libio/iofclose.c,
libio/iofdopen.c, libio/iofflush.c, libio/iofgetpos.c, libio/iofgets.c,
libio/iofopen.c, libio/iofprintf.c, libio/iofputs.c, libio/iofread.c,
libio/iofscanf.c, libio/iofsetpos.c, libio/ioftell.c, libio/iofwrite.c,
libio/iogetdelim.c, libio/iogetline.c, libio/iogets.c, libio/iolibio.h,
libio/iopadn.c, libio/ioprims.c, libio/ioputs.c, libio/ioseekoff.c,
libio/ioseekpos.c, libio/iosetbuffer.c, libio/iosetvbuf.c,
libio/iosprintf.c, libio/ioungetc.c, libio/iovsprintf.c,
libio/iovsscanf.c, libio/libio.h, libio/libioP.h, libio/putc.c,
libio/putchar.c, libio/rewind.c, libio/setbuf.c, libio/setlinebuf.c,
libio/stdfiles.c, libio/stdio.c, libio/stdio.h, libio/strfile.h,
libio/strops.c, libio/vasprintf.c, libio/vscanf.c, libio/vsnprintf.c:
New files. Slightly modified version from Linux libc.
* libio/memstream.c, libio/vdprintf.c: New files for functions not
(yet) part of GNU libio.
* libio/iofopncook.c: Implementation of `fopencookie', mainly written
by Per Bothner.
* stdio-common/getline.c: Adapted to libio.
* stdio-common/snprintf.c: Adapted to libio.
* stdio-common/vfprintf.c: Adapted to libio.
* stdio-common/vfscanf.c: Adapted to libio.
* sysdeps/posix/tempname.c: Adapted to libio.
1995-11-20 04:48:11 +01:00
|
|
|
|
2001-07-06 06:58:11 +02:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with the GNU C Library; if not, write to the Free
|
|
|
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
|
|
02111-1307 USA.
|
Sat Nov 18 16:46:01 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* libio/Makefile, libio/cleanup.c, libio/clearerr.c, libio/feof.c,
libio/ferror.c, libio/fgetc.c, libio/filedoalloc.c, libio/fileno.c,
libio/fileops.c, libio/fputc.c, libio/freopen.c, libio/fseek.c,
libio/genops.c, libio/getc.c, libio/getchar.c, libio/iofclose.c,
libio/iofdopen.c, libio/iofflush.c, libio/iofgetpos.c, libio/iofgets.c,
libio/iofopen.c, libio/iofprintf.c, libio/iofputs.c, libio/iofread.c,
libio/iofscanf.c, libio/iofsetpos.c, libio/ioftell.c, libio/iofwrite.c,
libio/iogetdelim.c, libio/iogetline.c, libio/iogets.c, libio/iolibio.h,
libio/iopadn.c, libio/ioprims.c, libio/ioputs.c, libio/ioseekoff.c,
libio/ioseekpos.c, libio/iosetbuffer.c, libio/iosetvbuf.c,
libio/iosprintf.c, libio/ioungetc.c, libio/iovsprintf.c,
libio/iovsscanf.c, libio/libio.h, libio/libioP.h, libio/putc.c,
libio/putchar.c, libio/rewind.c, libio/setbuf.c, libio/setlinebuf.c,
libio/stdfiles.c, libio/stdio.c, libio/stdio.h, libio/strfile.h,
libio/strops.c, libio/vasprintf.c, libio/vscanf.c, libio/vsnprintf.c:
New files. Slightly modified version from Linux libc.
* libio/memstream.c, libio/vdprintf.c: New files for functions not
(yet) part of GNU libio.
* libio/iofopncook.c: Implementation of `fopencookie', mainly written
by Per Bothner.
* stdio-common/getline.c: Adapted to libio.
* stdio-common/snprintf.c: Adapted to libio.
* stdio-common/vfprintf.c: Adapted to libio.
* stdio-common/vfscanf.c: Adapted to libio.
* sysdeps/posix/tempname.c: Adapted to libio.
1995-11-20 04:48:11 +01:00
|
|
|
|
2001-07-06 06:58:11 +02:00
|
|
|
As a special exception, if you link the code in this file with
|
|
|
|
files compiled with a GNU compiler to produce an executable,
|
|
|
|
that does not cause the resulting executable to be covered by
|
|
|
|
the GNU Lesser General Public License. This exception does not
|
|
|
|
however invalidate any other reasons why the executable file
|
|
|
|
might be covered by the GNU Lesser General Public License.
|
|
|
|
This exception applies to code released by its copyright holders
|
|
|
|
in files containing the exception. */
|
Sat Nov 18 16:46:01 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* libio/Makefile, libio/cleanup.c, libio/clearerr.c, libio/feof.c,
libio/ferror.c, libio/fgetc.c, libio/filedoalloc.c, libio/fileno.c,
libio/fileops.c, libio/fputc.c, libio/freopen.c, libio/fseek.c,
libio/genops.c, libio/getc.c, libio/getchar.c, libio/iofclose.c,
libio/iofdopen.c, libio/iofflush.c, libio/iofgetpos.c, libio/iofgets.c,
libio/iofopen.c, libio/iofprintf.c, libio/iofputs.c, libio/iofread.c,
libio/iofscanf.c, libio/iofsetpos.c, libio/ioftell.c, libio/iofwrite.c,
libio/iogetdelim.c, libio/iogetline.c, libio/iogets.c, libio/iolibio.h,
libio/iopadn.c, libio/ioprims.c, libio/ioputs.c, libio/ioseekoff.c,
libio/ioseekpos.c, libio/iosetbuffer.c, libio/iosetvbuf.c,
libio/iosprintf.c, libio/ioungetc.c, libio/iovsprintf.c,
libio/iovsscanf.c, libio/libio.h, libio/libioP.h, libio/putc.c,
libio/putchar.c, libio/rewind.c, libio/setbuf.c, libio/setlinebuf.c,
libio/stdfiles.c, libio/stdio.c, libio/stdio.h, libio/strfile.h,
libio/strops.c, libio/vasprintf.c, libio/vscanf.c, libio/vsnprintf.c:
New files. Slightly modified version from Linux libc.
* libio/memstream.c, libio/vdprintf.c: New files for functions not
(yet) part of GNU libio.
* libio/iofopncook.c: Implementation of `fopencookie', mainly written
by Per Bothner.
* stdio-common/getline.c: Adapted to libio.
* stdio-common/snprintf.c: Adapted to libio.
* stdio-common/vfprintf.c: Adapted to libio.
* stdio-common/vfscanf.c: Adapted to libio.
* sysdeps/posix/tempname.c: Adapted to libio.
1995-11-20 04:48:11 +01:00
|
|
|
|
|
|
|
#include "libioP.h"
|
2002-08-10 11:24:53 +02:00
|
|
|
#include <stdio.h>
|
Sat Nov 18 16:46:01 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* libio/Makefile, libio/cleanup.c, libio/clearerr.c, libio/feof.c,
libio/ferror.c, libio/fgetc.c, libio/filedoalloc.c, libio/fileno.c,
libio/fileops.c, libio/fputc.c, libio/freopen.c, libio/fseek.c,
libio/genops.c, libio/getc.c, libio/getchar.c, libio/iofclose.c,
libio/iofdopen.c, libio/iofflush.c, libio/iofgetpos.c, libio/iofgets.c,
libio/iofopen.c, libio/iofprintf.c, libio/iofputs.c, libio/iofread.c,
libio/iofscanf.c, libio/iofsetpos.c, libio/ioftell.c, libio/iofwrite.c,
libio/iogetdelim.c, libio/iogetline.c, libio/iogets.c, libio/iolibio.h,
libio/iopadn.c, libio/ioprims.c, libio/ioputs.c, libio/ioseekoff.c,
libio/ioseekpos.c, libio/iosetbuffer.c, libio/iosetvbuf.c,
libio/iosprintf.c, libio/ioungetc.c, libio/iovsprintf.c,
libio/iovsscanf.c, libio/libio.h, libio/libioP.h, libio/putc.c,
libio/putchar.c, libio/rewind.c, libio/setbuf.c, libio/setlinebuf.c,
libio/stdfiles.c, libio/stdio.c, libio/stdio.h, libio/strfile.h,
libio/strops.c, libio/vasprintf.c, libio/vscanf.c, libio/vsnprintf.c:
New files. Slightly modified version from Linux libc.
* libio/memstream.c, libio/vdprintf.c: New files for functions not
(yet) part of GNU libio.
* libio/iofopncook.c: Implementation of `fopencookie', mainly written
by Per Bothner.
* stdio-common/getline.c: Adapted to libio.
* stdio-common/snprintf.c: Adapted to libio.
* stdio-common/vfprintf.c: Adapted to libio.
* stdio-common/vfscanf.c: Adapted to libio.
* sysdeps/posix/tempname.c: Adapted to libio.
1995-11-20 04:48:11 +01:00
|
|
|
|
|
|
|
void
|
|
|
|
rewind (fp)
|
1997-08-20 05:53:21 +02:00
|
|
|
_IO_FILE *fp;
|
Sat Nov 18 16:46:01 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* libio/Makefile, libio/cleanup.c, libio/clearerr.c, libio/feof.c,
libio/ferror.c, libio/fgetc.c, libio/filedoalloc.c, libio/fileno.c,
libio/fileops.c, libio/fputc.c, libio/freopen.c, libio/fseek.c,
libio/genops.c, libio/getc.c, libio/getchar.c, libio/iofclose.c,
libio/iofdopen.c, libio/iofflush.c, libio/iofgetpos.c, libio/iofgets.c,
libio/iofopen.c, libio/iofprintf.c, libio/iofputs.c, libio/iofread.c,
libio/iofscanf.c, libio/iofsetpos.c, libio/ioftell.c, libio/iofwrite.c,
libio/iogetdelim.c, libio/iogetline.c, libio/iogets.c, libio/iolibio.h,
libio/iopadn.c, libio/ioprims.c, libio/ioputs.c, libio/ioseekoff.c,
libio/ioseekpos.c, libio/iosetbuffer.c, libio/iosetvbuf.c,
libio/iosprintf.c, libio/ioungetc.c, libio/iovsprintf.c,
libio/iovsscanf.c, libio/libio.h, libio/libioP.h, libio/putc.c,
libio/putchar.c, libio/rewind.c, libio/setbuf.c, libio/setlinebuf.c,
libio/stdfiles.c, libio/stdio.c, libio/stdio.h, libio/strfile.h,
libio/strops.c, libio/vasprintf.c, libio/vscanf.c, libio/vsnprintf.c:
New files. Slightly modified version from Linux libc.
* libio/memstream.c, libio/vdprintf.c: New files for functions not
(yet) part of GNU libio.
* libio/iofopncook.c: Implementation of `fopencookie', mainly written
by Per Bothner.
* stdio-common/getline.c: Adapted to libio.
* stdio-common/snprintf.c: Adapted to libio.
* stdio-common/vfprintf.c: Adapted to libio.
* stdio-common/vfscanf.c: Adapted to libio.
* sysdeps/posix/tempname.c: Adapted to libio.
1995-11-20 04:48:11 +01:00
|
|
|
{
|
|
|
|
CHECK_FILE (fp, );
|
Update.
2003-08-29 Jakub Jelinek <jakub@redhat.com>
* libio/Makefile: Compile fputc.c, fputwc.c, freopen64.c, freopen.c,
fseek.c, fseeko64.c, fseeko.c, ftello64.c, ftello.c, fwide.c, getc.c,
getchar.c, getwc.c, getwchar.c, iofclose.c, iofflush.c, iofgetpos64.c,
iofgetpos.c, iofgets.c, iofgetws.c, iofputs.c, iofputws.c, iofread.c,
iofsetpos64.c, iofsetpos.c, ioftell.c, iofwrite.c, iogetdelim.c,
iogetline.c, iogets.c, iogetwline.c, ioputs.c, ioseekoff.c,
ioseekpos.c, iosetbuffer.c, iosetvbuf.c, ioungetc.c, ioungetwc.c,
oldfileops.c, oldiofclose.c, oldiofgetpos64.c, oldiofgetpos.c,
oldiofsetpos64.c, oldiofsetpos.c, peekc.c, putc.c, putchar.c, putwc.c,
putwchar.c and rewind.c with exceptions.
* sysdeps/generic/bits/stdio-lock.h (_IO_acquire_lock,
_IO_release_lock): Define.
* libio/fileops.c (_IO_new_file_underflow): Use it.
* libio/fputc.c (fputc): Likewise.
* libio/fputwc.c (fputwc): Likewise.
* libio/freopen64.c (freopen64):
* libio/freopen.c (freopen): Likewise.
* libio/fseek.c (fseek): Likewise.
* libio/fseeko64.c (fseeko64): Likewise.
* libio/fseeko.c (fseeko): Likewise.
* libio/ftello64.c (ftello64): Likewise.
* libio/ftello.c (ftello): Likewise.
* libio/fwide.c (fwide): Likewise.
* libio/getc.c (_IO_getc): Likewise.
* libio/getchar.c (getchar): Likewise.
* libio/getwc.c (_IO_getwc): Likewise.
* libio/getwchar.c (getwchar): Likewise.
* libio/iofclose.c (_IO_new_fclose):
* libio/iofflush.c (_IO_fflush): Likewise.
* libio/iofgetpos64.c (_IO_new_fgetpos64): Likewise.
* libio/iofgetpos.c (_IO_new_fgetpos): Likewise.
* libio/iofgets.c (_IO_fgets): Likewise.
* libio/iofgetws.c (fgetws): Likewise.
* libio/iofputs.c (_IO_fputs):
* libio/iofputws.c (_IO_fputs): Likewise.
* libio/iofread.c (_IO_fread): Likewise.
* libio/iofsetpos64.c (_IO_new_fsetpos64): Likewise.
* libio/iofsetpos.c (_IO_new_fsetpos): Likewise.
* libio/ioftell.c (_IO_ftell): Likewise.
* libio/iofwrite.c (_IO_fwrite): Likewise.
* libio/iogetdelim.c (_IO_getdelim): Likewise.
* libio/iogets.c (_IO_gets): Likewise.
* libio/ioputs.c (_IO_puts): Likewise.
* libio/ioseekoff.c (_IO_seekoff): Likewise.
* libio/ioseekpos.c (_IO_seekpos): Likewise.
* libio/iosetbuffer.c (_IO_setbuffer): Likewise.
* libio/iosetvbuf.c (_IO_setvbuf): Likewise.
* libio/ioungetc.c (_IO_ungetc): Likewise.
* libio/ioungetwc.c (ungetwc): Likewise.
* libio/oldiofclose.c (_IO_old_fclose): Likewise.
* libio/oldiofgetpos64.c (_IO_old_fgetpos64): Likewise.
* libio/oldiofgetpos.c (_IO_old_fgetpos): Likewise.
* libio/oldiofsetpos64.c (_IO_old_fsetpos64): Likewise.
* libio/oldiofsetpos.c (_IO_old_fsetpos): Likewise.
* libio/peekc.c (_IO_peekc_locked): Likewise.
* libio/putc.c (_IO_putc): Likewise.
* libio/putchar.c (putchar): Likewise.
* libio/putwc.c (putwc): Likewise.
* libio/putwchar.c (putwchar): Likewise.
* libio/rewind.c (rewind): Likewise.
* libio/wfileops.c (_IO_wfile_underflow): Likewise.
2003-08-29 21:58:49 +02:00
|
|
|
_IO_acquire_lock (fp);
|
Sat Nov 18 16:46:01 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* libio/Makefile, libio/cleanup.c, libio/clearerr.c, libio/feof.c,
libio/ferror.c, libio/fgetc.c, libio/filedoalloc.c, libio/fileno.c,
libio/fileops.c, libio/fputc.c, libio/freopen.c, libio/fseek.c,
libio/genops.c, libio/getc.c, libio/getchar.c, libio/iofclose.c,
libio/iofdopen.c, libio/iofflush.c, libio/iofgetpos.c, libio/iofgets.c,
libio/iofopen.c, libio/iofprintf.c, libio/iofputs.c, libio/iofread.c,
libio/iofscanf.c, libio/iofsetpos.c, libio/ioftell.c, libio/iofwrite.c,
libio/iogetdelim.c, libio/iogetline.c, libio/iogets.c, libio/iolibio.h,
libio/iopadn.c, libio/ioprims.c, libio/ioputs.c, libio/ioseekoff.c,
libio/ioseekpos.c, libio/iosetbuffer.c, libio/iosetvbuf.c,
libio/iosprintf.c, libio/ioungetc.c, libio/iovsprintf.c,
libio/iovsscanf.c, libio/libio.h, libio/libioP.h, libio/putc.c,
libio/putchar.c, libio/rewind.c, libio/setbuf.c, libio/setlinebuf.c,
libio/stdfiles.c, libio/stdio.c, libio/stdio.h, libio/strfile.h,
libio/strops.c, libio/vasprintf.c, libio/vscanf.c, libio/vsnprintf.c:
New files. Slightly modified version from Linux libc.
* libio/memstream.c, libio/vdprintf.c: New files for functions not
(yet) part of GNU libio.
* libio/iofopncook.c: Implementation of `fopencookie', mainly written
by Per Bothner.
* stdio-common/getline.c: Adapted to libio.
* stdio-common/snprintf.c: Adapted to libio.
* stdio-common/vfprintf.c: Adapted to libio.
* stdio-common/vfscanf.c: Adapted to libio.
* sysdeps/posix/tempname.c: Adapted to libio.
1995-11-20 04:48:11 +01:00
|
|
|
_IO_rewind (fp);
|
Update.
1998-10-25 Ulrich Drepper <drepper@cygnus.com>
* include/features.h: Define __USE_POSIS199506 is _POSIX_C_SOURCE is
greater or equal than 199506L.
* sysdeps/generic/bits/types.h (__fd_set): Define element as fds_bits
only is __USE_XOPEN. Otherwise use __fds_bits.
* sysdeps/unix/sysv/linux/alpha/bits/types.h: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/types.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/bits/types.h: Likewise.
* sysdeps/unix/sysv/linux/bits/types.h: Likewise.
* sysdeps/unix/sysv/sysv4/solaris2/bits/types.h: Likewise.
1998-10-24 H.J. Lu <hjl@gnu.org>
* locale/programs/charmap.c (parse_charmap): Accept tok_string
for <code_set_name>.
1998-10-25 H.J. Lu <hjl@gnu.org>
* locale/programs/ld-ctype.c (ctype_finish): Also check
<space>.
1998-10-25 Ulrich Drepper <drepper@cygnus.com>
* signal/signal.h: Include bits/sigthread.h only if __USE_POSIX199506.
* sysdeps/unix/sysv/linux/bits/types.h: Include pthreadtypes.h only
if __USE_POSIX199506 or __USE_UNIX98.
1998-10-24 22:34 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
* string/bits/string2.h: Inline strdup+friends only if
__USE_MISC || __USE_GNU (prevents namespace pollution).
1998-10-24 H.J. Lu <hjl@gnu.org>
* sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (LOCK_SH,
LOCK_EX, LOCK_NB, LOCK_UN): Protect with __USE_BSD.
* sysdeps/unix/sysv/linux/i386/bits/fcntl.h (LOCK_SH, LOCK_EX,
LOCK_NB, LOCK_UN): Likewise.
* sysdeps/unix/sysv/linux/mips/bits/fcntl.h (LOCK_SH, LOCK_EX,
LOCK_NB, LOCK_UN): Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (LOCK_SH, LOCK_EX,
LOCK_NB, LOCK_UN): Likewise.
* sysdeps/unix/sysv/linux/bits/fcntl.h (LOCK_SH, LOCK_EX,
LOCK_NB, LOCK_UN): Likewise.
1998-10-24 H.J. Lu <hjl@gnu.org>
* libio/ioseekoff.c (_IO_seekoff): Check the valid dir value.
* libio/rewind.c (rewind): Clear the error.
1998-10-24 H.J. Lu <hjl@gnu.org>
* grp/grp.h (getgrent_r, getgrgid_r, getgrnam_r): Add "__" to
"buffer".
1998-10-24 H.J. Lu <hjl@gnu.org>
* sysdeps/unix/sysv/linux/alpha/bits/time.h (timeval): Protect
with __need_timeval.
* sysdeps/unix/sysv/linux/mips/bits/time.h (timeval): Likewise.
* sysdeps/unix/sysv/linux/bits/time.h (timeval): Likewise.
1998-10-24 H.J. Lu <hjl@gnu.org>
* signal/signal.h (timespec, siginfo_t, sigwaitinfo, sigtimedwait,
sigqueue): Protect with __USE_POSIX199309.
1998-10-24 H.J. Lu <hjl@gnu.org>
* time/time.h (timespec): Protect with __USE_POSIX199309 instead of
__USE_POSIX.
1998-10-24 H.J. Lu <hjl@gnu.org>
* libio/fileops.c (_IO_new_file_seekoff): Always resync with
the kernel file offset.
* libio/oldfileops.c (_IO_old_file_seekoff): Likewise.
1998-10-25 10:11:53 +01:00
|
|
|
_IO_clearerr (fp);
|
Update.
2003-08-29 Jakub Jelinek <jakub@redhat.com>
* libio/Makefile: Compile fputc.c, fputwc.c, freopen64.c, freopen.c,
fseek.c, fseeko64.c, fseeko.c, ftello64.c, ftello.c, fwide.c, getc.c,
getchar.c, getwc.c, getwchar.c, iofclose.c, iofflush.c, iofgetpos64.c,
iofgetpos.c, iofgets.c, iofgetws.c, iofputs.c, iofputws.c, iofread.c,
iofsetpos64.c, iofsetpos.c, ioftell.c, iofwrite.c, iogetdelim.c,
iogetline.c, iogets.c, iogetwline.c, ioputs.c, ioseekoff.c,
ioseekpos.c, iosetbuffer.c, iosetvbuf.c, ioungetc.c, ioungetwc.c,
oldfileops.c, oldiofclose.c, oldiofgetpos64.c, oldiofgetpos.c,
oldiofsetpos64.c, oldiofsetpos.c, peekc.c, putc.c, putchar.c, putwc.c,
putwchar.c and rewind.c with exceptions.
* sysdeps/generic/bits/stdio-lock.h (_IO_acquire_lock,
_IO_release_lock): Define.
* libio/fileops.c (_IO_new_file_underflow): Use it.
* libio/fputc.c (fputc): Likewise.
* libio/fputwc.c (fputwc): Likewise.
* libio/freopen64.c (freopen64):
* libio/freopen.c (freopen): Likewise.
* libio/fseek.c (fseek): Likewise.
* libio/fseeko64.c (fseeko64): Likewise.
* libio/fseeko.c (fseeko): Likewise.
* libio/ftello64.c (ftello64): Likewise.
* libio/ftello.c (ftello): Likewise.
* libio/fwide.c (fwide): Likewise.
* libio/getc.c (_IO_getc): Likewise.
* libio/getchar.c (getchar): Likewise.
* libio/getwc.c (_IO_getwc): Likewise.
* libio/getwchar.c (getwchar): Likewise.
* libio/iofclose.c (_IO_new_fclose):
* libio/iofflush.c (_IO_fflush): Likewise.
* libio/iofgetpos64.c (_IO_new_fgetpos64): Likewise.
* libio/iofgetpos.c (_IO_new_fgetpos): Likewise.
* libio/iofgets.c (_IO_fgets): Likewise.
* libio/iofgetws.c (fgetws): Likewise.
* libio/iofputs.c (_IO_fputs):
* libio/iofputws.c (_IO_fputs): Likewise.
* libio/iofread.c (_IO_fread): Likewise.
* libio/iofsetpos64.c (_IO_new_fsetpos64): Likewise.
* libio/iofsetpos.c (_IO_new_fsetpos): Likewise.
* libio/ioftell.c (_IO_ftell): Likewise.
* libio/iofwrite.c (_IO_fwrite): Likewise.
* libio/iogetdelim.c (_IO_getdelim): Likewise.
* libio/iogets.c (_IO_gets): Likewise.
* libio/ioputs.c (_IO_puts): Likewise.
* libio/ioseekoff.c (_IO_seekoff): Likewise.
* libio/ioseekpos.c (_IO_seekpos): Likewise.
* libio/iosetbuffer.c (_IO_setbuffer): Likewise.
* libio/iosetvbuf.c (_IO_setvbuf): Likewise.
* libio/ioungetc.c (_IO_ungetc): Likewise.
* libio/ioungetwc.c (ungetwc): Likewise.
* libio/oldiofclose.c (_IO_old_fclose): Likewise.
* libio/oldiofgetpos64.c (_IO_old_fgetpos64): Likewise.
* libio/oldiofgetpos.c (_IO_old_fgetpos): Likewise.
* libio/oldiofsetpos64.c (_IO_old_fsetpos64): Likewise.
* libio/oldiofsetpos.c (_IO_old_fsetpos): Likewise.
* libio/peekc.c (_IO_peekc_locked): Likewise.
* libio/putc.c (_IO_putc): Likewise.
* libio/putchar.c (putchar): Likewise.
* libio/putwc.c (putwc): Likewise.
* libio/putwchar.c (putwchar): Likewise.
* libio/rewind.c (rewind): Likewise.
* libio/wfileops.c (_IO_wfile_underflow): Likewise.
2003-08-29 21:58:49 +02:00
|
|
|
_IO_release_lock (fp);
|
Sat Nov 18 16:46:01 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* libio/Makefile, libio/cleanup.c, libio/clearerr.c, libio/feof.c,
libio/ferror.c, libio/fgetc.c, libio/filedoalloc.c, libio/fileno.c,
libio/fileops.c, libio/fputc.c, libio/freopen.c, libio/fseek.c,
libio/genops.c, libio/getc.c, libio/getchar.c, libio/iofclose.c,
libio/iofdopen.c, libio/iofflush.c, libio/iofgetpos.c, libio/iofgets.c,
libio/iofopen.c, libio/iofprintf.c, libio/iofputs.c, libio/iofread.c,
libio/iofscanf.c, libio/iofsetpos.c, libio/ioftell.c, libio/iofwrite.c,
libio/iogetdelim.c, libio/iogetline.c, libio/iogets.c, libio/iolibio.h,
libio/iopadn.c, libio/ioprims.c, libio/ioputs.c, libio/ioseekoff.c,
libio/ioseekpos.c, libio/iosetbuffer.c, libio/iosetvbuf.c,
libio/iosprintf.c, libio/ioungetc.c, libio/iovsprintf.c,
libio/iovsscanf.c, libio/libio.h, libio/libioP.h, libio/putc.c,
libio/putchar.c, libio/rewind.c, libio/setbuf.c, libio/setlinebuf.c,
libio/stdfiles.c, libio/stdio.c, libio/stdio.h, libio/strfile.h,
libio/strops.c, libio/vasprintf.c, libio/vscanf.c, libio/vsnprintf.c:
New files. Slightly modified version from Linux libc.
* libio/memstream.c, libio/vdprintf.c: New files for functions not
(yet) part of GNU libio.
* libio/iofopncook.c: Implementation of `fopencookie', mainly written
by Per Bothner.
* stdio-common/getline.c: Adapted to libio.
* stdio-common/snprintf.c: Adapted to libio.
* stdio-common/vfprintf.c: Adapted to libio.
* stdio-common/vfscanf.c: Adapted to libio.
* sysdeps/posix/tempname.c: Adapted to libio.
1995-11-20 04:48:11 +01:00
|
|
|
}
|
2002-08-10 11:24:53 +02:00
|
|
|
libc_hidden_def (rewind)
|