From 0ebf79c824a0eebff35f757f85608e3dd7750ac3 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 21 Oct 2004 16:56:22 +0000 Subject: * configure.ac: Remove the check for asprintf * app-common.h (app_openpgp_storekey: Add prototype. * app-openpgp.c (do_sign): Replace asprintf by direct allocation. This avoids problems with missing vasprintf implementations. * card-util.c (generate_card_keys): Add a #warning for gnupg 1.9 and use the same string there. * util.h [!HAVE_VASPRINTF]: Removed prototype. * vasprintf.c: Removed. It was used only at one place and I don't want to get into build problems in 1.4. --- g10/app-openpgp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'g10/app-openpgp.c') diff --git a/g10/app-openpgp.c b/g10/app-openpgp.c index d6cbe88a6..11be93e28 100644 --- a/g10/app-openpgp.c +++ b/g10/app-openpgp.c @@ -1298,10 +1298,15 @@ do_sign (app_t app, const char *keyidstr, int hashalgo, { char *prompt; - if (asprintf (&prompt, _("PIN [sigs done: %lu]"), sigcount) < 0) +#define PROMPTSTRING _("PIN [sigs done: %lu]") + + prompt = malloc (strlen (PROMPTSTRING) + 50); + if (!prompt) return gpg_error_from_errno (errno); + sprintf (prompt, PROMPTSTRING, sigcount); rc = pincb (pincb_arg, prompt, &pinvalue); free (prompt); +#undef PROMPTSTRING } if (rc) { -- cgit