From 39ec8791f874a0a9a853aa1497099a57c1aa1dbc Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 15 Jan 2009 22:27:52 +0100 Subject: s3: make better use of ccache by not including version.h in every C-file. version.h changes rather frequently. Since it is included via includes.h, this means each C file will be a cache miss. This applies to the following situations: * When building a new package with a new Samba version * building in a git branch after calling mkversion.sh after a new commit (i.e. virtually always) This patch improves the situation in the following way: * remove inlude "version.h" from includes.h * Use samba_version_string() instead of SAMBA_VERSION_STRING in files that use no other macro from version.h instead of SAMBA_VERSION_STRING. * explicitly include "version.h" in those files that use more macros from "version.h" than just SAMBA_VERSION_STRING. Michael --- source3/param/loadparm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/param/loadparm.c') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index a874ce29d8..6438888942 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -4773,7 +4773,7 @@ static void init_globals(bool first_time_only) string_set(&Globals.szPidDir, get_dyn_PIDDIR()); string_set(&Globals.szSocketAddress, "0.0.0.0"); - if (asprintf(&s, "Samba %s", SAMBA_VERSION_STRING) < 0) { + if (asprintf(&s, "Samba %s", samba_version_string()) < 0) { smb_panic("init_globals: ENOMEM"); } string_set(&Globals.szServerString, s); -- cgit