Hi Eric,

Thanks for noticing and fixing this faster than I could.

> A better approach is to replace the autoconf macro with a version
> of our own that doesn't probe anything, so that the AC_DEFINE is
> reached exactly once.

Yes, agreed.

> +AC_DEFUN([AC_FUNC_STRERROR_R], [
> +  AC_DEFINE([HAVE_DECL_STRERROR_R], [1],
> +    [Define to 1, since you should have the declaration of strerror_r.])
> +  AC_DEFINE([STRERROR_R_CHAR_P], [0],
> +    [Define to 0, since strerror_r should not return char *.])
>  ])

In this definition I would also add

    AC_DEFINE([HAVE_STRERROR_R], [1],
      [Define to 1, since you should have the function strerror_r.])

Rationale: The autoconf documentation says that AC_FUNC_STRERROR_R
defines HAVE_STRERROR_R too. The user's configure.ac may possibly
  - invoke or AC_REQUIRE AC_FUNC_STRERROR_R,
  - then rely on the value of HAVE_STRERROR_R,
  - then only invoke gl_INIT.

Bruno


Reply via email to