From b4d98c68558acbe9782e24963999f922d52ccf28 Mon Sep 17 00:00:00 2001 From: tjr Date: Wed, 17 Mar 2004 01:43:08 +0000 Subject: Re-add macro versions of getc(), getchar(), putc(), putchar(), feof(), ferror(), fileno() and clearerr(), using the value of __isthreaded to decide between the fast inline single-threaded code and the more general function equivalent. This gives most of the performance benefits of the old unsafe macros while preserving thread safety. --- lib/libc/stdio/ferror.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/libc/stdio/ferror.c') diff --git a/lib/libc/stdio/ferror.c b/lib/libc/stdio/ferror.c index c0fdecd..5d4c187 100644 --- a/lib/libc/stdio/ferror.c +++ b/lib/libc/stdio/ferror.c @@ -45,12 +45,8 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "libc_private.h" -/* - * ferror has traditionally been a macro in . That is no - * longer true because it needs to be thread-safe. - * - * #undef ferror - */ +#undef ferror + int ferror(FILE *fp) { -- cgit v1.1