Add missing long double functions to Cygwin

This patch adds the long double functions missing in newlib to Cygwin.
Apart from some self-written additions (exp10l, finite{f,l}, isinf{f,l},
isnan{f,l}, pow10l) the files are taken from the Mingw-w64 math lib.
Minor changes were required, e.g. substitue _WIN64 with __x86_64__ and
fixing __FLT_RPT_DOMAIN/__FLT_RPT_ERANGE for Cygwin.

Cygwin:
	* math: New subdir with math functions.
	* Makefile.in (VPATH): Add math subdir.
	(MATH_OFILES): List of object files collected from building files in
	math subdir.
	(DLL_OFILES): Add $(MATH_OFILES).
	${CURDIR}/libm.a: Add $(MATH_OFILES) to build.
	* common.din: Add new functions from math subdir.
	* i686.din: Align to new math subdir.  Remove functions now commonly
	available.
	* x86_64.din: Ditto.
	* math.h: math.h wrapper to define mingw structs used in some files in
	math subdir.
	* include/cygwin/version.h: Bump API minor version.

newlib:
	* libc/include/complex.h: Add prototypes for complex long double
	functions.  Only define for Cygwin.
	* libc/include/math.h: Additionally enable prototypes of long double
	functions for Cygwin.  Add Cygwin-only prototypes for dreml, sincosl,
	exp10l and pow10l.  Explain why we don't add them to newlib.
	* libc/include/tgmath.h: Enable long double handling on Cygwin.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2016-03-28 19:35:20 +02:00
