summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2004-06-07 22:39:45 +0000
committerBruce Momjian <bruce@momjian.us>2004-06-07 22:39:45 +0000
commita63d2168e900bba799a9baed3b24c7cf171e3e9d (patch)
tree56b28dedb6d5a64a7e8aea2ba676b364a37c8554 /configure
parent913661380382f268d2eec10f5c5e1ec1497fdd32 (diff)
downloadpostgresql-a63d2168e900bba799a9baed3b24c7cf171e3e9d.tar.gz
Fix strerror_r by checking return type from configure.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure53
1 files changed, 53 insertions, 0 deletions
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 <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