r14362: Only include ndr_compression.h when necessary.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 14 Mar 2006 00:37:05 +0000 (00:37 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:57:14 +0000 (13:57 -0500)
source/include/includes.h
source/librpc/ndr/ndr_orpc.h
source/librpc/rpc/dcerpc.h
source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm

index b613a18633eb6b1f7fd0e731eabf50d12a2e28bf..81105d227d3e996d3f0429dfbf56d0caab509f2d 100644 (file)
@@ -125,9 +125,6 @@ enum brl_type {
 #include "libcli/nbt/libnbt.h"
 #include "libcli/util/proto.h"
 
-/* FIXME: This header should be included by pidl where necessary */
-#include "librpc/ndr/ndr_compression.h"
-
 #undef _PRINTF_ATTRIBUTE
 #define _PRINTF_ATTRIBUTE(a1, a2)
 
index 6c35d0106711ef4b1b73274a43b694d7ed8c13df..171a783b8e231345e2aa95388c65396427dacb1a 100644 (file)
@@ -34,6 +34,7 @@ struct DUALSTRINGARRAY
        struct SECURITYBINDING **securitybindings;
 };
 
+#include "librpc/gen_ndr/orpc.h"
 #include "librpc/ndr/ndr_orpc_proto.h"
 
 #endif /* __NDR_ORPC_H__ */
index 7f44feb0d95c222a0032e6c929e77c3f47472364..567246031a921f7a0c22dbca8c4931648d6ec78d 100644 (file)
@@ -24,6 +24,8 @@
 #ifndef __DCERPC_H__
 #define __DCERPC_H__
 
+#include "librpc/gen_ndr/dcerpc.h"
+
 enum dcerpc_transport_t {
        NCACN_NP, NCACN_IP_TCP, NCACN_IP_UDP, NCACN_VNS_IPC, NCACN_VNS_SPP, 
        NCACN_AT_DSP, NCADG_AT_DDP, NCALRPC, NCACN_UNIX_STREAM, NCADG_UNIX_DGRAM,
index 0b2cef54b88e1b90ebf716d950ede9e21a035dd4..4a1f8a9c1412a41bfcc271135530914214e6b97d 100644 (file)
@@ -2307,6 +2307,10 @@ sub ParseInterface($$)
 
        pidl_hdr "";
 
+       if ($needed->{"compression"}) {
+               pidl "#include \"librpc/ndr/ndr_compression.h\"";
+       }
+       
        HeaderInterface($interface);
 
        # Typedefs
@@ -2403,6 +2407,9 @@ sub NeededTypedef($$)
 
                for my $e (@{$t->{DATA}->{ELEMENTS}}) {
                        $e->{PARENT} = $t->{DATA};
+                       if (has_property($e, "compression")) { 
+                               $needed->{"compression"} = 1;
+                       }
                        if ($needed->{"pull_$t->{NAME}"} and
                                not defined($needed->{"pull_$e->{TYPE}"})) {
                                $needed->{"pull_$e->{TYPE}"} = 1;