aboutsummaryrefslogtreecommitdiffstats
path: root/regex.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2010-07-16 14:49:57 +0300
committerArnold D. Robbins <arnold@skeeve.com>2010-07-16 14:49:57 +0300
commit6a2caf2157d87b4b582b2494bdd7d6a688dd0b1f (patch)
tree9a2862cc11be4832f188cfbdce175120ceba5024 /regex.c
parent315bd501ca696bc3e3c938b4604d8dac7a6f512f (diff)
downloadegawk-6a2caf2157d87b4b582b2494bdd7d6a688dd0b1f.tar.gz
egawk-6a2caf2157d87b4b582b2494bdd7d6a688dd0b1f.tar.bz2
egawk-6a2caf2157d87b4b582b2494bdd7d6a688dd0b1f.zip
Move to gawk-3.1.6.
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c22
1 files changed, 15 insertions, 7 deletions
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 <isamu@yamato.ibm.com>.
@@ -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 <sys/types.h> must be included (by the caller) before
- <regex.h>. */
-#include <sys/types.h>
-#endif
-
#if defined (_MSC_VER)
#include <stdio.h> /* for size_t */
#endif
@@ -62,11 +61,20 @@
#undefs RE_DUP_MAX and sets it to the right value. */
#include <limits.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"
#include "regcomp.c"
+#ifdef GAWK
+#define bool int
+#define true (1)
+#define false (0)
+#endif
#include "regexec.c"
/* Binary backward compatibility. */