X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=common-src%2Fversuff.c.in;h=7996a2f3c3a8e284da55d21424cb5114b6e96687;hb=422c17cad7cd7473d9a3b0888ba5a02dd931262c;hp=9b32c833109934dbaa580dfb9a29bef34cfe2db5;hpb=3ab887b9bc819a846c75dd7f2ee5d41fac22b19f;p=debian%2Famanda diff --git a/common-src/versuff.c.in b/common-src/versuff.c.in index 9b32c83..7996a2f 100644 --- a/common-src/versuff.c.in +++ b/common-src/versuff.c.in @@ -1,6 +1,6 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver - * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 1991-1999 University of Maryland at College Park * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -24,7 +24,7 @@ * file named AUTHORS, in the root directory of this distribution. */ /* - * $Id: versuff.c.in,v 1.6.4.1.4.1 2001/07/20 19:37:20 jrjackson Exp $ + * $Id: versuff.c.in,v 1.12 2006/05/25 01:47:12 johnfranks Exp $ * * provide amanda version number and suffix appended to program names */ @@ -36,39 +36,18 @@ const int VERSION_MINOR = @VERSION_MINOR@; const int VERSION_PATCH = @VERSION_PATCH@; const char *const VERSION_COMMENT = @VERSION_COMMENT@; -char * -versionsuffix() +const char * +versionsuffix(void) { #ifdef USE_VERSION_SUFFIXES - static char *vsuff = NULL; - - if(vsuff) return vsuff; /* been here once already */ - - vsuff = stralloc2("-", version()); - malloc_mark(vsuff); - return vsuff; + return "-@VERSION_SUFFIX@"; #else - return ""; + return ""; #endif } -char * -version() +const char * +version(void) { - static char *vsuff = NULL; - char major_str[NUM_STR_SIZE]; - char minor_str[NUM_STR_SIZE]; - char patch_str[NUM_STR_SIZE]; - - if(vsuff) return vsuff; /* been here once already */ - - ap_snprintf(major_str, sizeof(major_str), "%d", VERSION_MAJOR); - ap_snprintf(minor_str, sizeof(minor_str), "%d", VERSION_MINOR); - ap_snprintf(patch_str, sizeof(patch_str), "%d", VERSION_PATCH); - - vsuff = vstralloc(major_str, ".", minor_str, ".", patch_str, - VERSION_COMMENT, - NULL); - malloc_mark(vsuff); - return vsuff; + return "@VERSION_SUFFIX@"; }