summaryrefslogtreecommitdiff
path: root/libxslt/xsltlocale.h
diff options
context:
space:
mode:
Diffstat (limited to 'libxslt/xsltlocale.h')
-rw-r--r--libxslt/xsltlocale.h29
1 files changed, 19 insertions, 10 deletions
diff --git a/libxslt/xsltlocale.h b/libxslt/xsltlocale.h
index 8a9ca152..f3b9d6e0 100644
--- a/libxslt/xsltlocale.h
+++ b/libxslt/xsltlocale.h
@@ -14,20 +14,31 @@
#include <libxml/xmlstring.h>
#include "xsltexports.h"
-#ifdef XSLT_LOCALE_XLOCALE
+#ifdef HAVE_STRXFRM_L
+/*
+ * XSLT_LOCALE_POSIX:
+ * Macro indicating to use POSIX locale extensions
+ */
+#define XSLT_LOCALE_POSIX
+
+#ifdef HAVE_LOCALE_H
#include <locale.h>
+#endif
+#ifdef HAVE_XLOCALE_H
#include <xlocale.h>
+#endif
-#ifdef __GLIBC__
-/*locale_t is defined only if _GNU_SOURCE is defined*/
-typedef __locale_t xsltLocale;
-#else
typedef locale_t xsltLocale;
-#endif
typedef xmlChar xsltLocaleChar;
-#elif defined(XSLT_LOCALE_WINAPI)
+#elif defined(_WIN32) && !defined(__CYGWIN__)
+
+/*
+ * XSLT_LOCALE_WINAPI:
+ * Macro indicating to use WinAPI for extended locale support
+ */
+#define XSLT_LOCALE_WINAPI
#include <windows.h>
#include <winnls.h>
@@ -39,11 +50,9 @@ typedef wchar_t xsltLocaleChar;
/*
* XSLT_LOCALE_NONE:
- * Macro indicating that locale are not supported
+ * Macro indicating that there's no extended locale support
*/
-#ifndef XSLT_LOCALE_NONE
#define XSLT_LOCALE_NONE
-#endif
typedef void *xsltLocale;
typedef xmlChar xsltLocaleChar;