[SCM] Samba Shared Repository - branch v3-6-test updated

Stefan Metzmacher metze at samba.org
Wed Feb 2 18:50:00 MST 2011


The branch, v3-6-test has been updated
       via  358abb2 pidl: regenerate lib/Parse/Pidl/Expr.pm from expr.yp
       via  9ce79da pidl: sync idl.yp with the CPP changes
       via  d26a085 pidl:Samba4/NDR/Client: remove compat mode for dcerpc_pipe based bindings
       via  dfc277e wmi: Remove unnecessary noprint statements.(cherry picked from commit 9529fdab26270f4d35119e87f9ca8a7693c24a3f)
       via  60003fd pidl:Samba4/NDR/Parser: fix ndr_pull/ndr_push mismatch
       via  756ba9f Fix some formatting.(cherry picked from commit b320cc799096fb07870c5e5d6d69d485cb1d1ea5)
      from  31d272e s3:lib: allow_trailing_dollar should only allow '$'

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 358abb289efc0ce9e0a6bf1b3c6c26091446943b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jan 5 09:26:02 2011 +0100

    pidl: regenerate lib/Parse/Pidl/Expr.pm from expr.yp
    
    metze
    (cherry picked from commit 2868fc8a91c5ba410cb004aa56084dd906da4177)

commit 9ce79daeeee1d5ef69dfe008d6ae31afd24566fd
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jan 5 09:24:22 2011 +0100

    pidl: sync idl.yp with the CPP changes
    
    This is taken from commit 21b0d5e3b10711e6ce3bfad0c1ee2da09a60e232.
    
    metze
    (cherry picked from commit c1c9e4a1c8fc8c38f8996e760da34976b97cfb6c)

commit d26a08548e979f752ab0382f4aee656d8966cc6a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Jan 15 08:59:16 2011 +0100

    pidl:Samba4/NDR/Client: remove compat mode for dcerpc_pipe based bindings
    
    The only consumer "openchange" uses the dcerpc_binding_handle based
    functions now.
    
    metze
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Fri Jan 21 08:16:25 CET 2011 on sn-devel-104
    (cherry picked from commit 1a96ec21095c3524558b9a28643f84a28701db13)

commit dfc277e08c844108a1dffeca2e4574faaa045182
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Tue Dec 28 17:33:30 2010 +0100

    wmi: Remove unnecessary noprint statements.(cherry picked from commit 9529fdab26270f4d35119e87f9ca8a7693c24a3f)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 60003fdc070693f9958e273d163e12b8868fcb24
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Feb 1 13:10:04 2011 +0100

    pidl:Samba4/NDR/Parser: fix ndr_pull/ndr_push mismatch
    
    metze
    (cherry picked from commit 34b7b552e85fddedf012af90eb13a4cfdcc16a74)

commit 756ba9f4577be646d9e060b1ff416ba576884ef3
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Tue Dec 28 16:30:47 2010 +0100

    Fix some formatting.(cherry picked from commit b320cc799096fb07870c5e5d6d69d485cb1d1ea5)
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 librpc/idl/wmi.idl                       |   27 +++++------
 librpc/ndr/ndr_wmi.c                     |   15 +++---
 librpc/ndr/ndr_wmi.h                     |    3 -
 pidl/idl.yp                              |   10 +++-
 pidl/lib/Parse/Pidl/Expr.pm              |   72 +++++++++++++++---------------
 pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm |   57 -----------------------
 pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm |   12 ++---
 7 files changed, 68 insertions(+), 128 deletions(-)
 delete mode 100644 librpc/ndr/ndr_wmi.h


Changeset truncated at 500 lines:

diff --git a/librpc/idl/wmi.idl b/librpc/idl/wmi.idl
index 3ae5a45..4d428a8 100644
--- a/librpc/idl/wmi.idl
+++ b/librpc/idl/wmi.idl
@@ -8,7 +8,6 @@ import "dcom.idl";
 import "misc.idl";
 
 [
-	helper("librpc/ndr/ndr_wmi.h"),
 	uuid("8BC3F05E-D86B-11d0-A075-00C04FB68820")
 ] coclass WbemLevel1Login
 {
@@ -17,8 +16,8 @@ import "misc.idl";
 };
 
 [
-	local, 
-	object, 
+	local,
+	object,
 	uuid("dc12a681-737f-11cf-884d-00aa004b2e24")
 ]
 interface IWbemClassObject : IUnknown
