From a63d2168e900bba799a9baed3b24c7cf171e3e9d Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 7 Jun 2004 22:39:45 +0000 Subject: Fix strerror_r by checking return type from configure. --- configure | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 30653380f8..287ebeeca6 100755 --- a/configure +++ b/configure @@ -13759,6 +13759,59 @@ _ACEOF fi +echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5 +echo $ECHO_N "checking whether strerror_r returns int... $ECHO_C" >&6 +if test "${pgac_func_strerror_r_int+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +#include +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +int strerror_r(int, char *, size_t); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + pgac_func_strerror_r_int=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +pgac_func_strerror_r_int=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $pgac_func_strerror_r_int" >&5 +echo "${ECHO_T}$pgac_func_strerror_r_int" >&6 +if test x"$pgac_func_strerror_r_int" = xyes ; then + +cat >>confdefs.h <<\_ACEOF +#define STRERROR_R_INT +_ACEOF + +fi + else # do not use values from template file -- cgit v1.2.1