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/fgets.c')
-rw-r--r--newlib/libc/stdio/fgets.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/newlib/libc/stdio/fgets.c b/newlib/libc/stdio/fgets.c
index 1644fba6a..7f02e3fcb 100644
--- a/newlib/libc/stdio/fgets.c
+++ b/newlib/libc/stdio/fgets.c
@@ -98,7 +98,7 @@ _DEFUN(_fgets_r, (ptr, buf, n, fp),
CHECK_INIT(ptr, fp);
- _newlib_flockfile_start (fp);
+ _flockfile (fp);
#ifdef __SCLE
if (fp->_flags & __SCLE)
{
@@ -112,11 +112,11 @@ _DEFUN(_fgets_r, (ptr, buf, n, fp),
}
if (c == EOF && s == buf)
{
- _newlib_flockfile_exit (fp);
+ _funlockfile (fp);
return NULL;
}
*s = 0;
- _newlib_flockfile_exit (fp);
+ _funlockfile (fp);
return buf;
}
#endif
@@ -134,7 +134,7 @@ _DEFUN(_fgets_r, (ptr, buf, n, fp),
/* EOF: stop with partial or no line */
if (s == buf)
{
- _newlib_flockfile_exit (fp);
+ _funlockfile (fp);
return 0;
}
break;
@@ -159,7 +159,7 @@ _DEFUN(_fgets_r, (ptr, buf, n, fp),
fp->_p = t;
_CAST_VOID memcpy ((_PTR) s, (_PTR) p, len);
s[len] = 0;
- _newlib_flockfile_exit (fp);
+ _funlockfile (fp);
return (buf);
}
fp->_r -= len;
@@ -169,7 +169,7 @@ _DEFUN(_fgets_r, (ptr, buf, n, fp),
}
while ((n -= len) != 0);
*s = 0;
- _newlib_flockfile_end (fp);
+ _funlockfile (fp);
return buf;
}