parent 087aca6163
commit 792e51b721
142 changed files with 10969 additions and 42 deletions
+25 -2
View File
@@ -108,12 +108,10 @@ long double cimagl(long double complex);
/* 7.3.9.3 The conj functions */
double complex conj(double complex);
float complex conjf(float complex);
/*long double complex conjl(long double complex); */
/* 7.3.9.4 The cproj functions */
double complex cproj(double complex);
float complex cprojf(float complex);
/*long double complex cprojl(long double complex); */
/* 7.3.9.5 The creal functions */
double creal(double complex);
@@ -125,6 +123,31 @@ double complex clog10(double complex);
float complex clog10f(float complex);
#endif
#if defined(__CYGWIN__)
long double complex cacosl(long double complex);
long double complex casinl(long double complex);
long double complex catanl(long double complex);
long double complex ccosl(long double complex);
long double complex csinl(long double complex);
long double complex ctanl(long double complex);
long double complex cacoshl(long double complex);
long double complex casinhl(long double complex);
long double complex catanhl(long double complex);
long double complex ccoshl(long double complex);
long double complex csinhl(long double complex);
long double complex ctanhl(long double complex);
long double complex cexpl(long double complex);
long double complex clogl(long double complex);
long double complex cpowl(long double complex, long double complex);
long double complex csqrtl(long double complex);
long double cargl(long double complex);
long double complex conjl(long double complex);
long double complex cprojl(long double complex);
#if __GNU_VISIBLE
long double complex clog10l(long double complex);
#endif
#endif /* __CYGWIN__ */
__END_DECLS
#endif /* ! _COMPLEX_H */
+22 -4
View File
@@ -421,8 +421,12 @@ extern float log2f _PARAMS((float));
extern float hypotf _PARAMS((float, float));
#endif /* ! defined (_REENT_ONLY) */
/* On platforms where long double equals double. */
#ifdef _LDBL_EQ_DBL
/* Newlib doesn't fully support long double math functions so far.
On platforms where long double equals double the long double functions
simply call the double functions. On Cygwin the long double functions
are implemented independently from newlib to be able to use optimized
assembler functions despite using the Microsoft x86_64 ABI. */
#if defined (_LDBL_EQ_DBL) || defined (__CYGWIN__)
/* Reentrant ANSI C functions. */
#ifndef __math_68881
extern long double atanl _PARAMS((long double));
@@ -492,7 +496,7 @@ extern long double lgammal _PARAMS((long double));
extern long double erfl _PARAMS((long double));
extern long double erfcl _PARAMS((long double));
#endif /* ! defined (_REENT_ONLY) */
#else /* !_LDBL_EQ_DBL */
#else /* !_LDBL_EQ_DBL && !__CYGWIN__ */
extern long double hypotl _PARAMS((long double, long double));
extern long double sqrtl _PARAMS((long double));
#ifdef __i386__
@@ -501,13 +505,16 @@ extern _LONG_DOUBLE rintl _PARAMS((_LONG_DOUBLE));
extern long int lrintl _PARAMS((_LONG_DOUBLE));
extern long long int llrintl _PARAMS((_LONG_DOUBLE));
#endif /* __i386__ */
#endif /* !_LDBL_EQ_DBL */
#endif /* !_LDBL_EQ_DBL && !__CYGWIN__ */
#endif /* __ISO_C_VISIBLE >= 1999 */
#if __MISC_VISIBLE
extern double drem _PARAMS((double, double));
extern float dremf _PARAMS((float, float));
#ifdef __CYGWIN__
extern float dreml _PARAMS((long double, long double));
#endif /* __CYGWIN__ */
extern double gamma_r _PARAMS((double, int *));
extern double lgamma_r _PARAMS((double, int *));
extern float gammaf_r _PARAMS((float, int *));
@@ -536,6 +543,9 @@ extern float jnf _PARAMS((int, float));
#if __GNU_VISIBLE
extern void sincos _PARAMS((double, double *, double *));
extern void sincosf _PARAMS((float, float *, float *));
#ifdef __CYGWIN__
extern void sincosl _PARAMS((long double, long double *, long double *));
#endif /* __CYGWIN__ */
# ifndef exp10
extern double exp10 _PARAMS((double));
# endif
@@ -548,6 +558,14 @@ extern float exp10f _PARAMS((float));
# ifndef pow10f
extern float pow10f _PARAMS((float));
# endif
#ifdef __CYGWIN__
# ifndef exp10l
extern float exp10l _PARAMS((float));
# endif
# ifndef pow10l
extern float pow10l _PARAMS((float));
# endif
#endif /* __CYGWIN__ */
#endif /* __GNU_VISIBLE */
#if __MISC_VISIBLE || __XSI_VISIBLE
+4 -3
View File
@@ -79,7 +79,7 @@
__tg_type3(__e1, __e2, __e3, long double _Complex) || \
__tg_type3(__e1, __e2, __e3, __typeof__(_Complex_I)))
#ifdef _LDBL_EQ_DBL
#if defined (_LDBL_EQ_DBL) || defined (__CYGWIN__)
#define __tg_impl_simple(x, y, z, fn, fnf, fnl, ...) \
__builtin_choose_expr(__tg_type_corr(x, y, z, long double), \
fnl(__VA_ARGS__), __builtin_choose_expr( \
@@ -161,9 +161,10 @@
#define lround(__x) __tg_simple(__x, lround)
#define nearbyint(__x) __tg_simple(__x, nearbyint)
#define nextafter(__x, __y) __tg_simple2(__x, __y, nextafter)
/* not yet implemented even for _LDBL_EQ_DBL platforms
/* not yet implemented even for _LDBL_EQ_DBL platforms */
#ifdef __CYGWIN__
#define nexttoward(__x, __y) __tg_simplev(__x, nexttoward, __x, __y)
*/
#endif
#define remainder(__x, __y) __tg_simple2(__x, __y, remainder)
#define remquo(__x, __y, __z) __tg_impl_simple(__x, __x, __y, remquo, remquof, \
remquol, __x, __y, __z)
+98 -2
View File
@@ -29,7 +29,7 @@ export CCWRAP_HEADERS:=. ${srcdir}
export CCWRAP_SYSTEM_HEADERS:=@cygwin_headers@ @newlib_headers@
export CCWRAP_DIRAFTER_HEADERS:=@windows_headers@
VPATH+=$(srcdir)/regex $(srcdir)/lib $(srcdir)/libc
VPATH+=$(srcdir)/regex $(srcdir)/lib $(srcdir)/libc $(srcdir)/math
target_cpu:=@target_cpu@
target_alias:=@target_alias@
@@ -153,6 +153,101 @@ DLL_IMPORTS:=${shell $(CC) -print-file-name=w32api/libkernel32.a} ${shell $(CC)
MT_SAFE_OBJECTS:=
#
MATH_OFILES:= \
acoshl.o \
acosl.o \
asinhl.o \
asinl.o \
atan2l.o \
atanhl.o \
atanl.o \
cabsl.o \
cacosl.o \
cargl.o \
casinl.o \
catanl.o \
cbrtl.o \
ccosl.o \
ceill.o \
cephes_emath.o \
cexpl.o \
cimagl.o \
clog10l.o \
clogl.o \
conjl.o \
copysignl.o \
coshl.o \
cosl.o \
cosl_internal.o \
cossin.o \
cpowl.o \
cprojl.o \
creall.o \
csinl.o \
csqrtl.o \
ctanl.o \
erfl.o \
exp10l.o \
exp2l.o \
expl.o \
expm1l.o \
fabsl.o \
fdiml.o \
finite.o \
floorl.o \
fmal.o \
fmaxl.o \
fminl.o \
fmodl.o \
frexpl.o \
ilogbl.o \
internal_logl.o \
isinf.o \
isnan.o \
ldexpl.o \
lgammal.o \
llrint.o \
llrintf.o \
llrintl.o \
llroundl.o \
log10l.o \
log1pl.o \
log2l.o \
logbl.o \
logl.o \
lrint.o \
lrintf.o \
lrintl.o \
lroundl.o \
modfl.o \
nearbyint.o \
nearbyintf.o \
nearbyintl.o \
nextafterl.o \
nexttoward.o \
nexttowardf.o \
pow10l.o \
powil.o \
powl.o \
remainder.o \
remainderf.o \
remainderl.o \
remquol.o \
rint.o \
rintf.o \
rintl.o \
roundl.o \
scalbl.o \
scalbnl.o \
sinhl.o \
sinl.o \
sinl_internal.o \
sqrtl.o \
tanhl.o \
tanl.o \
tgammal.o \
truncl.o
DLL_OFILES:= \
advapi32.o \
arc4random_stir.o \
@@ -305,6 +400,7 @@ DLL_OFILES:= \
xsique.o \
$(EXTRA_OFILES) \
$(MALLOC_OFILES) \
$(MATH_OFILES) \
$(MT_SAFE_OBJECTS)
EXCLUDE_STATIC_OFILES:=$(addprefix --exclude=,\
@@ -626,7 +722,7 @@ $(srcdir)/devices.cc: gendevices devices.in devices.h
${CURDIR}/libc.a: ${LIB_NAME} ${CURDIR}/libm.a libpthread.a libutil.a
${speclib} -v ${@F}
${CURDIR}/libm.a: ${LIB_NAME} $(LIBM)
${CURDIR}/libm.a: ${LIB_NAME} $(LIBM) $(MATH_OFILES)
${speclib} ${@F}
libpthread.a: ${LIB_NAME} pthread.o thread.o
+96 -6
View File
@@ -64,10 +64,10 @@ __getpagesize = getpagesize SIGFE
__getreent NOSIGFE
__gnu_basename NOSIGFE
__infinity NOSIGFE
__isinfd NOSIGFE
__isinff NOSIGFE
__isnand NOSIGFE
__isnanf NOSIGFE
__isinfd = isinf NOSIGFE
__isinff = isinff NOSIGFE
__isnand = isnan NOSIGFE
__isnanf = isnanf NOSIGFE
__locale_mb_cur_max NOSIGFE
__main NOSIGFE
__mempcpy = mempcpy NOSIGFE
@@ -169,6 +169,8 @@ acos NOSIGFE
acosf NOSIGFE
acosh NOSIGFE
acoshf NOSIGFE
acoshl NOSIGFE
acosl NOSIGFE
alarm SIGFE
aligned_alloc SIGFE
alphasort NOSIGFE
@@ -195,14 +197,19 @@ asin NOSIGFE
asinf NOSIGFE
asinh NOSIGFE
asinhf NOSIGFE
asinhl NOSIGFE
asinl NOSIGFE
asnprintf SIGFE
asprintf SIGFE
atan NOSIGFE
atan2 NOSIGFE
atan2f NOSIGFE
atan2l NOSIGFE
atanf NOSIGFE
atanh NOSIGFE
atanhf NOSIGFE
atanhl NOSIGFE
atanl NOSIGFE
atexit = cygwin_atexit SIGFE
atof SIGFE
atoff SIGFE
@@ -226,28 +233,40 @@ cacos NOSIGFE
cacosf NOSIGFE
cacosh NOSIGFE
cacoshf NOSIGFE
cacoshl NOSIGFE
cacosl NOSIGFE
calloc SIGFE
canonicalize_file_name SIGFE
carg NOSIGFE
cargf NOSIGFE
cargl NOSIGFE
casin NOSIGFE
casinf NOSIGFE
casinh NOSIGFE
casinhf NOSIGFE
casinhl NOSIGFE
casinl NOSIGFE
catan NOSIGFE
catanf NOSIGFE
catanh NOSIGFE
catanhf NOSIGFE
catanhl NOSIGFE
catanl NOSIGFE
cbrt NOSIGFE
cbrtf NOSIGFE
cbrtl NOSIGFE
ccos NOSIGFE
ccosf NOSIGFE
ccosh NOSIGFE
ccoshf NOSIGFE
ccoshl NOSIGFE
ccosl NOSIGFE
ceil NOSIGFE
ceilf NOSIGFE
ceill NOSIGFE
cexp NOSIGFE
cexpf NOSIGFE
cexpl NOSIGFE
cfgetispeed NOSIGFE
cfgetospeed NOSIGFE
cfmakeraw NOSIGFE
@@ -274,24 +293,32 @@ clock_settime SIGFE
clog NOSIGFE
clog10 NOSIGFE
clog10f NOSIGFE
clog10l NOSIGFE
clogf NOSIGFE
clogl NOSIGFE
close SIGFE
closedir SIGFE
closelog SIGFE
confstr NOSIGFE
conj NOSIGFE
conjf NOSIGFE
conjl NOSIGFE
connect = cygwin_connect SIGFE
copysign NOSIGFE
copysignf NOSIGFE
copysignl NOSIGFE
cos NOSIGFE
cosf NOSIGFE
cosh NOSIGFE
coshf NOSIGFE
coshl NOSIGFE
cosl NOSIGFE
cpow NOSIGFE
cpowf NOSIGFE
cpowl NOSIGFE
cproj NOSIGFE
cprojf NOSIGFE
cprojl NOSIGFE
creal NOSIGFE
crealf NOSIGFE
creall NOSIGFE
@@ -300,12 +327,17 @@ csin NOSIGFE
csinf NOSIGFE
csinh NOSIGFE
csinhf NOSIGFE
csinhl NOSIGFE
csinl NOSIGFE
csqrt NOSIGFE
csqrtf NOSIGFE
csqrtl NOSIGFE
ctan NOSIGFE
ctanf NOSIGFE
ctanh NOSIGFE
ctanhf NOSIGFE
ctanhl NOSIGFE
ctanl NOSIGFE
ctermid SIGFE
ctime SIGFE
ctime_r SIGFE
@@ -342,8 +374,9 @@ dn_expand = __dn_expand SIGFE
dn_skipname = __dn_skipname SIGFE
dprintf SIGFE
drand48 NOSIGFE
drem NOSIGFE
dremf NOSIGFE
drem = remainder NOSIGFE
dremf= remainderf NOSIGFE
dreml= remainderl NOSIGFE
dup SIGFE
dup2 SIGFE
dup3 SIGFE
@@ -370,7 +403,9 @@ erand48 NOSIGFE
erf NOSIGFE
erfc NOSIGFE
erfcf NOSIGFE
erfcl NOSIGFE
erff NOSIGFE
erfl NOSIGFE
err SIGFE
error SIGFE
error_at_line SIGFE
@@ -387,13 +422,18 @@ exit = cygwin_exit SIGFE
exp NOSIGFE
exp10 NOSIGFE
exp10f NOSIGFE
exp10l NOSIGFE
exp2 NOSIGFE
exp2f NOSIGFE
exp2l NOSIGFE
expf NOSIGFE
expl NOSIGFE
expm1 NOSIGFE
expm1f NOSIGFE
expm1l NOSIGFE
fabs NOSIGFE
fabsf NOSIGFE
fabsl NOSIGFE
faccessat SIGFE
facl SIGFE
fchdir SIGFE
@@ -410,6 +450,7 @@ fcvtf SIGFE
fdatasync SIGFE
fdim NOSIGFE
fdimf NOSIGFE
fdiml NOSIGFE
fdopen SIGFE
fdopendir SIGFE
feclearexcept NOSIGFE
@@ -459,15 +500,20 @@ flock SIGFE
flockfile SIGFE
floor NOSIGFE
floorf NOSIGFE
floorl NOSIGFE
fma NOSIGFE
fmaf NOSIGFE
fmal NOSIGFE
fmax NOSIGFE
fmaxf NOSIGFE
fmaxl NOSIGFE
fmemopen SIGFE
fmin NOSIGFE
fminf NOSIGFE
fminl NOSIGFE
fmod NOSIGFE
fmodf NOSIGFE
fmodl NOSIGFE
fnmatch NOSIGFE
fopen SIGFE
fopencookie SIGFE
@@ -493,6 +539,7 @@ fremovexattr SIGFE
freopen SIGFE
frexp NOSIGFE
frexpf NOSIGFE
frexpl NOSIGFE
fscanf SIGFE
fseek SIGFE
fseeko SIGFE
@@ -650,6 +697,7 @@ if_nameindex SIGFE
if_nametoindex SIGFE
ilogb NOSIGFE
ilogbf NOSIGFE
ilogbl NOSIGFE
imaxabs = llabs NOSIGFE
imaxdiv = lldiv NOSIGFE
index NOSIGFE
@@ -680,9 +728,11 @@ isdigit NOSIGFE
isgraph NOSIGFE
isinf NOSIGFE
isinff NOSIGFE
isinfl NOSIGFE
islower NOSIGFE
isnan NOSIGFE
isnanf NOSIGFE
isnanl NOSIGFE
isprint NOSIGFE
ispunct NOSIGFE
issetugid NOSIGFE
@@ -717,12 +767,15 @@ lchown SIGFE
lcong48 NOSIGFE
ldexp NOSIGFE
ldexpf NOSIGFE
ldexpl NOSIGFE
ldiv NOSIGFE
lfind NOSIGFE
lgamma NOSIGFE
lgamma_r NOSIGFE
lgammaf NOSIGFE
lgammaf_r NOSIGFE
lgammal NOSIGFE
lgammal_r NOSIGFE
lgetxattr SIGFE
link SIGFE
linkat SIGFE
@@ -731,8 +784,12 @@ listxattr SIGFE
llabs NOSIGFE
lldiv NOSIGFE
llistxattr SIGFE
llrint NOSIGFE
llrintf NOSIGFE
llrintl NOSIGFE
llround NOSIGFE
llroundf NOSIGFE
llroundl NOSIGFE
localeconv NOSIGFE
localtime SIGFE
localtime_r SIGFE
@@ -740,13 +797,18 @@ lockf SIGFE
log NOSIGFE
log10 NOSIGFE
log10f NOSIGFE
log10l NOSIGFE
log1p NOSIGFE
log1pf NOSIGFE
log1pl NOSIGFE
log2 NOSIGFE
log2f NOSIGFE
log2l NOSIGFE
logb NOSIGFE
logbf NOSIGFE
logbl NOSIGFE
logf NOSIGFE
logl NOSIGFE
login SIGFE
login_tty SIGFE
logout SIGFE
@@ -754,8 +816,12 @@ logwtmp SIGFE
longjmp NOSIGFE
lrand48 NOSIGFE
lremovexattr SIGFE
lrint NOSIGFE
lrintf NOSIGFE
lrintl NOSIGFE
lround NOSIGFE
lroundf NOSIGFE
lroundl NOSIGFE
lsearch NOSIGFE
lseek SIGFE
lsetxattr SIGFE
@@ -805,6 +871,7 @@ mlock SIGFE
mmap SIGFE
modf NOSIGFE
modff NOSIGFE
modfl NOSIGFE
mount SIGFE
mprotect SIGFE
mq_close SIGFE
@@ -830,8 +897,13 @@ nanf NOSIGFE
nanosleep SIGFE
nearbyint NOSIGFE
nearbyintf NOSIGFE
nearbyintl NOSIGFE
nextafter NOSIGFE
nextafterf NOSIGFE
nextafterl NOSIGFE
nexttoward NOSIGFE
nexttowardf NOSIGFE
nexttowardl NOSIGFE
nftw SIGFE
nice SIGFE
nl_langinfo SIGFE
@@ -883,7 +955,9 @@ posix_spawn_file_actions_addopen SIGFE
pow NOSIGFE
pow10 NOSIGFE
pow10f NOSIGFE
pow10l NOSIGFE
powf NOSIGFE
powl NOSIGFE
ppoll SIGFE
pread SIGFE
printf SIGFE
@@ -1037,11 +1111,13 @@ regexec SIGFE
regfree SIGFE
remainder NOSIGFE
remainderf NOSIGFE
remainderl NOSIGFE
remove SIGFE
removexattr SIGFE
remque NOSIGFE
remquo NOSIGFE
remquof NOSIGFE
remquol NOSIGFE
rename SIGFE
renameat SIGFE
res_close = __res_close SIGFE
@@ -1063,9 +1139,13 @@ rewind SIGFE
rewinddir SIGFE
rexec = cygwin_rexec SIGFE
rindex NOSIGFE
rint NOSIGFE
rintf NOSIGFE
rintl NOSIGFE
rmdir SIGFE
round NOSIGFE
roundf NOSIGFE
roundl NOSIGFE
rpmatch SIGFE
rresvport = cygwin_rresvport SIGFE
rresvport_af = cygwin_rresvport_af SIGFE
@@ -1073,10 +1153,13 @@ ruserok SIGFE
sbrk SIGFE
scalb NOSIGFE
scalbf NOSIGFE
scalbl NOSIGFE
scalbln NOSIGFE
scalblnf NOSIGFE
scalblnl NOSIGFE
scalbn NOSIGFE
scalbnf NOSIGFE
scalbnl NOSIGFE
scandir SIGFE
scandirat SIGFE
scanf SIGFE
@@ -1180,9 +1263,12 @@ sigwaitinfo SIGFE
sin NOSIGFE
sincos NOSIGFE
sincosf NOSIGFE
sincosl NOSIGFE
sinf NOSIGFE
sinh NOSIGFE
sinhf NOSIGFE
sinhl NOSIGFE
sinl NOSIGFE
siprintf SIGFE
sleep SIGFE
snprintf SIGFE
@@ -1271,6 +1357,8 @@ tan NOSIGFE
tanf NOSIGFE
tanh NOSIGFE
tanhf NOSIGFE
tanhl NOSIGFE
tanl NOSIGFE
tcdrain SIGFE
tcflow SIGFE
tcflush SIGFE
@@ -1287,6 +1375,7 @@ tempnam SIGFE
tfind NOSIGFE
tgamma NOSIGFE
tgammaf NOSIGFE
tgammal NOSIGFE
time SIGFE
timegm NOSIGFE
timelocal SIGFE
@@ -1307,6 +1396,7 @@ towupper NOSIGFE
trunc NOSIGFE
truncate SIGFE
truncf NOSIGFE
truncl NOSIGFE
tsearch SIGFE
ttyname SIGFE
ttyname_r SIGFE
+9 -18
View File
@@ -164,21 +164,21 @@ _f_frexp NOSIGFE
_f_frexpf NOSIGFE
_f_ldexp NOSIGFE
_f_ldexpf NOSIGFE
_f_llrint NOSIGFE
_f_llrintf NOSIGFE
_f_llrintl NOSIGFE
_f_llrint = llrint NOSIGFE
_f_llrintf = llrintf NOSIGFE
_f_llrintl = llrintl NOSIGFE
_f_log NOSIGFE
_f_log10 NOSIGFE
_f_log10f NOSIGFE
_f_logf NOSIGFE
_f_lrint NOSIGFE
_f_lrintf NOSIGFE
_f_lrintl NOSIGFE
_f_lrint = lrint NOSIGFE
_f_lrintf = lrintf NOSIGFE
_f_lrintl = lrintl NOSIGFE
_f_pow NOSIGFE
_f_powf NOSIGFE
_f_rint NOSIGFE
_f_rintf NOSIGFE
_f_rintl NOSIGFE
_f_rint = rint NOSIGFE
_f_rintf = rintf NOSIGFE
_f_rintl = rintl NOSIGFE
_f_tan NOSIGFE
_f_tanf NOSIGFE
_fabs = fabs NOSIGFE
@@ -622,19 +622,10 @@ fscanf_r = _fscanf_r SIGFE
get_osfhandle = _get_osfhandle SIGFE
getpwduid NOSIGFE
lacl SIGFE
llrint = _f_llrint NOSIGFE
llrintf = _f_llrintf NOSIGFE
llrintl = _f_llrintl NOSIGFE
lrint = _f_lrint NOSIGFE
lrintf = _f_lrintf NOSIGFE
lrintl = _f_lrintl NOSIGFE
posix_regcomp = regcomp SIGFE
posix_regerror = regerror SIGFE
posix_regexec = regexec SIGFE
posix_regfree = regfree SIGFE
rint = _f_rint NOSIGFE
rintf = _f_rintf NOSIGFE
rintl = _f_rintl NOSIGFE
scanf_r = _scanf_r SIGFE
setmode = cygwin_setmode SIGFE
setregid32 SIGFE
+12 -1
View File
@@ -478,13 +478,24 @@ details. */
294: Export clog10, clog10f.
295: Export POSIX ACL functions.
296: Export __getpagesize.
297: Export missing math functions, acoshl, acosl, asinhl, asinl, atan2l,
atanhl, atanl, cacoshl, cacosl, cargl, casinhl, casinl, catanhl,
catanl, ccoshl, ccosl, ceill, cexpl, clog10l, clogl, conjl,
copysignl, coshl, cosl, cpowl, cprojl, csinhl, csinl, csqrtl, ctanhl,
ctanl, dreml, erfcl, erfl, exp10l, exp2l, expl, expm1l, fabsl, fdiml,
floorl, fmal, fmaxl, fminl, fmodl, frexpl, ilogbl, isinfl, isnanl,
ldexpl, lgammal, lgammal_r, llroundl, log10l, log1pl, log2l, logbl,
logl, lroundl, modfl, nearbyintl, nextafterl, nexttoward,
nexttowardf, nexttowardl, pow10l, powl, remainderl, remquol, roundl,
scalbl, scalblnl, scalbnl, sincosl, sinhl, sinl, tanhl, tanl,
tgammal, truncl.
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull,
sigaltstack, sethostname. */
#define CYGWIN_VERSION_API_MAJOR 0
#define CYGWIN_VERSION_API_MINOR 296
#define CYGWIN_VERSION_API_MINOR 297
/* There is also a compatibity version number associated with the
shared memory regions. It is incremented when incompatible
+43
View File
@@ -0,0 +1,43 @@
#ifndef _LOCAL_MATH_H_
#define _LOCAL_MATH_H_
/* This header is required to define the types used by some of the
mingw-w64 based files in the math subdir. */
typedef union __mingw_dbl_type_t {
double x;
unsigned long long val;
struct {
unsigned int low, high;
} lh;
} __mingw_dbl_type_t;
typedef union __mingw_flt_type_t {
float x;
unsigned int val;
} __mingw_flt_type_t;
typedef union __mingw_ldbl_type_t
{
long double x;
struct {
unsigned int low, high;
int sign_exponent : 16;
int res1 : 16;
int res0 : 32;
} lh;
} __mingw_ldbl_type_t;
typedef union __mingw_fp_types_t
{
long double *ld;
double *d;
float *f;
__mingw_ldbl_type_t *ldt;
__mingw_dbl_type_t *dt;
__mingw_flt_type_t *ft;
} __mingw_fp_types_t;
#include_next <math.h>
#endif /* _LOCAL_MATH_H_ */
+9
View File
@@ -0,0 +1,9 @@
/**
* DISCLAIMER
* This file has no copyright assigned and is placed in the Public Domain.
*
* Its code is distributed in the hope that it will be useful but WITHOUT
* ANY WARRANTY. ALL WARRANTIES, EXPRESSED OR IMPLIED ARE HEREBY DISCLAIMED.
* This includes but is not limited to warranties of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*/
+70
View File
@@ -0,0 +1,70 @@
/*
This Software is provided under the Zope Public License (ZPL) Version 2.1.
Copyright (c) 2009, 2010 by the mingw-w64 project
See the AUTHORS file for the list of contributors to the mingw-w64 project.
This license has been certified as open source. It has also been designated
as GPL compatible by the Free Software Foundation (FSF).
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions in source code must retain the accompanying copyright
notice, this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the accompanying
copyright notice, this list of conditions, and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
3. Names of the copyright holders must not be used to endorse or promote
products derived from this software without prior written permission
from the copyright holders.
4. The right to distribute this software or to use it for any purpose does
not give you the right to use Servicemarks (sm) or Trademarks (tm) of
the copyright holders. Use of them is covered by separate agreement
with the copyright holders.
5. If any files are modified, you must cause the modified files to carry
prominent notices stating that you changed the files and the date of
any change.
Disclaimer
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "complex_internal.h"
#include <errno.h>
#include "fastmath.h"
__FLT_TYPE
__FLT_ABI(acosh) (__FLT_TYPE x)
{
int x_class = fpclassify (x);
if (x_class == FP_NAN || x < __FLT_CST(1.0))
{
__FLT_RPT_DOMAIN ("acosh", x, 0.0, __FLT_NAN);
return __FLT_NAN;
}
else if (x_class == FP_INFINITE)
{
__FLT_RPT_DOMAIN ("acosh", x, 0.0, __FLT_NAN);
return __FLT_NAN;
}
if (x > __FLT_CST(0x1p32))
return __FLT_ABI (__fast_log) (x) + 6.9314718055994530941723E-1L;
return __FLT_ABI (__fast_log) (x +
__FLT_ABI (__fast_sqrt) ((x + __FLT_CST(1.0)) * (x - __FLT_CST(1.0))));
}
+46
View File
@@ -0,0 +1,46 @@
/*
This Software is provided under the Zope Public License (ZPL) Version 2.1.
Copyright (c) 2009, 2010 by the mingw-w64 project
See the AUTHORS file for the list of contributors to the mingw-w64 project.
This license has been certified as open source. It has also been designated
as GPL compatible by the Free Software Foundation (FSF).
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions in source code must retain the accompanying copyright
notice, this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the accompanying
copyright notice, this list of conditions, and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
3. Names of the copyright holders must not be used to endorse or promote
products derived from this software without prior written permission
from the copyright holders.
4. The right to distribute this software or to use it for any purpose does
not give you the right to use Servicemarks (sm) or Trademarks (tm) of
the copyright holders. Use of them is covered by separate agreement
with the copyright holders.
5. If any files are modified, you must cause the modified files to carry
prominent notices stating that you changed the files and the date of
any change.
Disclaimer
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#define _NEW_COMPLEX_LDOUBLE 1
#include "acosh.def.h"
+22
View File
@@ -0,0 +1,22 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
long double acosl (long double x);
long double acosl (long double x)
{
long double res = 0.0L;
/* acosl = atanl (sqrtl(1 - x^2) / x) */
asm ( "fld %%st\n\t"
"fmul %%st(0)\n\t" /* x^2 */
"fld1\n\t"
"fsubp\n\t" /* 1 - x^2 */
"fsqrt\n\t" /* sqrtl (1 - x^2) */
"fxch %%st(1)\n\t"
"fpatan"
: "=t" (res) : "0" (x) : "st(1)");
return res;
}
+33
View File
@@ -0,0 +1,33 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include <math.h>
#include <errno.h>
#include "fastmath.h"
/* asinh(x) = copysign(log(fabs(x) + sqrt(x * x + 1.0)), x) */
long double asinhl(long double x)
{
long double z;
if (!isfinite (x))
return x;
z = fabsl (x);
/* Avoid setting FPU underflow exception flag in x * x. */
#if 0
if ( z < 0x1p-32)
return x;
#endif
/* Use log1p to avoid cancellation with small x. Put
x * x in denom, so overflow is harmless.
asinh(x) = log1p (x + sqrt (x * x + 1.0) - 1.0)
= log1p (x + x * x / (sqrt (x * x + 1.0) + 1.0)) */
z = __fast_log1pl (z + z * z / (__fast_sqrtl (z * z + 1.0L) + 1.0L));
return ( x > 0.0 ? z : -z);
}
+27
View File
@@ -0,0 +1,27 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
/*
* Written by J.T. Conklin <jtc@netbsd.org>.
* Public domain.
* Adapted for long double type by Danny Smith <dannysmith@users.sourceforge.net>.
*/
/* asin = atan (x / sqrt(1 - x^2)) */
long double asinl (long double x);
long double asinl (long double x)
{
long double res = 0.0L;
asm ( "fld %%st\n\t"
"fmul %%st(0)\n\t" /* x^2 */
"fld1\n\t"
"fsubp\n\t" /* 1 - x^2 */
"fsqrt\n\t" /* sqrt (1 - x^2) */
"fpatan"
: "=t" (res) : "0" (x) : "st(1)");
return res;
}
+14
View File
@@ -0,0 +1,14 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
long double atan2l (long double y, long double x);
long double
atan2l (long double y, long double x)
{
long double res = 0.0L;
asm ("fpatan" : "=t" (res) : "u" (y), "0" (x) : "st(1)");
return res;
}
+34
View File
@@ -0,0 +1,34 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
#include <math.h>
#include <errno.h>
#include "fastmath.h"
/* atanh (x) = 0.5 * log ((1.0 + x)/(1.0 - x)) */
long double atanhl (long double x)
{
long double z;
if (isnan (x))
return x;
z = fabsl (x);
if (z == 1.0L)
{
errno = ERANGE;
return (x > 0 ? INFINITY : -INFINITY);
}
if ( z > 1.0L)
{
errno = EDOM;
return nanl("");
}
/* Rearrange formula to avoid precision loss for small x.
atanh(x) = 0.5 * log ((1.0 + x)/(1.0 - x))
= 0.5 * log1p ((1.0 + x)/(1.0 - x) - 1.0)
= 0.5 * log1p ((1.0 + x - 1.0 + x) /(1.0 - x))
= 0.5 * log1p ((2.0 * x ) / (1.0 - x)) */
z = 0.5L * __fast_log1pl ((z + z) / (1.0L - z));
return x >= 0 ? z : -z;
}
+17
View File
@@ -0,0 +1,17 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/
long double atanl (long double x);
long double
atanl (long double x)
{
long double res = 0.0L;
asm ("fld1\n\t"
"fpatan"
: "=t" (res) : "0" (x));
return res;
}
+49
View File
@@ -0,0 +1,49 @@
/*
This Software is provided under the Zope Public License (ZPL) Version 2.1.
Copyright (c) 2009, 2010 by the mingw-w64 project
See the AUTHORS file for the list of contributors to the mingw-w64 project.
This license has been certified as open source. It has also been designated
as GPL compatible by the Free Software Foundation (FSF).
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions in source code must retain the accompanying copyright
notice, this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the accompanying
copyright notice, this list of conditions, and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
3. Names of the copyright holders must not be used to endorse or promote
products derived from this software without prior written permission
from the copyright holders.
4. The right to distribute this software or to use it for any purpose does
not give you the right to use Servicemarks (sm) or Trademarks (tm) of
the copyright holders. Use of them is covered by separate agreement
with the copyright holders.
5. If any files are modified, you must cause the modified files to carry
prominent notices stating that you changed the files and the date of
any change.
Disclaimer
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
__FLT_TYPE __cdecl
__FLT_ABI(cabs) (__FLT_TYPE __complex__ z)
{
return __FLT_ABI(hypot) (__real__ z, __imag__ z);
}
+48
View File
@@ -0,0 +1,48 @@
/*
This Software is provided under the Zope Public License (ZPL) Version 2.1.
Copyright (c) 2009, 2010 by the mingw-w64 project
See the AUTHORS file for the list of contributors to the mingw-w64 project.
This license has been certified as open source. It has also been designated
as GPL compatible by the Free Software Foundation (FSF).
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions in source code must retain the accompanying copyright
notice, this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the accompanying
copyright notice, this list of conditions, and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
3. Names of the copyright holders must not be used to endorse or promote
products derived from this software without prior written permission
from the copyright holders.
4. The right to distribute this software or to use it for any purpose does
not give you the right to use Servicemarks (sm) or Trademarks (tm) of
the copyright holders. Use of them is covered by separate agreement
with the copyright holders.
5. If any files are modified, you must cause the modified files to carry
prominent notices stating that you changed the files and the date of
any change.
Disclaimer
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/* long double version of the functions. */
#define _NEW_COMPLEX_LDOUBLE 1
#include "complex_internal.h"
#include "cabs.def.h"
+57
View File
@@ -0,0 +1,57 @@
/*
This Software is provided under the Zope Public License (ZPL) Version 2.1.
Copyright (c) 2009, 2010 by the mingw-w64 project
See the AUTHORS file for the list of contributors to the mingw-w64 project.
This license has been certified as open source. It has also been designated
as GPL compatible by the Free Software Foundation (FSF).
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions in source code must retain the accompanying copyright
notice, this list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the accompanying
copyright notice, this list of conditions, and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
3. Names of the copyright holders must not be used to endorse or promote
products derived from this software without prior written permission
from the copyright holders.
4. The right to distribute this software or to use it for any purpose does
not give you the right to use Servicemarks (sm) or Trademarks (tm) of
the copyright holders. Use of them is covered by separate agreement
with the copyright holders.
5. If any files are modified, you must cause the modified files to carry
prominent notices stating that you changed the files and the date of
any change.
Disclaimer
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
__FLT_TYPE __complex__ __cdecl
__FLT_ABI(cacos) (__FLT_TYPE __complex__ z)
{
__complex__ __FLT_TYPE x;
__complex__ __FLT_TYPE ret;
x = __FLT_ABI(casin) (z);
__real__ ret = (__FLT_TYPE) __FLT_PI_2 - __real__ x;
__imag__ ret = -__imag__ x;
return ret;
}

Some files were not shown because too many files have changed in this diff Show More