@@ -203,7 +202,7 @@ coclass WbemClassObject
         WBEM_E_PROVIDER_DISABLED                = 0x8004108a
     }   WBEMSTATUS;
 
-    typedef [public,noprint] enum
+    typedef [public] bitmap
     {
         WBEM_FLAG_RETURN_WBEM_COMPLETE 		= 0,
         WBEM_FLAG_BIDIRECTIONAL 			= 0,
@@ -225,7 +224,7 @@ coclass WbemClassObject
         WBEM_MASK_RESERVED_FLAGS 			= 0x001F000
     } WBEM_GENERIC_FLAG_TYPE;
 
-    typedef [public,noprint,v1_enum] enum tag_WBEM_TIMEOUT_TYPE
+    typedef [public,v1_enum] enum tag_WBEM_TIMEOUT_TYPE
     {
         WBEM_NO_WAIT = 0,
         WBEM_INFINITE = 0xFFFFFFFF
@@ -300,18 +299,18 @@ coclass WbemClassObject
 		WCF_CLASS = 4,
 		WCF_CLASS_PART_INTERNAL = 8
 	/*	WCF_CLASS_PART_SHARED = 0x104 */
-    } WCO_FLAGS;
+	} WCO_FLAGS;
 
-    typedef [public,nopull,nopush] struct
-    {
+	typedef struct
+	{
 		uint32 count;
 		[ref,charset(UTF16)] uint16 *item[count];
-    } CIMSTRINGS;
+	} CIMSTRINGS;
 
-    typedef [public,bitmap8bit] bitmap {
-        DEFAULT_FLAG_EMPTY = 1,
-        DEFAULT_FLAG_INHERITED = 2
-    } DEFAULT_FLAGS;
+	typedef [public,bitmap8bit] bitmap {
+		DEFAULT_FLAG_EMPTY = 1,
+		DEFAULT_FLAG_INHERITED = 2
+	} DEFAULT_FLAGS;
 
 	WERROR OpenNamespace(
 		[in] BSTR strNamespace,
@@ -653,7 +652,7 @@ coclass WbemClassObject
 		[in,ref] GUID *gWCO,
 		[out,ref] uint32 *puReturned,
 		[out,ref] uint32 *pSize,
-		[out,ref,noprint,size_is(,*pSize)] uint8 **pData
+		[out,ref,size_is(,*pSize)] uint8 **pData
 		);
 }
 
diff --git a/librpc/ndr/ndr_wmi.c b/librpc/ndr/ndr_wmi.c
index 2c122de..87f3e96 100644
--- a/librpc/ndr/ndr_wmi.c
+++ b/librpc/ndr/ndr_wmi.c
@@ -23,7 +23,6 @@
 #include "includes.h"
 #include "librpc/gen_ndr/ndr_dcom.h"
 #include "librpc/gen_ndr/ndr_wmi.h"
-#include "librpc/ndr/ndr_wmi.h"
 
 // Just for debugging
 int NDR_CHECK_depth = 0;
@@ -35,18 +34,18 @@ enum ndr_err_code ndr_push_BSTR(struct ndr_push *ndr, int ndr_flags, const struc
 	uint32_t flags;
 	enum ndr_err_code status;
 	len = strlen(r->data);
-        if (ndr_flags & NDR_SCALARS) {
-                NDR_CHECK(ndr_push_align(ndr, 4));
-                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x72657355));
-                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, len));
-                NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2*len));
+	if (ndr_flags & NDR_SCALARS) {
+		NDR_CHECK(ndr_push_align(ndr, 4));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x72657355));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, len));
+		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2*len));
 		flags = ndr->flags;
 		ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NOTERM | LIBNDR_FLAG_STR_SIZE4);
 		status = ndr_push_string(ndr, NDR_SCALARS, r->data);
 		ndr->flags = flags;
 		return status;
-        }
-        return NDR_ERR_SUCCESS;
+	}
+	return NDR_ERR_SUCCESS;
 }
 
 enum ndr_err_code ndr_pull_BSTR(struct ndr_pull *ndr, int ndr_flags, struct BSTR *r)
