w32: Print the installation directory in debug mode.

* src/debug.c (debug_init) [W32]: Show libgpgme installation dir.
--

I expect that gpgme will be distributed by applications and thus it
will be helpful to see in the debug log which gpgme is actually used.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2015-08-24 15:03:20 +02:00
parent 2b632bbb78
commit df098d6a43
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
2 changed files with 15 additions and 1 deletions

View File

@ -46,6 +46,7 @@
#include "util.h" #include "util.h"
#include "ath.h" #include "ath.h"
#include "sema.h" #include "sema.h"
#include "sys-util.h"
#include "debug.h" #include "debug.h"
@ -207,7 +208,16 @@ debug_init (void)
UNLOCK (debug_lock); UNLOCK (debug_lock);
if (debug_level > 0) if (debug_level > 0)
{
_gpgme_debug (DEBUG_INIT, "gpgme_debug: level=%d\n", debug_level); _gpgme_debug (DEBUG_INIT, "gpgme_debug: level=%d\n", debug_level);
#ifdef HAVE_W32_SYSTEM
{
const char *name = _gpgme_get_inst_dir ();
_gpgme_debug (DEBUG_INIT, "gpgme_debug: gpgme='%s'\n",
name? name: "?");
}
#endif
}
} }

View File

@ -27,4 +27,8 @@ int _gpgme_set_default_gpgconf_name (const char *name);
char *_gpgme_get_gpg_path (void); char *_gpgme_get_gpg_path (void);
char *_gpgme_get_gpgconf_path (void); char *_gpgme_get_gpgconf_path (void);
#ifdef HAVE_W32_SYSTEM
const char *_gpgme_get_inst_dir (void);
#endif
#endif /* SYS_UTIL_H */ #endif /* SYS_UTIL_H */