diff options
Diffstat (limited to 'sci-mathematics/scilab/files/scilab-5.2.1-no-redef-exp10.patch')
-rw-r--r-- | sci-mathematics/scilab/files/scilab-5.2.1-no-redef-exp10.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/sci-mathematics/scilab/files/scilab-5.2.1-no-redef-exp10.patch b/sci-mathematics/scilab/files/scilab-5.2.1-no-redef-exp10.patch new file mode 100644 index 000000000..c85d1839e --- /dev/null +++ b/sci-mathematics/scilab/files/scilab-5.2.1-no-redef-exp10.patch @@ -0,0 +1,65 @@ +diff -urN scilab-5.2.1-orig//configure.ac scilab-5.2.1//configure.ac +--- scilab-5.2.1-orig//configure.ac 2010-02-17 03:06:08.000000000 -0500 ++++ scilab-5.2.1//configure.ac 2010-02-20 16:49:52.000000000 -0500 +@@ -953,12 +953,7 @@ + # Provided by math.h + + LDFLAGS="$LDFLAGS $LIBM" +-AC_CHECK_FUNCS([pow] [sqrt] [finite] [floor]) +- +-AC_CHECK_FUNC([exp10],,[ +- AC_DEFINE([log_10_],[2.3025850929940456840179914546844],[Provide a macro to do exp10]) +- AC_DEFINE([exp10(x)],[exp( (log_10_) * (x) )],[Provide a macro to do exp10]) +- ]) ++AC_CHECK_FUNCS([pow] [sqrt] [finite] [floor] [exp10]) + + ### If isinf exists or not (used to not be the case under Solaris) + ### See bug #4164 +diff -urN scilab-5.2.1-orig//modules/core/includes/core_math.h scilab-5.2.1//modules/core/includes/core_math.h +--- scilab-5.2.1-orig//modules/core/includes/core_math.h 2010-02-17 03:06:08.000000000 -0500 ++++ scilab-5.2.1//modules/core/includes/core_math.h 2010-02-20 16:49:52.000000000 -0500 +@@ -90,6 +90,11 @@ + #define M_PI 3.14159265358979323846 + #endif + ++#ifndef HAVE_EXP10 ++#define log_10_ 2.3025850929940456840179914546844 ++/* Provide a macro to do exp10 */ ++#define exp10(x) exp( (log_10_) * (x) ) ++#endif + + #endif /* __BASE_MATH_H__ */ + +diff -urN scilab-5.2.1-orig//modules/core/includes/machine.h.in scilab-5.2.1//modules/core/includes/machine.h.in +--- scilab-5.2.1-orig//modules/core/includes/machine.h.in 2010-02-17 03:06:08.000000000 -0500 ++++ scilab-5.2.1//modules/core/includes/machine.h.in 2010-02-20 16:49:52.000000000 -0500 +@@ -77,6 +77,9 @@ + /* Define to 1 if you have the `endpwent' function. */ + #undef HAVE_ENDPWENT + ++/* Define to 1 if you have the `exp10' function. */ ++#undef HAVE_EXP10 ++ + /* Define to 1 if you have the <fcntl.h> header file. */ + #undef HAVE_FCNTL_H + +@@ -515,9 +518,6 @@ + /* Define to empty if `const' does not conform to ANSI C. */ + #undef const + +-/* Provide a macro to do exp10 */ +-#undef exp10 +- + /* Don't use getwd but getcwd */ + #undef getwd + +@@ -530,9 +530,6 @@ + /* Provide a macro to do isinf */ + #undef isinf + +-/* Provide a macro to do exp10 */ +-#undef log_10_ +- + + + #ifdef DIR_SEPARATOR |