From 176594bbcd1255f0e6bbde616aeaaa7ddfeca3cc Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Tue, 1 Jan 2013 19:02:40 +0200 Subject: Bring gawk regex closer to GLIBC. --- ChangeLog | 10 ++++++++++ regex_internal.h | 2 -- regexec.c | 3 +-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index d37c9eb5..0ef990c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2013-01-01 Arnold D. Robbins + + Sync with GLIBC regex files. + + * regex_internal.h (struct re_dfa_t): Remove ifdefs around + __libc_lock_define since it's already defined to empty in non-LIBC + case. + * regexec.c (check_node_accept_bytes): Restore decl with use from + GLIBC code since this is LIBC case. + 2012-12-24 Arnold D. Robbins * 4.0.2: Release tar ball made. diff --git a/regex_internal.h b/regex_internal.h index f38a13b0..18050898 100644 --- a/regex_internal.h +++ b/regex_internal.h @@ -692,9 +692,7 @@ struct re_dfa_t #ifdef DEBUG char* re_str; #endif -#if defined _LIBC __libc_lock_define (, lock) -#endif }; #define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) diff --git a/regexec.c b/regexec.c index ea4a02f7..7d594d2f 100644 --- a/regexec.c +++ b/regexec.c @@ -3934,7 +3934,6 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, if (cset->nequiv_classes) { const unsigned char *cp = pin; - int32_t idx; table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); weights = (const unsigned char *) @@ -3943,7 +3942,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx, _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); - idx = findidx (&cp, elem_len); + int32_t idx = findidx (&cp, elem_len); if (idx > 0) for (i = 0; i < cset->nequiv_classes; ++i) { -- cgit v1.2.3