diff options
author | Michael Adam <obnox@samba.org> | 2009-01-15 22:27:52 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-01-15 22:56:01 +0100 |
commit | 39ec8791f874a0a9a853aa1497099a57c1aa1dbc (patch) | |
tree | 33519fc91211ed6aa875c06007c6ba6bf81bf8ba /source3/libsmb | |
parent | da656c2e87708daf2276ad4f091452c9ec411053 (diff) | |
download | samba-39ec8791f874a0a9a853aa1497099a57c1aa1dbc.tar.gz samba-39ec8791f874a0a9a853aa1497099a57c1aa1dbc.tar.bz2 samba-39ec8791f874a0a9a853aa1497099a57c1aa1dbc.zip |
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
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/cliconnect.c | 2 | ||||
-rw-r--r-- | source3/libsmb/libsmb_context.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index b446879140..9e4266de5a 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -224,7 +224,7 @@ static NTSTATUS cli_session_setup_plaintext(struct cli_state *cli, char *p; fstring lanman; - fstr_sprintf( lanman, "Samba %s", SAMBA_VERSION_STRING); + fstr_sprintf( lanman, "Samba %s", samba_version_string()); memset(cli->outbuf, '\0', smb_size); cli_set_message(cli->outbuf,13,0,True); diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c index becee17f65..66329e2860 100644 --- a/source3/libsmb/libsmb_context.c +++ b/source3/libsmb/libsmb_context.c @@ -619,7 +619,7 @@ smbc_init_context(SMBCCTX *context) const char * smbc_version(void) { - return SAMBA_VERSION_STRING; + return samba_version_string(); } |