Skip to content

Commit 7e7c72b

Browse files
committed
Use MB_CUR_MAX == 6 by default
Internally, Cygwin already uses __utf8_mbtowc(), even if it still claims to use the "ASCII" charset. But the `MB_CUR_MAX` value (which is not actually a constant, but dependent on the current locale) was still 1, which broke the initial `globify()` call while parsing the the command-line in `build_argv()` for non-ASCII arguments. This fixes git-for-windows/git#2189 Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 6f2afa8 commit 7e7c72b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

newlib/libc/locale/lctype.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@
2525

2626
#define LCCTYPE_SIZE (sizeof(struct lc_ctype_T) / sizeof(char *))
2727

28+
#ifdef __CYGWIN__
29+
/* Cygwin uses __utf8_mbtowc() by default, therefore mb_cur_max := 6 */
30+
static char numone[] = { '\x06', '\0'};
31+
#else
2832
static char numone[] = { '\1', '\0'};
33+
#endif
2934

3035
const struct lc_ctype_T _C_ctype_locale = {
3136
"ASCII", /* codeset */

0 commit comments

Comments
 (0)