aboutsummaryrefslogtreecommitdiffstats
path: root/dfa.c
diff options
context:
space:
mode:
Diffstat (limited to 'dfa.c')
-rw-r--r--dfa.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/dfa.c b/dfa.c
index 88d34d55..df0dc4a1 100644
--- a/dfa.c
+++ b/dfa.c
@@ -92,6 +92,14 @@ is_blank (int c)
}
#endif /* GAWK */
+#ifdef LIBC_IS_BORKED
+extern int gawk_mb_cur_max;
+#undef MB_CUR_MAX
+#define MB_CUR_MAX gawk_mb_cur_max
+#undef mbrtowc
+#define mbrtowc(a, b, c, d) (-1)
+#endif
+
/* HPUX, define those as macros in sys/param.h */
#ifdef setbit
# undef setbit
@@ -794,6 +802,10 @@ using_utf8 (void)
#else
utf8 = 0;
#endif
+#ifdef LIBC_IS_BORKED
+ if (gawk_mb_cur_max == 1)
+ utf8 = 0;
+#endif
}
return utf8;