summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gcrypt.h.in5
-rw-r--r--src/global.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in
index ad4da049..83437991 100644
--- a/src/gcrypt.h.in
+++ b/src/gcrypt.h.in
@@ -66,6 +66,11 @@ extern "C" {
matches the installed library. */
#define GCRYPT_VERSION "@VERSION@"
+/* The version number of this header. It may be used to handle minor
+ API incompatibilities. */
+#define GCRYPT_VERSION_NUMBER @VERSION_NUMBER@
+
+
/* Internal: We can't use the convenience macros for the multi
precision integer functions when building this library. */
#ifdef _GCRYPT_IN_LIBGCRYPT
diff --git a/src/global.c b/src/global.c
index 0c6fbbdd..f8738975 100644
--- a/src/global.c
+++ b/src/global.c
@@ -247,6 +247,9 @@ gcry_check_version( const char *req_version )
int rq_major, rq_minor, rq_micro;
const char *my_plvl;
+ if (req_version && req_version[0] == 1 && req_version[1] == 1)
+ return _gcry_compat_identification ();
+
/* Initialize library. */
global_init ();
@@ -686,8 +689,6 @@ _gcry_vcontrol (enum gcry_ctl_cmds cmd, va_list arg_ptr)
default:
_gcry_set_preferred_rng_type (0);
- /* A call to make sure that the dummy code is linked in. */
- _gcry_compat_identification ();
err = GPG_ERR_INV_OP;
}