aboutsummaryrefslogtreecommitdiffstats
path: root/dfa.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2013-03-20 19:06:08 +0200
committerArnold D. Robbins <arnold@skeeve.com>2013-03-20 19:06:08 +0200
commit13b8d9034b58c51e06c05c70fe89a34ad1c7dcd9 (patch)
tree84bc18fa33af998c37aef00f1df7a2a221a2a955 /dfa.c
parent15c90ed3319a297680282dba3a24cbdeaca7e8bb (diff)
downloadegawk-13b8d9034b58c51e06c05c70fe89a34ad1c7dcd9.tar.gz
egawk-13b8d9034b58c51e06c05c70fe89a34ad1c7dcd9.tar.bz2
egawk-13b8d9034b58c51e06c05c70fe89a34ad1c7dcd9.zip
Additional fixes for MirBSD. Now passes make check.
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;