aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRicardo Cerqueira <ricardo@cyngn.com>2014-11-08 16:24:46 +0000
committerRicardo Cerqueira <ricardo@cyngn.com>2014-11-08 16:24:46 +0000
commitafce319f61d1f53adef295c8486ede4f67f7fe7d (patch)
tree7d83ec50a676bab38ac6634940d66f619b37c35a /include
parent61d7e027464ee83bbc0763e81d25332ced7c59dd (diff)
downloadandroid_external_bash-afce319f61d1f53adef295c8486ede4f67f7fe7d.tar.gz
android_external_bash-afce319f61d1f53adef295c8486ede4f67f7fe7d.tar.bz2
android_external_bash-afce319f61d1f53adef295c8486ede4f67f7fe7d.zip
Updates for L
Diffstat (limited to 'include')
-rw-r--r--include/shmbutil.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/shmbutil.h b/include/shmbutil.h
index afb381a..975046b 100644
--- a/include/shmbutil.h
+++ b/include/shmbutil.h
@@ -46,7 +46,11 @@ extern int locale_mb_cur_max; /* XXX */
#define MBSLEN(s) (((s) && (s)[0]) ? ((s)[1] ? mbstrlen (s) : 1) : 0)
#define MB_STRLEN(s) ((MB_CUR_MAX > 1) ? MBSLEN (s) : STRLEN (s))
+#ifdef __BIONIC__
+#define MBLEN(s, n) ((MB_CUR_MAX > 1) ? mbtowc((wchar_t *)0, (s), (n)) : 1)
+#else
#define MBLEN(s, n) ((MB_CUR_MAX > 1) ? mblen ((s), (n)) : 1)
+#endif
#define MBRLEN(s, n, p) ((MB_CUR_MAX > 1) ? mbrlen ((s), (n), (p)) : 1)
#else /* !HANDLE_MULTIBYTE */