summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-04-30 17:24:00 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-04-30 17:24:00 +0000
commit2e935f0186169655f422c103d677ad3d878b9eab (patch)
treef7d6ca6ea07bbb329e168e0621c2af805b96a237
parent6757c3c734759b8b51fa99b6b60bcd2dbdc9522d (diff)
downloadzsh-2e935f0186169655f422c103d677ad3d878b9eab.tar.gz
zsh-2e935f0186169655f422c103d677ad3d878b9eab.zip
Defeat GCC over-optimization in AC_TRY_LINK tests.
-rw-r--r--ChangeLog15
-rw-r--r--configure.in12
2 files changed, 16 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index fc92100e7..e866eee98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,15 +1,20 @@
+2001-04-30 Bart Schaefer <schaefer@zsh.org>
+
+ * 14169: configure.in: Improve some AC_TRY_LINK tests so that they
+ can't accidentally succeed because of a compiler that optimizes
+ away unreferenced variables.
+
2001-04-30 Sven Wischnowsky <wischnow@zsh.org>
- * 14160: Completion/Base/Completer/_expand: fixelt for the test
+ * 14160: Completion/Base/Completer/_expand: fixlet for the test
for the suffix style; if word contains only a tilde, don't try
to expand it
2001-04-30 Andrej Borsenkow <bor@zsh.org>
- * Bart: 14144 (modified): Src/Modules/stat.c
- The S_IXUSR, S_IXGRP, S_IXOTH are made external variables in
- Cygwin 1.3.1 and cannot be used as static array initializer
- anymore.
+ * Bart: 14144 (modified): Src/Modules/stat.c: The S_IXUSR,
+ S_IXGRP, S_IXOTH are made external variables in Cygwin 1.3.1 and
+ cannot be used as static array initializer anymore.
2001-04-29 Bart Schaefer <schaefer@zsh.org>
diff --git a/configure.in b/configure.in
index 87d787320..4e118de5e 100644
--- a/configure.in
+++ b/configure.in
@@ -533,36 +533,36 @@ AC_MSG_CHECKING(if boolcodes is available)
AC_TRY_LINK([#ifdef TERM_H_NEEDS_CURSES_H
#include <curses.h>
#endif
-#include <term.h>], [char **test = boolcodes;],
+#include <term.h>], [char **test = boolcodes; printf(*test);],
AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes, boolcodes=no)
AC_MSG_RESULT($boolcodes)
AC_MSG_CHECKING(if numcodes is available)
AC_TRY_LINK([#ifdef TERM_H_NEEDS_CURSES_H
#include <curses.h>
#endif
-#include <term.h>], [char **test = numcodes;],
+#include <term.h>], [char **test = numcodes; printf(*test);],
AC_DEFINE(HAVE_NUMCODES) numcodes=yes, numcodes=no)
AC_MSG_RESULT($numcodes)
AC_MSG_CHECKING(if strcodes is available)
AC_TRY_LINK([#ifdef TERM_H_NEEDS_CURSES_H
#include <curses.h>
#endif
-#include <term.h>], [char **test = strcodes;],
+#include <term.h>], [char **test = strcodes; printf(*test);],
AC_DEFINE(HAVE_STRCODES) strcodes=yes, strcodes=no)
AC_MSG_RESULT($strcodes)
AC_MSG_CHECKING(if boolnames is available)
AC_TRY_LINK([#include <curses.h>
-#include <term.h>], [char **test = boolnames;],
+#include <term.h>], [char **test = boolnames; printf(*test);],
AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes, boolnames=no)
AC_MSG_RESULT($boolnames)
AC_MSG_CHECKING(if numnames is available)
AC_TRY_LINK([#include <curses.h>
-#include <term.h>], [char **test = numnames;],
+#include <term.h>], [char **test = numnames; printf(*test);],
AC_DEFINE(HAVE_NUMNAMES) numnames=yes, numnames=no)
AC_MSG_RESULT($numnames)
AC_MSG_CHECKING(if strnames is available)
AC_TRY_LINK([#include <curses.h>
-#include <term.h>], [char **test = strnames;],
+#include <term.h>], [char **test = strnames; printf(*test);],
AC_DEFINE(HAVE_STRNAMES) strnames=yes, strnames=no)
AC_MSG_RESULT($strnames)