svn commit: samba r12523 - in branches/SAMBA_4_0/source: . build/smb_build include lib/registry smbd torture/local

jelmer at samba.org jelmer at samba.org
Tue Dec 27 21:11:09 GMT 2005


Author: jelmer
Date: 2005-12-27 21:11:09 +0000 (Tue, 27 Dec 2005)
New Revision: 12523

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12523

Log:
Convert the registry subsystem to use a seperate prototype header 
(note that this doesn't use the distinction between private 
 and public prototypes yet)

Modified:
   branches/SAMBA_4_0/source/build/smb_build/input.pm
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm
   branches/SAMBA_4_0/source/include/structs.h
   branches/SAMBA_4_0/source/lib/registry/config.mk
   branches/SAMBA_4_0/source/lib/registry/registry.h
   branches/SAMBA_4_0/source/main.mk
   branches/SAMBA_4_0/source/smbd/server.c
   branches/SAMBA_4_0/source/torture/local/registry.c


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/input.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/input.pm	2005-12-27 20:52:36 UTC (rev 12522)
+++ branches/SAMBA_4_0/source/build/smb_build/input.pm	2005-12-27 21:11:09 UTC (rev 12523)
@@ -140,10 +140,14 @@
 			$part->{NOPROTO} = "NO";
 		}
 
-		if (defined($part->{PRIVATE_PROTO_HEADER}) or 
-			defined($part->{PUBLIC_PROTO_HEADER})) {
+		if (defined($part->{PRIVATE_PROTO_HEADER})) {
 			$part->{NOPROTO} = "YES";
 		}
+		
+		if (defined($part->{PUBLIC_PROTO_HEADER})) {
+			$part->{NOPROTO} = "YES";
+			push (@{$part->{PUBLIC_HEADERS}}, $part->{PUBLIC_PROTO_HEADER});
+		}
 
 		if (defined($enabled->{$part->{NAME}})) { 
 			$part->{ENABLE} = $enabled->{$part->{NAME}};

Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===================================================================
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2005-12-27 20:52:36 UTC (rev 12522)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm	2005-12-27 21:11:09 UTC (rev 12523)
@@ -25,6 +25,7 @@
 	$self->{shared_libs} = [];
 	$self->{headers} = [];
 	$self->{pc_files} = [];
+	$self->{proto_headers} = [];
 	$self->{output} = "";
 
 	$self->{mkfile} = $mkfile;
@@ -426,7 +427,7 @@
 
 	my $dir = $ctx->{BASEDIR};
 	
-	$ctx->{BASEDIR} =~ s/^\.\///g;
+	$dir =~ s/^\.\///g;
 
 	push (@{$self->{manpages}}, "$dir/$ctx->{MANPAGE}");
 }
@@ -464,17 +465,19 @@
 	my ($self,$ctx) = @_;
 
 	my $dir = $ctx->{BASEDIR};
-	$ctx->{BASEDIR} =~ s/^\.\///g;
 
+	$dir =~ s/^\.\///g;
+
 	my $comment = "";
-	my $target = "$dir/$ctx->{PRIVATE_PROTO_HEADER}";
 	if (defined($ctx->{PUBLIC_PROTO_HEADER})) {
-		$comment.= " and $dir/$ctx->{PRIVATE_PROTO_HEADER}";
+		$comment.= " and $dir/$ctx->{PUBLIC_PROTO_HEADER}";
+		push (@{$self->{proto_headers}}, "$dir/$ctx->{PUBLIC_PROTO_HEADER}");
 	} else {
 		$ctx->{PUBLIC_PROTO_HEADER} = $ctx->{PRIVATE_PROTO_HEADER};
 	}	
+	push (@{$self->{proto_headers}}, "$dir/$ctx->{PRIVATE_PROTO_HEADER}");
 
-	$self->output("$target: \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST:.o=.c)\n");
+	$self->output("$dir/$ctx->{PUBLIC_PROTO_HEADER}: \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST:.o=.c)\n");
 	$self->output("\t\@echo \"Creating $dir/$ctx->{PRIVATE_PROTO_HEADER}$comment\"\n");
 
 	$self->output("\t\@\$(PERL) \${srcdir}/script/mkproto.pl --private=$dir/$ctx->{PRIVATE_PROTO_HEADER} --public=$dir/$ctx->{PUBLIC_PROTO_HEADER} \$($ctx->{TYPE}_$ctx->{NAME}_OBJ_LIST)\n\n");
@@ -494,6 +497,7 @@
 	$self->output("PC_FILES = " . array2oneperline($self->{pc_files}) . "\n");
 	$self->output("ALL_OBJS = " . array2oneperline($self->{all_objs}) . "\n");
 	$self->output("PROTO_OBJS = " . array2oneperline($self->{proto_objs}) .  "\n");
+	$self->output("PROTO_HEADERS = " . array2oneperline($self->{proto_headers}) .  "\n");
 
 	$self->_prepare_mk_files();
 

Modified: branches/SAMBA_4_0/source/include/structs.h
===================================================================
--- branches/SAMBA_4_0/source/include/structs.h	2005-12-27 20:52:36 UTC (rev 12522)
+++ branches/SAMBA_4_0/source/include/structs.h	2005-12-27 21:11:09 UTC (rev 12523)
@@ -138,10 +138,6 @@
 struct ldap_message;
 struct ldap_Result;
 struct rw_buffer;
-struct registry_context;
-struct registry_key;
-struct registry_value;
-struct reg_diff_file;
 
 struct rap_NetShareEnum;
 struct rap_NetServerEnum2;
@@ -375,3 +371,5 @@
 struct IUnknown_vtable;
 
 struct MprVar;
+
+struct registry_context;

Modified: branches/SAMBA_4_0/source/lib/registry/config.mk
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/config.mk	2005-12-27 20:52:36 UTC (rev 12522)
+++ branches/SAMBA_4_0/source/lib/registry/config.mk	2005-12-27 21:11:09 UTC (rev 12523)
@@ -90,6 +90,7 @@
 		patchfile.o
 REQUIRED_SUBSYSTEMS = \
 		LIBBASIC
+PRIVATE_PROTO_HEADER = registry_proto.h
 PUBLIC_HEADERS = registry.h
 # End MODULE registry_ldb
 ################################################

Modified: branches/SAMBA_4_0/source/lib/registry/registry.h
===================================================================
--- branches/SAMBA_4_0/source/lib/registry/registry.h	2005-12-27 20:52:36 UTC (rev 12522)
+++ branches/SAMBA_4_0/source/lib/registry/registry.h	2005-12-27 21:11:09 UTC (rev 12523)
@@ -161,4 +161,6 @@
 	struct reg_diff_key *keys;
 };
 
