Commit 7289e34c authored by Morten Welinder's avatar Morten Welinder Committed by Morten Welinder

Test if we must prototype strtold. Test for log1pl.

2002-02-25  Morten Welinder  <terra@diku.dk>

	* configure.in: Test if we must prototype strtold.  Test for
	log1pl.
parent 01ce3618
2002-02-25 Morten Welinder <terra@diku.dk>
* configure.in: Test if we must prototype strtold. Test for
log1pl.
2002-02-25 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/sheet-object-widget.c (cb_scrollbar_set_focus) : remove code
......
2002-02-25 Morten Welinder <terra@diku.dk>
* configure.in: Test if we must prototype strtold. Test for
log1pl.
2002-02-25 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/sheet-object-widget.c (cb_scrollbar_set_focus) : remove code
......
2002-02-25 Morten Welinder <terra@diku.dk>
* configure.in: Test if we must prototype strtold. Test for
log1pl.
2002-02-25 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/sheet-object-widget.c (cb_scrollbar_set_focus) : remove code
......
......@@ -23,5 +23,6 @@
#undef HAVE_PSPELL
#undef ENABLE_EVOLUTION
#undef WITH_LONG_DOUBLE
#undef MUST_PROTOTYPE_STRTOLD
@BOTTOM@
......@@ -74,7 +74,7 @@ AC_ARG_WITH(long_double,
fi
need_sunmath=no
for ldfunc in fabsl sqrtl expl logl log10l ceill floorl powl hypotl \
for ldfunc in fabsl sqrtl expl logl log10l log1pl ceill floorl powl hypotl \
sinl cosl tanl asinl acosl atanl atan2l \
sinhl coshl tanhl asinhl acoshl atanhl \
erfl erfcl ynl isnanl finitel; do
......@@ -103,6 +103,21 @@ AC_ARG_WITH(long_double,
AC_CHECK_FUNCS(modfl frexpl ldexpl strtold string_to_decimal decimal_to_quadruple)
if test "$ac_cv_func_strtold" = "yes"; then
AC_MSG_CHECKING([if we must prototype strtold ourselves])
AC_TRY_RUN([
#include <stdlib.h>
int main ()
{
const char *s = "+3.1415e+0";
char *theend;
long double res = strtold (s, &theend);
return (*theend == 0 && finitel (res) &&
res >= 3.14 && res <= 3.15);
}],
AC_MSG_RESULT(no),
[AC_MSG_RESULT(yes)
AC_DEFINE(MUST_PROTOTYPE_STRTOLD)],
AC_MSG_RESULT(assuming not));
true
elif test "$ac_cv_func_string_to_decimal" = "yes" -a \
"$ac_cv_func_decimal_to_quadruple" = "yes" -a \
......
......@@ -12,6 +12,9 @@ typedef int gnum_int;
typedef long double gnum_float;
#ifdef HAVE_STRTOLD
#ifdef MUST_PROTOTYPE_STRTOLD
long double strtold (const char *, char **);
#endif
#define strtognum strtold
#else
#define NEED_FAKE_STRTOGNUM
......@@ -52,6 +55,7 @@ gnum_float frexpgnum (gnum_float x, int *exp);
#define expgnum expl
#define loggnum logl
#define log10gnum log10l
#define log1pgnum log1pl
#define singnum sinl
#define cosgnum cosl
#define tangnum tanl
......@@ -98,6 +102,7 @@ typedef double gnum_float;
#define expgnum exp
#define loggnum log
#define log10gnum log10
#define log1pgnum log1p
#define singnum sin
#define cosgnum cos
#define tangnum tan
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment