comparison 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
comparison
equal deleted inserted replaced
10425:0677c5d80b77 10426:4db7beace28e
27 %top { 27 %top {
28 #ifdef HAVE_CONFIG_H 28 #ifdef HAVE_CONFIG_H
29 #include <config.h> 29 #include <config.h>
30 #endif 30 #endif
31 31
32 #if defined (GNULIB_NAMESPACE)
33 #undef GNULIB_NAMESPACE
34 #endif
35 } 32 }
36 33
37 %s COMMAND_START 34 %s COMMAND_START
38 %s MATRIX_START 35 %s MATRIX_START
39 36
79 #include "toplev.h" 76 #include "toplev.h"
80 #include "utils.h" 77 #include "utils.h"
81 #include "variables.h" 78 #include "variables.h"
82 #include <oct-parse.h> 79 #include <oct-parse.h>
83 #include <oct-gperf.h> 80 #include <oct-gperf.h>
81
82 #if defined (GNULIB_NAMESPACE)
83 // Calls to the following functions appear in the generated output from
84 // flex without the namespace tag. Redefine them so we will use them
85 // via the gnulib namespace.
86 #define fprintf GNULIB_NAMESPACE::fprintf
87 #define fwrite GNULIB_NAMESPACE::fwrite
88 #define malloc GNULIB_NAMESPACE::malloc
89 #define realloc GNULIB_NAMESPACE::realloc
90 #endif
84 91
85 #if ! (defined (FLEX_SCANNER) \ 92 #if ! (defined (FLEX_SCANNER) \
86 && defined (YY_FLEX_MAJOR_VERSION) && YY_FLEX_MAJOR_VERSION >= 2 \ 93 && defined (YY_FLEX_MAJOR_VERSION) && YY_FLEX_MAJOR_VERSION >= 2 \
87 && defined (YY_FLEX_MINOR_VERSION) && YY_FLEX_MINOR_VERSION >= 5) 94 && defined (YY_FLEX_MINOR_VERSION) && YY_FLEX_MINOR_VERSION >= 5)
88 #error lex.l requires flex version 2.5.4 or later 95 #error lex.l requires flex version 2.5.4 or later