# define CL_STRTOD cl_strtold
# define DOUBLE long double
# define C_STRTOD c_strtold
+# define STRTOD strtold
#else
# define CL_STRTOD cl_strtod
# define DOUBLE double
# define C_STRTOD c_strtod
-#endif
-
-/* fall back on strtod if strtold doesn't conform to C99. */
-#if LONG && HAVE_C99_STRTOLD
-# define STRTOD strtold
-#else
# define STRTOD strtod
#endif
#define UCHAR_LIM (UCHAR_MAX + 1)
-#if HAVE_C99_STRTOLD
-# define long_double long double
-#else
-# define long_double double
-# undef strtold
-# define strtold strtod
-#endif
-
#ifndef DEFAULT_TMPDIR
# define DEFAULT_TMPDIR "/tmp"
#endif
/* Work around a problem whereby the long double value returned by glibc's
strtold ("NaN", ...) contains uninitialized bits: clear all bytes of
- A and B before calling strtold. FIXME: remove this function once
+ A and B before calling strtold. FIXME: remove this function if
gnulib guarantees that strtold's result is always well defined. */
static int
nan_compare (char const *sa, char const *sb)
{
- long_double a;
+ long double a;
memset (&a, 0, sizeof a);
a = strtold (sa, NULL);
- long_double b;
+ long double b;
memset (&b, 0, sizeof b);
b = strtold (sb, NULL);
char *ea;
char *eb;
- long_double a = strtold (sa, &ea);
- long_double b = strtold (sb, &eb);
+ long double a = strtold (sa, &ea);
+ long double b = strtold (sb, &eb);
/* Put conversion errors at the start of the collating sequence. */
if (sa == ea)
LC_ALL=$LOC getlimits_
- # See if sort should be using long doubles
- grep '^#define HAVE_C99_STRTOLD 1' $CONFIG_HEADER > /dev/null ||
- { LDBL_MAX="$DBL_MAX"; LDBL_MIN="$DBL_MIN"; }
-
# If DBL_MIN happens to be smaller than LDBL_MIN, swap them,
# so that out expected output is sorted.
if test $reversed = 1; then