1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Finished the bulk of changes for gnupg 1.9. This included switching

to libgcrypt functions, using shared error codes from libgpg-error,
replacing the old functions we used to have in ../util by those in
../jnlib and ../common, renaming the malloc functions and a couple of
types.  Note, that not all changes are listed below becuause they are
too similar and done at far too many places.  As of today the code
builds using the current libgcrypt from CVS but it is very unlikely
that it actually works.
This commit is contained in:
Werner Koch 2003-06-18 19:56:13 +00:00
parent b7b07d36e8
commit c0c2c58054
90 changed files with 5078 additions and 2925 deletions

View file

@ -30,14 +30,21 @@
#include <unistd.h>
#include <time.h>
#include <assert.h>
#include <gcrypt.h>
#ifdef HAVE_LOCALE_H
#include <locale.h>
#endif
#include <assuan.h>
#include "gpg.h"
#include "util.h"
#include "membuf.h"
#include "options.h"
#include "i18n.h"
#include "call-agent.h"
#ifndef DBG_ASSUAN
# define DBG_ASSUAN 1
#endif
static ASSUAN_CONTEXT agent_ctx = NULL;
static int force_pipe_server = 0;
@ -175,7 +182,7 @@ start_agent (void)
char *optstr;
if (asprintf (&optstr, "OPTION display=%s",
opt.display ? opt.display : dft_display) < 0)
return OUT_OF_CORE (errno);
return gpg_error_from_errno (errno);
rc = assuan_transact (agent_ctx, optstr, NULL, NULL, NULL, NULL, NULL,
NULL);
free (optstr);
@ -193,7 +200,7 @@ start_agent (void)
char *optstr;
if (asprintf (&optstr, "OPTION ttyname=%s",
opt.ttyname ? opt.ttyname : dft_ttyname) < 0)
return OUT_OF_CORE (errno);
return gpg_error_from_errno (errno);
rc = assuan_transact (agent_ctx, optstr, NULL, NULL, NULL, NULL, NULL,
NULL);
free (optstr);
@ -206,7 +213,7 @@ start_agent (void)
char *optstr;
if (asprintf (&optstr, "OPTION ttytype=%s",
opt.ttyname ? opt.ttytype : dft_ttytype) < 0)
return OUT_OF_CORE (errno);
return gpg_error_from_errno (errno);
rc = assuan_transact (agent_ctx, optstr, NULL, NULL, NULL, NULL, NULL,
NULL);
free (optstr);
@ -219,7 +226,8 @@ start_agent (void)
{
old_lc = strdup (old_lc);
if (!old_lc)
return OUT_OF_CORE (errno);
return gpg_error_from_errno (errno);
}
dft_lc = setlocale (LC_CTYPE, "");
#endif
@ -228,7 +236,7 @@ start_agent (void)
char *optstr;
if (asprintf (&optstr, "OPTION lc-ctype=%s",
opt.lc_ctype ? opt.lc_ctype : dft_lc) < 0)
rc = OUT_OF_CORE (errno);
rc = gpg_error_from_errno (errno);
else
{
rc = assuan_transact (agent_ctx, optstr, NULL, NULL, NULL, NULL, NULL,
@ -253,7 +261,7 @@ start_agent (void)
{
old_lc = strdup (old_lc);
if (!old_lc)
return OUT_OF_CORE (errno);
return gpg_error_from_errno (errno);
}
dft_lc = setlocale (LC_MESSAGES, "");
#endif
@ -262,7 +270,7 @@ start_agent (void)
char *optstr;
if (asprintf (&optstr, "OPTION lc-messages=%s",
opt.lc_messages ? opt.lc_messages : dft_lc) < 0)
rc = OUT_OF_CORE (errno);
rc = gpg_error_from_errno (errno);
else
{
rc = assuan_transact (agent_ctx, optstr, NULL, NULL, NULL, NULL, NULL,