File: work-around-flex-bug.patch

package info (click to toggle)
eegdev 0.2-11
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 5,108 kB
  • sloc: ansic: 32,298; sh: 10,962; makefile: 252; lex: 138; yacc: 130; xml: 29
file content (32 lines) | stat: -rw-r--r-- 745 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Description: Workaround flex bug for inclusion of config.h when an embedded gnulib is present
See https://github.com/westes/flex/issues/564
Author: Nilesh Patra <nilesh@debian.org>
Last-Update: 2023-08-25
--- a/src/core/conffile.l
+++ b/src/core/conffile.l
@@ -21,6 +21,11 @@
 %option prefix="cff_"
 %option header-file="conffile.lex.h"
 %option outfile="conffile.lex.c"
+%top {
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+}
 %{
 #if HAVE_CONFIG_H
 # include <config.h>
--- a/src/core/confline.l
+++ b/src/core/confline.l
@@ -21,6 +21,11 @@
 %option prefix="cfl_"
 %option header-file="confline.lex.h"
 %option outfile="confline.lex.c"
+%top {
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
+}
 %{
 #if HAVE_CONFIG_H
 # include <config.h>