Skip to content

Commit f24b1bf

Browse files
jackpot51ararslan
authored andcommitted
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.
1 parent 0f22aeb commit f24b1bf

8 files changed

Lines changed: 8 additions & 8 deletions

File tree

include/openlibm_math.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#endif
2727

2828
#ifndef __arm__
29-
#define LONG_DOUBLE
29+
#define OLM_LONG_DOUBLE
3030
#endif
3131

3232
#ifndef __pure2

src/s_fpclassify.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ __fpclassifyf(float f)
7272
}
7373
}
7474

75-
#ifdef LONG_DOUBLE
75+
#ifdef OLM_LONG_DOUBLE
7676
OLM_DLLEXPORT int
7777
__fpclassifyl(long double e)
7878
{

src/s_isfinite.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ __isfinitef(float f)
4949
return (u.bits.exp != 255);
5050
}
5151

52-
#ifdef LONG_DOUBLE
52+
#ifdef OLM_LONG_DOUBLE
5353
OLM_DLLEXPORT int
5454
__isfinitel(long double e)
5555
{

src/s_isinf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ __isinff(float f)
5151
return (u.bits.exp == 255 && u.bits.man == 0);
5252
}
5353

54-
#ifdef LONG_DOUBLE
54+
#ifdef OLM_LONG_DOUBLE
5555
OLM_DLLEXPORT int
5656
__isinfl(long double e)
5757
{

src/s_isnan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ __isnanf(float f)
5252
return (u.bits.exp == 255 && u.bits.man != 0);
5353
}
5454

55-
#ifdef LONG_DOUBLE
55+
#ifdef OLM_LONG_DOUBLE
5656
OLM_DLLEXPORT int
5757
__isnanl(long double e)
5858
{

src/s_isnormal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ __isnormalf(float f)
4949
return (u.bits.exp != 0 && u.bits.exp != 255);
5050
}
5151

52-
#ifdef LONG_DOUBLE
52+
#ifdef OLM_LONG_DOUBLE
5353
OLM_DLLEXPORT int
5454
__isnormall(long double e)
5555
{

src/s_nexttowardf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#define LDBL_INFNAN_EXP (LDBL_MAX_EXP * 2 - 1)
2222

23-
#ifdef LONG_DOUBLE
23+
#ifdef OLM_LONG_DOUBLE
2424
OLM_DLLEXPORT float
2525
nexttowardf(float x, long double y)
2626
{

src/s_signbit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ __signbitf(float f)
4949
return (u.bits.sign);
5050
}
5151

52-
#ifdef LONG_DOUBLE
52+
#ifdef OLM_LONG_DOUBLE
5353
OLM_DLLEXPORT int
5454
__signbitl(long double e)
5555
{

0 commit comments

Comments
 (0)