diff options
author | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2021-07-13 10:59:14 +0000 |
---|---|---|
committer | Hironobu Yamashita <h.y.acetaminophen@gmail.com> | 2021-07-13 10:59:14 +0000 |
commit | d1e3a19375c44f7062e2acc0b74e960a7040fc8f (patch) | |
tree | 7ee148cf78f05af75349e5fdd5551dac34d159b4 /Build/source | |
parent | 64474c87a93ca01caa60f05d6ccebf4b0d8ca606 (diff) |
pdftexdir, chktex: Avoid MSVC compiler error C2059 for regex/regexec.c
git-svn-id: svn://tug.org/texlive/trunk@59914 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rw-r--r-- | Build/source/texk/chktex/ChangeLog | 9 | ||||
-rw-r--r-- | Build/source/texk/chktex/regex/regexec.c | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/ChangeLog | 9 | ||||
-rw-r--r-- | Build/source/texk/web2c/pdftexdir/regex/regexec.c | 4 |
4 files changed, 26 insertions, 0 deletions
diff --git a/Build/source/texk/chktex/ChangeLog b/Build/source/texk/chktex/ChangeLog index 46cb3e45174..2424c024905 100644 --- a/Build/source/texk/chktex/ChangeLog +++ b/Build/source/texk/chktex/ChangeLog @@ -1,5 +1,14 @@ 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-07-13 Hironobu Yamashita <h.y.acetaminophen@gmail.com> + * regex/regex_internal.h: sync with pdftexdir/regex 2017-02-16. 2017-03-27 Karl Berry <karl@freefriends.org> diff --git a/Build/source/texk/chktex/regex/regexec.c b/Build/source/texk/chktex/regex/regexec.c index a37da21f306..919c4dea96e 100644 --- a/Build/source/texk/chktex/regex/regexec.c +++ b/Build/source/texk/chktex/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; 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; |