+#include "registry_proto.h"
+
 #endif /* _REGISTRY_H */

Modified: branches/SAMBA_4_0/source/main.mk
===================================================================
--- branches/SAMBA_4_0/source/main.mk	2005-12-27 20:52:36 UTC (rev 12522)
+++ branches/SAMBA_4_0/source/main.mk	2005-12-27 21:11:09 UTC (rev 12523)
@@ -216,7 +216,8 @@
 basics: include/config.h \
 	include/proto.h \
 	idl \
-	heimdal_basics
+	heimdal_basics \
+	$(PROTO_HEADERS)
 
 clean: heimdal_clean
 	@echo Removing headers
@@ -234,6 +235,8 @@
 	@echo Removing generated files
 	@-rm -rf librpc/gen_* 
 	@-rm -f lib/registry/regf.h lib/registry/tdr_regf*
+	@echo Removing proto headers
+	@-rm -f $(PROTO_HEADERS)
 
 distclean: clean
 	-rm -f bin/.dummy 

Modified: branches/SAMBA_4_0/source/smbd/server.c
===================================================================
--- branches/SAMBA_4_0/source/smbd/server.c	2005-12-27 20:52:36 UTC (rev 12522)
+++ branches/SAMBA_4_0/source/smbd/server.c	2005-12-27 21:11:09 UTC (rev 12523)
@@ -31,6 +31,7 @@
 #include "system/filesys.h"
 #include "system/kerberos.h"
 #include "smb_build.h"
+#include "registry/registry.h"
 
 /*
   recursively delete a directory tree

Modified: branches/SAMBA_4_0/source/torture/local/registry.c
===================================================================
--- branches/SAMBA_4_0/source/torture/local/registry.c	2005-12-27 20:52:36 UTC (rev 12522)
+++ branches/SAMBA_4_0/source/torture/local/registry.c	2005-12-27 21:11:09 UTC (rev 12523)
@@ -23,6 +23,7 @@
 #include "includes.h"
 #include "librpc/gen_ndr/security.h"
 #include "librpc/gen_ndr/ndr_epmapper.h"
+#include "lib/registry/registry.h"
 
 static BOOL test_hive(TALLOC_CTX *mem_ctx, const char *backend, const char *location)
 {



More information about the samba-cvs mailing list