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/fgetc.c')
-rw-r--r--newlib/libc/stdio/fgetc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/newlib/libc/stdio/fgetc.c b/newlib/libc/stdio/fgetc.c
index 99d8330fe..20492d24b 100644
--- a/newlib/libc/stdio/fgetc.c
+++ b/newlib/libc/stdio/fgetc.c
@@ -92,9 +92,11 @@ _DEFUN(fgetc, (fp),
{
#if !defined(PREFER_SIZE_OVER_SPEED) && !defined(__OPTIMIZE_SIZE__)
int result;
- CHECK_INIT(_REENT, fp);
+ struct _reent *reent = _REENT;
+
+ CHECK_INIT(reent, fp);
_newlib_flockfile_start (fp);
- result = __sgetc_r (_REENT, fp);
+ result = __sgetc_r (reent, fp);
_newlib_flockfile_end (fp);
return result;
#else