From 3e19c55fcdc760754587baf37f7987cbed29191c Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Sun, 19 Jul 2009 22:24:16 +0200 Subject: [PATCH] Use version string determined by Autoconf. --- main.c | 8 ++------ version.c | 46 ---------------------------------------------- 2 files changed, 2 insertions(+), 52 deletions(-) delete mode 100644 version.c diff --git a/main.c b/main.c index addd4c2..1fe1844 100644 --- a/main.c +++ b/main.c @@ -27,10 +27,6 @@ #include "libtext/text.h" #include "petidomo.h" -#define _VERSION_C_AS_HEADER_ -#include "version.c" -#undef _VERSION_C_AS_HEADER_ - #ifndef LOG_PERROR # define LOG_PERROR 0 #endif @@ -87,7 +83,7 @@ main(int argc, char * argv[]) /* Parse the command line. */ argv_help_string = "Petidomo Mailing List Server"; - argv_version_string = (char *)petidomo_version.v_gnu; + argv_version_string = PACKAGE_STRING; argv_process(args, argc, argv); /* Make sure we got all required parameters. */ @@ -124,7 +120,7 @@ main(int argc, char * argv[]) /* Log a few helpful facts about this Petidomo instance. */ syslog(LOG_DEBUG, "%s starting up; mode=%s, listname=%s, masterconf=%s, approved=%s, ruid=%d, euid=%d, gid=%d, egid=%d", - petidomo_version.v_gnu, mode, (listname != NULL ? listname : ""), masterconfig_path, (g_is_approved) ? "true" : "false", + PACKAGE_STRING, mode, (listname != NULL ? listname : ""), masterconfig_path, (g_is_approved) ? "true" : "false", getuid(), geteuid(), getgid(), getegid()); /* Init Petidomo's internal stuff. */ diff --git a/version.c b/version.c deleted file mode 100644 index e67ed96..0000000 --- a/version.c +++ /dev/null @@ -1,46 +0,0 @@ -/* -** version.c -- Version Information for OSSP petidomo (syntax: C/C++) -** [automatically generated and maintained by GNU shtool] -*/ - -#ifdef _VERSION_C_AS_HEADER_ - -#ifndef _VERSION_C_ -#define _VERSION_C_ - -#define PETIDOMO_VERSION 0x400106 - -typedef struct { - const int v_hex; - const char *v_short; - const char *v_long; - const char *v_tex; - const char *v_gnu; - const char *v_web; - const char *v_sccs; - const char *v_rcs; -} petidomo_version_t; - -extern petidomo_version_t petidomo_version; - -#endif /* _VERSION_C_ */ - -#else /* _VERSION_C_AS_HEADER_ */ - -#define _VERSION_C_AS_HEADER_ -#include "version.c" -#undef _VERSION_C_AS_HEADER_ - -petidomo_version_t petidomo_version = { - 0x400106, - "4.0b6", - "4.0b6 (19-Mar-2004)", - "This is OSSP petidomo, Version 4.0b6 (19-Mar-2004)", - "OSSP petidomo 4.0b6 (19-Mar-2004)", - "OSSP petidomo/4.0b6", - "@(#)OSSP petidomo 4.0b6 (19-Mar-2004)", - "$Id$" -}; - -#endif /* _VERSION_C_AS_HEADER_ */ -