diff --git a/librpc/ndr/ndr_wmi.h b/librpc/ndr/ndr_wmi.h
deleted file mode 100644
index 539b9e8..0000000
--- a/librpc/ndr/ndr_wmi.h
+++ /dev/null
@@ -1,3 +0,0 @@
-typedef const char *CIMSTRING;
-enum ndr_err_code ndr_pull_CIMSTRING(struct ndr_pull *ndr, int ndr_flags, CIMSTRING *r);
-enum ndr_err_code ndr_push_CIMSTRING(struct ndr_push *ndr, int ndr_flags, const CIMSTRING *r);
diff --git a/pidl/idl.yp b/pidl/idl.yp
index 30247f9..0062859 100644
--- a/pidl/idl.yp
+++ b/pidl/idl.yp
@@ -653,11 +653,17 @@ sub parse_file($$)
 	my $saved_delim = $/;
 	undef $/;
 	my $cpp = $ENV{CPP};
+	my $options = "";
 	if (! defined $cpp) {
-		$cpp = "cpp";
+		if (defined $ENV{CC}) {
+			$cpp = "$ENV{CC}";
+			$options = "-E";
+		} else {
+			$cpp = "cpp";
+		}
 	}
 	my $includes = join('',map { " -I$_" } @$incdirs);
-	my $data = `$cpp -D__PIDL__$includes -xc "$filename"`;
+	my $data = `$cpp $options -D__PIDL__$includes -xc "$filename"`;
 	$/ = $saved_delim;
 
 	return parse_string($data, $filename);
