Author: jelmer Date: 2006-03-13 22:36:07 +0000 (Mon, 13 Mar 2006) New Revision: 14349
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=14349 Log: Kill proto.h! Prototypes are now spread over multiple headers, usually one per subsystem. This change is required to allow proper header dependencies later on, without recompiling Samba each time the mtime of any source file changes. Modified: branches/SAMBA_4_0/source/build/smb_build/TODO branches/SAMBA_4_0/source/client/client.c branches/SAMBA_4_0/source/include/ branches/SAMBA_4_0/source/include/includes.h branches/SAMBA_4_0/source/lib/db_wrap.c branches/SAMBA_4_0/source/lib/ldb/config.mk branches/SAMBA_4_0/source/lib/ldb/include/includes.h branches/SAMBA_4_0/source/lib/ldb/samba/ branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c branches/SAMBA_4_0/source/lib/registry/tools/regshell.c branches/SAMBA_4_0/source/lib/replace/ branches/SAMBA_4_0/source/lib/replace/config.mk branches/SAMBA_4_0/source/lib/replace/readline.m4 branches/SAMBA_4_0/source/libcli/config.mk branches/SAMBA_4_0/source/libcli/nbt/ branches/SAMBA_4_0/source/librpc/config.mk branches/SAMBA_4_0/source/librpc/ndr/ branches/SAMBA_4_0/source/librpc/ndr/ndr_orpc.h branches/SAMBA_4_0/source/main.mk Changeset: Modified: branches/SAMBA_4_0/source/build/smb_build/TODO =================================================================== --- branches/SAMBA_4_0/source/build/smb_build/TODO 2006-03-13 22:32:41 UTC (rev 14348) +++ branches/SAMBA_4_0/source/build/smb_build/TODO 2006-03-13 22:36:07 UTC (rev 14349) @@ -1,15 +1,15 @@ -- subdir handler for install headers into a specific directory - saner names for some of the .pc files - .pc files also when there is a public header? - get rid of include/structs.h and include/proto.h - support including a custom header by librpc/gen_ndr/*.c files + - if a ndr_.*_man.h file exists, include it. - plugin loading support in ldb -- add register function to smbtorture - proper #include dependencies: for each subsystem: - include line in Makefile - rule in Makefile -- install (parts of ?) autogenerated headers +- install autogenerated headers (seperate directory) +- subdir handler for install headers into a specific directory set of test scripts that check the code: - configure_check_unused.pl Modified: branches/SAMBA_4_0/source/client/client.c =================================================================== --- branches/SAMBA_4_0/source/client/client.c 2006-03-13 22:32:41 UTC (rev 14348) +++ branches/SAMBA_4_0/source/client/client.c 2006-03-13 22:36:07 UTC (rev 14349) @@ -37,6 +37,7 @@ #include "system/time.h" /* needed by some systems for asctime() */ #include "libcli/resolve/resolve.h" #include "libcli/security/proto.h" +#include "lib/replace/readline.h" static int io_bufsize = 64512; Property changes on: branches/SAMBA_4_0/source/include ___________________________________________________________________ Name: svn:ignore - config.h config.h.in build.h includes.h.gch proto.h stamp-h version.h + config.h config.h.in build.h includes.h.gch stamp-h version.h Modified: branches/SAMBA_4_0/source/include/includes.h =================================================================== --- branches/SAMBA_4_0/source/include/includes.h 2006-03-13 22:32:41 UTC (rev 14348) +++ branches/SAMBA_4_0/source/include/includes.h 2006-03-13 22:36:07 UTC (rev 14349) @@ -125,12 +125,19 @@ #include "libcli/nbt/libnbt.h" #include "libcli/util/proto.h" +/* These headers are used by the NDR parsers. They are globally + * included at the moment, but will be included by the autogenerated + * NDR parsers later on and removed from here. */ +#include "libcli/nbt/nbtname.h" +#include "librpc/ndr/ndr_sec.h" +#include "librpc/ndr/ndr_drsuapi.h" +#include "librpc/ndr/ndr_spoolss_buf.h" +#include "librpc/ndr/ndr_krb5pac.h" +#include "librpc/ndr/ndr_compression.h" + #undef _PRINTF_ATTRIBUTE #define _PRINTF_ATTRIBUTE(a1, a2) -/***** automatically generated prototypes *****/ -#include "include/proto.h" - /* String routines */ #include "util/safe_string.h" Modified: branches/SAMBA_4_0/source/lib/db_wrap.c =================================================================== --- branches/SAMBA_4_0/source/lib/db_wrap.c 2006-03-13 22:32:41 UTC (rev 14348) +++ branches/SAMBA_4_0/source/lib/db_wrap.c 2006-03-13 22:36:07 UTC (rev 14349) @@ -32,6 +32,7 @@ #include "lib/events/events.h" #include "lib/tdb/include/tdb.h" #include "lib/ldb/include/ldb.h" +#include "lib/ldb/samba/ldif_handlers.h" #include "db_wrap.h" static struct tdb_wrap *tdb_list; Modified: branches/SAMBA_4_0/source/lib/ldb/config.mk =================================================================== --- branches/SAMBA_4_0/source/lib/ldb/config.mk 2006-03-13 22:32:41 UTC (rev 14348) +++ branches/SAMBA_4_0/source/lib/ldb/config.mk 2006-03-13 22:36:07 UTC (rev 14349) @@ -162,6 +162,7 @@ ################################################ # Start SUBSYSTEM LDBSAMBA [SUBSYSTEM::LDBSAMBA] +PRIVATE_PROTO_HEADER = samba/ldif_handlers.h REQUIRED_SUBSYSTEMS = LIB_SECURITY SAMDB OBJ_FILES = \ samba/ldif_handlers.o Modified: branches/SAMBA_4_0/source/lib/ldb/include/includes.h =================================================================== --- branches/SAMBA_4_0/source/lib/ldb/include/includes.h 2006-03-13 22:32:41 UTC (rev 14348) +++ branches/SAMBA_4_0/source/lib/ldb/include/includes.h 2006-03-13 22:36:07 UTC (rev 14349) @@ -38,6 +38,7 @@ #define discard_const(ptr) ((void *)((intptr_t)(ptr))) #define discard_const_p(type, ptr) ((type *)discard_const(ptr)) +#include "lib/ldb/samba/ldif_handlers.h" #include "talloc.h" #endif /*_SAMBA_BUILD_*/ Property changes on: branches/SAMBA_4_0/source/lib/ldb/samba ___________________________________________________________________ Name: svn:ignore - .sconsign *.d + ldif_handlers.h *.d Modified: branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c =================================================================== --- branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c 2006-03-13 22:32:41 UTC (rev 14348) +++ branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c 2006-03-13 22:36:07 UTC (rev 14349) @@ -28,6 +28,7 @@ #ifdef _SAMBA_BUILD_ #include "lib/cmdline/popt_common.h" +#include "lib/ldb/samba/ldif_handlers.h" #include "auth/auth.h" #include "db_wrap.h" #endif Modified: branches/SAMBA_4_0/source/lib/registry/tools/regshell.c =================================================================== --- branches/SAMBA_4_0/source/lib/registry/tools/regshell.c 2006-03-13 22:32:41 UTC (rev 14348) +++ branches/SAMBA_4_0/source/lib/registry/tools/regshell.c 2006-03-13 22:36:07 UTC (rev 14349) @@ -24,6 +24,7 @@ #include "lib/cmdline/popt_common.h" #include "lib/registry/reg_backend_rpc.h" #include "system/time.h" +#include "lib/replace/readline.h" /* * ck/cd - change key Property changes on: branches/SAMBA_4_0/source/lib/replace ___________________________________________________________________ Name: svn:ignore - .sconsign *.d *.ho + readline.h *.d *.ho Modified: branches/SAMBA_4_0/source/lib/replace/config.mk =================================================================== --- branches/SAMBA_4_0/source/lib/replace/config.mk 2006-03-13 22:32:41 UTC (rev 14348) +++ branches/SAMBA_4_0/source/lib/replace/config.mk 2006-03-13 22:36:07 UTC (rev 14349) @@ -18,3 +18,7 @@ REQUIRED_SUBSYSTEMS = REPLACE_READDIR # End SUBSYSTEM LIBREPLACE ############################## + +[SUBSYSTEM::SMBREADLINE] +OBJ_FILES = readline.o +PRIVATE_PROTO_HEADER = readline.h Modified: branches/SAMBA_4_0/source/lib/replace/readline.m4 =================================================================== --- branches/SAMBA_4_0/source/lib/replace/readline.m4 2006-03-13 22:32:41 UTC (rev 14348) +++ branches/SAMBA_4_0/source/lib/replace/readline.m4 2006-03-13 22:36:07 UTC (rev 14349) @@ -72,14 +72,10 @@ if test x"$EXTERNAL_READLINE" = x"yes"; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LIBREADLINE,1,[Whether the system has readline]) - SMB_SUBSYSTEM(LIBREADLINE, - [lib/replace/readline.o], - [EXT_LIB_READLINE]) + SMB_SUBSYSTEM(LIBREADLINE, [], [SMBREADLINE EXT_LIB_READLINE]) SMB_EXT_LIB(READLINE, [${TERMLIBS}]) SMB_EXT_LIB_ENABLE(READLINE,YES) else - SMB_SUBSYSTEM(LIBREADLINE, - [lib/replace/readline.o], - []) + SMB_SUBSYSTEM(LIBREADLINE, [], [SMBREADLINE]) AC_MSG_RESULT(no) fi Modified: branches/SAMBA_4_0/source/libcli/config.mk =================================================================== --- branches/SAMBA_4_0/source/libcli/config.mk 2006-03-13 22:32:41 UTC (rev 14348) +++ branches/SAMBA_4_0/source/libcli/config.mk 2006-03-13 22:36:07 UTC (rev 14349) @@ -36,7 +36,8 @@ REQUIRED_SUBSYSTEMS = LIBCLI_COMPOSITE [SUBSYSTEM::NDR_NBT_BUF] -OBJ_FILES = nbt/nbtname.o\ +PRIVATE_PROTO_HEADER = nbt/nbtname.h +OBJ_FILES = nbt/nbtname.o [LIBRARY::LIBCLI_NBT] VERSION = 0.0.1 Property changes on: branches/SAMBA_4_0/source/libcli/nbt ___________________________________________________________________ Name: svn:ignore - nbt_proto.h .sconsign *.d + nbtname.h nbt_proto.h *.d Modified: branches/SAMBA_4_0/source/librpc/config.mk =================================================================== --- branches/SAMBA_4_0/source/librpc/config.mk 2006-03-13 22:32:41 UTC (rev 14348) +++ branches/SAMBA_4_0/source/librpc/config.mk 2006-03-13 22:36:07 UTC (rev 14349) @@ -22,6 +22,7 @@ VERSION = 0.0.1 SO_VERSION = 0.0.1 DESCRIPTION = NDR support for compressed subcontexts +PRIVATE_PROTO_HEADER = ndr/ndr_compression.h OBJ_FILES = \ ndr/ndr_compression.o REQUIRED_SUBSYSTEMS = LIBCOMPRESSION @@ -29,6 +30,7 @@ ################################################ [SUBSYSTEM::NDR_SECURITY_HELPER] +PRIVATE_PROTO_HEADER = ndr/ndr_sec.h OBJ_FILES = ndr/ndr_sec_helper.o ndr/ndr_sec.o [LIBRARY::NDR_SECURITY] @@ -144,6 +146,7 @@ REQUIRED_SUBSYSTEMS = LIBNDR NDR_DRSUAPI_PRINT NDR_COMPRESSION NDR_SECURITY [SUBSYSTEM::NDR_DRSUAPI_PRINT] +PRIVATE_PROTO_HEADER = ndr/ndr_drsuapi.h OBJ_FILES = ndr/ndr_drsuapi.o [LIBRARY::NDR_DRSBLOBS] @@ -195,6 +198,7 @@ REQUIRED_SUBSYSTEMS = LIBNDR NDR_SPOOLSS_BUF [SUBSYSTEM::NDR_SPOOLSS_BUF] +PRIVATE_PROTO_HEADER = ndr/ndr_spoolss_buf.h OBJ_FILES = ndr/ndr_spoolss_buf.o [LIBRARY::NDR_WKSSVC] @@ -318,6 +322,7 @@ REQUIRED_SUBSYSTEMS = LIBNDR NDR_ORPC [SUBSYSTEM::NDR_ORPC_MANUAL] +PRIVATE_PROTO_HEADER = ndr/ndr_orpc_proto.h OBJ_FILES = ndr/ndr_orpc.o [LIBRARY::NDR_ORPC] @@ -417,6 +422,7 @@ REQUIRED_SUBSYSTEMS = LIBNDR NDR_KRB5PAC_UTIL NDR_NETLOGON [SUBSYSTEM::NDR_KRB5PAC_UTIL] +PRIVATE_PROTO_HEADER = ndr/ndr_krb5pac.h OBJ_FILES = ndr/ndr_krb5pac.o [LIBRARY::NDR_XATTR] Property changes on: branches/SAMBA_4_0/source/librpc/ndr ___________________________________________________________________ Name: svn:ignore - libndr_proto.h *.po *.d + libndr_proto.h *.po *.d ndr_orpc_proto.h ndr_krb5pac.h ndr_spoolss_buf.h ndr_compression.h ndr_drsuapi.h ndr_sec.h Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_orpc.h =================================================================== --- branches/SAMBA_4_0/source/librpc/ndr/ndr_orpc.h 2006-03-13 22:32:41 UTC (rev 14348) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr_orpc.h 2006-03-13 22:36:07 UTC (rev 14349) @@ -34,4 +34,6 @@ struct SECURITYBINDING **securitybindings; }; +#include "librpc/ndr/ndr_orpc_proto.h" + #endif /* __NDR_ORPC_H__ */ Modified: branches/SAMBA_4_0/source/main.mk =================================================================== --- branches/SAMBA_4_0/source/main.mk 2006-03-13 22:32:41 UTC (rev 14348) +++ branches/SAMBA_4_0/source/main.mk 2006-03-13 22:36:07 UTC (rev 14349) @@ -218,14 +218,6 @@ @echo "You need to rerun ./autogen.sh and ./configure" @/bin/false -include/proto.h: $(PROTO_OBJS:.o=.c) - @echo "Creating include/proto.h" - @$(PERL) $(srcdir)/script/mkproto.pl --public-define=_PROTO_H_ \ - --public=include/proto.h --private=include/proto.h \ - $(PROTO_OBJS) - -proto: include/proto.h - librpc/gen_ndr/misc.h: idl librpc/ndr/libndr.h: librpc/ndr/libndr_proto.h librpc/gen_ndr/misc.h librpc/rpc/dcerpc.h: librpc/rpc/dcerpc_proto.h @@ -235,7 +227,6 @@ include/includes.h: \ include/config.h \ - include/proto.h \ librpc/ndr/libndr.h \ librpc/rpc/dcerpc.h \ auth/credentials/credentials_proto.h \ @@ -243,7 +234,14 @@ lib/util/util_proto.h \ lib/charset/charset.h \ param/param.h \ - libcli/util/proto.h + libcli/util/proto.h \ + librpc/ndr/ndr_orpc_proto.h \ + libcli/nbt/nbtname.h \ + librpc/ndr/ndr_sec.h \ + librpc/ndr/ndr_drsuapi.h \ + librpc/ndr/ndr_spoolss_buf.h \ + librpc/ndr/ndr_krb5pac.h \ + librpc/ndr/ndr_compression.h clean_pch: -rm -f include/includes.h.gch @@ -256,8 +254,6 @@ heimdal_basics clean: heimdal_clean clean_pch - @echo Removing headers - @-rm -f include/proto.h @echo Removing objects @-find . -name '*.o' -exec rm -f '{}' \; @echo Removing hostcc objects