newlib: update
git-svn-id: svn://kolibrios.org@6099 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include <stddef.h>
|
||||
|
||||
#include <sys/reent.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <machine/stdlib.h>
|
||||
#ifndef __STRICT_ANSI__
|
||||
#include <alloca.h>
|
||||
@@ -27,13 +28,13 @@
|
||||
|
||||
_BEGIN_STD_C
|
||||
|
||||
typedef struct
|
||||
typedef struct
|
||||
{
|
||||
int quot; /* quotient */
|
||||
int rem; /* remainder */
|
||||
} div_t;
|
||||
|
||||
typedef struct
|
||||
typedef struct
|
||||
{
|
||||
long quot; /* quotient */
|
||||
long rem; /* remainder */
|
||||
@@ -63,7 +64,7 @@ int _EXFUN(__locale_mb_cur_max,(_VOID));
|
||||
|
||||
#define MB_CUR_MAX __locale_mb_cur_max()
|
||||
|
||||
_VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((noreturn)));
|
||||
_VOID _EXFUN(abort,(_VOID) _ATTRIBUTE ((__noreturn__)));
|
||||
int _EXFUN(abs,(int));
|
||||
int _EXFUN(atexit,(_VOID (*__func)(_VOID)));
|
||||
double _EXFUN(atof,(const char *__nptr));
|
||||
@@ -81,7 +82,7 @@ _PTR _EXFUN(bsearch,(const _PTR __key,
|
||||
__compar_fn_t _compar));
|
||||
_PTR _EXFUN_NOTHROW(calloc,(size_t __nmemb, size_t __size));
|
||||
div_t _EXFUN(div,(int __numer, int __denom));
|
||||
_VOID _EXFUN(exit,(int __status) _ATTRIBUTE ((noreturn)));
|
||||
_VOID _EXFUN(exit,(int __status) _ATTRIBUTE ((__noreturn__)));
|
||||
_VOID _EXFUN_NOTHROW(free,(_PTR));
|
||||
char * _EXFUN(getenv,(const char *__string));
|
||||
char * _EXFUN(_getenv_r,(struct _reent *, const char *__string));
|
||||
@@ -111,14 +112,14 @@ int _EXFUN(mkostemp,(char *, int));
|
||||
int _EXFUN(mkostemps,(char *, int, int));
|
||||
int _EXFUN(mkstemp,(char *));
|
||||
int _EXFUN(mkstemps,(char *, int));
|
||||
char * _EXFUN(mktemp,(char *) _ATTRIBUTE ((__warning__ ("the use of `mktemp' is dangerous; use `mkstemp' instead"))));
|
||||
char * _EXFUN(mktemp,(char *) _ATTRIBUTE ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead"))));
|
||||
#endif
|
||||
char * _EXFUN(_mkdtemp_r, (struct _reent *, char *));
|
||||
int _EXFUN(_mkostemp_r, (struct _reent *, char *, int));
|
||||
int _EXFUN(_mkostemps_r, (struct _reent *, char *, int, int));
|
||||
int _EXFUN(_mkstemp_r, (struct _reent *, char *));
|
||||
int _EXFUN(_mkstemps_r, (struct _reent *, char *, int));
|
||||
char * _EXFUN(_mktemp_r, (struct _reent *, char *) _ATTRIBUTE ((__warning__ ("the use of `mktemp' is dangerous; use `mkstemp' instead"))));
|
||||
char * _EXFUN(_mktemp_r, (struct _reent *, char *) _ATTRIBUTE ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead"))));
|
||||
#endif
|
||||
_VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, __compar_fn_t _compar));
|
||||
int _EXFUN(rand,(_VOID));
|
||||
@@ -126,16 +127,19 @@ _PTR _EXFUN_NOTHROW(realloc,(_PTR __r, size_t __size));
|
||||
#ifndef __STRICT_ANSI__
|
||||
_PTR _EXFUN(reallocf,(_PTR __r, size_t __size));
|
||||
char * _EXFUN(realpath, (const char *__restrict path, char *__restrict resolved_path));
|
||||
int _EXFUN(rpmatch, (const char *response));
|
||||
#endif
|
||||
_VOID _EXFUN(srand,(unsigned __seed));
|
||||
double _EXFUN(strtod,(const char *__restrict __n, char **__restrict __end_PTR));
|
||||
double _EXFUN(_strtod_r,(struct _reent *,const char *__restrict __n, char **__restrict __end_PTR));
|
||||
#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) || (__cplusplus >= 201103L)
|
||||
#if !defined(__STRICT_ANSI__) || \
|
||||
(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
|
||||
(defined(__cplusplus) && __cplusplus >= 201103L)
|
||||
float _EXFUN(strtof,(const char *__restrict __n, char **__restrict __end_PTR));
|
||||
#endif
|
||||
#ifndef __STRICT_ANSI__
|
||||
/* the following strtodf interface is deprecated...use strtof instead */
|
||||
# ifndef strtodf
|
||||
# ifndef strtodf
|
||||
# define strtodf strtof
|
||||
# endif
|
||||
#endif
|
||||
@@ -151,7 +155,13 @@ long _EXFUN(a64l,(const char *__input));
|
||||
char * _EXFUN(l64a,(long __input));
|
||||
char * _EXFUN(_l64a_r,(struct _reent *,long __input));
|
||||
int _EXFUN(on_exit,(_VOID (*__func)(int, _PTR),_PTR __arg));
|
||||
_VOID _EXFUN(_Exit,(int __status) _ATTRIBUTE ((noreturn)));
|
||||
#endif /* ! __STRICT_ANSI__ */
|
||||
#if !defined(__STRICT_ANSI__) || \
|
||||
(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
|
||||
(defined(__cplusplus) && __cplusplus >= 201103L)
|
||||
_VOID _EXFUN(_Exit,(int __status) _ATTRIBUTE ((__noreturn__)));
|
||||
#endif
|
||||
#ifndef __STRICT_ANSI__
|
||||
int _EXFUN(putenv,(char *__string));
|
||||
int _EXFUN(_putenv_r,(struct _reent *, char *__string));
|
||||
_PTR _EXFUN(_reallocf_r,(struct _reent *, _PTR, size_t));
|
||||
@@ -167,6 +177,12 @@ char * _EXFUN(ecvtbuf,(double, int, int*, int*, char *));
|
||||
char * _EXFUN(fcvtbuf,(double, int, int*, int*, char *));
|
||||
char * _EXFUN(ecvtf,(float,int,int *,int *));
|
||||
char * _EXFUN(dtoa,(double, int, int, int *, int*, char**));
|
||||
#endif
|
||||
char * _EXFUN(__itoa,(int, char *, int));
|
||||
char * _EXFUN(__utoa,(unsigned, char *, int));
|
||||
#ifndef __STRICT_ANSI__
|
||||
char * _EXFUN(itoa,(int, char *, int));
|
||||
char * _EXFUN(utoa,(unsigned, char *, int));
|
||||
int _EXFUN(rand_r,(unsigned *__seed));
|
||||
|
||||
double _EXFUN(drand48,(_VOID));
|
||||
@@ -189,18 +205,28 @@ unsigned short *
|
||||
_EXFUN(_seed48_r,(struct _reent *, unsigned short [3]));
|
||||
_VOID _EXFUN(srand48,(long));
|
||||
_VOID _EXFUN(_srand48_r,(struct _reent *, long));
|
||||
#endif /* ! __STRICT_ANSI__ */
|
||||
#if !defined(__STRICT_ANSI__) || \
|
||||
(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
|
||||
(defined(__cplusplus) && __cplusplus >= 201103L)
|
||||
long long _EXFUN(atoll,(const char *__nptr));
|
||||
#endif
|
||||
#ifndef __STRICT_ANSI__
|
||||
long long _EXFUN(_atoll_r,(struct _reent *, const char *__nptr));
|
||||
#endif /* ! __STRICT_ANSI__ */
|
||||
#if !defined(__STRICT_ANSI__) || \
|
||||
(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
|
||||
(defined(__cplusplus) && __cplusplus >= 201103L)
|
||||
long long _EXFUN(llabs,(long long));
|
||||
lldiv_t _EXFUN(lldiv,(long long __numer, long long __denom));
|
||||
#endif /* ! __STRICT_ANSI__ */
|
||||
#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) || (__cplusplus >= 201103L)
|
||||
long long _EXFUN(strtoll,(const char *__restrict __n, char **__restrict __end_PTR, int __base));
|
||||
#endif
|
||||
#ifndef __STRICT_ANSI__
|
||||
long long _EXFUN(_strtoll_r,(struct _reent *, const char *__restrict __n, char **__restrict __end_PTR, int __base));
|
||||
#endif /* ! __STRICT_ANSI__ */
|
||||
#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) || (__cplusplus >= 201103L)
|
||||
#if !defined(__STRICT_ANSI__) || \
|
||||
(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
|
||||
(defined(__cplusplus) && __cplusplus >= 201103L)
|
||||
unsigned long long _EXFUN(strtoull,(const char *__restrict __n, char **__restrict __end_PTR, int __base));
|
||||
#endif
|
||||
#ifndef __STRICT_ANSI__
|
||||
@@ -230,12 +256,42 @@ int _EXFUN(_system_r,(struct _reent *, const char *));
|
||||
|
||||
_VOID _EXFUN(__eprintf,(const char *, const char *, unsigned int, const char *));
|
||||
|
||||
/* There are two common qsort_r variants. If you request
|
||||
_BSD_SOURCE, you get the BSD version; otherwise you get the GNU
|
||||
version. We want that #undef qsort_r will still let you
|
||||
invoke the underlying function, but that requires gcc support. */
|
||||
#ifdef _BSD_SOURCE
|
||||
# ifdef __GNUC__
|
||||
_VOID _EXFUN(qsort_r,(_PTR __base, size_t __nmemb, size_t __size, _PTR __thunk, int (*_compar)(_PTR, const _PTR, const _PTR)))
|
||||
__asm__ (__ASMNAME ("__bsd_qsort_r"));
|
||||
# else
|
||||
_VOID _EXFUN(__bsd_qsort_r,(_PTR __base, size_t __nmemb, size_t __size, _PTR __thunk, int (*_compar)(_PTR, const _PTR, const _PTR)));
|
||||
# define qsort_r __bsd_qsort_r
|
||||
# endif
|
||||
#elif __GNU_VISIBLE
|
||||
_VOID _EXFUN(qsort_r,(_PTR __base, size_t __nmemb, size_t __size, int (*_compar)(const _PTR, const _PTR, _PTR), _PTR __thunk));
|
||||
#endif
|
||||
|
||||
/* On platforms where long double equals double. */
|
||||
#ifdef _LDBL_EQ_DBL
|
||||
#if !defined(__STRICT_ANSI__) || (__STDC_VERSION__ >= 199901L) || (__cplusplus >= 201103L)
|
||||
#ifdef _HAVE_LONG_DOUBLE
|
||||
extern long double _strtold_r (struct _reent *, const char *__restrict, char **__restrict);
|
||||
#if !defined(__STRICT_ANSI__) || \
|
||||
(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
|
||||
(defined(__cplusplus) && __cplusplus >= 201103L)
|
||||
extern long double strtold (const char *__restrict, char **__restrict);
|
||||
#endif
|
||||
#endif /* _LDBL_EQ_DBL */
|
||||
#endif /* _HAVE_LONG_DOUBLE */
|
||||
|
||||
/*
|
||||
* If we're in a mode greater than C99, expose C11 functions.
|
||||
*/
|
||||
#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
|
||||
void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1)
|
||||
__alloc_size(2);
|
||||
int at_quick_exit(void (*)(void));
|
||||
_Noreturn void
|
||||
quick_exit(int);
|
||||
#endif /* __ISO_C_VISIBLE >= 2011 */
|
||||
|
||||
_END_STD_C
|
||||
|
||||
|
Reference in New Issue
Block a user