bug-gnulib
[Top][All Lists]
Advanced

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

Re: [bug-gnulib] c-strtod patch for HP-UX pre 11.23


From: Bruno Haible
Subject: Re: [bug-gnulib] c-strtod patch for HP-UX pre 11.23
Date: Sat, 25 Dec 2004 14:12:53 +0100
User-agent: KMail/1.5

Paul Eggert wrote:
> +    [AC_COMPILE_IFELSE(
> +       [AC_LANG_PROGRAM(
> +          [[/* On HP-UX before 11.23, strtold returns a struct instead of
> +             long double.  Reject implementations like that, by requiring
> +             compatibility with the C99 prototype.  */
> +          #include <stdlib.h>
> +          static long double (*p) (char const *, char **) = strtold;
> +          static long double
> +          test (char const *nptr, char **endptr)
> +          {
> +            long double r;
> +            r = strtold (nptr, endptr);
> +            return r;
> +          }]],
> +           [[return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;]])],
> +       [gl_cv_func_c99_strtold=yes],
> +       [gl_cv_func_c99_strtold=no])])

What's the purpose of the
    return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;
statement? You are using AC_COMPILE_IFELSE, not AC_RUN_IFELSE, therefore
this statement tests nothing. If you were using AC_RUN_IFELSE, I would also
expect to see a default guess for cross-compilation.

Bruno





reply via email to

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