]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: early-include "config.h" in flex lexers 2965/head
authorDavid Lamparter <equinox@opensourcerouting.org>
Sat, 8 Sep 2018 23:00:42 +0000 (01:00 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Sat, 8 Sep 2018 23:16:25 +0000 (01:16 +0200)
This is neccessary to get _FILE_OFFSET_BITS right.

Signed-off-by: David Lamparter <equinox@diac24.net>
lib/command_lex.l
lib/defun_lex.l

index 0d6e6ee7e5fc60b0ac55918d38acc258face2219..3b18b58a2e9e3dfefdb0fdedc2549c4ff8c901a4 100644 (file)
  * 02111-1307, USA.
  */
 
+%top{
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+}
 %{
 /* ignore flex generated code in static analyzer */
 #ifndef __clang_analyzer__
index d901c26a2ed336ad37eefd66984e359b0e0dd246..6c0805a4fa9b4542319eaf82476b35d6bae53698 100644 (file)
@@ -1,4 +1,3 @@
-%{
 /*
  * clippy (CLI preparator in python) C pseudo-lexer
  * Copyright (C) 2016-2017  David Lamparter for NetDEF, Inc.
  * code documentation in it.
  */
 
+%top{
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+}
+%{
 /* ignore harmless bugs in old versions of flex */
 #pragma GCC diagnostic ignored "-Wsign-compare"
 #pragma GCC diagnostic ignored "-Wunused-value"