From b98257919b20bdfc14f363761cc6215c1ad8bcee Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Thu, 26 Jul 2018 21:41:49 +0300 Subject: Switch to GNULIB regex. --- support/regex.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) (limited to 'support/regex.c') 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 . @@ -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 - . */ + . */ -#ifdef HAVE_CONFIG_H -#include "config.h" +#ifndef _LIBC +# include + +# 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 -/* This header defines the MIN and MAX macros. */ -#ifdef HAVE_SYS_PARAM_H -#include -#endif /* HAVE_SYS_PARAM_H */ - -#ifdef GAWK -#undef alloca -#define alloca alloca_is_bad_you_should_never_use_it -#endif #include #include "regex_internal.h" #include "regex_internal.c" -#ifndef HAVE_STDBOOL_H -#include "missing_d/gawkbool.h" -#endif #include "regcomp.c" #include "regexec.c" -- cgit v1.2.3