aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2021-02-10 08:32:57 +0100
committerWerner Koch <wk@gnupg.org>2021-02-10 08:32:57 +0100
commit2b75b256054427119a284792540243c3471267d4 (patch)
tree2ee874538b232116982a01c83d31503c8308dfa6
parentf9e4dae08d7caed741d35916c46b8302e098d521 (diff)
downloadgnupg-2b75b256054427119a284792540243c3471267d4.tar.gz
Require GpgRT version 1.41.
* configure.ac (NEED_GPG_ERROR_VERSION): Rename to NEED_GPGRT_VERSION and set to 1.41. * common/sysutils.c (gnupg_access): Remove code for older gpgrt versions. * kbx/backend-sqlite.c: Ditto. * sm/gpgsm.c (main): Ditto. -- We already have a requirement for a newer Libgcrypt and thus we can also require a more recent libgpgrt (aka libgpg-error) which was released before Libgcrypt.
-rw-r--r--common/sysutils.c19
-rw-r--r--configure.ac12
-rw-r--r--kbx/backend-sqlite.c16
-rw-r--r--sm/gpgsm.c5
4 files changed, 6 insertions, 46 deletions
diff --git a/common/sysutils.c b/common/sysutils.c
index 50713a5f0..8b2d70180 100644
--- a/common/sysutils.c
+++ b/common/sysutils.c
@@ -1233,26 +1233,7 @@ gnupg_getcwd (void)
gpg_err_code_t
gnupg_access (const char *name, int mode)
{
-#if GPGRT_VERSION_NUMBER < 0x012800 /* 1.40 */
-# ifdef HAVE_W32_SYSTEM
- wchar_t *wname;
- gpg_err_code_t ec;
-
- wname = utf8_to_wchar (name);
- if (!wname)
- ec = gpg_err_code_from_syserror ();
- else
- {
- ec = _waccess (wname, mode)? gpg_err_code_from_syserror () : 0;
- xfree (wname);
- }
- return ec;
-# else
- return access (name, mode)? gpg_err_code_from_syserror () : 0;
-# endif
-#else /* gpgrt 1.40 or newer. */
return gpgrt_access (name, mode);
-#endif
}
diff --git a/configure.ac b/configure.ac
index 171847a33..dad73ce91 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,7 +53,7 @@ AC_INIT([mym4_package],[mym4_version],[https://bugs.gnupg.org])
# build-aux/speedo.mk and Makefile.am
AC_DEFINE_UNQUOTED(GNUPG_SWDB_TAG, "gnupg24", [swdb tag for this branch])
-NEED_GPG_ERROR_VERSION=1.38
+NEED_GPGRT_VERSION=1.41
NEED_LIBGCRYPT_API=1
NEED_LIBGCRYPT_VERSION=1.9.0
@@ -802,10 +802,10 @@ AC_MSG_NOTICE([checking for libraries])
#
-# libgpg-error is a library with error codes shared between GnuPG
-# related projects.
+# gpgrt (aka libgpg-error) is a library with error codes shared
+# between GnuPG related projects.
#
-AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
+AM_PATH_GPG_ERROR("$NEED_GPGRT_VERSION",
have_gpg_error=yes,have_gpg_error=no)
@@ -1920,8 +1920,8 @@ if test "$have_gpg_error" = "no"; then
***
*** You need libgpg-error to build this program.
** This library is for example available at
-*** https://gnupg.org/ftp/gcrypt/libgpg-error
-*** (at least version $NEED_GPG_ERROR_VERSION is required.)
+*** https://gnupg.org/ftp/gcrypt/gpgrt
+*** (at least version $NEED_GPGRT_VERSION is required.)
***]])
fi
if test "$have_libgcrypt" = "no"; then
diff --git a/kbx/backend-sqlite.c b/kbx/backend-sqlite.c
index 175cb938c..ae2530d1a 100644
--- a/kbx/backend-sqlite.c
+++ b/kbx/backend-sqlite.c
@@ -34,22 +34,6 @@
#include "keybox-defs.h" /* (for the openpgp parser) */
-/* Add replacement error codes; GPGRT provides SQL error codes from
- * version 1.37 on. */
-#if GPGRT_VERSION_NUMBER < 0x012500 /* 1.37 */
-
-static GPGRT_INLINE gpg_error_t
-gpg_err_code_from_sqlite (int sqlres)
-{
- return sqlres? 1500 + (sqlres & 0xff) : 0;
-}
-
-#define GPG_ERR_SQL_OK 1500
-#define GPG_ERR_SQL_ROW 1600
-#define GPG_ERR_SQL_DONE 1601
-
-#endif /*GPGRT_VERSION_NUMBER*/
-
/* Our definition of the backend handle. */
struct backend_handle_s
diff --git a/sm/gpgsm.c b/sm/gpgsm.c
index e461f99fe..49e7e3870 100644
--- a/sm/gpgsm.c
+++ b/sm/gpgsm.c
@@ -1955,15 +1955,10 @@ main ( int argc, char **argv)
else
wrong_args ("--encrypt [datafile]");
-#if GPGRT_VERSION_NUMBER >= 0x012700 /* >= 1.39 */
if (err)
gpgrt_fcancel (fp);
else
es_fclose (fp);
-#else
- (void)err;
- es_fclose (fp);
-#endif
}
break;