git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 4/7] fixup! compat/regex: update the gawk regex engine from upstream

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
May 4, 2017, 22:00 UTC
Message-ID
<20170504220043.25702-5-avarab@gmail.com>
In-Reply-To
<20170504220043.25702-1-avarab@gmail.com>
---
 compat/regex/regex.c | 32 ++++++++++++++++++--------------
 1 file changed, 18 insertions(+), 14 deletions(-)
diff --git a/compat/regex/regex.c b/compat/regex/regex.c
index 5cb23e5d59..d6e525e567 100644
--- a/compat/regex/regex.c
+++ b/compat/regex/regex.c
@@ -1,5 +1,12 @@
+/*
+ * This is git.git's copy of gawk.git's regex engine. Please see that
+ * project for the latest version & to submit patches to this code,
+ * and git.git's compat/regex/README for information on how git's copy
+ * of this code is maintained.
+ */
+
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2002-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
 
@@ -14,15 +21,14 @@
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-   02110-1301 USA.  */
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-/* Make sure no one compiles this code with a C++ compiler.  */
+/* Make sure noone compiles this code with a C++ compiler.  */
 #ifdef __cplusplus
 # error "This is C code, use a C compiler"
 #endif
@@ -52,15 +58,15 @@
 # include "../locale/localeinfo.h"
 #endif
 
-#if defined (_MSC_VER)
-#include <stdio.h> /* for size_t */
-#endif
-
 /* On some systems, limits.h sets RE_DUP_MAX to a lower value than
    GNU regex allows.  Include it before <regex.h>, which correctly
    #undefs RE_DUP_MAX and sets it to the right value.  */
 #include <limits.h>
-#include <stdint.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
@@ -70,10 +76,8 @@
 #include "regex_internal.h"
 
 #include "regex_internal.c"
-#ifdef GAWK
-#define bool int
-#define true (1)
-#define false (0)
+#ifndef HAVE_STDBOOL_H
+#include "missing_d/gawkbool.h"
 #endif
 #include "regcomp.c"
 #include "regexec.c"
-- 
2.11.0
Previous: Ævar Arnfjörð BjarmasonNext: Ævar Arnfjörð Bjarmason
Message 14 of 21 in “Update the compat/regex engine from upstream”
  1. 0/7 Update the compat/regex engine from upstreamÆvar Arnfjörð Bjarmason, May 4, 2017
  2. 1/7 compat/regex: add a README with a maintenance guideÆvar Arnfjörð Bjarmason, May 4, 2017
  3. Junio C HamanoMay 12, 2017
  4. Johannes SchindelinMay 12, 2017
  5. Junio C HamanoMay 12, 2017
  6. arnold@skeeve.comMay 14, 2017
  7. Junio C HamanoMay 15, 2017
  8. Johannes SchindelinMay 15, 2017
  9. arnold@skeeve.comMay 15, 2017
  10. 2/7 compat/regex: update the gawk regex engine from upstreamÆvar Arnfjörð Bjarmason, May 4, 2017
  11. 3/7 fixup! compat/regex: update the gawk regex engine from upstreamÆvar Arnfjörð Bjarmason, May 4, 2017
  12. Johannes SixtMay 5, 2017
  13. 8/7 fixup! compat/regex: update the gawk regex engine from upstreamÆvar Arnfjörð Bjarmason, May 5, 2017
  14. 4/7 fixup! compat/regex: update the gawk regex engine from upstreamÆvar Arnfjörð Bjarmason, May 4, 2017
  15. 5/7 fixup! compat/regex: update the gawk regex engine from upstreamÆvar Arnfjörð Bjarmason, May 4, 2017
  16. 6/7 fixup! compat/regex: update the gawk regex engine from upstreamÆvar Arnfjörð Bjarmason, May 4, 2017
  17. 7/7 fixup! compat/regex: update the gawk regex engine from upstreamÆvar Arnfjörð Bjarmason, May 4, 2017
  18. Junio C HamanoMay 8, 2017
  19. Ævar Arnfjörð BjarmasonMay 8, 2017
  20. Junio C HamanoMay 8, 2017
  21. Junio C HamanoMay 12, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.