From dddef1b8224a2977c6e8b56af83429b36d6119ad Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 4 Nov 2019 12:17:41 +1300 Subject: [PATCH] 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 --- pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 9 +++++++++ 1 file changed, 9 insertions(+) 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} */"); } -- 2.47.3