From 6a2caf2157d87b4b582b2494bdd7d6a688dd0b1f Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 16 Jul 2010 14:49:57 +0300 Subject: Move to gawk-3.1.6. --- regex.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'regex.c') diff --git a/regex.c b/regex.c index 7ea28deb..6dbb4ee1 100644 --- a/regex.c +++ b/regex.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -22,6 +22,11 @@ #include "config.h" #endif +/* Make sure noone compiles this code with a C++ compiler. */ +#ifdef __cplusplus +# error "This is C code, use a C compiler" +#endif + #ifdef _LIBC /* We have to keep the namespace clean. */ # define regfree(preg) __regfree (preg) @@ -47,12 +52,6 @@ # include "../locale/localeinfo.h" #endif -#ifdef HAVE_SYS_TYPES_H -/* POSIX says that must be included (by the caller) before - . */ -#include -#endif - #if defined (_MSC_VER) #include /* for size_t */ #endif @@ -62,11 +61,20 @@ #undefs RE_DUP_MAX and sets it to the right value. */ #include +#ifdef GAWK +#undef alloca +#define alloca alloca_is_bad_you_should_never_use_it +#endif #include #include "regex_internal.h" #include "regex_internal.c" #include "regcomp.c" +#ifdef GAWK +#define bool int +#define true (1) +#define false (0) +#endif #include "regexec.c" /* Binary backward compatibility. */ -- cgit v1.2.3