]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: regex: Create regex_comp function that compiles regex using compilation...
authorThierry FOURNIER <tfournier@exceliance.fr>
Mon, 14 Oct 2013 12:07:36 +0000 (14:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 14 Oct 2013 12:42:50 +0000 (14:42 +0200)
commited5a4aefaee68e1046a55218be7853739e3484c0
treef24f4b77bfa138da974ad91d34d9294368ddcd0a
parente68e02dc1d93ae5c684fb2c12adffe3d9b87fce9
CLEANUP: regex: Create regex_comp function that compiles regex using compilation options

The current file "regex.h" define an abstraction for the regex. It
provides the same struct name and the same "regexec" function for the
3 regex types supported: standard libc, basic pcre and jit pcre.

The regex compilation function is not provided by this file. If the
developper wants to use regex, he must write regex compilation code
containing "#define *JIT*".

This patch provides a unique regex compilation function according to
the compilation options.

In addition, the "regex.h" file checks the presence of the "#define
PCRE_CONFIG_JIT" when "USE_PCRE_JIT" is enabled. If this flag is not
present, the pcre lib doesn't support JIT and "#error" is emitted.
include/common/regex.h
src/acl.c
src/regex.c