From ed733acb3b73174fa2a27c78ed5acfca9f604ec9 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 10 Jan 2007 10:18:05 +0000 Subject: [PATCH] / * configure.ac (NEED_GPG_VERSION, (NEED_GPGSM_VERSION): Must define after it may have been changed by an option. * configure.ac: Require gpg-error 1.4 due to the use of gpg_error_from_syserror. (HAVE_ASSUAN_H): New. gpgme/ * ttyname_r.c (ttyname_r) [W32]: Return a dummy name. * version.c (do_subsystem_inits): Do assuan init only if building with Assuan. * setenv.c: Include assuan-def.h only if building with Assuan support. * op-support.c (_gpgme_op_reset): Set LC_MESSAGES only if if defined. * engine-gpgsm.c (gpgsm_set_locale): Ditto. * rungpg.c (gpg_set_locale): Ditto. --- trunk/ChangeLog | 6 ++++++ trunk/TODO | 5 +++++ trunk/configure.ac | 9 +++++---- trunk/gpgme/ChangeLog | 4 ++++ trunk/gpgme/ttyname_r.c | 13 +++++++++---- 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/trunk/ChangeLog b/trunk/ChangeLog index 290d1f7..8aeb797 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,9 @@ +2007-01-09 Werner Koch + + * configure.ac (NEED_GPG_VERSION, + (NEED_GPGSM_VERSION): Must define after it may have been changed + by an option. + 2007-01-08 Werner Koch * configure.ac: Require gpg-error 1.4 due to the use of diff --git a/trunk/TODO b/trunk/TODO index ddcf6b1..c67c902 100644 --- a/trunk/TODO +++ b/trunk/TODO @@ -99,6 +99,11 @@ Hey Emacs, this is -*- outline -*- mode! gpg: test: sign+encrypt failed: general error ** Without agent and with wrong passphrase, gpg 1.4.2 enters into an infinite loop. +** Use correct argv[0] + In rungpg.c:build_argv we use + argv[argc] = strdup ("gpg"); /* argv[0] */ + This should be changed to take the real file name used in account. + * Operations ** Include cert values -2, -1, 0 and 1 should be defined as macros. diff --git a/trunk/configure.ac b/trunk/configure.ac index 2e3c4e7..09384b8 100644 --- a/trunk/configure.ac +++ b/trunk/configure.ac @@ -87,10 +87,6 @@ AC_PROG_CC AC_SUBST(LIBGPGME_LT_CURRENT) AC_SUBST(LIBGPGME_LT_AGE) AC_SUBST(LIBGPGME_LT_REVISION) -AC_DEFINE_UNQUOTED(NEED_GPG_VERSION, "$NEED_GPG_VERSION", - [Min. needed GnuPG version.]) -AC_DEFINE_UNQUOTED(NEED_GPGSM_VERSION, "$NEED_GPGSM_VERSION", - [Min. needed GPGSM version.]) AC_SUBST(PACKAGE) AC_SUBST(VERSION) @@ -273,6 +269,11 @@ if test "$NEED_GPGSM_VERSION" = "no"; then NEED_GPGSM_VERSION=0.0.0 fi +AC_DEFINE_UNQUOTED(NEED_GPG_VERSION, "$NEED_GPG_VERSION", + [Min. needed GnuPG version.]) +AC_DEFINE_UNQUOTED(NEED_GPGSM_VERSION, "$NEED_GPGSM_VERSION", + [Min. needed GPGSM version.]) + NO_OVERRIDE=no AC_ARG_WITH(gpg, diff --git a/trunk/gpgme/ChangeLog b/trunk/gpgme/ChangeLog index a60a169..7c1835e 100644 --- a/trunk/gpgme/ChangeLog +++ b/trunk/gpgme/ChangeLog @@ -1,3 +1,7 @@ +2007-01-10 Werner Koch + + * ttyname_r.c (ttyname_r) [W32]: Return a dummy name. + 2007-01-08 Werner Koch * version.c (do_subsystem_inits): Do assuan init only if building diff --git a/trunk/gpgme/ttyname_r.c b/trunk/gpgme/ttyname_r.c index 5cd2949..4487658 100644 --- a/trunk/gpgme/ttyname_r.c +++ b/trunk/gpgme/ttyname_r.c @@ -32,17 +32,22 @@ int ttyname_r (int fd, char *buf, size_t buflen) { -#if HAVE_W32_SYSTEM - errno = ENOTTY; /* The best error code I have under mingw. */ -#else char *tty; +#if HAVE_W32_SYSTEM + /* We use this default one for now. AFAICS we only need it to be + passed to gpg and in turn to pinentry. Providing a replacement + is needed because elsewhere we bail out on error. If we + eventually implement a pinentry for Windows it is uinlikely that + we need a real tty at all. */ + tty = "/dev/tty"; +#else tty = ttyname (fd); if (!tty) return errno; +#endif strncpy (buf, tty, buflen); buf[buflen - 1] = '\0'; return (strlen (tty) >= buflen) ? ERANGE : 0; -#endif } -- 2.26.2