From 809ddff4fd01ab65b99be2f04070d17450509b93 Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 2 May 2008 15:25:07 +0000 Subject: Next round of stdio changes: Remove all inlining of stdio operations and move the definition of the type backing FILE (struct __sFILE) into an internal header. - Remove macros to inline certain operations from stdio.h. Applications will now always call the functions instead. - Move the various foo_unlocked() functions from unlocked.c into foo.c. This lets some of the inlining macros (e.g. __sfeof()) move into foo.c. - Update a few comments. - struct __sFILE can now go back to using mbstate_t, pthread_t, and pthread_mutex_t instead of knowing about their private, backing types. MFC after: 1 month Reviewed by: kan --- lib/libc/stdio/getchar.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/libc/stdio/getchar.c') diff --git a/lib/libc/stdio/getchar.c b/lib/libc/stdio/getchar.c index d10daed..2ac13f5 100644 --- a/lib/libc/stdio/getchar.c +++ b/lib/libc/stdio/getchar.c @@ -45,8 +45,6 @@ __FBSDID("$FreeBSD$"); #include "local.h" #include "libc_private.h" -#undef getchar - int getchar() { @@ -58,3 +56,10 @@ getchar() FUNLOCKFILE(stdin); return (retval); } + +int +getchar_unlocked(void) +{ + + return (__sgetc(stdin)); +} -- cgit v1.1