newlib-2.1.0

git-svn-id: svn://kolibrios.org@4921 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge)
2014-05-10 22:12:19 +00:00
parent 914e67bd24
commit 7315bb05c0
204 changed files with 10781 additions and 3986 deletions

View File

@@ -126,8 +126,8 @@ static char sccsid[] = "%W% (Berkeley) %G%";
FILE *
_DEFUN(_fopen_r, (ptr, file, mode),
struct _reent *ptr _AND
_CONST char *file _AND
_CONST char *mode)
_CONST char *__restrict file _AND
_CONST char *__restrict mode)
{
register FILE *fp;
register int f;
@@ -140,16 +140,16 @@ _DEFUN(_fopen_r, (ptr, file, mode),
if ((f = _open_r (ptr, file, oflags, 0666)) < 0)
{
__sfp_lock_acquire ();
_newlib_sfp_lock_start ();
fp->_flags = 0; /* release */
#ifndef __SINGLE_THREAD__
__lock_close_recursive (fp->_lock);
#endif
__sfp_lock_release ();
_newlib_sfp_lock_end ();
return NULL;
}
_flockfile (fp);
_newlib_flockfile_start (fp);
fp->_file = f;
fp->_flags = flags;
@@ -167,7 +167,7 @@ _DEFUN(_fopen_r, (ptr, file, mode),
fp->_flags |= __SCLE;
#endif
_funlockfile (fp);
_newlib_flockfile_end (fp);
return fp;
}