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:
10
pidl/idl.yp
10
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);
|
||||
|
Reference in New Issue
Block a user