diff --git a/pidl/lib/Parse/Pidl/Expr.pm b/pidl/lib/Parse/Pidl/Expr.pm
index 1230a71..24581d2 100644
--- a/pidl/lib/Parse/Pidl/Expr.pm
+++ b/pidl/lib/Parse/Pidl/Expr.pm
@@ -1127,7 +1127,7 @@ sub new {
 	[#Rule 2
 		 'exp', 1,
 sub
-#line 24 "./../pidl/expr.yp"
+#line 24 "expr.yp"
 { "\"$_[1]\"" }
 	],
 	[#Rule 3
@@ -1139,199 +1139,199 @@ sub
 	[#Rule 5
 		 'exp', 2,
 sub
-#line 30 "./../pidl/expr.yp"
+#line 30 "expr.yp"
 { "~$_[2]" }
 	],
 	[#Rule 6
 		 'exp', 3,
 sub
-#line 32 "./../pidl/expr.yp"
+#line 32 "expr.yp"
 { "$_[1] + $_[3]" }
 	],
 	[#Rule 7
 		 'exp', 3,
 sub
-#line 34 "./../pidl/expr.yp"
+#line 34 "expr.yp"
 { "$_[1] - $_[3]" }
 	],
 	[#Rule 8
 		 'exp', 3,
 sub
-#line 36 "./../pidl/expr.yp"
+#line 36 "expr.yp"
 { "$_[1] * $_[3]" }
 	],
 	[#Rule 9
 		 'exp', 3,
 sub
-#line 38 "./../pidl/expr.yp"
+#line 38 "expr.yp"
 { "$_[1] % $_[3]" }
 	],
 	[#Rule 10
 		 'exp', 3,
 sub
-#line 40 "./../pidl/expr.yp"
+#line 40 "expr.yp"
 { "$_[1] < $_[3]" }
 	],
 	[#Rule 11
 		 'exp', 3,
 sub
-#line 42 "./../pidl/expr.yp"
+#line 42 "expr.yp"
 { "$_[1] > $_[3]" }
 	],
 	[#Rule 12
 		 'exp', 3,
 sub
-#line 44 "./../pidl/expr.yp"
+#line 44 "expr.yp"
 { "$_[1] | $_[3]" }
 	],
 	[#Rule 13
 		 'exp', 3,
 sub
-#line 46 "./../pidl/expr.yp"
+#line 46 "expr.yp"
 { "$_[1] == $_[3]" }
 	],
 	[#Rule 14
 		 'exp', 3,
 sub
-#line 48 "./../pidl/expr.yp"
+#line 48 "expr.yp"
 { "$_[1] <= $_[3]" }
 	],
 	[#Rule 15
 		 'exp', 3,
 sub
-#line 50 "./../pidl/expr.yp"
+#line 50 "expr.yp"
 { "$_[1] => $_[3]" }
 	],
 	[#Rule 16
 		 'exp', 3,
 sub
-#line 52 "./../pidl/expr.yp"
+#line 52 "expr.yp"
 { "$_[1] << $_[3]" }
 	],
 	[#Rule 17
 		 'exp', 3,
 sub
-#line 54 "./../pidl/expr.yp"
+#line 54 "expr.yp"
 { "$_[1] >> $_[3]" }
 	],
 	[#Rule 18
 		 'exp', 3,
 sub
-#line 56 "./../pidl/expr.yp"
+#line 56 "expr.yp"
 { "$_[1] != $_[3]" }
 	],
 	[#Rule 19
 		 'exp', 3,
 sub
-#line 58 "./../pidl/expr.yp"
+#line 58 "expr.yp"
 { "$_[1] || $_[3]" }
 	],
 	[#Rule 20
 		 'exp', 3,
 sub
-#line 60 "./../pidl/expr.yp"
+#line 60 "expr.yp"
 { "$_[1] && $_[3]" }
 	],
 	[#Rule 21
 		 'exp', 3,
 sub
-#line 62 "./../pidl/expr.yp"
+#line 62 "expr.yp"
 { "$_[1] & $_[3]" }
 	],
 	[#Rule 22
 		 'exp', 5,
 sub
-#line 64 "./../pidl/expr.yp"
+#line 64 "expr.yp"
 { "$_[1]?$_[3]:$_[5]" }
 	],
 	[#Rule 23
 		 'exp', 2,
 sub
-#line 66 "./../pidl/expr.yp"
+#line 66 "expr.yp"
 { "~$_[1]" }
 	],
 	[#Rule 24
 		 'exp', 2,
 sub
-#line 68 "./../pidl/expr.yp"
+#line 68 "expr.yp"
 { "not $_[1]" }
 	],
 	[#Rule 25
 		 'exp', 3,
 sub
-#line 70 "./../pidl/expr.yp"
+#line 70 "expr.yp"
 { "$_[1] / $_[3]" }
 	],
 	[#Rule 26
 		 'exp', 2,
 sub
-#line 72 "./../pidl/expr.yp"
+#line 72 "expr.yp"
 { "-$_[2]" }
 	],
 	[#Rule 27
 		 'exp', 2,
 sub
-#line 74 "./../pidl/expr.yp"
+#line 74 "expr.yp"
 { "&$_[2]" }
 	],
 	[#Rule 28
 		 'exp', 3,
 sub
-#line 76 "./../pidl/expr.yp"
+#line 76 "expr.yp"
 { "$_[1]^$_[3]" }
 	],
 	[#Rule 29
 		 'exp', 3,
 sub
-#line 78 "./../pidl/expr.yp"
+#line 78 "expr.yp"
 { "($_[2])" }
 	],
 	[#Rule 30
 		 'possible_pointer', 1,
 sub
-#line 82 "./../pidl/expr.yp"
+#line 82 "expr.yp"
 { $_[0]->_Lookup($_[1]) }
 	],
 	[#Rule 31
 		 'possible_pointer', 2,
 sub
-#line 84 "./../pidl/expr.yp"
+#line 84 "expr.yp"
 { $_[0]->_Dereference($_[2]); "*$_[2]" }
 	],
 	[#Rule 32
 		 'var', 1,
 sub
-#line 88 "./../pidl/expr.yp"
+#line 88 "expr.yp"
 { $_[0]->_Use($_[1]) }
 	],
 	[#Rule 33
 		 'var', 3,
 sub
-#line 90 "./../pidl/expr.yp"
+#line 90 "expr.yp"
 { $_[0]->_Use("$_[1].$_[3]") }
 	],
 	[#Rule 34
 		 'var', 3,
 sub
-#line 92 "./../pidl/expr.yp"
+#line 92 "expr.yp"
 { "($_[2])" }
 	],
 	[#Rule 35
 		 'var', 3,
 sub
-#line 94 "./../pidl/expr.yp"
+#line 94 "expr.yp"
 { $_[0]->_Use("*$_[1]"); $_[1]."->".$_[3] }
 	],
 	[#Rule 36
 		 'func', 4,
 sub
-#line 99 "./../pidl/expr.yp"
+#line 99 "expr.yp"
 { "$_[1]($_[3])" }
 	],
 	[#Rule 37
 		 'opt_args', 0,
 sub
-#line 104 "./../pidl/expr.yp"
+#line 104 "expr.yp"
 { "" }
 	],
 	[#Rule 38
@@ -1349,7 +1349,7 @@ sub
 	[#Rule 42
 		 'args', 3,
 sub
-#line 118 "./../pidl/expr.yp"
+#line 118 "expr.yp"
 { "$_[1], $_[3]" }
 	]
 ],
@@ -1357,7 +1357,7 @@ sub
     bless($self,$class);
 }
 
-#line 121 "./../pidl/expr.yp"
+#line 121 "expr.yp"
 
 
 package Parse::Pidl::Expr;
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
index 3230958..2397f1a 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
@@ -220,49 +220,6 @@ sub ParseFunction_r_Sync($$$$)
 	$self->pidl("");
 }
 
