From 84aea6eca58b20f32fad0de0f43d9a5c7de247c9 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 15 Mar 2006 17:26:53 +0000 Subject: r14455: also add the: #ifndef FOO #define FOO ... #endif to the client headers metze (This used to be commit c0dd773537bda9980e77eb6eda848161b7df82e5) --- source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm | 6 ++++++ source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'source4/pidl/lib/Parse') diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm index 60faa78df3..0f3a86e81e 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm @@ -66,6 +66,10 @@ my %done; sub ParseInterface($) { my($interface) = shift; + + $res_hdr .= "#ifndef _HEADER_RPC_$interface->{NAME}\n"; + $res_hdr .= "#define _HEADER_RPC_$interface->{NAME}\n\n"; + $res .= "/* $interface->{NAME} - client functions generated by pidl */\n\n"; foreach my $fn (@{$interface->{FUNCTIONS}}) { @@ -75,6 +79,8 @@ sub ParseInterface($) $done{$fn->{NAME}} = 1; } + $res_hdr .= "#endif /* _HEADER_RPC_$interface->{NAME} */\n"; + return $res; } diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 249a1ae194..42375674f5 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -2301,8 +2301,8 @@ sub ParseInterface($$) { my($interface,$needed) = @_; - pidl_hdr "#ifndef _HEADER_RPC_$interface->{NAME}"; - pidl_hdr "#define _HEADER_RPC_$interface->{NAME}"; + pidl_hdr "#ifndef _HEADER_NDR_$interface->{NAME}"; + pidl_hdr "#define _HEADER_NDR_$interface->{NAME}"; pidl_hdr ""; @@ -2338,7 +2338,7 @@ sub ParseInterface($$) FunctionTable($interface); - pidl_hdr "#endif /* _HEADER_RPC_$interface->{NAME} */"; + pidl_hdr "#endif /* _HEADER_NDR_$interface->{NAME} */"; } ##################################################################### @@ -2351,7 +2351,7 @@ sub Parse($$) $res = ""; $res_hdr = ""; - pidl_hdr "/* header auto-generated by pidl */"; + pidl_hdr "/* header auto-generated by pidl */"; pidl_hdr ""; pidl "/* parser auto-generated by pidl */"; -- cgit