/programs/develop/libraries/newlib/include/machine/fastmath.h |
---|
1,122 → 1,100 |
#ifndef _MACHFASTMATH_H |
#define _MACHFASTMATH_H |
#ifdef __sysvnecv70_target |
double EXFUN(fast_sin,(double)); |
double EXFUN(fast_cos,(double)); |
double EXFUN(fast_tan,(double)); |
#if defined(__GNUC__) && __STDC__ - 0 > 0 |
double EXFUN(fast_asin,(double)); |
double EXFUN(fast_acos,(double)); |
double EXFUN(fast_atan,(double)); |
#define __str1__(__x) #__x |
#define __str2__(__x) __str1__(__x) |
#define __U_L_PREFIX__ __str2__(__USER_LABEL_PREFIX__) |
double EXFUN(fast_sinh,(double)); |
double EXFUN(fast_cosh,(double)); |
double EXFUN(fast_tanh,(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_asinh,(double)); |
double EXFUN(fast_acosh,(double)); |
double EXFUN(fast_atanh,(double)); |
#if !defined(__STRICT_ANSI__) || defined(__cplusplus) || __STDC_VERSION__ >= 199901L |
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)); |
__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 |
#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) |
#else |
#ifdef _HAVE_STDC |
/* These functions are in assembler, they really do take floats. This |
can only be used with a real ANSI compiler */ |
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)); |
float EXFUN(fast_sinf,(float)); |
float EXFUN(fast_cosf,(float)); |
float EXFUN(fast_tanf,(float)); |
#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)) |
float EXFUN(fast_asinf,(float)); |
float EXFUN(fast_acosf,(float)); |
float EXFUN(fast_atanf,(float)); |
#ifndef __STRICT_ANSI__ |
float EXFUN(fast_sinhf,(float)); |
float EXFUN(fast_coshf,(float)); |
float EXFUN(fast_tanhf,(float)); |
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)); |
float EXFUN(fast_asinhf,(float)); |
float EXFUN(fast_acoshf,(float)); |
float EXFUN(fast_atanhf,(float)); |
#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)) |
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) |
#endif |
/* Override the functions defined in math.h */ |
#endif /* __sysvnecv70_target */ |
#endif /* GCC */ |
#endif /* _MACHFASTMATH_H */ |
/programs/develop/libraries/newlib/include/machine/ieeefp.h |
---|
342,6 → 342,12 |
#define __IEEE_BIG_ENDIAN |
#endif |
#ifdef __RL78__ |
#define __IEEE_LITTLE_ENDIAN |
#define __SMALL_BITFIELDS /* 16 Bit INT */ |
#define _DOUBLE_IS_32BITS |
#endif |
#ifdef __RX__ |
#ifdef __RX_BIG_ENDIAN__ |
/programs/develop/libraries/newlib/include/machine/setjmp.h |
---|
265,6 → 265,12 |
#define _JBTYPE unsigned short |
#endif /* __m32c__ */ |
#ifdef __RL78__ |
/* Three banks of registers, SP, CS, ES, PC */ |
#define _JBLEN (8*3+8) |
#define _JBTYPE unsigned char |
#endif |
#ifdef __RX__ |
#define _JBLEN 0x44 |
#endif |
/programs/develop/libraries/newlib/include/signal.h |
---|
8,6 → 8,7 |
typedef int sig_atomic_t; /* Atomic entity type (ANSI) */ |
#ifndef _POSIX_SOURCE |
typedef _sig_func_ptr sig_t; /* BSD naming */ |
typedef _sig_func_ptr sighandler_t; /* glibc naming */ |
#endif /* !_POSIX_SOURCE */ |
23,6 → 24,7 |
#ifndef _REENT_ONLY |
_sig_func_ptr _EXFUN(signal, (int, _sig_func_ptr)); |
int _EXFUN(raise, (int)); |
void _EXFUN(psignal, (int, const char *)); |
#endif |
_END_STD_C |
/programs/develop/libraries/newlib/include/string.h |
---|
9,6 → 9,7 |
#include "_ansi.h" |
#include <sys/reent.h> |
#include <sys/cdefs.h> |
#define __need_size_t |
#include <stddef.h> |
62,11 → 63,25 |
char *_EXFUN(stpncpy,(char *, const char *, size_t)); |
int _EXFUN(strcasecmp,(const char *, const char *)); |
char *_EXFUN(strcasestr,(const char *, const char *)); |
char *_EXFUN(strchrnul,(const char *, int)); |
char *_EXFUN(strdup,(const char *)); |
char *_EXFUN(_strdup_r,(struct _reent *, const char *)); |
char *_EXFUN(strndup,(const char *, size_t)); |
char *_EXFUN(_strndup_r,(struct _reent *, const char *, size_t)); |
/* There are two common strerror_r variants. If you request |
_GNU_SOURCE, you get the GNU version; otherwise you get the POSIX |
version. POSIX requires that #undef strerror_r will still let you |
invoke the underlying function, but that requires gcc support. */ |
#ifdef _GNU_SOURCE |
char *_EXFUN(strerror_r,(int, char *, size_t)); |
#else |
# ifdef __GNUC__ |
int _EXFUN(strerror_r,(int, char *, size_t)) __asm__ (__ASMNAME ("__xpg_strerror_r")); |
# else |
int _EXFUN(__xpg_strerror_r,(int, char *, size_t)); |
# define strerror_r __xpg_strerror_r |
# endif |
#endif |
size_t _EXFUN(strlcat,(char *, const char *, size_t)); |
size_t _EXFUN(strlcpy,(char *, const char *, size_t)); |
int _EXFUN(strncasecmp,(const char *, const char *, size_t)); |
74,13 → 89,30 |
char *_EXFUN(strsep,(char **, const char *)); |
char *_EXFUN(strlwr,(char *)); |
char *_EXFUN(strupr,(char *)); |
#ifdef __CYGWIN__ |
#ifndef DEFS_H /* Kludge to work around problem compiling in gdb */ |
char *_EXFUN(strsignal, (int __signo)); |
#endif |
#ifdef __CYGWIN__ |
int _EXFUN(strtosigno, (const char *__name)); |
#endif |
/* Recursive version of strerror. */ |
char * _EXFUN(_strerror_r, (struct _reent *, int, int, int *)); |
#if defined _GNU_SOURCE && defined __GNUC__ |
#define strdupa(__s) \ |
(__extension__ ({const char *__in = (__s); \ |
size_t __len = strlen (__in) + 1; \ |
char * __out = (char *) __builtin_alloca (__len); \ |
(char *) memcpy (__out, __in, __len);})) |
#define strndupa(__s, __n) \ |
(__extension__ ({const char *__in = (__s); \ |
size_t __len = strnlen (__in, (__n)) + 1; \ |
char *__out = (char *) __builtin_alloca (__len); \ |
__out[__len-1] = '\0'; \ |
(char *) memcpy (__out, __in, __len-1);})) |
#endif /* _GNU_SOURCE && __GNUC__ */ |
/* These function names are used on Windows and perhaps other systems. */ |
#ifndef strcmpi |
#define strcmpi strcasecmp |
/programs/develop/libraries/newlib/include/sys/cdefs.h |
---|
58,6 → 58,27 |
#define __DOTS , ... |
#define __THROW |
/* |
* The __CONCAT macro is used to concatenate parts of symbol names, e.g. |
* with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. |
* The __CONCAT macro is a bit tricky to use if it must work in non-ANSI |
* mode -- there must be no spaces between its arguments, and for nested |
* __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also |
* concatenate double-quoted strings produced by the __STRING macro, but |
* this only works with ANSI C. |
* |
* __XSTRING is like __STRING, but it expands any macros in its argument |
* first. It is only available with ANSI C. |
*/ |
#define __CONCAT1(x,y) x ## y |
#define __CONCAT(x,y) __CONCAT1(x,y) |
#define __STRING(x) #x /* stringify without expanding x */ |
#define __XSTRING(x) __STRING(x) /* expand x, then stringify */ |
#ifdef __GNUC__ |
# define __ASMNAME(cname) __XSTRING (__USER_LABEL_PREFIX__) cname |
#endif |
#define __ptr_t void * |
#define __long_double_t long double |
/programs/develop/libraries/newlib/include/sys/errno.h |
---|
22,6 → 22,8 |
#ifdef __CYGWIN__ |
extern __IMPORT const char * const sys_errlist[]; |
extern __IMPORT int sys_nerr; |
extern __IMPORT char *program_invocation_name; |
extern __IMPORT char *program_invocation_short_name; |
#endif |
#define __errno_r(ptr) ((ptr)->_errno) |
/programs/develop/libraries/newlib/include/sys/features.h |
---|
15,7 → 15,7 |
* OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS |
* SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. |
* |
* $Id: features.h,v 1.22 2010/08/09 08:29:22 corinna Exp $ |
* $Id: features.h,v 1.27 2011/07/20 19:41:15 yselkowitz Exp $ |
*/ |
#ifndef _SYS_FEATURES_H |
102,8 → 102,8 |
/* #define _POSIX_ASYNCHRONOUS_IO -1 */ |
/* #define _POSIX_BARRIERS -1 */ |
#define _POSIX_CHOWN_RESTRICTED 1 |
/* #define _POSIX_CLOCK_SELECTION -1 */ |
/* #define _POSIX_CPUTIME -1 */ |
#define _POSIX_CLOCK_SELECTION 200112L |
#define _POSIX_CPUTIME 200112L |
#define _POSIX_FSYNC 200112L |
#define _POSIX_IPV6 200112L |
#define _POSIX_JOB_CONTROL 1 |
125,12 → 125,12 |
#define _POSIX_SHARED_MEMORY_OBJECTS 200112L |
#define _POSIX_SHELL 1 |
/* #define _POSIX_SPAWN -1 */ |
/* #define _POSIX_SPIN_LOCKS -1 */ |
#define _POSIX_SPIN_LOCKS 200112L |
/* #define _POSIX_SPORADIC_SERVER -1 */ |
#define _POSIX_SYNCHRONIZED_IO 200112L |
/* #define _POSIX_THREAD_ATTR_STACKADDR -1 */ |
#define _POSIX_THREAD_ATTR_STACKADDR 200112L |
#define _POSIX_THREAD_ATTR_STACKSIZE 200112L |
/* #define _POSIX_THREAD_CPUTIME -1 */ |
#define _POSIX_THREAD_CPUTIME 200112L |
/* #define _POSIX_THREAD_PRIO_INHERIT -1 */ |
/* #define _POSIX_THREAD_PRIO_PROTECT -1 */ |
#define _POSIX_THREAD_PRIORITY_SCHEDULING 200112L |
178,6 → 178,12 |
/* #define _XOPEN_UNIX -1 */ |
#endif /* !__STRICT_ANSI__ || __cplusplus || __STDC_VERSION__ >= 199901L */ |
/* The value corresponds to UNICODE version 4.0, which is the version |
supported by XP. Newlib supports 5.2 (2011) but so far Cygwin needs |
the MS conversions for double-byte charsets. */ |
#define __STDC_ISO_10646__ 200305L |
#endif /* __CYGWIN__ */ |
/* Per the permission given in POSIX.1-2008 section 2.2.1, define |
/programs/develop/libraries/newlib/include/sys/signal.h |
---|
76,11 → 76,12 |
* |
* (1) Routines stored in sa_handler should take a single int as |
* their argument although the POSIX standard does not require this. |
* This is not longer true since at least POSIX.1-2008 |
* (2) The fields sa_handler and sa_sigaction may overlap, and a conforming |
* application should not use both simultaneously. |
*/ |
typedef void (*_sig_func_ptr)(); |
typedef void (*_sig_func_ptr)(int); |
struct sigaction { |
int sa_flags; /* Special flags to affect behavior of signal */ |
/programs/develop/libraries/newlib/include/sys/types.h |
---|
98,6 → 98,7 |
typedef unsigned short ushort; /* System V compatibility */ |
typedef unsigned int uint; /* System V compatibility */ |
typedef unsigned long ulong; /* System V compatibility */ |
# endif /*!_POSIX_SOURCE */ |
#ifndef __clock_t_defined |
/programs/develop/libraries/newlib/include/sys/unistd.h |
---|
46,6 → 46,9 |
int _EXFUN(execl, (const char *__path, const char *, ... )); |
int _EXFUN(execle, (const char *__path, const char *, ... )); |
int _EXFUN(execlp, (const char *__file, const char *, ... )); |
#if defined(__CYGWIN__) |
int _EXFUN(execlpe, (const char *__file, const char *, ... )); |
#endif |
int _EXFUN(execv, (const char *__path, char * const __argv[] )); |
int _EXFUN(execve, (const char *__path, char * const __argv[], char * const __envp[] )); |
int _EXFUN(execvp, (const char *__file, char * const __argv[] )); |
487,10 → 490,11 |
#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS 16 |
#define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS 17 |
#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS |
#define _CS_XBS5_WIDTH_RESTRICTED_ENVS _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS |
#define _CS_POSIX_V7_THREADS_CFLAGS 18 |
#define _CS_POSIX_V7_THREADS_LDFLAGS 19 |
#define _CS_V7_ENV 20 |
#define _CS_V6_ENV _CS_V6_ENV |
#define _CS_V6_ENV _CS_V7_ENV |
#endif |
#ifndef __CYGWIN__ |
/programs/develop/libraries/newlib/include/time.h |
---|
175,10 → 175,26 |
#endif |
#endif /* _POSIX_TIMERS */ |
#if defined(_POSIX_CLOCK_SELECTION) |
#ifdef __cplusplus |
extern "C" { |
#endif |
int _EXFUN(clock_nanosleep, |
(clockid_t clock_id, int flags, const struct timespec *rqtp, |
struct timespec *rmtp)); |
#ifdef __cplusplus |
} |
#endif |
#endif /* _POSIX_CLOCK_SELECTION */ |
#ifdef __cplusplus |
extern "C" { |
#endif |
/* CPU-time Clock Attributes, P1003.4b/D8, p. 54 */ |
/* values for the clock enable attribute */ |
212,7 → 228,7 |
the identifier of the CPU_time clock associated with the PROCESS |
making the function call. */ |
#define CLOCK_PROCESS_CPUTIME (clockid_t)2 |
#define CLOCK_PROCESS_CPUTIME_ID (clockid_t)2 |
#endif |
222,7 → 238,7 |
the identifier of the CPU_time clock associated with the THREAD |
making the function call. */ |
#define CLOCK_THREAD_CPUTIME (clockid_t)3 |
#define CLOCK_THREAD_CPUTIME_ID (clockid_t)3 |
#endif |
/programs/develop/libraries/newlib/include/wchar.h |
---|
16,6 → 16,9 |
/* For _mbstate_t definition. */ |
#include <sys/_types.h> |
/* For __STDC_ISO_10646__ */ |
#include <sys/features.h> |
#ifndef NULL |
#define NULL 0 |
#endif |