diff options
author | tjr <tjr@FreeBSD.org> | 2004-03-17 01:43:08 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2004-03-17 01:43:08 +0000 |
commit | b4d98c68558acbe9782e24963999f922d52ccf28 (patch) | |
tree | a146c0d7f2efde65782926d4c69016d3b4715398 /lib/libc/stdio/putchar.c | |
parent | 131892ca17e9e6a23bd98f9bef05d035b36d2790 (diff) | |
download | FreeBSD-src-b4d98c68558acbe9782e24963999f922d52ccf28.zip FreeBSD-src-b4d98c68558acbe9782e24963999f922d52ccf28.tar.gz |
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.
Diffstat (limited to 'lib/libc/stdio/putchar.c')
-rw-r--r-- | lib/libc/stdio/putchar.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/libc/stdio/putchar.c b/lib/libc/stdio/putchar.c index 5a775ec..fe97d01 100644 --- a/lib/libc/stdio/putchar.c +++ b/lib/libc/stdio/putchar.c @@ -46,14 +46,8 @@ __FBSDID("$FreeBSD$"); #include "local.h" #include "libc_private.h" -/* - * putchar has traditionally been a macro in <stdio.h>. That is no - * longer true because POSIX requires it to be thread-safe. POSIX - * does define putchar_unlocked() which is defined as a macro and is - * probably what you want to use instead. - * - * #undef putchar - */ +#undef putchar + /* * A subroutine version of the macro putchar */ |