Skip to content

Commit d7aa2fe

Browse files
agattidpgeorge
authored andcommitted
lib/libm: Define _IEEE_LIBM only if not set.
fdilibm was originally meant to see _IEEE_LIBM defined from outside the libm code, not it being hardcoded in. Picolibc assumes this assumption holds true and attempts to define itself, conflicting with the existing definition. Signed-off-by: Alessandro Gatti <[email protected]>
1 parent ace08c3 commit d7aa2fe

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

lib/libm/wf_lgamma.c

+2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
*/
2525

2626
#include "fdlibm.h"
27+
#ifndef _IEEE_LIBM
2728
#define _IEEE_LIBM 1
29+
#endif
2830

2931
#ifdef __STDC__
3032
float lgammaf(float x)

lib/libm/wf_tgamma.c

+2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424

2525
#include "math.h"
2626
#include "fdlibm.h"
27+
#ifndef _IEEE_LIBM
2728
#define _IEEE_LIBM 1
29+
#endif
2830

2931
#ifdef __STDC__
3032
float tgammaf(float x)

0 commit comments

Comments
 (0)