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

@@ -1,5 +1,5 @@
/*
* $Id: _default_types.h,v 1.6 2013/12/03 16:04:41 corinna Exp $
* $Id$
*/
#ifndef _MACHINE__DEFAULT_TYPES_H
@@ -25,7 +25,11 @@ extern "C" {
#ifdef __INT8_TYPE__
typedef __INT8_TYPE__ __int8_t;
#ifdef __UINT8_TYPE__
typedef __UINT8_TYPE__ __uint8_t;
#else
typedef unsigned __INT8_TYPE__ __uint8_t;
#endif
#define ___int8_t_defined 1
#elif __EXP(SCHAR_MAX) == 0x7f
typedef signed char __int8_t ;
@@ -35,7 +39,11 @@ typedef unsigned char __uint8_t ;
#ifdef __INT16_TYPE__
typedef __INT16_TYPE__ __int16_t;
#ifdef __UINT16_TYPE__
typedef __UINT16_TYPE__ __uint16_t;
#else
typedef unsigned __INT16_TYPE__ __uint16_t;
#endif
#define ___int16_t_defined 1
#elif __EXP(INT_MAX) == 0x7fff
typedef signed int __int16_t;
@@ -53,7 +61,11 @@ typedef unsigned char __uint16_t;
#ifdef __INT32_TYPE__
typedef __INT32_TYPE__ __int32_t;
#ifdef __UINT32_TYPE__
typedef __UINT32_TYPE__ __uint32_t;
#else
typedef unsigned __INT32_TYPE__ __uint32_t;
#endif
#define ___int32_t_defined 1
#elif __EXP(INT_MAX) == 0x7fffffffL
typedef signed int __int32_t;
@@ -75,7 +87,11 @@ typedef unsigned char __uint32_t;
#ifdef __INT64_TYPE__
typedef __INT64_TYPE__ __int64_t;
#ifdef __UINT64_TYPE__
typedef __UINT64_TYPE__ __uint64_t;
#else
typedef unsigned __INT64_TYPE__ __uint64_t;
#endif
#define ___int64_t_defined 1
#elif __EXP(LONG_MAX) > 0x7fffffff
typedef signed long __int64_t;
@@ -102,7 +118,11 @@ typedef unsigned int __uint64_t;
#ifdef __INT_LEAST8_TYPE__
typedef __INT_LEAST8_TYPE__ __int_least8_t;
#ifdef __UINT_LEAST8_TYPE__
typedef __UINT_LEAST8_TYPE__ __uint_least8_t;
#else
typedef unsigned __INT_LEAST8_TYPE__ __uint_least8_t;
#endif
#define ___int_least8_t_defined 1
#elif defined(___int8_t_defined)
typedef __int8_t __int_least8_t;
@@ -124,7 +144,11 @@ typedef __uint64_t __uint_least8_t;
#ifdef __INT_LEAST16_TYPE__
typedef __INT_LEAST16_TYPE__ __int_least16_t;
#ifdef __UINT_LEAST16_TYPE__
typedef __UINT_LEAST16_TYPE__ __uint_least16_t;
#else
typedef unsigned __INT_LEAST16_TYPE__ __uint_least16_t;
#endif
#define ___int_least16_t_defined 1
#elif defined(___int16_t_defined)
typedef __int16_t __int_least16_t;
@@ -142,7 +166,11 @@ typedef __uint64_t __uint_least16_t;
#ifdef __INT_LEAST32_TYPE__
typedef __INT_LEAST32_TYPE__ __int_least32_t;
#ifdef __UINT_LEAST32_TYPE__
typedef __UINT_LEAST32_TYPE__ __uint_least32_t;
#else
typedef unsigned __INT_LEAST32_TYPE__ __uint_least32_t;
#endif
#define ___int_least32_t_defined 1
#elif defined(___int32_t_defined)
typedef __int32_t __int_least32_t;
@@ -156,7 +184,11 @@ typedef __uint64_t __uint_least32_t;
#ifdef __INT_LEAST64_TYPE__
typedef __INT_LEAST64_TYPE__ __int_least64_t;
#ifdef __UINT_LEAST64_TYPE__
typedef __UINT_LEAST64_TYPE__ __uint_least64_t;
#else
typedef unsigned __INT_LEAST64_TYPE__ __uint_least64_t;
#endif
#define ___int_least64_t_defined 1
#elif defined(___int64_t_defined)
typedef __int64_t __int_least64_t;
@@ -166,7 +198,11 @@ typedef __uint64_t __uint_least64_t;
#ifdef __INTPTR_TYPE__
typedef __INTPTR_TYPE__ __intptr_t;
#ifdef __UINTPTR_TYPE__
typedef __UINTPTR_TYPE__ __uintptr_t;
#else
typedef unsigned __INTPTR_TYPE__ __uintptr_t;
#endif
#elif defined(__PTRDIFF_TYPE__)
typedef __PTRDIFF_TYPE__ __intptr_t;
typedef unsigned __PTRDIFF_TYPE__ __uintptr_t;

View File

@@ -1,5 +1,5 @@
/*
* $Id: _types.h,v 1.3 2007/09/07 21:16:25 jjohnstn Exp $
* $Id$
*/
#ifndef _MACHINE__TYPES_H

View File

@@ -99,7 +99,7 @@
#define isfinite(__y) \
(__extension__ ({int __cy; \
(sizeof (__y) == sizeof (float)) ? (1) : \
(sizeof (__y) == sizeof (float)) ? (1) : \
(__cy = fpclassify(__y)) != FP_INFINITE && __cy != FP_NAN;}))
#define isinf(__x) ((sizeof (__x) == sizeof (float)) ? (0) : __isinfd(__x))
@@ -283,6 +283,10 @@
#define __IEEE_BIG_ENDIAN
#endif
#ifdef __FT32__
#define __IEEE_LITTLE_ENDIAN
#endif
#ifdef __mcore__
#define __IEEE_BIG_ENDIAN
#endif
@@ -316,7 +320,7 @@
#define _DOUBLE_IS_32BITS
#endif
#if defined(__or32__) || defined(__or1k__) || defined(__or16__)
#if defined(__or1k__) || defined(__OR1K__) || defined(__OR1KND__)
#define __IEEE_BIG_ENDIAN
#endif
@@ -379,8 +383,10 @@
#ifdef __RL78__
#define __IEEE_LITTLE_ENDIAN
#define __SMALL_BITFIELDS /* 16 Bit INT */
#ifndef __RL78_64BIT_DOUBLES__
#define _DOUBLE_IS_32BITS
#endif
#endif
#ifdef __RX__
@@ -413,6 +419,10 @@
# endif
#endif
#ifdef __VISIUM__
#define __IEEE_BIG_ENDIAN
#endif
#ifndef __IEEE_BIG_ENDIAN
#ifndef __IEEE_LITTLE_ENDIAN
#error Endianess not declared!!

View File

@@ -1,6 +1,11 @@
_BEGIN_STD_C
#if defined(__or1k__) || defined(__or1knd__)
#define _JBLEN 31 /* 32 GPRs - r0 */
#define _JBTYPE unsigned long
#endif
#if defined(__arm__) || defined(__thumb__)
/*
* All callee preserved registers:
@@ -56,11 +61,18 @@ _BEGIN_STD_C
#endif
#ifdef __nds32__
/* Only 17 words are currently needed.
Preserve one word slot if we need to expand.
Check newlib/libc/machine/nds32/setjmp.S for more information. */
/* 17 words for GPRs,
1 word for $fpcfg.freg and 30 words for FPUs
Reserved 2 words for aligement-adjustment. When storeing double-precision
floating-point register into memory, the address has to be
double-word-aligned.
Check libc/machine/nds32/setjmp.S for more information. */
#if __NDS32_EXT_FPU_SP__ || __NDS32_EXT_FPU_DP__
#define _JBLEN 50
#else
#define _JBLEN 18
#endif
#endif
#if defined(__Z8001__) || defined(__Z8002__)
/* 16 regs + pc */
@@ -106,7 +118,7 @@ _BEGIN_STD_C
#endif
#ifdef __mips__
# if defined(__mips64) || (__mips_fpr == 64)
# if defined(__mips64)
# define _JBTYPE long long
# endif
# ifdef __mips_soft_float
@@ -238,6 +250,10 @@ _BEGIN_STD_C
#define _JBLEN 10
#endif
#ifdef __FT32__
#define _JBLEN 27
#endif
#ifdef __iq2000__
#define _JBLEN 32
#endif
@@ -246,6 +262,10 @@ _BEGIN_STD_C
#define _JBLEN 16
#endif
#ifdef __arc__
#define _JBLEN 25 /* r13-r30,blink,lp_count,lp_start,lp_end,mlo,mhi,status32 */
#endif
#ifdef __MMIX__
/* Using a layout compatible with GCC's built-in. */
#define _JBLEN 5
@@ -275,6 +295,10 @@ _BEGIN_STD_C
#define _JBLEN 18
#endif
#ifdef __ia64
#define _JBLEN 64
#endif
#ifdef __lm32__
#define _JBLEN 19
#endif
@@ -326,6 +350,11 @@ _BEGIN_STD_C
#define _JBLEN 0x44
#endif
#ifdef __VISIUM__
/* All call-saved GP registers: r11-r19,r21,r22,r23. */
#define _JBLEN 12
#endif
#ifdef _JBLEN
#ifdef _JBTYPE
typedef _JBTYPE jmp_buf[_JBLEN];
@@ -364,6 +393,13 @@ typedef int sigjmp_buf[_JBLEN+1+(sizeof (sigset_t)/sizeof (int))];
#define __SIGMASK_FUNC sigprocmask
#endif
#ifdef __CYGWIN__
/* Per POSIX, siglongjmp has to be implemented as function. Cygwin
provides functions for both, siglongjmp and sigsetjmp since 2.2.0. */
extern void siglongjmp (sigjmp_buf, int) __attribute__ ((__noreturn__));
extern int sigsetjmp (sigjmp_buf, int);
#endif
#if defined(__GNUC__)
#define sigsetjmp(env, savemask) \
@@ -401,8 +437,8 @@ typedef int sigjmp_buf[_JBLEN+1+(sizeof (sigset_t)/sizeof (int))];
are equivalent to sigsetjmp/siglongjmp when not saving the signal mask.
New applications should use sigsetjmp/siglongjmp instead. */
#ifdef __CYGWIN__
extern void _longjmp(jmp_buf, int);
extern int _setjmp(jmp_buf);
extern void _longjmp (jmp_buf, int) __attribute__ ((__noreturn__));
extern int _setjmp (jmp_buf);
#else
#define _setjmp(env) sigsetjmp ((env), 0)
#define _longjmp(env, val) siglongjmp ((env), (val))

View File

@@ -1,19 +1,15 @@
#ifndef _MACHTIME_H_
#define _MACHTIME_H_
#if defined(__rtems__)
#define _CLOCKS_PER_SEC_ sysconf(_SC_CLK_TCK)
#else /* !__rtems__ */
#if defined(__aarch64__) || defined(__arm__) || defined(__thumb__)
#if defined(__rtems__) || defined(__VISIUM__)
#define _CLOCKS_PER_SEC_ 1000000
#elif defined(__aarch64__) || defined(__arm__) || defined(__thumb__)
#define _CLOCKS_PER_SEC_ 100
#endif
#endif /* !__rtems__ */
#ifdef __SPU__
#include <sys/types.h>
#include <sys/_timespec.h>
int nanosleep (const struct timespec *, struct timespec *);
#endif
#endif /* _MACHTIME_H_ */

View File

@@ -25,6 +25,8 @@ typedef long int __loff_t;
#endif
#endif
typedef long __suseconds_t; /* microseconds (signed) */
#endif /* _MACHTYPES_H_ */