summaryrefslogtreecommitdiff
path: root/include/math.h
diff options
context:
space:
mode:
authornsz <nsz@port70.net>2012-08-13 22:06:01 +0200
committernsz <nsz@port70.net>2012-08-13 22:06:01 +0200
commit23e6940a2cf101017df33236ebee0fd4e3383172 (patch)
tree89ea196385a88905a5db1ee270a78debcd484c09 /include/math.h
parentab76321c14e18e70c853f34202a567749292eafc (diff)
downloadmusl-23e6940a2cf101017df33236ebee0fd4e3383172.tar.gz
math: fix _BSD_SOURCE namespace in math.h
Diffstat (limited to 'include/math.h')
-rw-r--r--include/math.h51
1 files changed, 26 insertions, 25 deletions
diff --git a/include/math.h b/include/math.h
index cf9d9fbf..2fdcb7b4 100644
--- a/include/math.h
+++ b/include/math.h
@@ -330,6 +330,11 @@ double trunc(double);
float truncf(float);
long double truncl(long double);
+
+#if defined(_XOPEN_SOURCE) || defined(_BSD_SOURCE)
+#define MAXFLOAT 3.40282347e+38F
+#endif
+
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
#define M_E 2.7182818284590452354 /* e */
#define M_LOG2E 1.4426950408889634074 /* log_2 e */
@@ -344,13 +349,7 @@ long double truncl(long double);
#define M_2_SQRTPI 1.12837916709551257390 /* 2/sqrt(pi) */
#define M_SQRT2 1.41421356237309504880 /* sqrt(2) */
#define M_SQRT1_2 0.70710678118654752440 /* 1/sqrt(2) */
-#endif
-#if defined(_XOPEN_SOURCE)
-#define MAXFLOAT 3.40282347e+38F
-#endif
-
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
extern int signgam;
double j0(double);
@@ -362,47 +361,49 @@ double y1(double);
double yn(int, double);
#endif
-#ifdef _GNU_SOURCE
-#define HUGE 3.40282347e+38F
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define HUGE 3.40282347e+38F
+
double scalb(double, double);
float scalbf(float, float);
-long double scalbl(long double, long double);
-void sincos(double, double*, double*);
-void sincosf(float, float*, float*);
-void sincosl(long double, long double*, long double*);
-
-double gamma(double);
-float gammaf(float);
-long double gammal(long double);
+double significand(double);
+float significandf(float);
double lgamma_r(double, int*);
float lgammaf_r(float, int*);
-long double lgammal_r(long double, int*);
float j0f(float);
-long double j0l(long double);
float j1f(float);
-long double j1l(long double);
float jnf(int, float);
-long double jnl(int, long double);
float y0f(float);
-long double y0l(long double);
float y1f(float);
-long double y1l(long double);
float ynf(int, float);
+#endif
+
+#ifdef _GNU_SOURCE
+long double lgammal_r(long double, int*);
+
+long double j0l(long double);
+long double j1l(long double);
+long double jnl(int, long double);
+
+long double y0l(long double);
+long double y1l(long double);
long double ynl(int, long double);
+void sincos(double, double*, double*);
+void sincosf(float, float*, float*);
+void sincosl(long double, long double*, long double*);
+
double exp10(double);
float exp10f(float);
long double exp10l(long double);
+
double pow10(double);
float pow10f(float);
long double pow10l(long double);
-
-double significand(double);
-float significandf(float);
#endif
#ifdef __cplusplus