bibtool/bibtool-use-system-regex.patch

51 lines
1.4 KiB
Diff
Raw Normal View History

Index: BibTool/AutoConf/makefile.in
===================================================================
--- BibTool.orig/AutoConf/makefile.in
+++ BibTool/AutoConf/makefile.in
@@ -220,9 +220,9 @@ NON_ANSI_DEFS = @DEFS@
REGEX_DIR = regex-0.12
#
-REGEX_DEF = -DREGEX -I$(REGEX_DIR) -I..
+REGEX_DEF = -DREGEX
-REGEX = regex$(OBJ)
+REGEX =
# -------------------------------------------------------
# Kpathsea Library support.
@@ -477,8 +477,8 @@ $(OFILES): $(MAKEFILE)
# __________________________________________________________________
# Targets from the GNU Regular Expression Library.
-regex$(OBJ): $(REGEX_DIR)$(DIR_SEP)regex.c $(MAKEFILE)
- $(CC) $(C_FLAGS) -I$(REGEX_DIR) -I.. $(NON_ANSI_DEFS) $(REGEX_DIR)$(DIR_SEP)regex.c $(DONT_LINK) -o $@
+#regex$(OBJ): $(REGEX_DIR)$(DIR_SEP)regex.c $(MAKEFILE)
+# $(CC) $(C_FLAGS) -I$(REGEX_DIR) -I.. $(NON_ANSI_DEFS) $(REGEX_DIR)$(DIR_SEP)regex.c $(DONT_LINK) -o $@
bibtcl:
@@ -510,7 +510,7 @@ test check:
(cd Test; $(MAKE))
libbib.a: $(OLIBFILES)
- $(AR) $@ $(OLIBFILES) regex.o
+ $(AR) $@ $(OLIBFILES)
$(RANLIB) $@
depend:
Index: BibTool/rewrite.c
===================================================================
--- BibTool.orig/rewrite.c
+++ BibTool/rewrite.c
@@ -24,7 +24,8 @@
#include <bibtool/rewrite.h>
#ifdef REGEX
-#include <bibtool/regex.h>
+#define __USE_GNU
+#include <regex.h>
#endif
typedef struct rULE