diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 2001-02-11 22:06:43 +0000 |
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 2001-02-11 22:06:43 +0000 |
| commit | 29ac6bd228d1c75dc4c19105fa149861bff04720 (patch) | |
| tree | 91800b480f9efe4c0d90fe0b653e4bb1125f24f7 /lib/libc/stdio/feof.c | |
| parent | 5b62961a494b0271f6029f0c8f1e8c92a2267fe7 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdio/feof.c')
| -rw-r--r-- | lib/libc/stdio/feof.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/libc/stdio/feof.c b/lib/libc/stdio/feof.c index 3581100a3806..60cad53642cd 100644 --- a/lib/libc/stdio/feof.c +++ b/lib/libc/stdio/feof.c @@ -42,16 +42,24 @@ static const char rcsid[] = "$FreeBSD$"; #endif /* LIBC_SCCS and not lint */ +#include "namespace.h" #include <stdio.h> +#include "un-namespace.h" +#include "libc_private.h" /* - * A subroutine version of the macro feof. + * feof has traditionally been a macro in <stdio.h>. That is no + * longer true because it needs to be thread-safe. + * + * #undef feof */ -#undef feof - int -feof(fp) - FILE *fp; +feof(FILE *fp) { - return (__sfeof(fp)); + int ret; + + FLOCKFILE(fp); + ret= __sfeof(fp); + FUNLOCKFILE(fp); + return (ret); } |
