Make checks for global variables (sys_nerr, timezone) safe against getting
optimized away completely.
This commit is contained in:
parent
09a160d579
commit
5508ef30e2
|
@ -1,5 +1,5 @@
|
||||||
# Macros that test various C library quirks
|
# 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
|
# PGAC_VAR_INT_TIMEZONE
|
||||||
|
@ -8,8 +8,9 @@
|
||||||
# HAVE_INT_TIMEZONE.
|
# HAVE_INT_TIMEZONE.
|
||||||
AC_DEFUN([PGAC_VAR_INT_TIMEZONE],
|
AC_DEFUN([PGAC_VAR_INT_TIMEZONE],
|
||||||
[AC_CACHE_CHECK(for int timezone, pgac_cv_var_int_timezone,
|
[AC_CACHE_CHECK(for int timezone, pgac_cv_var_int_timezone,
|
||||||
[AC_TRY_LINK([#include <time.h>],
|
[AC_TRY_LINK([#include <time.h>
|
||||||
[int res = timezone / 60;],
|
int res;],
|
||||||
|
[res = timezone / 60;],
|
||||||
[pgac_cv_var_int_timezone=yes],
|
[pgac_cv_var_int_timezone=yes],
|
||||||
[pgac_cv_var_int_timezone=no])])
|
[pgac_cv_var_int_timezone=no])])
|
||||||
if test x"$pgac_cv_var_int_timezone" = xyes ; then
|
if test x"$pgac_cv_var_int_timezone" = xyes ; then
|
||||||
|
@ -131,8 +132,9 @@ fi])
|
||||||
# HAVE_SYS_NERR.
|
# HAVE_SYS_NERR.
|
||||||
AC_DEFUN([PGAC_VAR_SYS_NERR],
|
AC_DEFUN([PGAC_VAR_SYS_NERR],
|
||||||
[AC_CACHE_CHECK([for sys_nerr], pgac_cv_var_sys_nerr,
|
[AC_CACHE_CHECK([for sys_nerr], pgac_cv_var_sys_nerr,
|
||||||
[AC_TRY_LINK([extern int sys_nerr;],
|
[AC_TRY_LINK([extern int sys_nerr;
|
||||||
[int x = sys_nerr;],
|
int x;],
|
||||||
|
[x = sys_nerr;],
|
||||||
[pgac_cv_var_sys_nerr=yes],
|
[pgac_cv_var_sys_nerr=yes],
|
||||||
[pgac_cv_var_sys_nerr=no])])
|
[pgac_cv_var_sys_nerr=no])])
|
||||||
if test x"$pgac_cv_var_sys_nerr" = xyes ; then
|
if test x"$pgac_cv_var_sys_nerr" = xyes ; then
|
||||||
|
|
Loading…
Reference in a new issue