summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/flex/flex/0001-Emit-no-line-directives-if-gen_line_dirs-is-false.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/flex/flex/0001-Emit-no-line-directives-if-gen_line_dirs-is-false.patch')
-rw-r--r--meta/recipes-devtools/flex/flex/0001-Emit-no-line-directives-if-gen_line_dirs-is-false.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/meta/recipes-devtools/flex/flex/0001-Emit-no-line-directives-if-gen_line_dirs-is-false.patch b/meta/recipes-devtools/flex/flex/0001-Emit-no-line-directives-if-gen_line_dirs-is-false.patch
new file mode 100644
index 0000000000..c8202b6bd5
--- /dev/null
+++ b/meta/recipes-devtools/flex/flex/0001-Emit-no-line-directives-if-gen_line_dirs-is-false.patch
@@ -0,0 +1,32 @@
1From 440f3f55739468cd26e22f31871eca8cbbd53294 Mon Sep 17 00:00:00 2001
2From: Oleksiy Obitotskyy <oobitots@cisco.com>
3Date: Wed, 6 Jan 2021 06:12:14 -0800
4Subject: [PATCH] Emit no #line directives if gen_line_dirs is false
5
6If we set --noline we should not print line directives.
7But setting --noline means gen_line_dirs is false.
8
9Upstream-Status: Submitted
10Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
11---
12 src/buf.c | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/src/buf.c b/src/buf.c
16index 185083c..4439e28 100644
17--- a/src/buf.c
18+++ b/src/buf.c
19@@ -95,8 +95,8 @@ struct Buf *buf_linedir (struct Buf *buf, const char* filename, int lineno)
20 const char *src;
21 size_t tsz;
22
23- if (gen_line_dirs)
24- return buf;
25+ if (!gen_line_dirs)
26+ return buf;
27
28 tsz = strlen("#line \"\"\n") + /* constant parts */
29 2 * strlen (filename) + /* filename with possibly all backslashes escaped */
30--
312.26.2.Cisco
32