blob: 565692499f792a116e9ad06f61e369fafc44384a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# DP: Define fpclassify and signbit for systems that need it.
--- a/src/gcc/d/phobos2/gcc/cbridge_math.c 2010-04-21 13:08:40.000000000 +0100
+++ b/src/gcc/d/phobos2/gcc/cbridge_math.c 2010-08-23 11:01:05.022792451 +0100
@@ -21,6 +21,23 @@
#include <math.h>
#include "config.h"
+/* If undefined, define fpclassify and signbit here */
+#ifndef fpclassify
+# define fpclassify(x) \
+ (sizeof (x) == sizeof (float) \
+ ? __fpclassifyf (x) \
+ : sizeof (x) == sizeof (double) \
+ ? __fpclassify (x) : __fpclassifyl (x))
+#endif
+
+#ifndef signbit
+# define signbit(x) \
+ (sizeof (x) == sizeof (float) \
+ ? __signbitf (x) \
+ : sizeof (x) == sizeof (double) \
+ ? __signbit (x) : __signbitl (x))
+#endif
+
/*
#if HAVE_DISTINCT_LONG_DOUBLE
typedef long double my_long_double;
|