Wireshark-dev: [Wireshark-dev] Flex --header-file option?
From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Thu, 24 May 2007 11:39:33 -0700
standel@xxxxxxxxxxxxx wrote:
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=21817

User: standel
Date: 2007/05/17 06:02 PM

Log:
 Since code generated by lex may trigger gcc warnings, we are now generating two
 libraries.  A single library is generated with the lex code without the barrier
 "stop on warning". An other library is generated from the remaining source
 files with the "stop on warning" barrier.
The warnings that show up only on the Ubuntu buildbot look as if they 
might be warnings that functions deliberately exported by the scanner 
for use by the code using it aren't being declared before being defined.
It appears that Flex 2.5.33 has a --header-file option that tells it to 
"create a C header file in addition to the scanner".  If that header 
file declares the functions in question, perhaps the configure script 
can check whether Flex supports --header-file and, if it does, pass that 
flag (with an appropriate file name), make the generated header file 
part of the EXTRA_DIST list (so that a tarball built on a system with a 
Flex that supports that flag can be built without having Flex).
If the generated .c file doesn't include that .h file automatically, we 
could have a config.h option to control that (if *I'd* added that option 
to Flex, I'd have had the .c file include it, so it might be that it 
automatically includes it).
Unfortunately, my main development machine just has 2.5.4; I'll see if I 
can find any machine with a Flex that supports --header-file, and see if 
I can make that work.