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/winbindd/winbindd.c | 2 +- source3/winbindd/winbindd_misc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/winbindd') diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 8f94f8ad70..821812925c 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -1121,7 +1121,7 @@ int main(int argc, char **argv, char **envp) setup_logging("winbindd", log_stdout); reopen_logs(); - DEBUG(0,("winbindd version %s started.\n", SAMBA_VERSION_STRING)); + DEBUG(0,("winbindd version %s started.\n", samba_version_string())); DEBUGADD(0,("%s\n", COPYRIGHT_STARTUP_MESSAGE)); if (!lp_load_initial_only(get_dyn_CONFIGFILE())) { diff --git a/source3/winbindd/winbindd_misc.c b/source3/winbindd/winbindd_misc.c index 0e34615c3a..737fd08d2a 100644 --- a/source3/winbindd/winbindd_misc.c +++ b/source3/winbindd/winbindd_misc.c @@ -742,7 +742,7 @@ void winbindd_info(struct winbindd_cli_state *state) DEBUG(3, ("[%5lu]: request misc info\n", (unsigned long)state->pid)); state->response.data.info.winbind_separator = *lp_winbind_separator(); - fstrcpy(state->response.data.info.samba_version, SAMBA_VERSION_STRING); + fstrcpy(state->response.data.info.samba_version, samba_version_string()); request_ok(state); } -- cgit