aboutsummaryrefslogtreecommitdiffstats
path: root/src/engine-g13.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/engine-g13.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/engine-g13.c')
-rw-r--r--src/engine-g13.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/engine-g13.c b/src/engine-g13.c
index 208fb35c..8b2af4d7 100644
--- a/src/engine-g13.c
+++ b/src/engine-g13.c
@@ -28,7 +28,9 @@
#include <sys/types.h>
#include <assert.h>
#include <unistd.h>
+#ifdef HAVE_LOCALE_H
#include <locale.h>
+#endif
#include <fcntl.h> /* FIXME */
#include <errno.h>
@@ -354,7 +356,10 @@ g13_set_locale (void *engine, int category, const char *value)
/* FIXME: If value is NULL, we need to reset the option to default.
But we can't do this. So we error out here. G13 needs support
for this. */
- if (category == LC_CTYPE)
+ if (0)
+ ;
+#ifdef LC_CTYPE
+ else if (category == LC_CTYPE)
{
catstr = "lc-ctype";
if (!value && g13->lc_ctype_set)
@@ -362,6 +367,7 @@ g13_set_locale (void *engine, int category, const char *value)
if (value)
g13->lc_ctype_set = 1;
}
+#endif
#ifdef LC_MESSAGES
else if (category == LC_MESSAGES)
{