update from main archive 960105
[glibc/history.git] / libio / feof.c
blob34ca1da1616cd79828f2679f80ace23c2812ae0f
1 /* Copyright (C) 1993, 1996 Free Software Foundation, Inc.
3 This file is part of the GNU IO Library. This library is free
4 software; you can redistribute it and/or modify it under the
5 terms of the GNU General Public License as published by the
6 Free Software Foundation; either version 2, or (at your option)
7 any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this library; see the file COPYING. If not, write to the Free
16 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 As a special exception, if you link this library with files
19 compiled with a GNU compiler to produce an executable, this does not cause
20 the resulting executable to be covered by the GNU General Public License.
21 This exception does not however invalidate any other reasons why
22 the executable file might be covered by the GNU General Public License. */
24 #include "libioP.h"
25 #include "stdio.h"
27 int
28 _IO_feof (fp)
29 _IO_FILE* fp;
31 int result;
32 CHECK_FILE (fp, EOF);
33 _IO_flockfile (fp);
34 result = _IO_feof_unlocked (fp);
35 _IO_funlockfile (fp);
36 return result;
38 weak_alias (_IO_feof, feof)
40 #ifdef _IO_MTSAFE_IO
41 /* The feof implementation for libio does not require locking because
42 it only accesses once a single variable and this is already atomic
43 (at least at thread level). */
45 weak_alias (_IO_feof, feof_locked)
46 #endif