s3: make better use of ccache by not including version.h in every C-file.
authorMichael Adam <obnox@samba.org>
Thu, 15 Jan 2009 21:27:52 +0000 (22:27 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 15 Jan 2009 21:56:01 +0000 (22:56 +0100)
commit39ec8791f874a0a9a853aa1497099a57c1aa1dbc
tree33519fc91211ed6aa875c06007c6ba6bf81bf8ba
parentda656c2e87708daf2276ad4f091452c9ec411053
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
18 files changed:
source3/client/client.c
source3/include/includes.h
source3/lib/fault.c
source3/lib/popt_common.c
source3/lib/substitute.c
source3/lib/version.c
source3/libnet/libnet_join.c
source3/libsmb/cliconnect.c
source3/libsmb/libsmb_context.c
source3/nmbd/nmbd.c
source3/param/loadparm.c
source3/smbd/server.c
source3/smbd/sesssetup.c
source3/smbd/trans2.c
source3/utils/status.c
source3/web/statuspage.c
source3/winbindd/winbindd.c
source3/winbindd/winbindd_misc.c