Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/getc.c')
-rw-r--r--newlib/libc/stdio/getc.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/newlib/libc/stdio/getc.c b/newlib/libc/stdio/getc.c
index 9628a8740..4b2509737 100644
--- a/newlib/libc/stdio/getc.c
+++ b/newlib/libc/stdio/getc.c
@@ -62,9 +62,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
static char sccsid[] = "%W% (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
-#include <_ansi.h>
#include <stdio.h>
-#include "local.h"
/*
* A subroutine version of the macro getc.
@@ -73,13 +71,10 @@ static char sccsid[] = "%W% (Berkeley) %G%";
#undef getc
int
-_DEFUN(getc, (fp),
- register FILE *fp)
+getc (fp)
+ register FILE *fp;
{
- int result;
- CHECK_INIT (_REENT);
- _flockfile (fp);
- result = __sgetc (fp);
- _funlockfile (fp);
- return result;
+ /* CHECK_INIT is called (eventually) by __srefill. */
+
+ return __sgetc (fp);
}