1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

pidl: sync idl.yp with the CPP changes

This is taken from commit 21b0d5e3b1.

metze
This commit is contained in:
Stefan Metzmacher
2011-01-05 09:24:22 +01:00
parent d9fd1f684a
commit c1c9e4a1c8

View File

@ -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);