blob: e3d53391129ea87b53105ea22f330db4912b7457 (
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
29
|
$NetBSD: patch-ae,v 1.5 2007/08/30 09:15:53 rillig Exp $
--- speech_tools/include/EST_math.h.orig 2004-04-30 18:56:49.000000000 +0200
+++ speech_tools/include/EST_math.h 2007-08-30 10:51:43.000000000 +0200
@@ -46,6 +46,7 @@
extern "C" int isnan(double);
#endif
+#include <cmath>
#include <math.h>
#include <limits.h>
#include <float.h>
@@ -94,6 +95,16 @@ extern "C" {
#define isnanf(X) isnan(X)
#endif
+/* If isnan is a macro, assume it is C99 type-variadic. */
+#if defined(__DragonFly__) && defined(isnan)
+#define isnanf(X) isnan(X)
+#endif
+
+/* The g++-3.3.6 <cmath> header undefines the macro isnan, but shouldn't. */
+#if !defined(isnan) && defined(__fpmacro_unary_floating)
+#define isnan(X) __fpmacro_unary_floating(isnan, (X))
+#endif
+
/* FreeBSD *and other 4.4 based systems require anything, isnanf is defined */
#if defined(__FreeBSD__)
|