1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Fix strerror_r by checking return type from configure.

This commit is contained in:
Bruce Momjian
2004-06-07 22:39:45 +00:00
parent 9136613803
commit a63d2168e9
5 changed files with 87 additions and 8 deletions

53
configure vendored
View File

@ -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 <string.h>
#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