From 8f0418e4a239ba973834592537b474d3aac52d5b Mon Sep 17 00:00:00 2001 From: root Date: Sat, 13 Apr 2013 00:05:58 -0700 Subject: Sat Apr 13 00:05:58 PDT 2013 --- extra/samba/samba-4.0.3-fix_pidl_with_gcc48.patch | 60 +++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 extra/samba/samba-4.0.3-fix_pidl_with_gcc48.patch (limited to 'extra/samba/samba-4.0.3-fix_pidl_with_gcc48.patch') diff --git a/extra/samba/samba-4.0.3-fix_pidl_with_gcc48.patch b/extra/samba/samba-4.0.3-fix_pidl_with_gcc48.patch new file mode 100644 index 000000000..cb2378a78 --- /dev/null +++ b/extra/samba/samba-4.0.3-fix_pidl_with_gcc48.patch @@ -0,0 +1,60 @@ +From 1ac743a7d0d20e16fc325749d593edaaed89d706 Mon Sep 17 00:00:00 2001 +From: Alexander Bokovoy +Date: Wed, 6 Feb 2013 10:17:57 +0200 +Subject: [PATCH] PIDL: fix parsing linemarkers in preprocessor output + +When PIDL calls out to C preprocessor to expand IDL files +and parse the output, it filters out linemarkers and line control +information as described in http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html +and http://gcc.gnu.org/onlinedocs/cpp/Line-Control.html#Line-Control + +With gcc 4.8 stdc-predef.h is included automatically and linemarker for the +file has extended flags that PIDL couldn't parse ('system header that needs to +be extern "C" protected for C++') + +Thanks to Jakub Jelinek for explanation of the linemarker format. + +Fixes https://bugzilla.redhat.com/show_bug.cgi?id=906517 + +Reviewed-by: Andreas Schneider +(cherry picked from commit 6ba7ab5c14801aecae96373d5a9db7ab82957526) + +Signed-off-by: Andreas Schneider +--- + pidl/idl.yp | 4 +++- + pidl/lib/Parse/Pidl/IDL.pm | 4 +++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/pidl/idl.yp b/pidl/idl.yp +index b5c5185..c8a65f6 100644 +--- a/pidl/idl.yp ++++ b/pidl/idl.yp +@@ -610,7 +610,9 @@ again: + + for ($parser->YYData->{INPUT}) { + if (/^\#/) { +- if (s/^\# (\d+) \"(.*?)\"( \d+|)//) { ++ # Linemarker format is described at ++ # http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html ++ if (s/^\# (\d+) \"(.*?)\"(( \d+){1,4}|)//) { + $parser->YYData->{LINE} = $1-1; + $parser->YYData->{FILE} = $2; + goto again; +diff --git a/pidl/lib/Parse/Pidl/IDL.pm b/pidl/lib/Parse/Pidl/IDL.pm +index d4820ff..6927c89 100644 +--- a/pidl/lib/Parse/Pidl/IDL.pm ++++ b/pidl/lib/Parse/Pidl/IDL.pm +@@ -2576,7 +2576,9 @@ again: + + for ($parser->YYData->{INPUT}) { + if (/^\#/) { +- if (s/^\# (\d+) \"(.*?)\"( \d+|)//) { ++ # Linemarker format is described at ++ # http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html ++ if (s/^\# (\d+) \"(.*?)\"(( \d+){1,4}|)//) { + $parser->YYData->{LINE} = $1-1; + $parser->YYData->{FILE} = $2; + goto again; +-- +1.8.1.1 + -- cgit v1.2.3-54-g00ecf