diff options
-rw-r--r-- | pidl/idl.yp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pidl/idl.yp b/pidl/idl.yp index 30247f9ef3..0062859eb3 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); |