summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-16 00:38:33 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-16 00:38:33 +0000
commitd313dab5eea860bc36d9c4e259073850708080e1 (patch)
treeae5f9a686b3628ed74bec016c388a92b4b1ab4d3 /source4
parentc0149d86c5e0572ab0376b79a42307f8ed38934d (diff)
downloadsamba-d313dab5eea860bc36d9c4e259073850708080e1.tar.gz
samba-d313dab5eea860bc36d9c4e259073850708080e1.tar.bz2
samba-d313dab5eea860bc36d9c4e259073850708080e1.zip
cope with different cpp formatting on some systems, and make sure we
don't loop forever if we get a cpp format line we don't understand (This used to be commit 003c6c493b1babadb1f7c4eb54babed394bd42a9)
Diffstat (limited to 'source4')
-rw-r--r--source4/build/pidl/idl.pm9
-rw-r--r--source4/build/pidl/idl.yp9
2 files changed, 16 insertions, 2 deletions
diff --git a/source4/build/pidl/idl.pm b/source4/build/pidl/idl.pm
index d5c0ae0071..ee7fd8d9cf 100644
--- a/source4/build/pidl/idl.pm
+++ b/source4/build/pidl/idl.pm
@@ -1937,7 +1937,14 @@ again:
$parser->YYData->{INPUT_FILENAME} = $2;
goto again;
}
- goto again;
+ if (s/^\#line (\d+) \"(.*?)\"( \d+|)//) {
+ $parser->YYData->{LINE} = $1-1;
+ $parser->YYData->{INPUT_FILENAME} = $2;
+ goto again;
+ }
+ if (s/^(\#.*)$//m) {
+ goto again;
+ }
}
if (s/^(\n)//) {
$parser->YYData->{LINE}++;
diff --git a/source4/build/pidl/idl.yp b/source4/build/pidl/idl.yp
index bfc4698709..93446dc8c1 100644
--- a/source4/build/pidl/idl.yp
+++ b/source4/build/pidl/idl.yp
@@ -267,7 +267,14 @@ again:
$parser->YYData->{INPUT_FILENAME} = $2;
goto again;
}
- goto again;
+ if (s/^\#line (\d+) \"(.*?)\"( \d+|)//) {
+ $parser->YYData->{LINE} = $1-1;
+ $parser->YYData->{INPUT_FILENAME} = $2;
+ goto again;
+ }
+ if (s/^(\#.*)$//m) {
+ goto again;
+ }
}
if (s/^(\n)//) {
$parser->YYData->{LINE}++;