Skip to content

Commit a997bf4

Browse files
avargitster
authored andcommitted
compat/regex: get the gawk regex engine to compile within git
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 <[email protected]> Acked-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d18f76d commit a997bf4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,6 +1878,10 @@ ifdef NO_EXPAT
18781878
http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT
18791879
endif
18801880

1881+
ifdef NO_REGEX
1882+
compat/regex/regex.o: EXTRA_CPPFLAGS = -DGAWK -DNO_MBSUPPORT
1883+
endif
1884+
18811885
git-%$X: %.o $(GITLIBS)
18821886
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
18831887

compat/regex/regex.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#include <stdio.h>
2+
#include <stddef.h>
3+
14
/* Definitions for data structures and routines for the regular
25
expression library.
36
Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006,2008

0 commit comments

Comments
 (0)