Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-re
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-re
Commits
c56b2dec
Unverified
Commit
c56b2dec
authored
Nov 11, 2022
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support missing pcre2_set_depth_limit() function
Code taken from varnish-cache
parent
db254d19
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
0 deletions
+42
-0
configure.ac
configure.ac
+38
-0
vmod_re.c
src/vmod_re.c
+4
-0
No files found.
configure.ac
View file @
c56b2dec
...
...
@@ -69,6 +69,44 @@ AC_PATH_PROG([VARNISHTEST], [varnishtest], [],
AC_PATH_PROG([VARNISHD], [varnishd], [],
[$LIBVARNISHAPI_SBINDIR:$LIBVARNISHAPI_BINDIR:$PATH])
m4_ifndef([PKG_PROG_PKG_CONFIG], [m4_fatal([pkg.m4 missing, please install pkg-config])])
PKG_PROG_PKG_CONFIG
if test -n $PKG_CONFIG; then
PKG_CHECK_MODULES([PCRE2], [libpcre2-8])
else
AC_CHECK_PROG(PCRE2_CONFIG, pcre2-config, pcre2-config)
AC_ARG_WITH(pcre2-config,
AS_HELP_STRING([--with-pcre2-config=PATH],
[Location of PCRE2 pcre2-config (auto)]),
[pcre2_config="$withval"],
[pcre2_config=""])
if test "x$pcre2_config" != "x" ; then
AC_MSG_CHECKING(for $pcre2_config)
if test -f $pcre2_config ; then
PCRE2_CONFIG=$pcre2_config
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no - searching PATH)
fi
fi
if test "x$PCRE2_CONFIG" = "x"; then
AC_CHECK_PROGS(PCRE2_CONFIG, pcre2-config)
fi
PCRE2_CFLAGS=`$PCRE2_CONFIG --cflags`
PCRE2_LIBS=`$PCRE2_CONFIG --libs8`
fi
AC_SUBST(PCRE2_CFLAGS)
AC_SUBST(PCRE2_LIBS)
save_LIBS="${LIBS}"
LIBS="${LIBS} ${PCRE2_LIBS}"
AC_CHECK_FUNCS([pcre2_set_depth_limit_8], [
AC_DEFINE([HAVE_PCRE2_SET_DEPTH_LIMIT], [1], [Use pcre2_set_depth_limit()])
])
LIBS="${save_LIBS}"
# This corresponds to FreeBSD's WARNS level 6
DEVELOPER_CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wformat"
...
...
src/vmod_re.c
View file @
c56b2dec
...
...
@@ -42,6 +42,10 @@
#include "vcc_if.h"
#if !HAVE_PCRE2_SET_DEPTH_LIMIT
# define pcre2_set_depth_limit(r, d) pcre2_set_recursion_limit(r, d)
#endif
#define MAX_MATCHES 11
#define MAX_OV ((MAX_MATCHES) * 2)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment