diff src/oct-parse.yy @ 10426:4db7beace28e

oct-parse.yy, lex.ll: use symbols via gnulib namespace
author John W. Eaton <jwe@octave.org>
date Sat, 20 Mar 2010 11:01:04 -0400
parents 479cc8a0a846
children 34e51d4e199b
line wrap: on
line diff
--- a/src/oct-parse.yy	Fri Mar 19 13:00:06 2010 +0100
+++ b/src/oct-parse.yy	Sat Mar 20 11:01:04 2010 -0400
@@ -33,16 +33,9 @@
 #include <config.h>
 #endif
 
-#if defined (GNULIB_NAMESPACE)
-#undef GNULIB_NAMESPACE
-#endif
-
 #include <cassert>
 #include <cstdio>
-
-#ifdef YYBYACC
 #include <cstdlib>
-#endif
 
 #include <iostream>
 #include <map>
@@ -83,6 +76,15 @@
 #include "utils.h"
 #include "variables.h"
 
+#if defined (GNULIB_NAMESPACE)
+// Calls to the following functions appear in the generated output from
+// Bison without the namespace tag.  Redefine them so we will use them
+// via the gnulib namespace.
+#define fclose GNULIB_NAMESPACE::fclose
+#define fprintf GNULIB_NAMESPACE::fprintf
+#define malloc GNULIB_NAMESPACE::malloc
+#endif
+
 // The current input line number.
 int input_line_number = 1;