summaryrefslogtreecommitdiffstats
path: root/src/rcclocale.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rcclocale.c')
-rw-r--r--src/rcclocale.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/rcclocale.c b/src/rcclocale.c
index fcd9a6d..b514e80 100644
--- a/src/rcclocale.c
+++ b/src/rcclocale.c
@@ -19,9 +19,14 @@
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include <locale.h>
+#include <string.h>
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif /* HAVE_STRINGS_H */
+
+
#include "../config.h"
#ifdef HAVE_LIBCHARSET
@@ -35,11 +40,17 @@
#include "rccconfig.h"
int rccLocaleGetClassByName(const char *locale) {
+#ifdef LC_CTYPE
if (!locale) return LC_CTYPE;
-
+
if (!strcmp(locale, "LC_CTYPE")) return LC_CTYPE;
+#endif /* LC_CTYPE */
+#ifdef LC_MESSAGES
if (!strcmp(locale, "LC_MESSAGES")) return LC_MESSAGES;
+#endif /* LC_MESSAGES */
+#ifdef LC_COLLATE
if (!strcmp(locale, "LC_COLLATE")) return LC_COLLATE;
+#endif /* LC_COLLATE */
/*
if (!strcmp(locale, "LC_ALL")) return LC_ALL;
if (!strcmp(locale, "LC_NUMERIC")) return LC_NUMERIC;