svn commit: samba r13755 - in branches/tmp/samba4-ldb-register/source: build/smb_build lib/ldb script/tests

jelmer at samba.org jelmer at samba.org
Tue Feb 28 13:41:35 GMT 2006


Author: jelmer
Date: 2006-02-28 13:41:34 +0000 (Tue, 28 Feb 2006)
New Revision: 13755

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

Log:
Allow different semantics for init functions.

Modified:
   branches/tmp/samba4-ldb-register/source/build/smb_build/config_mk.pm
   branches/tmp/samba4-ldb-register/source/build/smb_build/header.pm
   branches/tmp/samba4-ldb-register/source/build/smb_build/input.pm
   branches/tmp/samba4-ldb-register/source/lib/ldb/config.mk
   branches/tmp/samba4-ldb-register/source/script/tests/test_cifsdd.sh


Changeset:
Modified: branches/tmp/samba4-ldb-register/source/build/smb_build/config_mk.pm
===================================================================
--- branches/tmp/samba4-ldb-register/source/build/smb_build/config_mk.pm	2006-02-28 13:33:48 UTC (rev 13754)
+++ branches/tmp/samba4-ldb-register/source/build/smb_build/config_mk.pm	2006-02-28 13:41:34 UTC (rev 13755)
@@ -67,6 +67,8 @@
 		"MAJOR_VERSION"		=> "string",
 		"MINOR_VERSION"		=> "string",
 		"RELEASE_VERSION"	=> "string",
+		
+		"INIT_FUNCTION_TYPE" => "string",
 
 		"OBJ_FILES"		=> "list",
 

Modified: branches/tmp/samba4-ldb-register/source/build/smb_build/header.pm
===================================================================
--- branches/tmp/samba4-ldb-register/source/build/smb_build/header.pm	2006-02-28 13:33:48 UTC (rev 13754)
+++ branches/tmp/samba4-ldb-register/source/build/smb_build/header.pm	2006-02-28 13:41:34 UTC (rev 13755)
@@ -30,13 +30,16 @@
 		my $DEFINE = ();
 		next if ($key->{TYPE} ne "LIBRARY" and $key->{TYPE} ne "SUBSYSTEM");
 		next unless defined($key->{INIT_FUNCTIONS});
-		
+
 		$DEFINE->{COMMENT} = "$key->{TYPE} $key->{NAME} INIT";
 		$DEFINE->{KEY} = "STATIC_$key->{NAME}_MODULES";
 		$DEFINE->{VAL} = "{ \\\n";
 		foreach (@{$key->{INIT_FUNCTIONS}}) {
 			$DEFINE->{VAL} .= "\t$_, \\\n";
-			$output .= "NTSTATUS $_(void);\n";
+			my $fn = $key->{INIT_FUNCTION_TYPE};
+			unless(defined($fn)) { $fn = "NTSTATUS (*) (void)"; }
+			$fn =~ s/\(\*\)/$_/;
+			$output .= "$fn;\n";
 		}
 
 		$DEFINE->{VAL} .= "\tNULL \\\n }";

Modified: branches/tmp/samba4-ldb-register/source/build/smb_build/input.pm
===================================================================
--- branches/tmp/samba4-ldb-register/source/build/smb_build/input.pm	2006-02-28 13:33:48 UTC (rev 13754)
+++ branches/tmp/samba4-ldb-register/source/build/smb_build/input.pm	2006-02-28 13:41:34 UTC (rev 13755)
@@ -97,6 +97,10 @@
 		return;
 	}
 
+	unless (defined($lib->{INIT_FUNCTION_TYPE})) {
+		$lib->{INIT_FUNCTION_TYPE} = "NTSTATUS (*) (void)";
+	}
+
 	$lib->{INSTALLDIR} = "LIBDIR";
 }
 

Modified: branches/tmp/samba4-ldb-register/source/lib/ldb/config.mk
===================================================================
--- branches/tmp/samba4-ldb-register/source/lib/ldb/config.mk	2006-02-28 13:33:48 UTC (rev 13754)
+++ branches/tmp/samba4-ldb-register/source/lib/ldb/config.mk	2006-02-28 13:41:34 UTC (rev 13755)
@@ -144,6 +144,7 @@
 MAJOR_VERSION = 0
 MINOR_VERSION = 0
 DESCRIPTION = LDAP-like embedded database library
+INIT_FUNCTION_TYPE = int (*) (void)
 RELEASE_VERSION = 1
 OBJ_FILES = \
 		common/ldb.o \

Modified: branches/tmp/samba4-ldb-register/source/script/tests/test_cifsdd.sh
===================================================================
--- branches/tmp/samba4-ldb-register/source/script/tests/test_cifsdd.sh	2006-02-28 13:33:48 UTC (rev 13754)
+++ branches/tmp/samba4-ldb-register/source/script/tests/test_cifsdd.sh	2006-02-28 13:41:34 UTC (rev 13755)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 # Basic script to make sure that cifsdd can do both local and remote I/O.
 



More information about the samba-cvs mailing list