summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity/samba/samba/0001-PIDL-fix-parsing-linemarkers-in-preprocessor-output.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-connectivity/samba/samba/0001-PIDL-fix-parsing-linemarkers-in-preprocessor-output.patch')
-rw-r--r--meta-oe/recipes-connectivity/samba/samba/0001-PIDL-fix-parsing-linemarkers-in-preprocessor-output.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/samba/samba/0001-PIDL-fix-parsing-linemarkers-in-preprocessor-output.patch b/meta-oe/recipes-connectivity/samba/samba/0001-PIDL-fix-parsing-linemarkers-in-preprocessor-output.patch
new file mode 100644
index 000000000..586867d8f
--- /dev/null
+++ b/meta-oe/recipes-connectivity/samba/samba/0001-PIDL-fix-parsing-linemarkers-in-preprocessor-output.patch
@@ -0,0 +1,68 @@
1Upstream-Status: Backport
2
3From b07ade6e6fcc8b844cf1fb8b6038617281c4c2d0 Mon Sep 17 00:00:00 2001
4From: Alexander Bokovoy <ab@samba.org>
5Date: Wed, 6 Feb 2013 10:17:57 +0200
6Subject: [PATCH] PIDL: fix parsing linemarkers in preprocessor output
7
8Commit b07ade6e6fcc8b844cf1fb8b6038617281c4c2d0 v3-6-stable
9
10When PIDL calls out to C preprocessor to expand IDL files
11and parse the output, it filters out linemarkers and line control
12information as described in http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html
13and http://gcc.gnu.org/onlinedocs/cpp/Line-Control.html#Line-Control
14
15With gcc 4.8 stdc-predef.h is included automatically and linemarker for the
16file has extended flags that PIDL couldn't parse ('system header that needs to
17be extern "C" protected for C++')
18
19Thanks to Jakub Jelinek <jakub@redhat.com> for explanation of the linemarker format.
20
21Fixes https://bugzilla.redhat.com/show_bug.cgi?id=906517
22
23Reviewed-by: Andreas Schneider <asn@samba.org>
24(cherry picked from commit 6ba7ab5c14801aecae96373d5a9db7ab82957526)
25
26Signed-off-by: Andreas Schneider <asn@samba.org>
27
28Fix bug #9636 - pidl can't parse new linemarkers in preprocessor output.
29(cherry picked from commit 643571470f2e4cd2f58bd60ac7189abb826d33cc)
30(cherry picked from commit b5a8afd6550e9091d169d3010751913bb483fc4b)
31---
32 pidl/idl.yp | 4 +++-
33 pidl/lib/Parse/Pidl/IDL.pm | 4 +++-
34 2 files changed, 6 insertions(+), 2 deletions(-)
35
36diff --git a/pidl/idl.yp b/pidl/idl.yp
37index b5c5185..c8a65f6 100644
38--- a/pidl/idl.yp
39+++ b/pidl/idl.yp
40@@ -610,7 +610,9 @@ again:
41
42 for ($parser->YYData->{INPUT}) {
43 if (/^\#/) {
44- if (s/^\# (\d+) \"(.*?)\"( \d+|)//) {
45+ # Linemarker format is described at
46+ # http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html
47+ if (s/^\# (\d+) \"(.*?)\"(( \d+){1,4}|)//) {
48 $parser->YYData->{LINE} = $1-1;
49 $parser->YYData->{FILE} = $2;
50 goto again;
51diff --git a/pidl/lib/Parse/Pidl/IDL.pm b/pidl/lib/Parse/Pidl/IDL.pm
52index d4820ff..6927c89 100644
53--- a/pidl/lib/Parse/Pidl/IDL.pm
54+++ b/pidl/lib/Parse/Pidl/IDL.pm
55@@ -2576,7 +2576,9 @@ again:
56
57 for ($parser->YYData->{INPUT}) {
58 if (/^\#/) {
59- if (s/^\# (\d+) \"(.*?)\"( \d+|)//) {
60+ # Linemarker format is described at
61+ # http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html
62+ if (s/^\# (\d+) \"(.*?)\"(( \d+){1,4}|)//) {
63 $parser->YYData->{LINE} = $1-1;
64 $parser->YYData->{FILE} = $2;
65 goto again;
66--
671.7.5.4
68