forked from KolibriOS/kolibrios
newlib: update
git-svn-id: svn://kolibrios.org@3065 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -98,7 +98,6 @@ _DEFUN(_fgets_r, (ptr, buf, n, fp),
|
||||
|
||||
CHECK_INIT(ptr, fp);
|
||||
|
||||
__sfp_lock_acquire ();
|
||||
_flockfile (fp);
|
||||
#ifdef __SCLE
|
||||
if (fp->_flags & __SCLE)
|
||||
@@ -114,12 +113,10 @@ _DEFUN(_fgets_r, (ptr, buf, n, fp),
|
||||
if (c == EOF && s == buf)
|
||||
{
|
||||
_funlockfile (fp);
|
||||
__sfp_lock_release ();
|
||||
return NULL;
|
||||
}
|
||||
*s = 0;
|
||||
_funlockfile (fp);
|
||||
__sfp_lock_release ();
|
||||
return buf;
|
||||
}
|
||||
#endif
|
||||
@@ -138,7 +135,6 @@ _DEFUN(_fgets_r, (ptr, buf, n, fp),
|
||||
if (s == buf)
|
||||
{
|
||||
_funlockfile (fp);
|
||||
__sfp_lock_release ();
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
@@ -164,7 +160,6 @@ _DEFUN(_fgets_r, (ptr, buf, n, fp),
|
||||
_CAST_VOID memcpy ((_PTR) s, (_PTR) p, len);
|
||||
s[len] = 0;
|
||||
_funlockfile (fp);
|
||||
__sfp_lock_release ();
|
||||
return (buf);
|
||||
}
|
||||
fp->_r -= len;
|
||||
@@ -175,7 +170,6 @@ _DEFUN(_fgets_r, (ptr, buf, n, fp),
|
||||
while ((n -= len) != 0);
|
||||
*s = 0;
|
||||
_funlockfile (fp);
|
||||
__sfp_lock_release ();
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user