Skip to content

Commit

Permalink
Include config.h at the very beginning of all Flex scanners.
Browse files Browse the repository at this point in the history
That way, if we #define anything for large file support, that's done
before we include any system header files that either depend on that
definition or that define it themselves if it's not already defined.

Change-Id: I9b07344151103be337899dead44d6960715d6813
Reviewed-on: https://code.wireshark.org/review/19035
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
  • Loading branch information
guyharris committed Dec 2, 2016
1 parent 2ec9093 commit 6f37317
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 19 deletions.
7 changes: 5 additions & 2 deletions epan/dfilter/scanner.l
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
%top {
/* Include this before everything else, for various large-file definitions */
#include "config.h"
}

/*
* We want a reentrant scanner.
*/
Expand Down Expand Up @@ -68,8 +73,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

#include "config.h"

#include <stdlib.h>
#include <errno.h>

Expand Down
7 changes: 5 additions & 2 deletions epan/diam_dict.l
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
%top {
/* Include this before everything else, for various large-file definitions */
#include "config.h"
}

/*
* We want a reentrant scanner.
*/
Expand Down Expand Up @@ -82,8 +87,6 @@
** Boston, MA 02110-1301, USA.
*/

#include "config.h"

#include <glib.h>
#include <stdio.h>
#include <string.h>
Expand Down
7 changes: 5 additions & 2 deletions epan/dtd_parse.l
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
%top {
/* Include this before everything else, for various large-file definitions */
#include "config.h"
}

/*
* We want a reentrant scanner.
*/
Expand Down Expand Up @@ -76,8 +81,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

#include "config.h"

#include <glib.h>
#include <string.h>

Expand Down
7 changes: 5 additions & 2 deletions epan/dtd_preparse.l
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
%top {
/* Include this before everything else, for various large-file definitions */
#include "config.h"
}

/*
* We want a reentrant scanner.
*/
Expand Down Expand Up @@ -85,8 +90,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

#include "config.h"

#include <glib.h>
#include <string.h>
#include <errno.h>
Expand Down
7 changes: 5 additions & 2 deletions epan/radius_dict.l
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
%top {
/* Include this before everything else, for various large-file definitions */
#include "config.h"
}

/*
* We want a reentrant scanner.
*/
Expand Down Expand Up @@ -78,8 +83,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

#include "config.h"

#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down
7 changes: 5 additions & 2 deletions epan/uat_load.l
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
%top {
/* Include this before everything else, for various large-file definitions */
#include "config.h"
}

/*
* We want a reentrant scanner.
*/
Expand Down Expand Up @@ -75,8 +80,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "config.h"

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
Expand Down
5 changes: 5 additions & 0 deletions plugins/mate/mate_parser.l
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
%top {
/* Include this before everything else, for various large-file definitions */
#include "config.h"
}

/*
* We want a reentrant scanner.
*/
Expand Down
7 changes: 5 additions & 2 deletions plugins/wimaxasncp/wimaxasncp_dict.l
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
%top {
/* Include this before everything else, for various large-file definitions */
#include "config.h"
}

/*
* We want a reentrant scanner.
*/
Expand Down Expand Up @@ -83,8 +88,6 @@
** Boston, MA 02110-1301, USA.
*/

#include "config.h"

#include <glib.h>
#include <stdio.h>
#include <string.h>
Expand Down
5 changes: 5 additions & 0 deletions text2pcap-scanner.l
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/* -*-mode: flex-*- */

%top {
/* Include this before everything else, for various large-file definitions */
#include "config.h"
}

/*
* We don't use input, so don't generate code for it.
*/
Expand Down
7 changes: 5 additions & 2 deletions ui/text_import_scanner.l
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/* -*-mode: flex-*- */

%top {
/* Include this before everything else, for various large-file definitions */
#include "config.h"
}

/*
* We want a reentrant scanner.
*/
Expand Down Expand Up @@ -74,8 +79,6 @@
*
*******************************************************************************/

#include "config.h"

#include <stdio.h>
#include <stdlib.h>

Expand Down
7 changes: 5 additions & 2 deletions wiretap/ascend_scanner.l
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
%top {
/* Include this before everything else, for various large-file definitions */
#include "config.h"
}

/*
* We want a reentrant scanner.
*/
Expand Down Expand Up @@ -64,8 +69,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

#include "config.h"

#include <stdlib.h>
#include <string.h>

Expand Down
6 changes: 5 additions & 1 deletion wiretap/k12text.l
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
%top {
/* Include this before everything else, for various large-file definitions */
#include "config.h"
}

/*
* We want a reentrant scanner.
*/
Expand Down Expand Up @@ -95,7 +100,6 @@
* - verify encapsulations
*/

#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <errno.h>
Expand Down

0 comments on commit 6f37317

Please sign in to comment.