[PATCH 7/9] math.h: add wrappers for the missing finite() functions

Florian Fainelli florian at openwrt.org
Fri Sep 21 15:29:17 UTC 2012


From: Felix Fietkau <nbd at openwrt.org>

Signed-off-by: Felix Fietkau <nbd at openwrt.org>
---
 include/math.h |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/include/math.h b/include/math.h
index d3f86f9..4995b55 100644
--- a/include/math.h
+++ b/include/math.h
@@ -195,7 +195,7 @@ extern int signgam;
 
 
 /* ISO C99 defines some generic macros which work on any data type.  */
-#ifdef __USE_ISOC99
+#if defined(__USE_ISOC99) || defined(__USE_BSD)
 
 /* Get the architecture specific values describing the floating-point
    evaluation.  The following symbols will get defined:
@@ -315,6 +315,11 @@ enum
 
 #endif /* Use ISO C99.  */
 
+/* BSD compat */
+#define finite(x) __finite(x)
+#define finitef(x) __finitef(x)
+#define finitel(x) __finitel(x)
+
 #ifdef	__USE_MISC
 /* Support for various different standard error handling behaviors.  */
 typedef enum
-- 
1.7.9.5



More information about the uClibc mailing list