diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-11-15 08:37:58 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-11-15 08:37:58 -0500 |
commit | 8bb181622222f2ee3462c8b021bcae4fcdbbd37a (patch) | |
tree | 166a1be834c8cd5a4c2521d41d7ee506bd8c8e51 /src/internal | |
parent | 22781b4d8ecaf97ac52d2a501a2e7d3bc1920ce0 (diff) | |
parent | 68847ecd3a644d3ffd9be58603be1a3fa437dff0 (diff) | |
download | musl-8bb181622222f2ee3462c8b021bcae4fcdbbd37a.tar.gz musl-8bb181622222f2ee3462c8b021bcae4fcdbbd37a.tar.xz musl-8bb181622222f2ee3462c8b021bcae4fcdbbd37a.zip |
Merge remote-tracking branch 'nsz/math'
Diffstat (limited to 'src/internal')
-rw-r--r-- | src/internal/libm.h | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/src/internal/libm.h b/src/internal/libm.h index a71c4c05..46c4b564 100644 --- a/src/internal/libm.h +++ b/src/internal/libm.h @@ -157,38 +157,23 @@ long double __tanl(long double, long double, int); long double __polevll(long double, const long double *, int); long double __p1evll(long double, const long double *, int); -// FIXME: not needed when -fexcess-precision=standard is supported (>=gcc4.5) -/* - * Attempt to get strict C99 semantics for assignment with non-C99 compilers. - */ -#if 1 +#if 0 +/* Attempt to get strict C99 semantics for assignment with non-C99 compilers. */ #define STRICT_ASSIGN(type, lval, rval) do { \ volatile type __v = (rval); \ (lval) = __v; \ } while (0) #else +/* Should work with -fexcess-precision=standard (>=gcc-4.5) or -ffloat-store */ #define STRICT_ASSIGN(type, lval, rval) ((lval) = (type)(rval)) #endif - /* complex */ -union dcomplex { - double complex z; - double a[2]; -}; -union fcomplex { - float complex z; - float a[2]; -}; -union lcomplex { - long double complex z; - long double a[2]; -}; - -/* x + y*I is not supported properly by gcc */ -#define cpack(x,y) ((union dcomplex){.a={(x),(y)}}.z) -#define cpackf(x,y) ((union fcomplex){.a={(x),(y)}}.z) -#define cpackl(x,y) ((union lcomplex){.a={(x),(y)}}.z) +#ifndef CMPLX +#define CMPLX(x, y) __CMPLX(x, y, double) +#define CMPLXF(x, y) __CMPLX(x, y, float) +#define CMPLXL(x, y) __CMPLX(x, y, long double) +#endif #endif |