aboutsummaryrefslogtreecommitdiffstats
path: root/support/regex.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-07-26 21:41:49 +0300
committerArnold D. Robbins <arnold@skeeve.com>2018-07-26 21:41:49 +0300
commitb98257919b20bdfc14f363761cc6215c1ad8bcee (patch)
tree0709d74988db880ef510289bf6fb576c0f221300 /support/regex.c
parent1bc2871bbe4ae6b99fd1862a412440672846bc05 (diff)
downloadegawk-b98257919b20bdfc14f363761cc6215c1ad8bcee.tar.gz
egawk-b98257919b20bdfc14f363761cc6215c1ad8bcee.tar.bz2
egawk-b98257919b20bdfc14f363761cc6215c1ad8bcee.zip
Switch to GNULIB regex.
Diffstat (limited to 'support/regex.c')
-rw-r--r--support/regex.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/support/regex.c b/support/regex.c
index d3a44851..d6591e86 100644
--- a/support/regex.c
+++ b/support/regex.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2017 Free Software Foundation, Inc.
+ Copyright (C) 2002-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -15,14 +15,22 @@
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
+#ifndef _LIBC
+# include <config.h>
+
+# if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
+# endif
+# if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wold-style-definition"
+# pragma GCC diagnostic ignored "-Wtype-limits"
+# endif
#endif
-/* Make sure noone compiles this code with a C++ compiler. */
-#ifdef __cplusplus
+/* Make sure no one compiles this code with a C++ compiler. */
+#if defined __cplusplus && defined _LIBC
# error "This is C code, use a C compiler"
#endif
@@ -56,22 +64,10 @@
#undefs RE_DUP_MAX and sets it to the right value. */
#include <limits.h>
-/* This header defines the MIN and MAX macros. */
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif /* HAVE_SYS_PARAM_H */
-
-#ifdef GAWK
-#undef alloca
-#define alloca alloca_is_bad_you_should_never_use_it
-#endif
#include <regex.h>
#include "regex_internal.h"
#include "regex_internal.c"
-#ifndef HAVE_STDBOOL_H
-#include "missing_d/gawkbool.h"
-#endif
#include "regcomp.c"
#include "regexec.c"