r12623: Another round of fixes for the prototypes of tables.c
authorJelmer Vernooij <jelmer@samba.org>
Sat, 31 Dec 2005 00:02:41 +0000 (00:02 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:49:06 +0000 (13:49 -0500)
(This used to be commit fb5b22e3dc9ad0892817ae72a73e1e80f3db75c5)

source4/build/smb_build/TODO
source4/librpc/config.mk
source4/librpc/rpc/table.c
source4/librpc/tables.pl

index 6c45e6e6b24cbd37c2d2867c206377dfacf5b1c8..487556b513b16fa0cf8cf346df68739a1aba4f68 100644 (file)
@@ -4,11 +4,7 @@
 - install Samba-specific headers in $INCLUDEDIR/samba-4.0. talloc.h, tdb.h and 
        ldb.h belong in $INCLUDEDIR
 - add register function to smbtorture
-- init functions per shared library / binary
- - gensec, com
- - rpc/ndr ??
- - list not automatically generated
- - utility function for 'init mutex'
 - install shared modules
 - improve (un)install scripts (rewrite in perl?)
 - proper #include dependencies
+- determine dependencies from #include lines ?
index dc40b692711b79424ab819e3e43319c4576f47cb..d87ac86ce52d10dd89ebf25a17e3d8be4ba679e9 100644 (file)
@@ -302,10 +302,14 @@ librpc/gen_ndr/tables.c: librpc/gen_ndr/ndr_*.h
        @$(PERL) librpc/tables.pl --output=librpc/gen_ndr/tables.c \
                                                                        librpc/gen_ndr/ndr_*.h
 
+[SUBSYSTEM::NDR_IFACE_TABLE]
+OBJ_FILES = gen_ndr/tables.o
+NOPROTO = YES
+
 [SUBSYSTEM::NDR_ALL]
-OBJ_FILES = rpc/table.o gen_ndr/tables.o
+OBJ_FILES = rpc/table.o 
 PRIVATE_PROTO_HEADER = rpc/dcerpc_table.h
-REQUIRED_SUBSYSTEMS = NDR_AUDIOSRV NDR_ECHO NDR_DCERPC NDR_EXCHANGE \
+REQUIRED_SUBSYSTEMS = NDR_IFACE_TABLE NDR_AUDIOSRV NDR_ECHO NDR_DCERPC NDR_EXCHANGE \
        NDR_DSBACKUP NDR_EFS NDR_MISC NDR_LSA NDR_DFS NDR_DRSUAPI \
        NDR_POLICYAGENT NDR_UNIXINFO NDR_SAMR NDR_SPOOLSS NDR_WKSSVC NDR_SRVSVC NDR_ATSVC \
        NDR_EVENTLOG NDR_EPMAPPER NDR_DBGIDL NDR_DSSETUP NDR_MSGSVC NDR_WINS \
index 14600a779f932e2645a8f7e41cfdb29a025689db..8dfecd858e24826064ac1b2295c4c8e32e054ce3 100644 (file)
@@ -119,3 +119,16 @@ const struct dcerpc_interface_list *librpc_dcerpc_pipes(void)
 }
 
 
+NTSTATUS dcerpc_register_builtin_interfaces();
+
+NTSTATUS dcerpc_table_init(void)
+{
+       static BOOL initialized = False;
+
+       if (initialized) return NT_STATUS_OK;
+       initialized = True;
+
+       dcerpc_register_builtin_interfaces();
+
+       return NT_STATUS_OK;
+}
index 462ef19e0823f65dd6bcebba7eca85572a5c2755..9f30674de8b0b5a2602f4117c1d8632ed4e328d2 100644 (file)
@@ -55,7 +55,8 @@ sub process_file($)
        while (my $line = <FILE>) {
                if ($line =~ /extern const struct dcerpc_interface_table (\w+);/) {
                        $found = 1;
-                       $init_fns.="\tlibrpc_register_interface(&$1);\n";
+                       $init_fns.="\tstatus = librpc_register_interface(&$1);\n";
+                       $init_fns.="\tif (NT_STATUS_IS_ERR(status)) return status;\n\n";
                }
        }
 
@@ -81,12 +82,9 @@ process_file($_) foreach (@ARGV);
 
 print TABLEC <<EOF;
 
-NTSTATUS dcerpc_table_init(void)
+NTSTATUS dcerpc_register_builtin_interfaces(void)
 {
-       static BOOL initialized = False;
-
-       if (initialized) return NT_STATUS_OK;
-       initialized = True;
+       NTSTATUS status;
 
 $init_fns