From f24b1bfe5560ce77603a49bb797257001ed8ce26 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Mon, 14 Jan 2019 12:53:14 -0700 Subject: [PATCH] Fix compilation of gcc when using openlibm as system libm (#190) For some sad reason, gcc poisons LONG_DOUBLE in sreal.c. The identifier has been changed to OLM_LONG_DOUBLE. --- include/openlibm_math.h | 2 +- src/s_fpclassify.c | 2 +- src/s_isfinite.c | 2 +- src/s_isinf.c | 2 +- src/s_isnan.c | 2 +- src/s_isnormal.c | 2 +- src/s_nexttowardf.c | 2 +- src/s_signbit.c | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/openlibm_math.h b/include/openlibm_math.h index e17e6ad..732ad00 100644 --- a/include/openlibm_math.h +++ b/include/openlibm_math.h @@ -26,7 +26,7 @@ #endif #ifndef __arm__ -#define LONG_DOUBLE +#define OLM_LONG_DOUBLE #endif #ifndef __pure2 diff --git a/src/s_fpclassify.c b/src/s_fpclassify.c index 558fb55..2b552e1 100644 --- a/src/s_fpclassify.c +++ b/src/s_fpclassify.c @@ -72,7 +72,7 @@ __fpclassifyf(float f) } } -#ifdef LONG_DOUBLE +#ifdef OLM_LONG_DOUBLE OLM_DLLEXPORT int __fpclassifyl(long double e) { diff --git a/src/s_isfinite.c b/src/s_isfinite.c index 504c2b8..7c11876 100644 --- a/src/s_isfinite.c +++ b/src/s_isfinite.c @@ -49,7 +49,7 @@ __isfinitef(float f) return (u.bits.exp != 255); } -#ifdef LONG_DOUBLE +#ifdef OLM_LONG_DOUBLE OLM_DLLEXPORT int __isfinitel(long double e) { diff --git a/src/s_isinf.c b/src/s_isinf.c index c013c91..a9bd858 100644 --- a/src/s_isinf.c +++ b/src/s_isinf.c @@ -51,7 +51,7 @@ __isinff(float f) return (u.bits.exp == 255 && u.bits.man == 0); } -#ifdef LONG_DOUBLE +#ifdef OLM_LONG_DOUBLE OLM_DLLEXPORT int __isinfl(long double e) { diff --git a/src/s_isnan.c b/src/s_isnan.c index b68aa5b..e66bb9a 100644 --- a/src/s_isnan.c +++ b/src/s_isnan.c @@ -52,7 +52,7 @@ __isnanf(float f) return (u.bits.exp == 255 && u.bits.man != 0); } -#ifdef LONG_DOUBLE +#ifdef OLM_LONG_DOUBLE OLM_DLLEXPORT int __isnanl(long double e) { diff --git a/src/s_isnormal.c b/src/s_isnormal.c index b6f6dd2..3c721d7 100644 --- a/src/s_isnormal.c +++ b/src/s_isnormal.c @@ -49,7 +49,7 @@ __isnormalf(float f) return (u.bits.exp != 0 && u.bits.exp != 255); } -#ifdef LONG_DOUBLE +#ifdef OLM_LONG_DOUBLE OLM_DLLEXPORT int __isnormall(long double e) { diff --git a/src/s_nexttowardf.c b/src/s_nexttowardf.c index 5676995..bf50862 100644 --- a/src/s_nexttowardf.c +++ b/src/s_nexttowardf.c @@ -20,7 +20,7 @@ #define LDBL_INFNAN_EXP (LDBL_MAX_EXP * 2 - 1) -#ifdef LONG_DOUBLE +#ifdef OLM_LONG_DOUBLE OLM_DLLEXPORT float nexttowardf(float x, long double y) { diff --git a/src/s_signbit.c b/src/s_signbit.c index 3954c41..87f40f2 100644 --- a/src/s_signbit.c +++ b/src/s_signbit.c @@ -49,7 +49,7 @@ __signbitf(float f) return (u.bits.sign); } -#ifdef LONG_DOUBLE +#ifdef OLM_LONG_DOUBLE OLM_DLLEXPORT int __signbitl(long double e) {