summaryrefslogtreecommitdiffstats
path: root/pidl/idl.yp
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-01-05 09:24:22 +0100
committerStefan Metzmacher <metze@samba.org>2011-01-05 10:24:48 +0100
commitc1c9e4a1c8fc8c38f8996e760da34976b97cfb6c (patch)
tree1a05d185dbd45f5b7c0a8d1c7c35317eccf88e5d /pidl/idl.yp
parentd9fd1f684a718806cf6a03bc60b8651a50d63530 (diff)
downloadsamba-c1c9e4a1c8fc8c38f8996e760da34976b97cfb6c.tar.gz
samba-c1c9e4a1c8fc8c38f8996e760da34976b97cfb6c.tar.xz
samba-c1c9e4a1c8fc8c38f8996e760da34976b97cfb6c.zip
pidl: sync idl.yp with the CPP changes
This is taken from commit 21b0d5e3b10711e6ce3bfad0c1ee2da09a60e232. metze
Diffstat (limited to 'pidl/idl.yp')
-rw-r--r--pidl/idl.yp10
1 files changed, 8 insertions, 2 deletions
diff --git a/pidl/idl.yp b/pidl/idl.yp
index 30247f9ef3f..0062859eb3c 100644
--- a/pidl/idl.yp
+++ b/pidl/idl.yp
@@ -653,11 +653,17 @@ sub parse_file($$)
my $saved_delim = $/;
undef $/;
my $cpp = $ENV{CPP};
+ my $options = "";
if (! defined $cpp) {
- $cpp = "cpp";
+ if (defined $ENV{CC}) {
+ $cpp = "$ENV{CC}";
+ $options = "-E";
+ } else {
+ $cpp = "cpp";
+ }
}
my $includes = join('',map { " -I$_" } @$incdirs);
- my $data = `$cpp -D__PIDL__$includes -xc "$filename"`;
+ my $data = `$cpp $options -D__PIDL__$includes -xc "$filename"`;
$/ = $saved_delim;
return parse_string($data, $filename);