diff options
| author | Werner Koch <[email protected]> | 2014-01-07 16:59:59 +0000 | 
|---|---|---|
| committer | Werner Koch <[email protected]> | 2014-01-07 16:59:59 +0000 | 
| commit | ab6e718327451e418782990c5a0a4e72588e3f0b (patch) | |
| tree | 19beebc0ca982828f98b55a5a501c5fb866742c1 | |
| parent | Make gpgme_new return a proper error if no engines are installed. (diff) | |
| download | gpgme-ab6e718327451e418782990c5a0a4e72588e3f0b.tar.gz gpgme-ab6e718327451e418782990c5a0a4e72588e3f0b.zip | |
Make gpgconf engine work again - fixes 02ba35c1.
* src/gpgconf.c: Remove ENABLE_GPGCONF and move prototypes to ...
* src/engine-backend.h: ... here.
--
gpgconf is a required part for gpgme.
| -rw-r--r-- | src/engine-backend.h | 12 | ||||
| -rw-r--r-- | src/gpgconf.c | 33 | 
2 files changed, 13 insertions, 32 deletions
| diff --git a/src/engine-backend.h b/src/engine-backend.h index a768652c..7e6c0c12 100644 --- a/src/engine-backend.h +++ b/src/engine-backend.h @@ -136,4 +136,16 @@ extern struct engine_ops _gpgme_engine_ops_g13;         /* Crypto VFS. */  extern struct engine_ops _gpgme_engine_ops_uiserver;  #endif + +/* Prototypes for extra functions in engine-gpgconf.c  */ +gpgme_error_t _gpgme_conf_arg_new (gpgme_conf_arg_t *arg_p, +                                   gpgme_conf_type_t type, const void *value); +void _gpgme_conf_arg_release (gpgme_conf_arg_t arg, gpgme_conf_type_t type); +gpgme_error_t _gpgme_conf_opt_change (gpgme_conf_opt_t opt, int reset, +				      gpgme_conf_arg_t arg); +void _gpgme_conf_release (gpgme_conf_comp_t conf); +gpgme_error_t _gpgme_conf_load (void *engine, gpgme_conf_comp_t *conf_p); + + +  #endif /* ENGINE_BACKEND_H */ diff --git a/src/gpgconf.c b/src/gpgconf.c index 47ef47ab..65914529 100644 --- a/src/gpgconf.c +++ b/src/gpgconf.c @@ -28,18 +28,7 @@  #include "engine.h"  #include "debug.h" -#ifdef ENABLE_GPGCONF -/* engine-gpgconf.c.  */ -gpgme_error_t _gpgme_conf_arg_new (gpgme_conf_arg_t *arg_p, -				  gpgme_conf_type_t type, const void *value); -void _gpgme_conf_arg_release (gpgme_conf_arg_t arg, gpgme_conf_type_t type); -gpgme_error_t _gpgme_conf_opt_change (gpgme_conf_opt_t opt, int reset, -				      gpgme_conf_arg_t arg); -void _gpgme_conf_release (gpgme_conf_comp_t conf); -gpgme_error_t _gpgme_conf_load (void *engine, gpgme_conf_comp_t *conf_p); -gpgme_error_t gpgme_op_conf_save (gpgme_ctx_t ctx, gpgme_conf_comp_t comp); - -#endif +#include "engine-backend.h"  /* Allocate a new gpgme_conf_arg_t.  */ @@ -47,11 +36,7 @@ gpgme_error_t  gpgme_conf_arg_new (gpgme_conf_arg_t *arg_p,  		    gpgme_conf_type_t type, const void *value)  { -#ifdef ENABLE_GPGCONF    return _gpgme_conf_arg_new (arg_p, type, value); -#else -  return gpg_error (GPG_ERR_NOT_IMPLEMENTED); -#endif  } @@ -59,9 +44,7 @@ gpgme_conf_arg_new (gpgme_conf_arg_t *arg_p,  void  gpgme_conf_arg_release (gpgme_conf_arg_t arg, gpgme_conf_type_t type)  { -#ifdef ENABLE_GPGCONF    _gpgme_conf_arg_release (arg, type); -#endif  } @@ -69,11 +52,7 @@ gpgme_conf_arg_release (gpgme_conf_arg_t arg, gpgme_conf_type_t type)  gpgme_error_t  gpgme_conf_opt_change (gpgme_conf_opt_t opt, int reset, gpgme_conf_arg_t arg)  { -#ifdef ENABLE_GPGCONF    return _gpgme_conf_opt_change (opt, reset, arg); -#else -  return gpg_error (GPG_ERR_NOT_IMPLEMENTED); -#endif  } @@ -82,9 +61,7 @@ gpgme_conf_opt_change (gpgme_conf_opt_t opt, int reset, gpgme_conf_arg_t arg)  void  gpgme_conf_release (gpgme_conf_comp_t conf)  { -#ifdef ENABLE_GPGCONF    _gpgme_conf_release (conf); -#endif  } @@ -93,7 +70,6 @@ gpgme_conf_release (gpgme_conf_comp_t conf)  gpgme_error_t  gpgme_op_conf_load (gpgme_ctx_t ctx, gpgme_conf_comp_t *conf_p)  { -#ifdef ENABLE_GPGCONF    gpgme_error_t err;    gpgme_protocol_t proto; @@ -109,9 +85,6 @@ gpgme_op_conf_load (gpgme_ctx_t ctx, gpgme_conf_comp_t *conf_p)    err = _gpgme_engine_op_conf_load (ctx->engine, conf_p);    ctx->protocol = proto;    return err; -#else -  return gpg_error (GPG_ERR_NOT_IMPLEMENTED); -#endif  } @@ -119,7 +92,6 @@ gpgme_op_conf_load (gpgme_ctx_t ctx, gpgme_conf_comp_t *conf_p)  gpgme_error_t  gpgme_op_conf_save (gpgme_ctx_t ctx, gpgme_conf_comp_t comp)  { -#ifdef ENABLE_GPGCONF    gpgme_error_t err;    gpgme_protocol_t proto; @@ -135,9 +107,6 @@ gpgme_op_conf_save (gpgme_ctx_t ctx, gpgme_conf_comp_t comp)    err = _gpgme_engine_op_conf_save (ctx->engine, comp);    ctx->protocol = proto;    return err; -#else -  return gpg_error (GPG_ERR_NOT_IMPLEMENTED); -#endif  } | 
