summaryrefslogtreecommitdiff
path: root/mbsupport.h
diff options
context:
space:
mode:
Diffstat (limited to 'mbsupport.h')
-rw-r--r--mbsupport.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/mbsupport.h b/mbsupport.h
index 6008da77..f647d788 100644
--- a/mbsupport.h
+++ b/mbsupport.h
@@ -40,6 +40,7 @@
#if defined(HAVE_ISWCTYPE) \
&& defined(HAVE_LOCALE_H) \
+ && (defined(HAVE_BTOWC) || defined(ZOS_USS)) \
&& defined(HAVE_MBRLEN) \
&& defined(HAVE_MBRTOWC) \
&& defined(HAVE_WCHAR_H) \
@@ -67,4 +68,25 @@
#if ! MBS_SUPPORT
# undef MB_CUR_MAX
# define MB_CUR_MAX 1
+
+/* All this glop is for dfa.c. Bleah. */
+
+#ifndef DJGPP
+#define wchar_t char
+#endif
+
+#define wctype_t int
+#define wint_t int
+#define mbstate_t int
+#define WEOF EOF
+#define towupper toupper
+#define towlower tolower
+#define btowc(x) (x)
+#define iswalnum isalnum
+#define iswalpha isalpha
+#define iswupper isupper
+
+extern wctype_t wctype(const char *name);
+extern int iswctype(wint_t wc, wctype_t desc);
+extern int wcscoll(const wchar_t *ws1, const wchar_t *ws2);
#endif