summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d18f76d)
raw | patch | inline | side by side (parent: d18f76d)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Tue, 17 Aug 2010 09:24:39 +0000 (09:24 +0000) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 18 Aug 2010 21:06:54 +0000 (14:06 -0700) |
We need to define -DGAWK -DNO_MBSUPPORT so that the gawk regex engine
will compile, and include stdio.h and stddef.h in regex.h. Gawk itself
includes these headers before it includes the regex.h header.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
will compile, and include stdio.h and stddef.h in regex.h. Gawk itself
includes these headers before it includes the regex.h header.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Acked-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile | patch | blob | history | |
compat/regex/regex.h | patch | blob | history |
diff --git a/Makefile b/Makefile
index bc3c57058faba66f6a7a947e1e9642f47053b5bb..09b03c003336b40e7765cbd529b91977580e880e 100644 (file)
--- a/Makefile
+++ b/Makefile
http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT
endif
+ifdef NO_REGEX
+compat/regex/regex.o: EXTRA_CPPFLAGS = -DGAWK -DNO_MBSUPPORT
+endif
+
git-%$X: %.o $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
diff --git a/compat/regex/regex.h b/compat/regex/regex.h
index de9332788359ed127e3a613b0d4c676836f0416e..61c96838721501031935dd560eb86d8dbcedd2b0 100644 (file)
--- a/compat/regex/regex.h
+++ b/compat/regex/regex.h
+#include <stdio.h>
+#include <stddef.h>
+
/* Definitions for data structures and routines for the regular
expression library.
Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006,2008