From ec411999a0262c8e3e6be53ae11ad761776a2fc1 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Thu, 12 Dec 2013 03:42:11 +0000 Subject: [PATCH] math: define _GNU_SOURCE when implementing non-standard math functions this makes the prototypes in math.h are visible so they are checked agaist the function definitions --- src/math/j0f.c | 1 + src/math/j1f.c | 1 + src/math/scalb.c | 1 + src/math/scalbf.c | 1 + src/math/sincos.c | 1 + src/math/sincosf.c | 1 + 6 files changed, 6 insertions(+) diff --git a/src/math/j0f.c b/src/math/j0f.c index 4b0ee3b7..45883dc4 100644 --- a/src/math/j0f.c +++ b/src/math/j0f.c @@ -13,6 +13,7 @@ * ==================================================== */ +#define _GNU_SOURCE #include "libm.h" static float pzerof(float), qzerof(float); diff --git a/src/math/j1f.c b/src/math/j1f.c index 6abde349..58875af9 100644 --- a/src/math/j1f.c +++ b/src/math/j1f.c @@ -13,6 +13,7 @@ * ==================================================== */ +#define _GNU_SOURCE #include "libm.h" static float ponef(float), qonef(float); diff --git a/src/math/scalb.c b/src/math/scalb.c index a54bdf2b..efe69e60 100644 --- a/src/math/scalb.c +++ b/src/math/scalb.c @@ -15,6 +15,7 @@ * should use scalbn() instead. */ +#define _GNU_SOURCE #include double scalb(double x, double fn) diff --git a/src/math/scalbf.c b/src/math/scalbf.c index 94364974..f44ed5b6 100644 --- a/src/math/scalbf.c +++ b/src/math/scalbf.c @@ -13,6 +13,7 @@ * ==================================================== */ +#define _GNU_SOURCE #include float scalbf(float x, float fn) diff --git a/src/math/sincos.c b/src/math/sincos.c index 49f8a098..35b2d923 100644 --- a/src/math/sincos.c +++ b/src/math/sincos.c @@ -10,6 +10,7 @@ * ==================================================== */ +#define _GNU_SOURCE #include "libm.h" void sincos(double x, double *sin, double *cos) diff --git a/src/math/sincosf.c b/src/math/sincosf.c index 1b50f01c..f8ca7232 100644 --- a/src/math/sincosf.c +++ b/src/math/sincosf.c @@ -14,6 +14,7 @@ * ==================================================== */ +#define _GNU_SOURCE #include "libm.h" /* Small multiples of pi/2 rounded to double precision. */ -- 2.25.1