From: Andrew Bartlett Date: Sun, 3 Nov 2019 23:17:41 +0000 (+1300) Subject: pidl: Allow the compilation of the ndr_table to be skiped X-Git-Tag: talloc-2.3.1~68 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dddef1b8224a2977c6e8b56af83429b36d6119ad;p=thirdparty%2Fsamba.git pidl: Allow the compilation of the ndr_table to be skiped libnetapi.idl defines a large number of functions a nopull,nopush and no replacement is provided. This will allow the ndr_table to be generated for all other IDL files that may have public structures that could usefully be dumped by ndrdump. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14191 Signed-off-by: Andrew Bartlett Signed-off-by: Douglas Bagnall Pair-progammed-with: Douglas Bagnall --- diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 2fc4327faf4..b896398355c 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -3093,7 +3093,16 @@ sub ParseInterface($$$) ($needed->{"ndr_print_$d->{NAME}"}) && $self->ParseFunctionPrint($d); } + # Allow compilation of generated files where replacement functions + # for structures declared nopull/nopush have not been provided. + # + # This makes sense when only the print functions are used + # + # Otherwise the ndr_table XXX will reference these + + $self->pidl("#ifndef SKIP_NDR_TABLE_$interface->{NAME}"); $self->FunctionTable($interface); + $self->pidl("#endif /* SKIP_NDR_TABLE_$interface->{NAME} */"); $self->pidl_hdr("#endif /* _HEADER_NDR_$interface->{NAME} */"); }