aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpgme-tool.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2010-05-07 01:32:54 +0000
committerMarcus Brinkmann <[email protected]>2010-05-07 01:32:54 +0000
commitbe3a828e7057e2ea01772b2a00d2ad3e5c46776c (patch)
tree8223fed22dbc57323d27a90909e6b8fb6646c4a5 /src/gpgme-tool.c
parent2010-05-07 Marcus Brinkmann <[email protected]> (diff)
downloadgpgme-be3a828e7057e2ea01772b2a00d2ad3e5c46776c.tar.gz
gpgme-be3a828e7057e2ea01772b2a00d2ad3e5c46776c.zip
2010-05-07 Marcus Brinkmann <[email protected]>
* engine-g13.c, gpgme.c, engine-gpgsm.c, engine-gpg.c, op-support.c, engine-assuan.c, gpgme-tool.c: Include <locale.h> only if available with HAVE_LOCALE_H and conditionalize use of LC_CTYPE on its definition. * engine-gpgconf.c: Do not include <locale.h>.
Diffstat (limited to 'src/gpgme-tool.c')
-rw-r--r--src/gpgme-tool.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpgme-tool.c b/src/gpgme-tool.c
index 63df70d1..f102979d 100644
--- a/src/gpgme-tool.c
+++ b/src/gpgme-tool.c
@@ -28,7 +28,9 @@
#include <getopt.h>
#include <ctype.h>
#include <stdarg.h>
+#ifdef HAVE_LOCALE_H
#include <locale.h>
+#endif
#ifdef HAVE_ARGP_H
#include <argp.h>
#endif
@@ -2908,10 +2910,13 @@ main (int argc, char *argv[])
setlocale (LC_ALL, "");
gpgme_check_version (NULL);
+#ifdef LC_CTYPE
gpgme_set_locale (NULL, LC_CTYPE, setlocale (LC_CTYPE, NULL));
+#endif
#ifdef LC_MESSAGES
gpgme_set_locale (NULL, LC_MESSAGES, setlocale (LC_MESSAGES, NULL));
#endif
+
args_init (&args);
argp_parse (&argp, argc, argv, 0, 0, &args);