From 519305feb888b529c005b40445d041a088a2f8fc Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 26 Aug 2014 17:47:22 +0200 Subject: Switch to the libgpg-error provided estream. * configure.ac (NEED_GPG_ERROR_VERSION): Reguire 1.14. (GPGRT_ENABLE_ES_MACROS): Define. (estream_INIT): Remove. * m4/estream.m4: Remove. * common/estream-printf.c, common/estream-printf.h: Remove. * common/estream.c, common/estream.h: Remove. * common/init.c (_init_common_subsystems): Call gpgrt initialization. --- scd/app-openpgp.c | 5 ++--- scd/atr.c | 2 +- scd/command.c | 10 +++++----- scd/scdaemon.c | 4 ++-- 4 files changed, 10 insertions(+), 11 deletions(-) (limited to 'scd') diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index fff097adb..9b4ab2220 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -1448,9 +1448,8 @@ get_public_key (app_t app, int keyno) } hexkeyid = fpr + 24; - ret = estream_asprintf (&command, - "gpg --list-keys --with-colons --with-key-data '%s'", - fpr); + ret = gpgrt_asprintf + (&command, "gpg --list-keys --with-colons --with-key-data '%s'", fpr); if (ret < 0) { err = gpg_error_from_syserror (); diff --git a/scd/atr.c b/scd/atr.c index c3fa49f4b..5b94758a5 100644 --- a/scd/atr.c +++ b/scd/atr.c @@ -24,7 +24,7 @@ #include #include -#include "../common/estream.h" +#include #include "../common/logging.h" #include "atr.h" diff --git a/scd/command.c b/scd/command.c index 05b50b935..dd4191f44 100644 --- a/scd/command.c +++ b/scd/command.c @@ -686,8 +686,8 @@ cmd_learn (assuan_context_t ctx, char *line) { char *command; - rc = estream_asprintf (&command, "KNOWNCARDP %s %lu", - serial, (unsigned long)stamp); + rc = gpgrt_asprintf (&command, "KNOWNCARDP %s %lu", + serial, (unsigned long)stamp); if (rc < 0) { xfree (serial); @@ -915,7 +915,7 @@ pin_cb (void *opaque, const char *info, char **retstr) if (info) { log_debug ("prompting for pinpad entry '%s'\n", info); - rc = estream_asprintf (&command, "POPUPPINPADPROMPT %s", info); + rc = gpgrt_asprintf (&command, "POPUPPINPADPROMPT %s", info); if (rc < 0) return gpg_error (gpg_err_code_from_errno (errno)); rc = assuan_inquire (ctx, command, &value, &valuelen, MAXLEN_PIN); @@ -935,7 +935,7 @@ pin_cb (void *opaque, const char *info, char **retstr) *retstr = NULL; log_debug ("asking for PIN '%s'\n", info); - rc = estream_asprintf (&command, "NEEDPIN %s", info); + rc = gpgrt_asprintf (&command, "NEEDPIN %s", info); if (rc < 0) return gpg_error (gpg_err_code_from_errno (errno)); @@ -2340,7 +2340,7 @@ update_reader_status_file (int set_card_removed_flag) gpg_error_t err; homestr = make_filename (opt.homedir, NULL); - if (estream_asprintf (&envstr, "GNUPGHOME=%s", homestr) < 0) + if (gpgrt_asprintf (&envstr, "GNUPGHOME=%s", homestr) < 0) log_error ("out of core while building environment\n"); else { diff --git a/scd/scdaemon.c b/scd/scdaemon.c index aa1588392..9cc4d117c 100644 --- a/scd/scdaemon.c +++ b/scd/scdaemon.c @@ -826,8 +826,8 @@ main (int argc, char **argv ) close (fd); /* create the info string: :: */ - if (estream_asprintf (&infostr, "SCDAEMON_INFO=%s:%lu:1", - socket_name, (ulong) pid) < 0) + if (gpgrt_asprintf (&infostr, "SCDAEMON_INFO=%s:%lu:1", + socket_name, (ulong) pid) < 0) { log_error ("out of core\n"); kill (pid, SIGTERM); -- cgit v1.2.3