aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpgrt-int.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-11-15 18:18:53 +0000
committerWerner Koch <[email protected]>2018-11-15 18:28:20 +0000
commita5d4a4b32b11814d673241d62624ecec1d577571 (patch)
treef276ffcc2ae1522ee83666dc6da4774bb602a26e /src/gpgrt-int.h
parentgpgrt-config: Prepend PKG_CONFIG_LIBDIR to PKG_CONFIG_PATH. (diff)
downloadlibgpg-error-a5d4a4b32b11814d673241d62624ecec1d577571.tar.gz
libgpg-error-a5d4a4b32b11814d673241d62624ecec1d577571.zip
core: New API gpgrt_cmp_version
* src/gpg-error.h.in: New API gpgrt_cmp_version. * src/visibility.c (gpgrt_cmp_version): New wrapper. * src/version.c (parse_version_string): Revamped. (do_cmp_version): New. (_gpgrt_cmp_version): New. (_gpg_error_check_version): Re-implemented using the new func. * tests/t-version.c: Include t-common.h. (t_gpgrt_cmp_version): New test. (main): Run new test. Change test for new version number to require a 2 level number. -- We have implementations of very similar functions in all out libs. Thus it makes sense to provide a generic version. This version is actually derived from the ftp-indexer.c we use for the gnupg website (see the gnupg-doc repo). Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'src/gpgrt-int.h')
-rw-r--r--src/gpgrt-int.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpgrt-int.h b/src/gpgrt-int.h
index 34e494c..b5a4dd1 100644
--- a/src/gpgrt-int.h
+++ b/src/gpgrt-int.h
@@ -742,6 +742,12 @@ void _gpgrt_set_usage_outfnc (int (*fnc)(int, const char *));
void _gpgrt_set_fixed_string_mapper (const char *(*f)(const char*));
+/*
+ * Various helper functions
+ */
+int _gpgrt_cmp_version (const char *a, const char *b, int level);
+
+
/*
* Internal platform abstraction functions (sysutils.c)