Fixes for building without gpgsm and for W32

This commit is contained in:
Werner Koch 2007-01-08 12:05:07 +00:00
parent 2a139abd8e
commit fca9d331d2
10 changed files with 43 additions and 8 deletions

View File

@ -1,3 +1,9 @@
2007-01-08 Werner Koch <wk@g10code.com>
* configure.ac: Require gpg-error 1.4 due to the use of
gpg_error_from_syserror.
(HAVE_ASSUAN_H): New.
2007-01-05 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Add options --with-gpg-version and

View File

@ -19,11 +19,11 @@
## Process this file with automake to produce Makefile.in
# Because there is no free IDL compiler for OLE, we have to distribute
# a binary typelibrary. To generate a new one, copy the idl file to a
# system with an install MIDL and run the command
# midl /nocpp gpgcom.idl
# Sorry, there is no other way yet.
# Because WIDL does not yet fully support generation of typelibs, we
# have to distribute a binary type library. To generate a new one,
# copy the idl file to a system with an install MIDL and run the
# command "midl /nocpp gpgcom.idl". Sorry, there is no other way yet.
EXTRA_DIST = gpgcom.idl gpgcom.tlb gpgcom.rc vbtest.html vbtest.vbs README
# No need to install this because we are cross-compiling anyway.

View File

@ -243,7 +243,7 @@ if test "$ac_cv_func_timegm" != yes; then
fi
# Checking for libgpg-error.
AM_PATH_GPG_ERROR(0.5,, AC_MSG_ERROR([libgpg-error was not found]))
AM_PATH_GPG_ERROR(1.4,, AC_MSG_ERROR([libgpg-error was not found]))
AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME,
[The default error source for GPGME.])
@ -458,7 +458,9 @@ AM_CONDITIONAL(RUN_GPGSM_TESTS, test "$ok" = "yes")
# FIXME: Only build if supported.
AM_CONDITIONAL(BUILD_ASSUAN, test "$GPGSM" != "no")
if test "$GPGSM" != "no"; then
AC_DEFINE(HAVE_ASSUAN_H, ,[Defined if we are building with assuan support.])
fi
# The assuan code uses funopen but it will also build without it. So
# test for it. Frankly, this is not required in gpgme, but thats the

View File

@ -1,3 +1,15 @@
2007-01-08 Werner Koch <wk@g10code.com>
* 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.
2006-12-17 Marcus Brinkmann <marcus@g10code.de>
* gpgme.c (gpgme_set_protocol): Shut down the engine when

View File

@ -548,6 +548,7 @@ gpgsm_set_locale (void *engine, int category, const char *value)
if (value)
gpgsm->lc_ctype_set = 1;
}
#ifdef LC_MESSAGES
else if (category == LC_MESSAGES)
{
catstr = "lc-messages";
@ -556,6 +557,7 @@ gpgsm_set_locale (void *engine, int category, const char *value)
if (value)
gpgsm->lc_messages_set = 1;
}
#endif /* LC_MESSAGES */
else
return gpg_error (GPG_ERR_INV_VALUE);

View File

@ -72,7 +72,7 @@ extern "C" {
AM_PATH_GPGME macro) check that this header matches the installed
library. Warning: Do not edit the next line. configure will do
that for you! */
#define GPGME_VERSION "1.1.3-cvs1196"
#define GPGME_VERSION "1.1.3-cvs1200"

View File

@ -101,9 +101,12 @@ _gpgme_op_reset (gpgme_ctx_t ctx, int type)
}
err = _gpgme_engine_set_locale (ctx->engine, LC_CTYPE, ctx->lc_ctype);
#ifdef LC_MESSAGES
if (!err)
err = _gpgme_engine_set_locale (ctx->engine,
LC_MESSAGES, ctx->lc_messages);
#endif
if (err)
{
_gpgme_engine_release (ctx->engine);

View File

@ -525,6 +525,7 @@ gpg_set_locale (void *engine, int category, const char *value)
return gpg_error_from_syserror ();
}
}
#ifdef LC_MESSAGES
else if (category == LC_MESSAGES)
{
if (gpg->lc_messages)
@ -536,6 +537,7 @@ gpg_set_locale (void *engine, int category, const char *value)
return gpg_error_from_syserror ();
}
}
#endif /* LC_MESSAGES */
else
return gpg_error (GPG_ERR_INV_VALUE);

View File

@ -20,7 +20,11 @@
# include <config.h>
#endif
#if HAVE_ASSUAN_H
/* Fixme: Why do we need to include the assuan header and why the
internal ones? */
#include "assuan-defs.h"
#endif /*HAVE_ASSUAN_H*/
#define __builtin_expect(cond,val) (cond)

View File

@ -32,7 +32,9 @@
/* For _gpgme_sema_subsystem_init (). */
#include "sema.h"
#ifdef HAVE_ASSUAN_H
#include "assuan.h"
#endif
/* Bootstrap the subsystems needed for concurrent operation. This
@ -50,7 +52,9 @@ do_subsystem_inits (void)
_gpgme_sema_subsystem_init ();
_gpgme_io_subsystem_init ();
#ifdef HAVE_ASSUAN_H
assuan_set_assuan_err_source (GPG_ERR_SOURCE_GPGME);
#endif
done = 1;
}