]> git.sommitrealweird.co.uk Git - onak.git/commitdiff
Change to using Autoconf version string.
authorJonathan McDowell <noodles@earth.li>
Tue, 14 Sep 2004 14:35:48 +0000 (14:35 +0000)
committerJonathan McDowell <noodles@earth.li>
Tue, 14 Sep 2004 14:35:48 +0000 (14:35 +0000)
Use PACKAGE_VERSION from Autoconf, not our own private VERSION macro.

armor.c
gpgwww.c
lookup.c
onak-conf.h
onak.c

diff --git a/armor.c b/armor.c
index 6d3fc138f6bee1445f9ac9fea4a0f20139723468..6bb77d8d7406376c5f4abcf5b80b173fc7356905 100644 (file)
--- a/armor.c
+++ b/armor.c
@@ -9,6 +9,7 @@
 #include <stdlib.h>
 
 #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;
index 87fe4ce67d3462a5dd8944ef3c73b76e3165538c..44c226ccae6c7a849f7220d1316710ac28482986 100644 (file)
--- 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("<HR>");
-               puts("Produced by gpgwww " VERSION ", part of onak. "
+               puts("Produced by gpgwww " PACKAGE_VERSION ", part of onak. "
                        "<A HREF=\"mailto:noodles-onak@earth.li\">"
                        "Jonathan McDowell</A>");
                end_html();
index e4cab46f2ad362030db60c9f5cde4274dfa4b513..c3b49085f59843443a1f87157e8c4fd8c704909b 100644 (file)
--- 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("<hr>");
-               puts("Produced by onak " VERSION " by Jonathan McDowell");
+               puts("Produced by onak " PACKAGE_VERSION 
+                               " by Jonathan McDowell");
                end_html();
        }
 
index 03f1e8bb75ea7918440dcb6452d6653c736515a2..7b3941528647852fc3a7152e9f5749a53101af65 100644 (file)
@@ -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 1dacae627ac29508f4ffbb0491fb5191fca08141..7bd89190118f02c664a6e758ef766a74b45faf77 100644 (file)
--- 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] <command> <parameters>\n");
        puts("\tCommands:\n");