diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-04-23 17:56:43 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-04-23 17:56:43 +0000 |
commit | 210cc311fb5645449adce0f62f6dc5cf434a6feb (patch) | |
tree | a71149688c812f799393785e87f089774eea90cd /epan/dfilter/scanner.l | |
parent | 0bbbcf55df44969533c8e7dbfe258bf8ecf6dc28 (diff) |
Try putting the include of config.h at the top of the generated scanner,
so that the config.h definitions are available before we include
anything else; that way, for example, anything defined to enable
large-file support will be defined before we include any system header
files that might depend on it.
svn path=/trunk/; revision=36832
Diffstat (limited to 'epan/dfilter/scanner.l')
-rw-r--r-- | epan/dfilter/scanner.l | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/epan/dfilter/scanner.l b/epan/dfilter/scanner.l index 4a22d8cb33..129cd2eee2 100644 --- a/epan/dfilter/scanner.l +++ b/epan/dfilter/scanner.l @@ -1,20 +1,4 @@ -/* - * We don't use unput, so don't generate code for it. - */ -%option nounput - -/* - * We don't read from the terminal. - */ -%option never-interactive - -/* - * Prefix scanner routines with "df_" rather than "yy", so this scanner - * can coexist with other scanners. - */ -%option prefix="df_" - -%{ +%top{ /* * $Id$ * @@ -40,7 +24,25 @@ #ifdef HAVE_CONFIG_H #include "config.h" #endif +} +/* + * We don't use unput, so don't generate code for it. + */ +%option nounput + +/* + * We don't read from the terminal. + */ +%option never-interactive + +/* + * Prefix scanner routines with "df_" rather than "yy", so this scanner + * can coexist with other scanners. + */ +%option prefix="df_" + +%{ #include <stdlib.h> #include <errno.h> |