From: Jonathan McDowell Date: Tue, 14 Sep 2004 14:35:48 +0000 (+0000) Subject: Change to using Autoconf version string. X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/commitdiff_plain/feb5361ac535c09eb8dbda4cd25157c77764c287 Change to using Autoconf version string. Use PACKAGE_VERSION from Autoconf, not our own private VERSION macro. --- diff --git a/armor.c b/armor.c index 6d3fc13..6bb77d8 100644 --- a/armor.c +++ b/armor.c @@ -9,6 +9,7 @@ #include #include "armor.h" +#include "config.h" #include "keystructs.h" #include "log.h" #include "onak-conf.h" @@ -320,8 +321,8 @@ int armor_openpgp_stream(int (*putchar_func)(void *ctx, size_t count, */ putchar_func(ctx, sizeof("-----BEGIN PGP PUBLIC KEY BLOCK-----\n") - 1, (unsigned char *) "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"); - putchar_func(ctx, sizeof("Version: onak " VERSION "\n\n") - 1, - (unsigned char *) "Version: onak " VERSION "\n\n"); + putchar_func(ctx, sizeof("Version: onak " PACKAGE_VERSION "\n\n") - 1, + (unsigned char *) "Version: onak " PACKAGE_VERSION "\n\n"); armor_init(&armor_ctx); armor_ctx.putchar_func = putchar_func; diff --git a/gpgwww.c b/gpgwww.c index 87fe4ce..44c226c 100644 --- a/gpgwww.c +++ b/gpgwww.c @@ -14,6 +14,7 @@ #include "armor.h" #include "charfuncs.h" #include "cleanup.h" +#include "config.h" #include "getcgi.h" #include "hash.h" #include "keydb.h" @@ -184,7 +185,7 @@ int main(int argc, char *argv[]) if (op != OP_GET) { puts("
"); - puts("Produced by gpgwww " VERSION ", part of onak. " + puts("Produced by gpgwww " PACKAGE_VERSION ", part of onak. " "" "Jonathan McDowell"); end_html(); diff --git a/lookup.c b/lookup.c index e4cab46..c3b4908 100644 --- a/lookup.c +++ b/lookup.c @@ -17,6 +17,7 @@ #include "charfuncs.h" #include "cleankey.h" #include "cleanup.h" +#include "config.h" #include "getcgi.h" #include "keydb.h" #include "keyindex.h" @@ -211,7 +212,8 @@ int main(int argc, char *argv[]) } if (!mrhkp) { puts("
"); - puts("Produced by onak " VERSION " by Jonathan McDowell"); + puts("Produced by onak " PACKAGE_VERSION + " by Jonathan McDowell"); end_html(); } diff --git a/onak-conf.h b/onak-conf.h index 03f1e8b..7b39415 100644 --- a/onak-conf.h +++ b/onak-conf.h @@ -9,8 +9,6 @@ #ifndef __ONAK_CONF_H_ #define __ONAK_CONF_H_ -#define VERSION "0.2.1" - /* * struct onak_config - Runtime configuration for onak. * @maxkeys: The maximum number of keys a query should return. diff --git a/onak.c b/onak.c index 1dacae6..7bd8919 100644 --- a/onak.c +++ b/onak.c @@ -18,6 +18,7 @@ #include "charfuncs.h" #include "cleankey.h" #include "cleanup.h" +#include "config.h" #include "keydb.h" #include "keyid.h" #include "keyindex.h" @@ -54,7 +55,7 @@ void find_keys(char *search, uint64_t keyid, bool ishex, } void usage(void) { - puts("onak " VERSION " - an OpenPGP keyserver.\n"); + puts("onak " PACKAGE_VERSION " - an OpenPGP keyserver.\n"); puts("Usage:\n"); puts("\tonak [options] \n"); puts("\tCommands:\n");