]> git.saurik.com Git - bison.git/commitdiff
tests: be robust to POSIXLY_CORRECT being defined.
authorAkim Demaille <demaille@gostai.com>
Tue, 6 Mar 2012 08:09:02 +0000 (09:09 +0100)
committerAkim Demaille <demaille@gostai.com>
Fri, 9 Mar 2012 07:41:32 +0000 (08:41 +0100)
* tests/local.at (AT_BISON_CHECK_NO_XML): Check if
POSIXLY_CORRECT is defined, not if it is defined to 1.
Reported by Lie Yan.
http://lists.gnu.org/archive/html/bug-bison/2012-03/msg00000.html

THANKS
tests/local.at

diff --git a/THANKS b/THANKS
index 868e81e0cd4385932b9e2d6cf3158b4822e3a198..f2c5231aa85931f98ad7b92a99b5776c114aedcf 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -59,6 +59,7 @@ Juan Manuel Guerrero      juan.guerrero@gmx.de
 Kees Zeelenberg           kzlg@users.sourceforge.net
 Keith Browne              kbrowne@legato.com
 Laurent Mascherpa         laurent.mascherpa@epita.fr
+Lie Yan                   lie.yan@kaust.edu.sa
 Magnus Fromreide          magfr@lysator.liu.se
 Marc Autret               autret_m@epita.fr
 Martin Jacobs             martin.jacobs@arcor.de
index e3e1ea30e0f769d801aa1b84631d7e40de174f14..57c2ae6b90f12538b448247f99a2c79dbe571da8 100644 (file)
@@ -284,9 +284,10 @@ m4_define([AT_BISON_CHECK_NO_XML],
                 [AT_QUELL_VALGRIND ])[[bison ]]$@)
 m4_if(m4_bregexp([$4], [: warning: ]), [-1], [],
       m4_quote(m4_if(m4_quote($2), [], [0], [$2])), [0], [[
-        # POSIXLY_CORRECT=1 causes bison to complain if options are added
-        # after the grammar file name, so skip these checks in that case.
-        if test x"$POSIXLY_CORRECT" != x1; then
+        # Defining POSIXLY_CORRECT causes bison to complain if options
+        # are added after the grammar file name, so skip these checks
+        # in that case.
+        if test -z "${POSIXLY_CORRECT+set}"; then
           # Don't interfere with caller's files.
           if test -f stderr; then mv stderr at-bison-check-stderr.bak; fi
           if test -f experr; then mv experr at-bison-check-experr.bak; fi