mirror of https://gitlab.com/rnger/amath
Fix build on compilers with broken endian detection
This commit is contained in:
parent
fb19bb560d
commit
9c70be649b
|
@ -52,20 +52,6 @@ double __kernel_sin(double x, double y, int iy);
|
||||||
double __kernel_tan(double x, double y, int iy);
|
double __kernel_tan(double x, double y, int iy);
|
||||||
int __kernel_rem_pio2(double* x, double* y, int e0, int nx, int prec, const int* ipio2);
|
int __kernel_rem_pio2(double* x, double* y, int e0, int nx, int prec, const int* ipio2);
|
||||||
|
|
||||||
/* Detect LE CPUs using compiler macro */
|
|
||||||
#if !defined(__IEEE_LITTLE_ENDIAN) && !defined(__IEEE_BIG_ENDIAN)
|
|
||||||
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
|
|
||||||
#define __IEEE_LITTLE_ENDIAN
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Detect BE CPUs using compiler macro */
|
|
||||||
#if !defined(__IEEE_LITTLE_ENDIAN) && !defined(__IEEE_BIG_ENDIAN)
|
|
||||||
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
|
|
||||||
#define __IEEE_BIG_ENDIAN
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Detect ARM CPUs */
|
/* Detect ARM CPUs */
|
||||||
#if !defined(__IEEE_LITTLE_ENDIAN) && !defined(__IEEE_BIG_ENDIAN)
|
#if !defined(__IEEE_LITTLE_ENDIAN) && !defined(__IEEE_BIG_ENDIAN)
|
||||||
#if defined(__arm__) || defined(__ARM_ARCH_2__) || \
|
#if defined(__arm__) || defined(__ARM_ARCH_2__) || \
|
||||||
|
|
Loading…
Reference in New Issue