use system regex routines if available.
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@414 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
ba03bd25be
commit
79e37862cb
@ -33,8 +33,8 @@ SHLIB_SUFFIX=@SHLIB_SUFFIX@
|
||||
CWD=$(PWD)
|
||||
#
|
||||
|
||||
OBJS=regexp.o regcomp.o regexec.o regerror.o regfree.o
|
||||
SOBJS=regexp@SHLIB_SUFFIX@ regcomp@SHLIB_SUFFIX@ regexec@SHLIB_SUFFIX@ regerror@SHLIB_SUFFIX@ regfree@SHLIB_SUFFIX@
|
||||
OBJS=regexp.o @NO_BUILTIN_REGEXP@ regcomp.o regexec.o regerror.o regfree.o
|
||||
SOBJS=regexp@SHLIB_SUFFIX@ @NO_BUILTIN_REGEXP@ regcomp@SHLIB_SUFFIX@ regexec@SHLIB_SUFFIX@ regerror@SHLIB_SUFFIX@ regfree@SHLIB_SUFFIX@
|
||||
|
||||
#in some systems we just create a single object, in others we need to
|
||||
# create a libray
|
||||
@ -45,7 +45,7 @@ sobjs: $(SOBJS)
|
||||
|
||||
dll: regexp@SHLIB_SUFFIX@
|
||||
|
||||
regexp.o: $(srcdir)/regexp.c $(srcdir)/regex2.h $(srcdir)/engine.c
|
||||
regexp.o: $(srcdir)/regexp.c @NO_BUILTIN_REGEXP@ $(srcdir)/regex2.h $(srcdir)/engine.c
|
||||
$(CC) -c $(CFLAGS) $(SHLIB_CFLAGS) $(srcdir)/regexp.c -o regexp.o
|
||||
|
||||
regcomp.o: $(srcdir)/regcomp.c $(srcdir)/regex2.h
|
||||
|
@ -20,7 +20,15 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#include "c_interface.h"
|
||||
#if HAVE_REGEX_H
|
||||
#include "regex.h"
|
||||
#define yap_regcomp(A,B,C) regcomp(A,B,C)
|
||||
#define yap_regexec(A,B,C,D,E) regexec(A,B,C,D,E)
|
||||
#define yap_regfree(A) regfree(A)
|
||||
#define yap_regerror(A,B,C,D) regfree(A,B,C,D)
|
||||
#else
|
||||
#include "yapregex.h"
|
||||
#endif
|
||||
/* for the sake of NULL */
|
||||
#include <stdio.h>
|
||||
|
||||
|
Reference in New Issue
Block a user