mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
pidl: added ifdef guards around ndr headers
this prevents us parsing the leading headers needlessly
This commit is contained in:
parent
bc47af50eb
commit
7d380795b6
@ -5,7 +5,6 @@
|
||||
# released under the GNU GPL
|
||||
|
||||
package Parse::Pidl::Samba4::Header;
|
||||
|
||||
require Exporter;
|
||||
|
||||
@ISA = qw(Exporter);
|
||||
@ -412,6 +411,20 @@ sub Parse($)
|
||||
$res = "";
|
||||
%headerstructs = ();
|
||||
pidl "/* header auto-generated by pidl */\n\n";
|
||||
|
||||
my $ifacename = "";
|
||||
|
||||
# work out a unique interface name
|
||||
foreach (@{$ndr}) {
|
||||
if ($_->{TYPE} eq "INTERFACE") {
|
||||
$ifacename = $_->{NAME};
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
pidl "#ifndef _PIDL_HEADER_$ifacename\n";
|
||||
pidl "#define _PIDL_HEADER_$ifacename\n\n";
|
||||
|
||||
if (!is_intree()) {
|
||||
pidl "#include <util/data_blob.h>\n";
|
||||
}
|
||||
@ -428,6 +441,8 @@ sub Parse($)
|
||||
($_->{TYPE} eq "INCLUDE") && HeaderInclude(@{$_->{PATHS}});
|
||||
}
|
||||
|
||||
pidl "#endif /* _PIDL_HEADER_$ifacename */\n";
|
||||
|
||||
return $res;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user