From 8b078cc509e10ee9c08c7dfb6ee5beb1a46b88d6 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Thu, 12 Jan 2012 13:52:38 +0000 Subject: [PATCH] - Added ub_version(). API version increase, with (binary) backwards compatibility for the previous version. git-svn-id: file:///svn/unbound/trunk@2584 be551aaa-1e26-0410-a405-d3ace91eadb9 --- configure | 8 ++++---- configure.ac | 8 ++++---- doc/Changelog | 4 ++++ libunbound/libunbound.c | 5 +++++ libunbound/unbound.h | 6 ++++++ 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/configure b/configure index 9cf831fa5..bf20d9c6d 100755 --- a/configure +++ b/configure @@ -2401,9 +2401,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -LIBUNBOUND_CURRENT=2 -LIBUNBOUND_REVISION=15 -LIBUNBOUND_AGE=0 +LIBUNBOUND_CURRENT=3 +LIBUNBOUND_REVISION=0 +LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 # 1.0.2 had 0:14:0 @@ -2433,7 +2433,7 @@ LIBUNBOUND_AGE=0 # 1.4.13 had 2:13:0 # and 1.4.13p1 and 1.4.13.p2 # 1.4.14 had 2:14:0 -# 1.4.15 had 2:15:0 +# 1.4.15 had 3:0:1 # adds ub_version() # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary diff --git a/configure.ac b/configure.ac index 35e113e51..26fa2848f 100644 --- a/configure.ac +++ b/configure.ac @@ -8,9 +8,9 @@ sinclude(ac_pkg_swig.m4) AC_INIT(unbound, 1.4.15, unbound-bugs@nlnetlabs.nl, unbound) -LIBUNBOUND_CURRENT=2 -LIBUNBOUND_REVISION=15 -LIBUNBOUND_AGE=0 +LIBUNBOUND_CURRENT=3 +LIBUNBOUND_REVISION=0 +LIBUNBOUND_AGE=1 # 1.0.0 had 0:12:0 # 1.0.1 had 0:13:0 # 1.0.2 had 0:14:0 @@ -40,7 +40,7 @@ LIBUNBOUND_AGE=0 # 1.4.13 had 2:13:0 # and 1.4.13p1 and 1.4.13.p2 # 1.4.14 had 2:14:0 -# 1.4.15 had 2:15:0 +# 1.4.15 had 3:0:1 # adds ub_version() # Current -- the number of the binary API that we're implementing # Revision -- which iteration of the implementation of the binary diff --git a/doc/Changelog b/doc/Changelog index ff341e5e1..688b14aa6 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,7 @@ +12 January 2012: Wouter + - Added ub_version(). API version increase, with (binary) backwards + compatibility for the previous version. + 10 January 2012: Wouter - Fix bug #425: unbound reports wrong TTL in reply, it reports a TTL that would be permissible by the RFCs but it is not the TTL in the diff --git a/libunbound/libunbound.c b/libunbound/libunbound.c index e75eb1c7e..10d00ddc5 100644 --- a/libunbound/libunbound.c +++ b/libunbound/libunbound.c @@ -1117,3 +1117,8 @@ int ub_ctx_data_remove(struct ub_ctx* ctx, char *data) free(nm); return UB_NOERROR; } + +const char* ub_version(void) +{ + return PACKAGE_VERSION; +} diff --git a/libunbound/unbound.h b/libunbound/unbound.h index a17742ca5..085f9f534 100644 --- a/libunbound/unbound.h +++ b/libunbound/unbound.h @@ -543,6 +543,12 @@ int ub_ctx_data_add(struct ub_ctx* ctx, char *data); */ int ub_ctx_data_remove(struct ub_ctx* ctx, char *data); +/** + * Get a version string from the libunbound implementation. + * @return a static constant string with the version number. + */ +const char* ub_version(void); + #ifdef __cplusplus } #endif -- 2.47.2