diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-05-08 08:27:22 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:05:44 -0500 |
commit | 721270ebad0a80fd3a608c4a6bd8c4218c6b774a (patch) | |
tree | 8cd055c4d83c23b9cb27fc0499b5114e171dfdf6 /source4/lib | |
parent | 2a8925ad2509e1e777e4eb3e7712a5cf68847ab5 (diff) | |
download | samba-721270ebad0a80fd3a608c4a6bd8c4218c6b774a.tar.gz samba-721270ebad0a80fd3a608c4a6bd8c4218c6b774a.tar.bz2 samba-721270ebad0a80fd3a608c4a6bd8c4218c6b774a.zip |
r15510: As discussed on samba-technical, move the VERSION system back to a
#define based system only. This avoids allocation in the fault code.
Andrew Bartlett
(This used to be commit 31c97b4e67ba6a188d0ed4844ca4f2f86f29514f)
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/version.c | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/source4/lib/version.c b/source4/lib/version.c index b7aa81a081..0ad6a93322 100644 --- a/source4/lib/version.c +++ b/source4/lib/version.c @@ -24,40 +24,5 @@ const char *samba_version_string(void) { - const char *official_string = SAMBA_VERSION_OFFICIAL_STRING; -#ifdef SAMBA_VERSION_RELEASE_NICKNAME - const char *release_nickname = SAMBA_VERSION_RELEASE_NICKNAME; -#else - const char *release_nickname = NULL; -#endif -#ifdef SAMBA_VERSION_VENDOR_SUFFIX - const char *vendor_suffix = SAMBA_VERSION_VENDOR_SUFFIX; -#else - const char *vendor_suffix = NULL; -#endif -#ifdef SAMBA_VERSION_VENDOR_PATCH - const char *vendor_patch = SAMBA_VERSION_VENDOR_PATCH; -#else - const char *vendor_patch = NULL; -#endif - static char *samba_version; - static BOOL init_samba_version; - - if (init_samba_version) { - return samba_version; - } - - samba_version = talloc_asprintf(talloc_autofree_context(), - "%s%s%s%s%s%s%s%s", - official_string, - (vendor_suffix?"-":""), - (vendor_suffix?vendor_suffix:""), - (vendor_patch?"-":""), - (vendor_patch?vendor_patch:""), - (release_nickname?" (":""), - (release_nickname?release_nickname:""), - (release_nickname?")":"")); - - init_samba_version = True; - return samba_version; + return SAMBA_VERSION_STRING; } |