forked from KolibriOS/kolibrios
newlib: update
git-svn-id: svn://kolibrios.org@3065 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -98,8 +98,6 @@ _DEFUN(_freopen_r, (ptr, file, mode, fp),
|
||||
int flags, oflags;
|
||||
int e = 0;
|
||||
|
||||
__sfp_lock_acquire ();
|
||||
|
||||
CHECK_INIT (ptr, fp);
|
||||
|
||||
_flockfile (fp);
|
||||
@@ -108,7 +106,6 @@ _DEFUN(_freopen_r, (ptr, file, mode, fp),
|
||||
{
|
||||
_funlockfile (fp);
|
||||
_fclose_r (ptr, fp);
|
||||
__sfp_lock_release ();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -208,6 +205,7 @@ _DEFUN(_freopen_r, (ptr, file, mode, fp),
|
||||
|
||||
if (f < 0)
|
||||
{ /* did not get it after all */
|
||||
__sfp_lock_acquire ();
|
||||
fp->_flags = 0; /* set it free */
|
||||
ptr->_errno = e; /* restore in case _close clobbered */
|
||||
_funlockfile (fp);
|
||||
@@ -232,7 +230,6 @@ _DEFUN(_freopen_r, (ptr, file, mode, fp),
|
||||
#endif
|
||||
|
||||
_funlockfile (fp);
|
||||
__sfp_lock_release ();
|
||||
return fp;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user