Use version string determined by Autoconf.

This commit is contained in:
Peter Simons 2009-07-19 22:24:16 +02:00
parent 78d117b6cb
commit 3e19c55fcd
2 changed files with 2 additions and 52 deletions

8
main.c
View File

@ -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 : "<none>"), masterconfig_path, (g_is_approved) ? "true" : "false",
PACKAGE_STRING, mode, (listname != NULL ? listname : "<none>"), masterconfig_path, (g_is_approved) ? "true" : "false",
getuid(), geteuid(), getgid(), getegid());
/* Init Petidomo's internal stuff. */

View File

@ -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_ */