summaryrefslogtreecommitdiffstats
path: root/src/rcclocale.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2010-07-16 09:58:26 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2010-07-16 09:58:26 +0200
commit4ed874500c66aeb60cb11a0acc081dbc113eec51 (patch)
tree425587d32b7a7e005c37c9c2c941936c0c65c0d6 /src/rcclocale.c
parent0f6f7b770b84bd02d8c94c84ed9da78bc11ba8ca (diff)
downloadlibrcc-4ed874500c66aeb60cb11a0acc081dbc113eec51.tar.gz
librcc-4ed874500c66aeb60cb11a0acc081dbc113eec51.tar.bz2
librcc-4ed874500c66aeb60cb11a0acc081dbc113eec51.tar.xz
librcc-4ed874500c66aeb60cb11a0acc081dbc113eec51.zip
Windows fixes and CMake scripts to build under Windows
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;