-sub ParseFunction_Compat_Sync($$$$)
-{
-	my ($self, $if, $fn, $name) = @_;
-	my $uname = uc $name;
-
-	my $proto = "NTSTATUS dcerpc_$name\_compat(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct $name *r)";
-
-	$self->pidl_hdr("#ifdef DCERPC_CALL_$uname\_COMPAT");
-	$self->pidl_hdr("#define dcerpc_$name(p, m, r) dcerpc_$name\_compat(p, m, r)");
-	$self->pidl_hdr("#endif /* DCERPC_CALL_$uname\_COMPAT */");
-
-	$self->fn_declare($proto);
-	$self->pidl("{");
-	$self->indent;
-	$self->pidl("NTSTATUS status;");
-	$self->pidl("");
-
-	$self->pidl("status = dcerpc_$name\_r(p->binding_handle, mem_ctx, r);");
-	$self->pidl("");
-
-	$self->pidl("if (NT_STATUS_IS_RPC(status)) {");
-	$self->indent;
-	$self->pidl("status = NT_STATUS_NET_WRITE_FAULT;");
-	$self->deindent;
-	$self->pidl("}");
-	$self->pidl("");
-
-	if (defined($fn->{RETURN_TYPE}) and $fn->{RETURN_TYPE} eq "NTSTATUS") {
-		$self->pidl("if (NT_STATUS_IS_OK(status)) {");
-		$self->indent;
-		$self->pidl("status = r->out.result;");
-		$self->deindent;
-		$self->pidl("}");
-		$self->pidl("");
-	}
-
-	$self->pidl("return status;");
-
-	$self->deindent;
-	$self->pidl("}");
-	$self->pidl("");
-}
-
 sub ElementDirection($)
 {
 	my ($e) = @_;
@@ -682,9 +639,7 @@ sub ParseFunction_Sync($$$$)
 		$fn_args .= ",\n" . $pad . mapTypeName($fn->{RETURN_TYPE}). " *result";
 	}
 
-	$self->pidl_hdr("#ifndef DCERPC_CALL_$uname\_COMPAT");
 	$self->fn_declare("$fn_str($fn_args)");
-	$self->pidl_hdr("#endif /* DCERPC_CALL_$uname\_COMPAT */");
 	$self->pidl("{");
 	$self->indent;
 	$self->pidl("struct $name r;");
@@ -740,8 +695,6 @@ sub ParseFunction($$$)
 	$self->ParseFunction_r_Recv($if, $fn, $fn->{NAME});
 	$self->ParseFunction_r_Sync($if, $fn, $fn->{NAME});
 
-	$self->ParseFunction_Compat_Sync($if, $fn, $fn->{NAME});
-
 	foreach my $e (@{$fn->{ELEMENTS}}) {
 		next unless (grep(/out/, @{$e->{DIRECTION}}));
 
@@ -811,16 +764,6 @@ sub ParseInterface($$)
 		$self->pidl_hdr("");
 	}
 
-	$self->pidl_hdr("#ifdef DCERPC_IFACE_$ifu\_COMPAT");
-	foreach my $fn (@{$if->{FUNCTIONS}}) {
-		next if has_property($fn, "noopnum");
-		next if has_property($fn, "todo");
-		my $fnu = uc($fn->{NAME});
-		$self->pidl_hdr("#define DCERPC_CALL_$fnu\_COMPAT 1");
-	}
-	$self->pidl_hdr("#endif /* DCERPC_IFACE_$ifu\_COMPAT */");
-	$self->pidl_hdr("");
-
 	$self->pidl("/* $if->{NAME} - client functions generated by pidl */");


-- 
Samba Shared Repository


More information about the samba-cvs mailing list