bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] configure.ac and cxx-type.at patches for bison-1.49c


From: Art Haas
Subject: [PATCH] configure.ac and cxx-type.at patches for bison-1.49c
Date: Fri, 27 Sep 2002 13:12:09 -0500
User-agent: Mutt/1.4i

Hi.

The configure.ac patch converts AM_CONFIG_HEADER to AC_CONFIG_HEADERS
as automake-1.7 has obsoleted its version. Also, the configure
template still used the old AC_OUTPUT format, so I switched it to
use AC_CONFIG_FILES and then call AC_OUTPUT.

The cxx-type.at patch fixes a missing "=" error.

I'd like to  suggest modifying the main() routine here slightly. I
typically build with '-DNDEBUG' used to compile files, and in this
test, the freopen() call is contained within the assertion. When
I build with the assertion-killing flag, the testsuite hangs at
the first cxx-test, because the freopen() call has disappeared!
Maybe something like this ...

int
main (int argc, char ** argv)
{
   if (argc != 2) return 1;
   if (!(freopen(argv[1], "r", stdin))) return 1;
   return yyparse();
}

Having the freopen() call in the assertion may/will trip up other
people who build bison with the -DNDEBUG flag and run the test suite.

The 1.49c build went cleanly and all the tests passed on my
machine. I'm building on i586-pc-linux-gnu.

Thanks.

Art Haas

--- configure.ac.orig   2002-09-27 08:23:01.000000000 -0500
+++ configure.ac        2002-09-27 12:28:24.000000000 -0500
@@ -24,7 +24,7 @@
 AC_CONFIG_AUX_DIR(config)
 
 AM_INIT_AUTOMAKE([1.7 check-news readme-alpha dist-bzip2])
-AM_CONFIG_HEADER(config.h:config.hin)
+AC_CONFIG_HEADERS([config.h:config.hin])
 
 # Initialize the test suite.
 AC_CONFIG_TESTDIR(tests)
@@ -110,9 +110,10 @@
 AM_GNU_GETTEXT(external, need-ngettext)
 AM_GNU_GETTEXT_VERSION(0.11.5)
 
-AC_OUTPUT([Makefile
-           config/Makefile
-           po/Makefile.in
-           data/Makefile
-           lib/Makefile src/Makefile doc/Makefile
-           m4/Makefile])
+AC_CONFIG_FILES([Makefile
+                 config/Makefile
+                 po/Makefile.in
+                 data/Makefile
+                 lib/Makefile src/Makefile doc/Makefile
+                 m4/Makefile])
+AC_OUTPUT
--- cxx-type.at.orig    2002-08-27 09:46:00.000000000 -0500
+++ cxx-type.at 2002-09-27 12:21:44.000000000 -0500
@@ -93,7 +93,7 @@
 int
 main (int argc, char** argv)
 {
-  assert (argc = 2);
+  assert (argc == 2);
   assert (freopen (argv[1], "r", stdin));
   exit (yyparse ());
 }
-- 
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety.
 -- Benjamin Franklin, Historical Review of Pennsylvania, 1759




reply via email to

[Prev in Thread] Current Thread [Next in Thread]