diff options
Diffstat (limited to 'Build/source/texk/web2c/pdftexdir')
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/ChangeLog | 9 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/regex/regexec.c | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/pdftexdir/ChangeLog b/Build/source/texk/web2c/pdftexdir/ChangeLog index 2a7f3d400d0..2f19c8ecfe7 100644 --- a/Build/source/texk/web2c/pdftexdir/ChangeLog +++ b/Build/source/texk/web2c/pdftexdir/ChangeLog @@ -1,3 +1,12 @@ +2021-07-13 Hironobu Yamashita <h.y.acetaminophen@gmail.com> + + * regex/regexec.c: Avoid MSVC compiler error. + -> error C2059: syntax error: ':' + MSVC does not allow empty expression for ternary + conditional operator (?:) which is a GNU C extension. + https://gcc.gnu.org/onlinedocs/gcc/Conditionals.html + https://stackoverflow.com/questions/3319075/ + 2021-02-17 Karl Berry <karl@tug.org> * NEWS, diff --git a/Build/source/texk/web2c/pdftexdir/regex/regexec.c b/Build/source/texk/web2c/pdftexdir/regex/regexec.c index a37da21f306..919c4dea96e 100644 --- a/Build/source/texk/web2c/pdftexdir/regex/regexec.c +++ b/Build/source/texk/web2c/pdftexdir/regex/regexec.c @@ -2866,7 +2866,11 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, int top_node, sizeof (re_dfastate_t *) * (path->alloc - old_alloc)); } +#ifdef _MSC_VER + str_idx = path->next_idx ? path->next_idx : top_str; +#else str_idx = path->next_idx ?: top_str; +#endif /* Temporary modify MCTX. */ backup_state_log = mctx->state_log; |