Mercurial > hg > octave-lyh
diff src/lex.ll @ 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 | 521373e25613 |
line wrap: on
line diff
--- a/src/lex.ll +++ b/src/lex.ll @@ -29,9 +29,6 @@ #include <config.h> #endif -#if defined (GNULIB_NAMESPACE) -#undef GNULIB_NAMESPACE -#endif } %s COMMAND_START @@ -82,6 +79,16 @@ #include <oct-parse.h> #include <oct-gperf.h> +#if defined (GNULIB_NAMESPACE) +// Calls to the following functions appear in the generated output from +// flex without the namespace tag. Redefine them so we will use them +// via the gnulib namespace. +#define fprintf GNULIB_NAMESPACE::fprintf +#define fwrite GNULIB_NAMESPACE::fwrite +#define malloc GNULIB_NAMESPACE::malloc +#define realloc GNULIB_NAMESPACE::realloc +#endif + #if ! (defined (FLEX_SCANNER) \ && defined (YY_FLEX_MAJOR_VERSION) && YY_FLEX_MAJOR_VERSION >= 2 \ && defined (YY_FLEX_MINOR_VERSION) && YY_FLEX_MINOR_VERSION >= 5)