bug-gnulib
[Top][All Lists]
Advanced

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

Re: 'round' modules takes 3


From: Bruno Haible
Subject: Re: 'round' modules takes 3
Date: Sun, 11 Nov 2007 14:07:34 +0100
User-agent: KMail/1.5.4

> >   1. fix the Solaris problem with roundf, roundl,

This fixes this part.

2007-11-11  Bruno Haible  <address@hidden>

        * m4/roundf.m4 (gl_FUNC_ROUNDF): Handle the case that floorf and
        roundf were declared but do not exist on functions.
        * m4/roundl.m4 (gl_FUNC_ROUNDL): Handle the case that floorl and
        roundl were declared but do not exist on functions.
        * lib/round.c (HAVE_FLOOR_AND_CEIL): Use HAVE_FLOORF_AND_CEILF and
        HAVE_FLOORL_AND_CEILL, respectively.
        Needed for Sun C on Solaris 10.

--- lib/round.c.orig    2007-11-11 14:04:00.000000000 +0100
+++ lib/round.c 2007-11-11 14:01:53.000000000 +0100
@@ -30,7 +30,7 @@
 # define DOUBLE long double
 # define MANT_DIG LDBL_MANT_DIG
 # define L_(literal) literal##L
-# define HAVE_FLOOR_AND_CEIL (HAVE_DECL_FLOORL && HAVE_DECL_CEILL)
+# define HAVE_FLOOR_AND_CEIL HAVE_FLOORL_AND_CEILL
 #elif ! defined USE_FLOAT
 # define ROUND round
 # define FLOOR floor
@@ -46,7 +46,7 @@
 # define DOUBLE float
 # define MANT_DIG FLT_MANT_DIG
 # define L_(literal) literal##f
-# define HAVE_FLOOR_AND_CEIL (HAVE_DECL_FLOORF && HAVE_DECL_CEILF)
+# define HAVE_FLOOR_AND_CEIL HAVE_FLOORF_AND_CEILF
 #endif
 
 /* If we're being included from test-round2[f].c, it already defined names for
--- m4/roundf.m4.orig   2007-11-11 14:04:00.000000000 +0100
+++ m4/roundf.m4        2007-11-11 14:03:37.000000000 +0100
@@ -20,6 +20,12 @@
     if test "$ac_cv_have_decl_floorf" = yes \
        && test "$ac_cv_have_decl_ceilf" = yes; then
       gl_CHECK_MATH_LIB([ROUNDF_LIBM], [x = floorf (x) + ceilf (x);])
+      if test "$ROUNDF_LIBM" != missing; then
+        AC_DEFINE([HAVE_FLOORF_AND_CEILF], 1,
+          [Define if the both the floorf() and ceilf() functions exist.])
+      else
+        ROUNDF_LIBM=
+      fi
     else
       ROUNDF_LIBM=
     fi
--- m4/roundl.m4.orig   2007-11-11 14:04:00.000000000 +0100
+++ m4/roundl.m4        2007-11-11 14:03:37.000000000 +0100
@@ -20,6 +20,12 @@
     if test "$ac_cv_have_decl_floorl" = yes \
        && test "$ac_cv_have_decl_ceill" = yes; then
       gl_CHECK_MATH_LIB([ROUNDL_LIBM], [x = floorl (x) + ceill (x);])
+      if test "$ROUNDL_LIBM" != missing; then
+        AC_DEFINE([HAVE_FLOORL_AND_CEILL], 1,
+          [Define if the both the floorl() and ceill() functions exist.])
+      else
+        ROUNDL_LIBM=
+      fi
     else
       ROUNDL_LIBM=
     fi





reply via email to

[Prev in Thread] Current Thread [Next in Thread]