summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2019-03-24 21:21:42 +0200
committerArnold D. Robbins <arnold@skeeve.com>2019-03-24 21:21:42 +0200
commitaced49eee334d9905208cda470d1cb14393613a2 (patch)
tree8cc136604c66040ff95cf513e5333169cca226bb
parentfadddc026c7a3d9e664c65ff3f3895af9ba28359 (diff)
downloadgawk-aced49eee334d9905208cda470d1cb14393613a2.tar.gz
Sync support files from GNULIB.
-rw-r--r--support/ChangeLog7
-rw-r--r--support/cdefs.h2
-rw-r--r--support/dfa.c12
-rw-r--r--support/dfa.h2
-rw-r--r--support/intprops.h2
-rw-r--r--support/libc-config.h2
-rw-r--r--support/localeinfo.c2
-rw-r--r--support/localeinfo.h2
-rw-r--r--support/regcomp.c22
-rw-r--r--support/regex.c6
-rw-r--r--support/regex.h2
-rw-r--r--support/regex_internal.c2
-rw-r--r--support/regex_internal.h2
-rw-r--r--support/regexec.c14
-rw-r--r--support/verify.h8
-rw-r--r--support/xalloc.h6
16 files changed, 48 insertions, 45 deletions
diff --git a/support/ChangeLog b/support/ChangeLog
index c42ba401..ce098e85 100644
--- a/support/ChangeLog
+++ b/support/ChangeLog
@@ -1,3 +1,10 @@
+2019-03-24 Arnold D. Robbins <arnold@skeeve.com>
+
+ * cdefs.h, dfa.c, dfa.h, intprops.h, libc-config.h, localeinfo.c,
+ localeinfo.h, regcomp.c, regex.c, regex.h, regex_internal.c,
+ regex_internal.h, regexec.c, verify.h, xalloc.h: Partial or
+ complete sync from GNULIB.
+
2019-02-01 Arnold D. Robbins <arnold@skeeve.com>
* regexec.c (proceed_next_node): Sync with GNULIB.
diff --git a/support/cdefs.h b/support/cdefs.h
index b616e195..20ee75db 100644
--- a/support/cdefs.h
+++ b/support/cdefs.h
@@ -340,7 +340,7 @@
semantics.
clang++ identifies itself as gcc-4.2, but has support for GNU inlining
- semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and
+ semantics, that can be checked for by using the __GNUC_STDC_INLINE_ and
__GNUC_GNU_INLINE__ macro definitions. */
#if (!defined __cplusplus || __GNUC_PREREQ (4,3) \
|| (defined __clang__ && (defined __GNUC_STDC_INLINE__ \
diff --git a/support/dfa.c b/support/dfa.c
index 7687aca0..88c9a231 100644
--- a/support/dfa.c
+++ b/support/dfa.c
@@ -1,5 +1,5 @@
/* dfa.c - deterministic extended regexp routines for GNU
- Copyright (C) 1988, 1998, 2000, 2002, 2004-2005, 2007-2018 Free Software
+ Copyright (C) 1988, 1998, 2000, 2002, 2004-2005, 2007-2019 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -820,7 +820,7 @@ emptyset (charclass const *s)
static void *
xpalloc (void *pa, ptrdiff_t *nitems, ptrdiff_t nitems_incr_min,
- ptrdiff_t nitems_max, ptrdiff_t item_size)
+ ptrdiff_t nitems_max, ptrdiff_t item_size)
{
ptrdiff_t n0 = *nitems;
@@ -854,8 +854,8 @@ xpalloc (void *pa, ptrdiff_t *nitems, ptrdiff_t nitems_incr_min,
*nitems = 0;
if (n - n0 < nitems_incr_min
&& (INT_ADD_WRAPV (n0, nitems_incr_min, &n)
- || (0 <= nitems_max && nitems_max < n)
- || INT_MULTIPLY_WRAPV (n, item_size, &nbytes)))
+ || (0 <= nitems_max && nitems_max < n)
+ || INT_MULTIPLY_WRAPV (n, item_size, &nbytes)))
xalloc_die ();
pa = xrealloc (pa, nbytes);
*nitems = n;
@@ -3169,11 +3169,11 @@ build_state (state_num s, struct dfa *d, unsigned char uc)
if (separate_contexts & possible_contexts & CTX_NEWLINE)
state_newline = state_index (d, &group, CTX_NEWLINE);
else
- state_newline = state;
+ state_newline = state;
if (separate_contexts & possible_contexts & CTX_LETTER)
state_letter = state_index (d, &group, CTX_LETTER);
else
- state_letter = state;
+ state_letter = state;
/* Reallocate now, to reallocate any newline transition properly. */
realloc_trans_if_necessary (d);
diff --git a/support/dfa.h b/support/dfa.h
index e419e9a0..2cf11b6b 100644
--- a/support/dfa.h
+++ b/support/dfa.h
@@ -1,5 +1,5 @@
/* dfa.h - declarations for GNU deterministic regexp compiler
- Copyright (C) 1988, 1998, 2007, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 1988, 1998, 2007, 2009-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/support/intprops.h b/support/intprops.h
index 9702aec4..140f6d2a 100644
--- a/support/intprops.h
+++ b/support/intprops.h
@@ -1,6 +1,6 @@
/* intprops.h -- properties of integer types
- Copyright (C) 2001-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
diff --git a/support/libc-config.h b/support/libc-config.h
index 98dc7c56..f24fbfa6 100644
--- a/support/libc-config.h
+++ b/support/libc-config.h
@@ -1,6 +1,6 @@
/* System definitions for code taken from the GNU C Library
- Copyright 2017-2018 Free Software Foundation, Inc.
+ Copyright 2017-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/support/localeinfo.c b/support/localeinfo.c
index 17f4163f..5c38849e 100644
--- a/support/localeinfo.c
+++ b/support/localeinfo.c
@@ -1,6 +1,6 @@
/* locale information
- Copyright 2016-2018 Free Software Foundation, Inc.
+ Copyright 2016-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/support/localeinfo.h b/support/localeinfo.h
index fcd5311e..a5140164 100644
--- a/support/localeinfo.h
+++ b/support/localeinfo.h
@@ -1,6 +1,6 @@
/* locale information
- Copyright 2016-2018 Free Software Foundation, Inc.
+ Copyright 2016-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/support/regcomp.c b/support/regcomp.c
index 3ede12bf..631b70d1 100644
--- a/support/regcomp.c
+++ b/support/regcomp.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -1812,8 +1812,8 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
token->word_char = 0;
#ifdef RE_ENABLE_I18N
token->mb_partial = 0;
- if (input->mb_cur_max > 1 &&
- !re_string_first_byte (input, re_string_cur_idx (input)))
+ if (input->mb_cur_max > 1
+ && !re_string_first_byte (input, re_string_cur_idx (input)))
{
token->type = CHARACTER;
token->mb_partial = 1;
@@ -2000,8 +2000,8 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
token->type = OP_PERIOD;
break;
case '^':
- if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) &&
- re_string_cur_idx (input) != 0)
+ if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE))
+ && re_string_cur_idx (input) != 0)
{
char prev = re_string_peek_byte (input, -1);
if (!(syntax & RE_NEWLINE_ALT) || prev != '\n')
@@ -2011,8 +2011,8 @@ peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
token->opr.ctx_type = LINE_FIRST;
break;
case '$':
- if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) &&
- re_string_cur_idx (input) + 1 != re_string_length (input))
+ if (!(syntax & RE_CONTEXT_INDEP_ANCHORS)
+ && re_string_cur_idx (input) + 1 != re_string_length (input))
{
re_token_t next;
re_string_skip_bytes (input, 1);
@@ -2046,8 +2046,8 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
token->opr.c = c;
#ifdef RE_ENABLE_I18N
- if (input->mb_cur_max > 1 &&
- !re_string_first_byte (input, re_string_cur_idx (input)))
+ if (input->mb_cur_max > 1
+ && !re_string_first_byte (input, re_string_cur_idx (input)))
{
token->type = CHARACTER;
return 1;
@@ -2345,8 +2345,8 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
}
FALLTHROUGH;
case OP_CLOSE_SUBEXP:
- if ((token->type == OP_CLOSE_SUBEXP) &&
- !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD))
+ if ((token->type == OP_CLOSE_SUBEXP)
+ && !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD))
{
*err = REG_ERPAREN;
return NULL;
diff --git a/support/regex.c b/support/regex.c
index a80e740c..d4459f7b 100644
--- a/support/regex.c
+++ b/support/regex.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -20,10 +20,10 @@
#ifndef _LIBC
# include <libc-config.h>
-# if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
+# if __GNUC_PREREQ (4, 6)
# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
# endif
-# if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+# if __GNUC_PREREQ (4, 3)
# pragma GCC diagnostic ignored "-Wold-style-definition"
# pragma GCC diagnostic ignored "-Wtype-limits"
# endif
diff --git a/support/regex.h b/support/regex.h
index 32933bc6..840e5150 100644
--- a/support/regex.h
+++ b/support/regex.h
@@ -1,6 +1,6 @@
/* Definitions for data structures and routines for the regular
expression library.
- Copyright (C) 1985, 1989-2018 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1989-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/support/regex_internal.c b/support/regex_internal.c
index 349d306b..9004ce80 100644
--- a/support/regex_internal.c
+++ b/support/regex_internal.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
diff --git a/support/regex_internal.h b/support/regex_internal.h
index f4b27028..fee1c84f 100644
--- a/support/regex_internal.h
+++ b/support/regex_internal.h
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2018 Free Software Foundation, Inc.
+ Copyright (C) 2002-2019 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
diff --git a/support/regexec.c b/support/regexec.c
index 084b1222..4ff30a79 100644
--- a/support/regexec.c
+++ b/support/regexec.c
@@ -2204,9 +2204,9 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
int naccepted;
/* Check the node can accept "multi byte". */
naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx);
- if (naccepted > 0 && str_idx + naccepted <= max_str_idx &&
- !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted],
- dfa->nexts[node_idx]))
+ if (naccepted > 0 && str_idx + naccepted <= max_str_idx
+ && !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted],
+ dfa->nexts[node_idx]))
/* The node can't accept the "multi byte", or the
destination was already thrown away, then the node
couldn't accept the current input "multi byte". */
@@ -3782,10 +3782,10 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
/* FIXME: I don't think this if is needed, as both '\n'
and '\0' are char_len == 1. */
/* '.' accepts any one character except the following two cases. */
- if ((!(dfa->syntax & RE_DOT_NEWLINE) &&
- re_string_byte_at (input, str_idx) == '\n') ||
- ((dfa->syntax & RE_DOT_NOT_NULL) &&
- re_string_byte_at (input, str_idx) == '\0'))
+ if ((!(dfa->syntax & RE_DOT_NEWLINE)
+ && re_string_byte_at (input, str_idx) == '\n')
+ || ((dfa->syntax & RE_DOT_NOT_NULL)
+ && re_string_byte_at (input, str_idx) == '\0'))
return 0;
return char_len;
}
diff --git a/support/verify.h b/support/verify.h
index 3b57ddee..6930645a 100644
--- a/support/verify.h
+++ b/support/verify.h
@@ -1,6 +1,6 @@
/* Compile-time assert-like macros.
- Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
here generates easier-to-read diagnostics when verify (R) fails.
Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11.
- This will likely be supported by future GCC versions, in C++ mode.
+ This is supported by GCC 6.1.0 and later, in C++ mode.
Use this only with GCC. If we were willing to slow 'configure'
down we could also use it with other compilers, but since this
@@ -36,9 +36,7 @@
&& !defined __cplusplus)
# define _GL_HAVE__STATIC_ASSERT 1
#endif
-/* The condition (99 < __GNUC__) is temporary, until we know about the
- first G++ release that supports static_assert. */
-#if (99 < __GNUC__) && defined __cplusplus
+#if (6 <= __GNUC__) && defined __cplusplus
# define _GL_HAVE_STATIC_ASSERT 1
#endif
diff --git a/support/xalloc.h b/support/xalloc.h
index f238bb79..722c3872 100644
--- a/support/xalloc.h
+++ b/support/xalloc.h
@@ -1,8 +1,6 @@
/* xalloc.h -- malloc with out-of-memory checking
- Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2019
- Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,7 +13,7 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef XALLOC_H_
# define XALLOC_H_