Make checks for global variables (sys_nerr, timezone) safe against getting

optimized away completely.
This commit is contained in:
Peter Eisentraut 2001-01-10 17:07:18 +00:00
parent 09a160d579
commit 5508ef30e2
2 changed files with 147 additions and 143 deletions

View File

@ -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

278
configure vendored

File diff suppressed because it is too large Load Diff