netinet/in.h: add IPPROTO_MH
[uclibc-ng.git] / libc / stdio / feof.c
blobe5f03b720e5c65fddda9d99a1817cbca289d088e
1 /* Copyright (C) 2004 Manuel Novoa III <mjn3@codepoet.org>
3 * GNU Library General Public License (LGPL) version 2 or later.
5 * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details.
6 */
8 #include "_stdio.h"
10 #undef feof
11 #ifdef __DO_UNLOCKED
13 #undef feof_unlocked
14 int feof_unlocked(register FILE *stream)
16 __STDIO_STREAM_VALIDATE(stream);
18 return __FEOF_UNLOCKED(stream);
21 #ifndef __UCLIBC_HAS_THREADS__
22 strong_alias(feof_unlocked,feof)
23 #endif
25 #elif defined __UCLIBC_HAS_THREADS__
27 int feof(register FILE *stream)
29 int retval;
30 __STDIO_AUTO_THREADLOCK_VAR;
32 __STDIO_AUTO_THREADLOCK(stream);
34 __STDIO_STREAM_VALIDATE(stream);
36 retval = __FEOF_UNLOCKED(stream);
38 __STDIO_AUTO_THREADUNLOCK(stream);
40 return retval;
43 #endif