PIDL: fix parsing linemarkers in preprocessor output
authorAlexander Bokovoy <ab@samba.org>
Wed, 6 Feb 2013 08:17:57 +0000 (10:17 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 4 Jul 2013 08:04:31 +0000 (10:04 +0200)
commitb5a8afd6550e9091d169d3010751913bb483fc4b
treea3e0924df605ae805c27785ab16160e5b40f953a
parente98d3b7648fe298f03e408ab91b8b53904bab8ca
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 <jakub@redhat.com> for explanation of the linemarker format.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=906517

Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 6ba7ab5c14801aecae96373d5a9db7ab82957526)

Signed-off-by: Andreas Schneider <asn@samba.org>
Fix bug #9636 - pidl can't parse new linemarkers in preprocessor output.
(cherry picked from commit 643571470f2e4cd2f58bd60ac7189abb826d33cc)
pidl/idl.yp
pidl/lib/Parse/Pidl/IDL.pm