diff options
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba4/NDR')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm index d52dc12ec3..f19f4df319 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm @@ -5,6 +5,8 @@ package Parse::Pidl::Samba4::NDR::Client; +use Parse::Pidl::Samba4 qw(choose_header is_intree); + use vars qw($VERSION); $VERSION = '0.01'; @@ -97,12 +99,21 @@ sub Parse($$$$) $res .= "/* client functions auto-generated by pidl */\n"; $res .= "\n"; - $res .= "#include \"includes.h\"\n"; + if (is_intree()) { + $res .= "#include \"includes.h\"\n"; + } else { + $res .= "#define _GNU_SOURCE\n"; + $res .= "#include <stdio.h>\n"; + $res .= "#include <stdlib.h>\n"; + $res .= "#include <stdint.h>\n"; + $res .= "#include <stdarg.h>\n"; + $res .= "#include <core/nterr.h>\n"; + } $res .= "#include \"$ndr_header\"\n"; $res .= "#include \"$client_header\"\n"; $res .= "\n"; - $res_hdr .= "#include \"librpc/rpc/dcerpc.h\"\n"; + $res_hdr .= choose_header("librpc/rpc/dcerpc.h", "dcerpc.h")."\n"; $res_hdr .= "#include \"$header\"\n"; foreach my $x (@{$ndr}) { |