summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2001-01-10 17:07:18 +0000
committerPeter Eisentraut <peter_e@gmx.net>2001-01-10 17:07:18 +0000
commit5508ef30e2031b84a69de3ff2b39fc4ec55fa4f2 (patch)
tree2e5e4dc6c431fd80bbb03835cd38673136e1e78c /config
parent09a160d5792e10e467a49801264cfd2ca8f616dc (diff)
downloadpostgresql-5508ef30e2031b84a69de3ff2b39fc4ec55fa4f2.tar.gz
Make checks for global variables (sys_nerr, timezone) safe against getting
optimized away completely.
Diffstat (limited to 'config')
-rw-r--r--config/c-library.m412
1 files changed, 7 insertions, 5 deletions
diff --git a/config/c-library.m4 b/config/c-library.m4
index 3cb3995f01..52cac9f4dd 100644
--- a/config/c-library.m4
+++ b/config/c-library.m4
@@ -1,5 +1,5 @@
# Macros that test various C library quirks
-# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.6 2001/01/09 18:40:13 petere Exp $
+# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.7 2001/01/10 17:07:18 petere Exp $
# PGAC_VAR_INT_TIMEZONE
@@ -8,8 +8,9 @@
# HAVE_INT_TIMEZONE.
AC_DEFUN([PGAC_VAR_INT_TIMEZONE],
[AC_CACHE_CHECK(for int timezone, pgac_cv_var_int_timezone,
-[AC_TRY_LINK([#include <time.h>],
- [int res = timezone / 60;],
+[AC_TRY_LINK([#include <time.h>
+int res;],
+ [res = timezone / 60;],
[pgac_cv_var_int_timezone=yes],
[pgac_cv_var_int_timezone=no])])
if test x"$pgac_cv_var_int_timezone" = xyes ; then
@@ -131,8 +132,9 @@ fi])
# HAVE_SYS_NERR.
AC_DEFUN([PGAC_VAR_SYS_NERR],
[AC_CACHE_CHECK([for sys_nerr], pgac_cv_var_sys_nerr,
-[AC_TRY_LINK([extern int sys_nerr;],
- [int x = sys_nerr;],
+[AC_TRY_LINK([extern int sys_nerr;
+int x;],
+ [x = sys_nerr;],
[pgac_cv_var_sys_nerr=yes],
[pgac_cv_var_sys_nerr=no])])
if test x"$pgac_cv_var_sys_nerr" = xyes ; then