newlib: update

git-svn-id: svn://kolibrios.org@6099 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge)
2016-01-26 02:29:46 +00:00
parent 38392b6ca6
commit cabcfc4bb3
144 changed files with 6873 additions and 1545 deletions

View File

@@ -35,7 +35,11 @@ const struct __sFILE_fake __sf_fake_stderr =
{_NULL, 0, 0, 0, 0, {_NULL, 0}, 0, _NULL};
#endif
#if (defined (__OPTIMIZE_SIZE__) || defined (PREFER_SIZE_OVER_SPEED))
_NOINLINE_STATIC _VOID
#else
static _VOID
#endif
_DEFUN(std, (ptr, flags, file, data),
FILE *ptr _AND
int flags _AND
@@ -170,8 +174,22 @@ _VOID
_DEFUN(_cleanup_r, (ptr),
struct _reent *ptr)
{
_CAST_VOID _fwalk(ptr, fclose);
/* _CAST_VOID _fwalk (ptr, fflush); */ /* `cheating' */
int (*cleanup_func) (struct _reent *, FILE *);
#ifdef _STDIO_BSD_SEMANTICS
/* BSD and Glibc systems only flush streams which have been written to
at exit time. Calling flush rather than close for speed, as on
the aforementioned systems. */
cleanup_func = __sflushw_r;
#else
/* Otherwise close files and flush read streams, too.
Note we call flush directly if "--enable-lite-exit" is in effect. */
#ifdef _LITE_EXIT
cleanup_func = _fflush_r;
#else
cleanup_func = _fclose_r;
#endif
#endif
_CAST_VOID _fwalk_reent (ptr, cleanup_func);
}
#ifndef _REENT_ONLY
@@ -275,7 +293,8 @@ static int
_DEFUN(__fp_lock, (ptr),
FILE * ptr)
{
_flockfile (ptr);
if (!(ptr->_flags2 & __SNLK))
_flockfile (ptr);
return 0;
}
@@ -285,7 +304,8 @@ static int
_DEFUN(__fp_unlock, (ptr),
FILE * ptr)
{
_funlockfile (ptr);
if (!(ptr->_flags2 & __SNLK))
_funlockfile (ptr);
return 0;
}