diff --git a/programs/develop/libraries/newlib/include/machine/fastmath.h b/programs/develop/libraries/newlib/include/machine/fastmath.h index e31d810ea8..3017b47815 100644 --- a/programs/develop/libraries/newlib/include/machine/fastmath.h +++ b/programs/develop/libraries/newlib/include/machine/fastmath.h @@ -1,100 +1,122 @@ -#ifdef __sysvnecv70_target -double EXFUN(fast_sin,(double)); -double EXFUN(fast_cos,(double)); -double EXFUN(fast_tan,(double)); +#ifndef _MACHFASTMATH_H +#define _MACHFASTMATH_H -double EXFUN(fast_asin,(double)); -double EXFUN(fast_acos,(double)); -double EXFUN(fast_atan,(double)); +#if defined(__GNUC__) && __STDC__ - 0 > 0 -double EXFUN(fast_sinh,(double)); -double EXFUN(fast_cosh,(double)); -double EXFUN(fast_tanh,(double)); +#define __str1__(__x) #__x +#define __str2__(__x) __str1__(__x) +#define __U_L_PREFIX__ __str2__(__USER_LABEL_PREFIX__) -double EXFUN(fast_asinh,(double)); -double EXFUN(fast_acosh,(double)); -double EXFUN(fast_atanh,(double)); +__extension__ double atan2(double, double) + __asm__(__U_L_PREFIX__ "_f_atan2"); +__extension__ double exp(double) + __asm__(__U_L_PREFIX__ "_f_exp"); +__extension__ double frexp(double, int*) + __asm__(__U_L_PREFIX__ "_f_frexp"); +__extension__ double ldexp(double, int) + __asm__(__U_L_PREFIX__ "_f_ldexp"); +__extension__ double log(double) + __asm__(__U_L_PREFIX__ "_f_log"); +__extension__ double log10(double) + __asm__(__U_L_PREFIX__ "_f_log10"); +__extension__ double pow(double, double) + __asm__(__U_L_PREFIX__ "_f_pow"); +__extension__ double tan(double) + __asm__(__U_L_PREFIX__ "_f_tan"); -double EXFUN(fast_abs,(double)); -double EXFUN(fast_sqrt,(double)); -double EXFUN(fast_exp2,(double)); -double EXFUN(fast_exp10,(double)); -double EXFUN(fast_expe,(double)); -double EXFUN(fast_log10,(double)); -double EXFUN(fast_log2,(double)); -double EXFUN(fast_loge,(double)); +#if !defined(__STRICT_ANSI__) || defined(__cplusplus) || __STDC_VERSION__ >= 199901L -#define sin(x) fast_sin(x) -#define cos(x) fast_cos(x) -#define tan(x) fast_tan(x) -#define asin(x) fast_asin(x) -#define acos(x) fast_acos(x) -#define atan(x) fast_atan(x) -#define sinh(x) fast_sinh(x) -#define cosh(x) fast_cosh(x) -#define tanh(x) fast_tanh(x) -#define asinh(x) fast_asinh(x) -#define acosh(x) fast_acosh(x) -#define atanh(x) fast_atanh(x) -#define abs(x) fast_abs(x) -#define sqrt(x) fast_sqrt(x) -#define exp2(x) fast_exp2(x) -#define exp10(x) fast_exp10(x) -#define expe(x) fast_expe(x) -#define log10(x) fast_log10(x) -#define log2(x) fast_log2(x) -#define loge(x) fast_loge(x) - -#ifdef _HAVE_STDC -/* These functions are in assembler, they really do take floats. This - can only be used with a real ANSI compiler */ - -float EXFUN(fast_sinf,(float)); -float EXFUN(fast_cosf,(float)); -float EXFUN(fast_tanf,(float)); - -float EXFUN(fast_asinf,(float)); -float EXFUN(fast_acosf,(float)); -float EXFUN(fast_atanf,(float)); - -float EXFUN(fast_sinhf,(float)); -float EXFUN(fast_coshf,(float)); -float EXFUN(fast_tanhf,(float)); - -float EXFUN(fast_asinhf,(float)); -float EXFUN(fast_acoshf,(float)); -float EXFUN(fast_atanhf,(float)); - -float EXFUN(fast_absf,(float)); -float EXFUN(fast_sqrtf,(float)); -float EXFUN(fast_exp2f,(float)); -float EXFUN(fast_exp10f,(float)); -float EXFUN(fast_expef,(float)); -float EXFUN(fast_log10f,(float)); -float EXFUN(fast_log2f,(float)); -float EXFUN(fast_logef,(float)); -#define sinf(x) fast_sinf(x) -#define cosf(x) fast_cosf(x) -#define tanf(x) fast_tanf(x) -#define asinf(x) fast_asinf(x) -#define acosf(x) fast_acosf(x) -#define atanf(x) fast_atanf(x) -#define sinhf(x) fast_sinhf(x) -#define coshf(x) fast_coshf(x) -#define tanhf(x) fast_tanhf(x) -#define asinhf(x) fast_asinhf(x) -#define acoshf(x) fast_acoshf(x) -#define atanhf(x) fast_atanhf(x) -#define absf(x) fast_absf(x) -#define sqrtf(x) fast_sqrtf(x) -#define exp2f(x) fast_exp2f(x) -#define exp10f(x) fast_exp10f(x) -#define expef(x) fast_expef(x) -#define log10f(x) fast_log10f(x) -#define log2f(x) fast_log2f(x) -#define logef(x) fast_logef(x) +__extension__ float atan2f(float, float) + __asm__(__U_L_PREFIX__ "_f_atan2f"); +__extension__ float expf(float) + __asm__(__U_L_PREFIX__ "_f_expf"); +__extension__ float frexpf(float, int*) + __asm__(__U_L_PREFIX__ "_f_frexpf"); +__extension__ float ldexpf(float, int) + __asm__(__U_L_PREFIX__ "_f_ldexpf"); +__extension__ long long llrint(double) + __asm__(__U_L_PREFIX__ "_f_llrint"); +__extension__ long long llrintf(float) + __asm__(__U_L_PREFIX__ "_f_llrintf"); +__extension__ long long llrintl(long double) + __asm__(__U_L_PREFIX__ "_f_llrintl"); +__extension__ float logf(float) + __asm__(__U_L_PREFIX__ "_f_logf"); +__extension__ float log10f(float) + __asm__(__U_L_PREFIX__ "_f_log10f"); +__extension__ long lrint(double) + __asm__(__U_L_PREFIX__ "_f_lrint"); +__extension__ long lrintf(float) + __asm__(__U_L_PREFIX__ "_f_lrintf"); +__extension__ long lrintl(long double) + __asm__(__U_L_PREFIX__ "_f_lrintl"); +__extension__ float powf(float, float) + __asm__(__U_L_PREFIX__ "_f_powf"); +__extension__ double rint(double) + __asm__(__U_L_PREFIX__ "_f_rint"); +__extension__ float rintf(float) + __asm__(__U_L_PREFIX__ "_f_rintf"); +__extension__ long double rintl(long double) + __asm__(__U_L_PREFIX__ "_f_rintl"); +__extension__ float tanf(float) + __asm__(__U_L_PREFIX__ "_f_tanf"); #endif -/* Override the functions defined in math.h */ -#endif /* __sysvnecv70_target */ +#else + +double EXFUN(_f_atan2,(double, double)); +double EXFUN(_f_exp,(double)); +double EXFUN(_f_frexp,(double, int*)); +double EXFUN(_f_ldexp,(double, int)); +double EXFUN(_f_log,(double)); +double EXFUN(_f_log10,(double)); +double EXFUN(_f_pow,(double, double)); + +#define atan2(__y,__x) _f_atan2((__y),(__x)) +#define exp(__x) _f_exp(__x) +#define frexp(__x,__p) _f_frexp((__x),(__p)) +#define ldexp(__x,__e) _f_ldexp((__x),(__e)) +#define log(__x) _f_log(__x) +#define log10(__x) _f_log10(__x) +#define pow(__x,__y) _f_pow((__x),(__y)) + +#ifndef __STRICT_ANSI__ + +float EXFUN(_f_atan2f,(float, float)); +float EXFUN(_f_expf,(float)); +float EXFUN(_f_frexpf,(float, int*)); +float EXFUN(_f_ldexpf,(float, int)); +long long EXFUN(_f_llrint,(double)); +long long EXFUN(_f_llrintf,(float)); +long long EXFUN(_f_llrintl,(long double)); +float EXFUN(_f_logf,(float)); +float EXFUN(_f_log10f,(float)); +long EXFUN(_f_lrint,(double)); +long EXFUN(_f_lrintf,(float)); +long EXFUN(_f_lrintl,(long double)); +float EXFUN(_f_powf,(float, float)); +float EXFUN(_f_rint,(double)); +double EXFUN(_f_rintf,(float)); +long double EXFUN(_f_rintl,(long double)); + +#define atan2f(__y,__x) _f_atan2f((__y),(__x)) +#define expf(__x) _f_expf(__x) +#define frexpf(__x,__p) _f_frexpf((__x),(__p)) +#define ldexpf(__x,__e) _f_ldexpf((__x),(__e)) +#define llrint(__x) _f_llrint((__x)) +#define llrintf(__x) _f_llrintf((__x)) +#define llrintl(__x) _f_llrintl((__x)) +#define logf(__x) _f_logf(__x) +#define log10f(__x) _f_log10f(__x) +#define lrint(__x) _f_lrint((__x)) +#define lrintf(__x) _f_lrintf((__x)) +#define lrintl(__x) _f_lrintl((__x)) +#define powf(__x,y) _f_powf((__x),(__y)) +#define rint(__x) _f_rint((__x)) +#define rintf(__x) _f_rintf((__x)) +#define rintl(__x) _f_rintl((__x)) +#endif + +#endif /* GCC */ +#endif /* _MACHFASTMATH_H */ diff --git a/programs/develop/libraries/newlib/include/machine/ieeefp.h b/programs/develop/libraries/newlib/include/machine/ieeefp.h index 12053b222e..cdc67ec5fc 100644 --- a/programs/develop/libraries/newlib/include/machine/ieeefp.h +++ b/programs/develop/libraries/newlib/include/machine/ieeefp.h @@ -360,6 +360,11 @@ #endif +#if (defined(__CR16__) || defined(__CR16C__) ||defined(__CR16CP__)) +#define __IEEE_LITTLE_ENDIAN +#define __SMALL_BITFIELDS /* 16 Bit INT */ +#endif + #ifndef __IEEE_BIG_ENDIAN #ifndef __IEEE_LITTLE_ENDIAN #error Endianess not declared!! diff --git a/programs/develop/libraries/newlib/include/machine/setjmp.h b/programs/develop/libraries/newlib/include/machine/setjmp.h index 1cce48cbbb..bd50e3ebb7 100644 --- a/programs/develop/libraries/newlib/include/machine/setjmp.h +++ b/programs/develop/libraries/newlib/include/machine/setjmp.h @@ -204,6 +204,13 @@ _BEGIN_STD_C #define _JBLEN 9 #endif +#if (defined(__CR16__) || defined(__CR16C__) ||defined(__CR16CP__)) +/* r6, r7, r8, r9, r10, r11, r12 (r12L, r12H), + * r13 (r13L, r13H), ra(raL, raH), sp(spL, spH) */ +#define _JBLEN 14 +#define _JBTYPE unsigned short +#endif + #ifdef __fr30__ #define _JBLEN 10 #endif diff --git a/programs/develop/libraries/newlib/include/math.h b/programs/develop/libraries/newlib/include/math.h index 5f94b6faa1..65859abd55 100644 --- a/programs/develop/libraries/newlib/include/math.h +++ b/programs/develop/libraries/newlib/include/math.h @@ -32,7 +32,7 @@ union __ldmath #endif /* Natural log of 2 */ -#define _M_LOG2_E 0.693147180559945309417 +#define _M_LN2 0.693147180559945309417 #if defined(__GNUC__) && \ ( (__GNUC__ >= 4) || \ @@ -276,7 +276,7 @@ extern double erf _PARAMS((double)); extern double erfc _PARAMS((double)); extern double log2 _PARAMS((double)); #if !defined(__cplusplus) -#define log2(x) (log (x) / _M_LOG2_E) +#define log2(x) (log (x) / _M_LN2) #endif #ifndef __math_68881 @@ -356,7 +356,7 @@ extern float erff _PARAMS((float)); extern float erfcf _PARAMS((float)); extern float log2f _PARAMS((float)); #if !defined(__cplusplus) -#define log2f(x) (logf (x) / (float) _M_LOG2_E) +#define log2f(x) (logf (x) / (float_t) _M_LN2) #endif extern float hypotf _PARAMS((float, float)); #endif /* ! defined (_REENT_ONLY) */ @@ -529,7 +529,7 @@ extern int matherr _PARAMS((struct exception *e)); #define M_E 2.7182818284590452354 #define M_LOG2E 1.4426950408889634074 #define M_LOG10E 0.43429448190325182765 -#define M_LN2 0.69314718055994530942 +#define M_LN2 _M_LN2 #define M_LN10 2.30258509299404568402 #define M_PI 3.14159265358979323846 #define M_TWOPI (M_PI * 2.0) @@ -546,7 +546,7 @@ extern int matherr _PARAMS((struct exception *e)); #define M_LN2HI 6.9314718036912381649E-1 #define M_SQRT3 1.73205080756887719000 #define M_IVLN10 0.43429448190325182765 /* 1 / log(10) */ -#define M_LOG2_E _M_LOG2_E +#define M_LOG2_E _M_LN2 #define M_INVLN2 1.4426950408889633870E0 /* 1 / log(2) */ /* Global control over fdlibm error handling. */ diff --git a/programs/develop/libraries/newlib/include/newlib.h b/programs/develop/libraries/newlib/include/newlib.h index 2152f8b0de..6da300434e 100644 --- a/programs/develop/libraries/newlib/include/newlib.h +++ b/programs/develop/libraries/newlib/include/newlib.h @@ -1,10 +1,173 @@ -/* dummy file for external tools to use. Real file is created by - newlib configuration. */ +/* newlib.h. Generated from newlib.hin by configure. */ +/* newlib.hin. Manually edited from the output of autoheader to + remove all PACKAGE_ macros which will collide with any user + package using newlib header files and having its own package name, + version, etc... */ +#ifndef __NEWLIB_H__ +#define __NEWLIB_H__ 1 -#ifndef _NEWLIB_H_ -#define _NEWLIB_H_ +/* EL/IX level */ +/* #undef _ELIX_LEVEL */ + +/* Newlib version */ +#define _NEWLIB_VERSION "1.19.0" + +/* C99 formats support (such as %a, %zu, ...) in IO functions like + * printf/scanf enabled */ +/* #undef _WANT_IO_C99_FORMATS */ #define __DYNAMIC_REENT__ -#endif /* _NEWLIB_H_ */ +/* long long type support in IO functions like printf/scanf enabled */ +/* #undef _WANT_IO_LONG_LONG */ + +/* Register application finalization function using atexit. */ +/* #undef _WANT_REGISTER_FINI */ + +/* long double type support in IO functions like printf/scanf enabled */ +/* #undef _WANT_IO_LONG_DOUBLE */ + +/* Positional argument support in printf functions enabled. */ +/* #undef _WANT_IO_POS_ARGS */ + +/* Optional reentrant struct support. Used mostly on platforms with + very restricted storage. */ +/* #undef _WANT_REENT_SMALL */ + +/* Multibyte supported */ +/* #undef _MB_CAPABLE */ + +/* MB_LEN_MAX */ +#define _MB_LEN_MAX 1 + +/* ICONV enabled */ +/* #undef _ICONV_ENABLED */ + +/* Enable ICONV external CCS files loading capabilities */ +/* #undef _ICONV_ENABLE_EXTERNAL_CCS */ + +/* Define if the linker supports .preinit_array/.init_array/.fini_array + * sections. */ +#define HAVE_INITFINI_ARRAY 1 + +/* True if atexit() may dynamically allocate space for cleanup + functions. */ +#define _ATEXIT_DYNAMIC_ALLOC 1 + +/* True if long double supported. */ +#define _HAVE_LONG_DOUBLE 1 + +/* True if long double supported and it is equal to double. */ +/* #undef _LDBL_EQ_DBL */ + +/* + * Iconv encodings enabled ("to" direction) + */ +/* #undef _ICONV_TO_ENCODING_BIG5 */ +/* #undef _ICONV_TO_ENCODING_CP775 */ +/* #undef _ICONV_TO_ENCODING_CP850 */ +/* #undef _ICONV_TO_ENCODING_CP852 */ +/* #undef _ICONV_TO_ENCODING_CP855 */ +/* #undef _ICONV_TO_ENCODING_CP866 */ +/* #undef _ICONV_TO_ENCODING_EUC_JP */ +/* #undef _ICONV_TO_ENCODING_EUC_TW */ +/* #undef _ICONV_TO_ENCODING_EUC_KR */ +/* #undef _ICONV_TO_ENCODING_ISO_8859_1 */ +/* #undef _ICONV_TO_ENCODING_ISO_8859_10 */ +/* #undef _ICONV_TO_ENCODING_ISO_8859_11 */ +/* #undef _ICONV_TO_ENCODING_ISO_8859_13 */ +/* #undef _ICONV_TO_ENCODING_ISO_8859_14 */ +/* #undef _ICONV_TO_ENCODING_ISO_8859_15 */ +/* #undef _ICONV_TO_ENCODING_ISO_8859_2 */ +/* #undef _ICONV_TO_ENCODING_ISO_8859_3 */ +/* #undef _ICONV_TO_ENCODING_ISO_8859_4 */ +/* #undef _ICONV_TO_ENCODING_ISO_8859_5 */ +/* #undef _ICONV_TO_ENCODING_ISO_8859_6 */ +/* #undef _ICONV_TO_ENCODING_ISO_8859_7 */ +/* #undef _ICONV_TO_ENCODING_ISO_8859_8 */ +/* #undef _ICONV_TO_ENCODING_ISO_8859_9 */ +/* #undef _ICONV_TO_ENCODING_ISO_IR_111 */ +/* #undef _ICONV_TO_ENCODING_KOI8_R */ +/* #undef _ICONV_TO_ENCODING_KOI8_RU */ +/* #undef _ICONV_TO_ENCODING_KOI8_U */ +/* #undef _ICONV_TO_ENCODING_KOI8_UNI */ +/* #undef _ICONV_TO_ENCODING_UCS_2 */ +/* #undef _ICONV_TO_ENCODING_UCS_2_INTERNAL */ +/* #undef _ICONV_TO_ENCODING_UCS_2BE */ +/* #undef _ICONV_TO_ENCODING_UCS_2LE */ +/* #undef _ICONV_TO_ENCODING_UCS_4 */ +/* #undef _ICONV_TO_ENCODING_UCS_4_INTERNAL */ +/* #undef _ICONV_TO_ENCODING_UCS_4BE */ +/* #undef _ICONV_TO_ENCODING_UCS_4LE */ +/* #undef _ICONV_TO_ENCODING_US_ASCII */ +/* #undef _ICONV_TO_ENCODING_UTF_16 */ +/* #undef _ICONV_TO_ENCODING_UTF_16BE */ +/* #undef _ICONV_TO_ENCODING_UTF_16LE */ +/* #undef _ICONV_TO_ENCODING_UTF_8 */ +/* #undef _ICONV_TO_ENCODING_WIN_1250 */ +/* #undef _ICONV_TO_ENCODING_WIN_1251 */ +/* #undef _ICONV_TO_ENCODING_WIN_1252 */ +/* #undef _ICONV_TO_ENCODING_WIN_1253 */ +/* #undef _ICONV_TO_ENCODING_WIN_1254 */ +/* #undef _ICONV_TO_ENCODING_WIN_1255 */ +/* #undef _ICONV_TO_ENCODING_WIN_1256 */ +/* #undef _ICONV_TO_ENCODING_WIN_1257 */ +/* #undef _ICONV_TO_ENCODING_WIN_1258 */ + +/* + * Iconv encodings enabled ("from" direction) + */ +/* #undef _ICONV_FROM_ENCODING_BIG5 */ +/* #undef _ICONV_FROM_ENCODING_CP775 */ +/* #undef _ICONV_FROM_ENCODING_CP850 */ +/* #undef _ICONV_FROM_ENCODING_CP852 */ +/* #undef _ICONV_FROM_ENCODING_CP855 */ +/* #undef _ICONV_FROM_ENCODING_CP866 */ +/* #undef _ICONV_FROM_ENCODING_EUC_JP */ +/* #undef _ICONV_FROM_ENCODING_EUC_TW */ +/* #undef _ICONV_FROM_ENCODING_EUC_KR */ +/* #undef _ICONV_FROM_ENCODING_ISO_8859_1 */ +/* #undef _ICONV_FROM_ENCODING_ISO_8859_10 */ +/* #undef _ICONV_FROM_ENCODING_ISO_8859_11 */ +/* #undef _ICONV_FROM_ENCODING_ISO_8859_13 */ +/* #undef _ICONV_FROM_ENCODING_ISO_8859_14 */ +/* #undef _ICONV_FROM_ENCODING_ISO_8859_15 */ +/* #undef _ICONV_FROM_ENCODING_ISO_8859_2 */ +/* #undef _ICONV_FROM_ENCODING_ISO_8859_3 */ +/* #undef _ICONV_FROM_ENCODING_ISO_8859_4 */ +/* #undef _ICONV_FROM_ENCODING_ISO_8859_5 */ +/* #undef _ICONV_FROM_ENCODING_ISO_8859_6 */ +/* #undef _ICONV_FROM_ENCODING_ISO_8859_7 */ +/* #undef _ICONV_FROM_ENCODING_ISO_8859_8 */ +/* #undef _ICONV_FROM_ENCODING_ISO_8859_9 */ +/* #undef _ICONV_FROM_ENCODING_ISO_IR_111 */ +/* #undef _ICONV_FROM_ENCODING_KOI8_R */ +/* #undef _ICONV_FROM_ENCODING_KOI8_RU */ +/* #undef _ICONV_FROM_ENCODING_KOI8_U */ +/* #undef _ICONV_FROM_ENCODING_KOI8_UNI */ +/* #undef _ICONV_FROM_ENCODING_UCS_2 */ +/* #undef _ICONV_FROM_ENCODING_UCS_2_INTERNAL */ +/* #undef _ICONV_FROM_ENCODING_UCS_2BE */ +/* #undef _ICONV_FROM_ENCODING_UCS_2LE */ +/* #undef _ICONV_FROM_ENCODING_UCS_4 */ +/* #undef _ICONV_FROM_ENCODING_UCS_4_INTERNAL */ +/* #undef _ICONV_FROM_ENCODING_UCS_4BE */ +/* #undef _ICONV_FROM_ENCODING_UCS_4LE */ +/* #undef _ICONV_FROM_ENCODING_US_ASCII */ +/* #undef _ICONV_FROM_ENCODING_UTF_16 */ +/* #undef _ICONV_FROM_ENCODING_UTF_16BE */ +/* #undef _ICONV_FROM_ENCODING_UTF_16LE */ +/* #undef _ICONV_FROM_ENCODING_UTF_8 */ +/* #undef _ICONV_FROM_ENCODING_WIN_1250 */ +/* #undef _ICONV_FROM_ENCODING_WIN_1251 */ +/* #undef _ICONV_FROM_ENCODING_WIN_1252 */ +/* #undef _ICONV_FROM_ENCODING_WIN_1253 */ +/* #undef _ICONV_FROM_ENCODING_WIN_1254 */ +/* #undef _ICONV_FROM_ENCODING_WIN_1255 */ +/* #undef _ICONV_FROM_ENCODING_WIN_1256 */ +/* #undef _ICONV_FROM_ENCODING_WIN_1257 */ +/* #undef _ICONV_FROM_ENCODING_WIN_1258 */ + +#endif /* !__NEWLIB_H__ */ + diff --git a/programs/develop/libraries/newlib/include/pthread.h b/programs/develop/libraries/newlib/include/pthread.h index 5cff51229d..a337870b17 100644 --- a/programs/develop/libraries/newlib/include/pthread.h +++ b/programs/develop/libraries/newlib/include/pthread.h @@ -2,7 +2,7 @@ * * Written by Joel Sherrill . * - * COPYRIGHT (c) 1989-2000. + * COPYRIGHT (c) 1989-2010. * On-Line Applications Research Corporation (OAR). * * Permission to use, copy, modify, and distribute this software for any @@ -15,7 +15,7 @@ * OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS * SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. * - * $Id: pthread.h,v 1.8 2009/12/17 19:22:23 jjohnstn Exp $ + * $Id: pthread.h,v 1.9 2010/12/08 14:44:06 corinna Exp $ */ #ifndef __PTHREAD_h @@ -185,10 +185,14 @@ int _EXFUN(pthread_mutex_getprioceiling, int _EXFUN(pthread_attr_init, (pthread_attr_t *__attr)); int _EXFUN(pthread_attr_destroy, (pthread_attr_t *__attr)); +int _EXFUN(pthread_attr_setstack, (pthread_attr_t *attr, + void *__stackaddr, size_t __stacksize)); +int _EXFUN(pthread_attr_getstack, (_CONST pthread_attr_t *attr, + void **__stackaddr, size_t *__stacksize)); int _EXFUN(pthread_attr_getstacksize, (_CONST pthread_attr_t *__attr, size_t *__stacksize)); int _EXFUN(pthread_attr_setstacksize, - (pthread_attr_t *__attr, size_t stacksize)); + (pthread_attr_t *__attr, size_t __stacksize)); int _EXFUN(pthread_attr_getstackaddr, (_CONST pthread_attr_t *__attr, void **__stackaddr)); int _EXFUN(pthread_attr_setstackaddr, @@ -197,6 +201,10 @@ int _EXFUN(pthread_attr_getdetachstate, (_CONST pthread_attr_t *__attr, int *__detachstate)); int _EXFUN(pthread_attr_setdetachstate, (pthread_attr_t *__attr, int __detachstate)); +int _EXFUN(pthread_attr_getguardsize, + (_CONST pthread_attr_t *__attr, size_t *__guardsize)); +int _EXFUN(pthread_attr_setguardsize, + (pthread_attr_t *__attr, size_t __guardsize)); /* Thread Creation, P1003.1c/Draft 10, p. 144 */ diff --git a/programs/develop/libraries/newlib/include/stdint.h b/programs/develop/libraries/newlib/include/stdint.h index 72dd28780b..ccf46b17a6 100644 --- a/programs/develop/libraries/newlib/include/stdint.h +++ b/programs/develop/libraries/newlib/include/stdint.h @@ -35,7 +35,6 @@ extern "C" { #define __have_long64 1 #elif __STDINT_EXP(LONG_MAX) == 0x7fffffff && !defined(__SPU__) #define __have_long32 1 -#define __have_long64 0 #endif #if __STDINT_EXP(SCHAR_MAX) == 0x7f @@ -76,23 +75,23 @@ typedef uint16_t uint_least8_t; #endif #endif -#if __have_long32 -typedef signed long int32_t; -typedef unsigned long uint32_t; -#define __int32_t_defined 1 -#elif __STDINT_EXP(INT_MAX) == 0x7fffffffL +//#if __have_long32 +//typedef signed long int32_t; +//typedef unsigned long uint32_t; +//#define __int32_t_defined 1 +//#elif __STDINT_EXP(INT_MAX) == 0x7fffffffL typedef signed int int32_t; typedef unsigned int uint32_t; #define __int32_t_defined 1 -#elif __STDINT_EXP(SHRT_MAX) == 0x7fffffffL -typedef signed short int32_t; -typedef unsigned short uint32_t; -#define __int32_t_defined 1 -#elif __STDINT_EXP(SCHAR_MAX) == 0x7fffffffL -typedef signed char int32_t; -typedef unsigned char uint32_t; -#define __int32_t_defined 1 -#endif +//#elif __STDINT_EXP(SHRT_MAX) == 0x7fffffffL +//typedef signed short int32_t; +//typedef unsigned short uint32_t; +//#define __int32_t_defined 1 +//#elif __STDINT_EXP(SCHAR_MAX) == 0x7fffffffL +//typedef signed char int32_t; +//typedef unsigned char uint32_t; +//#define __int32_t_defined 1 +//#endif #if __int32_t_defined typedef int32_t int_least32_t; @@ -178,8 +177,6 @@ typedef uint64_t uint_least32_t; typedef signed int int_fast64_t; typedef unsigned int uint_fast64_t; #define __int_fast64_t_defined 1 -#else -#define __int_fast64_t_defined 0 #endif /* @@ -215,7 +212,6 @@ typedef uint64_t uint_least32_t; #if __int_least64_t_defined typedef int_least64_t int_fast64_t; typedef uint_least64_t uint_fast64_t; -#undef __int_fast64_t_defined #define __int_fast64_t_defined 1 #endif #endif diff --git a/programs/develop/libraries/newlib/include/strings.h b/programs/develop/libraries/newlib/include/strings.h new file mode 100644 index 0000000000..131d81d20c --- /dev/null +++ b/programs/develop/libraries/newlib/include/strings.h @@ -0,0 +1,35 @@ +/* + * strings.h + * + * Definitions for string operations. + */ + +#ifndef _STRINGS_H_ +#define _STRINGS_H_ + +#include "_ansi.h" +#include + +#include /* for size_t */ + +_BEGIN_STD_C + +#if !defined __STRICT_ANSI__ && _POSIX_VERSION < 200809L +/* + * Marked LEGACY in Open Group Base Specifications Issue 6/IEEE Std 1003.1-2004 + * Removed from Open Group Base Specifications Issue 7/IEEE Std 1003.1-2008 + */ +int _EXFUN(bcmp,(const void *, const void *, size_t)); +void _EXFUN(bcopy,(const void *, void *, size_t)); +void _EXFUN(bzero,(void *, size_t)); +char *_EXFUN(index,(const char *, int)); +char *_EXFUN(rindex,(const char *, int)); +#endif /* ! __STRICT_ANSI__ */ + +int _EXFUN(ffs,(int)); +int _EXFUN(strcasecmp,(const char *, const char *)); +int _EXFUN(strncasecmp,(const char *, const char *, size_t)); + +_END_STD_C + +#endif /* _STRINGS_H_ */ diff --git a/programs/develop/libraries/newlib/include/sys/config.h b/programs/develop/libraries/newlib/include/sys/config.h index 83582638d8..84db19e33e 100644 --- a/programs/develop/libraries/newlib/include/sys/config.h +++ b/programs/develop/libraries/newlib/include/sys/config.h @@ -30,6 +30,22 @@ #define UINT_MAX (__INT_MAX__ * 2U + 1) #endif +#if (defined(__CR16__) || defined(__CR16C__) ||defined(__CR16CP__)) +#ifndef __INT32__ +#define __SMALL_BITFIELDS +#undef INT_MAX +#undef UINT_MAX +#define INT_MAX 32767 +#define UINT_MAX (__INT_MAX__ * 2U + 1) +#else /* INT32 */ +#undef INT_MAX +#undef UINT_MAX +#define INT_MAX 2147483647 +#define UINT_MAX (__INT_MAX__ * 2U + 1) +#endif /* INT32 */ + +#endif /* CR16C */ + #if defined (__xc16x__) || defined (__xc16xL__) || defined (__xc16xS__) #define __SMALL_BITFIELDS #endif diff --git a/programs/develop/libraries/newlib/include/sys/types.h b/programs/develop/libraries/newlib/include/sys/types.h index e8b058936e..2ff0ca4dbd 100644 --- a/programs/develop/libraries/newlib/include/sys/types.h +++ b/programs/develop/libraries/newlib/include/sys/types.h @@ -171,12 +171,16 @@ typedef signed char pid_t; typedef int pid_t; #endif +#if defined(__rtems__) +typedef _mode_t mode_t; +#endif + #ifndef __CYGWIN__ typedef long key_t; #endif typedef _ssize_t ssize_t; -#ifndef __CYGWIN__ +#if !defined(__CYGWIN__) && !defined(__rtems__) #ifdef __MS_types__ typedef char * addr_t; typedef int mode_t; @@ -349,6 +353,9 @@ typedef struct { int inheritsched; int schedpolicy; struct sched_param schedparam; +#if defined(__rtems__) + size_t guardsize; +#endif /* P1003.4b/D8, p. 54 adds cputime_clock_allowed attribute. */ #if defined(_POSIX_THREAD_CPUTIME)