[gnumeric] Compilation: namespace cleanup for floating point stuff.



commit 33df73e7d8f0aab915908d93c616a5032e5ddfbe
Author: Morten Welinder <terra gnome org>
Date:   Fri Nov 15 18:46:35 2013 -0500

    Compilation: namespace cleanup for floating point stuff.

 configure.ac           |    3 ---
 gnumeric-features.h.in |    9 ---------
 src/mathfunc.c         |    5 +----
 src/numbers.h          |   15 ++++-----------
 4 files changed, 5 insertions(+), 27 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5f5b713..7ee29e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -560,9 +560,6 @@ AC_CHECK_FUNCS(mkfifo)
 LIBS="$SAVE_LIBS"
 unset SAVE_LIBS
 
-dnl Either of these seem to signal IEEE754 math, see mathfunc.c
-AC_CHECK_HEADERS(ieeefp.h ieee754.h)
-
 AC_HEADER_SYS_WAIT
 
 dnl Check for some functions
diff --git a/gnumeric-features.h.in b/gnumeric-features.h.in
index f34e4ea..3716cd8 100644
--- a/gnumeric-features.h.in
+++ b/gnumeric-features.h.in
@@ -20,15 +20,6 @@
 /* Define if the long double type is to be used */
 #undef GNM_WITH_LONG_DOUBLE
 
-/* Define to 1 if you have the <ieeefp.h> header file. */
-#undef HAVE_IEEEFP_H
-
-/* Define to 1 if you have the <ieee754.h> header file. */
-#undef HAVE_IEEE754_H
-
-/* Define to 1 if you have the <sunmath.h> header file. */
-#undef HAVE_SUNMATH_H
-
 /* Define to 1 if you have the `lgamma' function. */
 #undef HAVE_LGAMMA
 
diff --git a/src/mathfunc.c b/src/mathfunc.c
index 6c03c98..c62855d 100644
--- a/src/mathfunc.c
+++ b/src/mathfunc.c
@@ -47,13 +47,10 @@
 #include <glib/gstdio.h>
 #include <value.h>
 
-#if defined (HAVE_IEEEFP_H) || defined (HAVE_IEEE754_H)
-/* Make sure we have this symbol defined, since the existance of either
-   header file implies it.  */
+/* R code wants this, so provide it.  */
 #ifndef IEEE_754
 #define IEEE_754
 #endif
-#endif
 
 #define M_LN_SQRT_2PI   GNM_const(0.918938533204672741780329736406)  /* log(sqrt(2*pi)) */
 #define M_SQRT_32       GNM_const(5.656854249492380195206754896838)  /* sqrt(32) */
diff --git a/src/numbers.h b/src/numbers.h
index bbcd510..26dc570 100644
--- a/src/numbers.h
+++ b/src/numbers.h
@@ -7,13 +7,10 @@
 
 G_BEGIN_DECLS
 
-/* WARNING : Any preprocessor conditionals in here must also be placed in libspreadsheet-config.h */
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-#ifdef HAVE_IEEE754_H
-#include <ieee754.h>
-#endif
+/*
+ * WARNING: Any preprocessor conditionals in here must also be placed
+ * in gnumeric-features.h.in
+ */
 
 #ifndef HAVE_LGAMMA
 /* Defined in mathfunc.c  */
@@ -27,10 +24,6 @@ double lgamma_r (double x, int *signp);
 
 #ifdef GNM_WITH_LONG_DOUBLE
 
-#ifdef HAVE_SUNMATH_H
-#include <sunmath.h>
-#endif
-
 typedef long double gnm_float;
 
 #ifdef HAVE_ERFL


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]