diff options
-rw-r--r-- | winsup/cygwin/regex/regexec.c | 2 | ||||
-rw-r--r-- | winsup/cygwin/regex/tre.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/regex/regexec.c b/winsup/cygwin/regex/regexec.c index a43f60e0f..65ad36c50 100644 --- a/winsup/cygwin/regex/regexec.c +++ b/winsup/cygwin/regex/regexec.c @@ -52,7 +52,7 @@ tre_fill_pmatch(size_t nmatch, regmatch_t pmatch[], int cflags, #define GET_NEXT_WCHAR() do { \ prev_c = next_c; pos += pos_add_next; \ - if ((pos_add_next = mbtowc(&next_c, str_byte, MB_LEN_MAX)) <= 0) { \ + if ((pos_add_next = mbrtowi(&next_c, str_byte, MB_LEN_MAX, NULL)) <= 0) { \ if (pos_add_next < 0) { ret = REG_NOMATCH; goto error_exit; } \ else pos_add_next++; \ } \ diff --git a/winsup/cygwin/regex/tre.h b/winsup/cygwin/regex/tre.h index 03f85a8f6..9ffcd5efe 100644 --- a/winsup/cygwin/regex/tre.h +++ b/winsup/cygwin/regex/tre.h @@ -41,7 +41,7 @@ #define TRE_REGEX_T_FIELD __opaque typedef int reg_errcode_t; -typedef wchar_t tre_char_t; +typedef wint_t tre_char_t; #define DPRINT(msg) do { } while(0) |