[PATCH] Add PCRE support

Poul-Henning Kamp phk at phk.freebsd.dk
Tue Oct 20 12:04:29 CEST 2009

I think it is time to wrap this discussion up.

Being as it may, that I happen to be the supreme master and arbiter
of all bikeshed coloring in the Open Source domain.

(Please see www.bikeshed.org if you doubt my credencials.)

First of all, I my spectroscope clearly indicates that the
discussion is in bikeshed territory now, reading

	lambda = 536 +/- 107 nm

I will therefore don my Official Psycedelic Overalls, and wielding
the Brush Of Authority, pronounce my judgment in the matter.

Which shall be as follows:

	Having in mind, the many examples that Varnish users have
	proffered, why PCRE would be A Good Thing over POSIX regexps...

	Beeing keenly aware that having binary packages of Varnish
	differ in this point would be a catastrophe for documentation
	and user support.

	Having studied PCRE at some length, and reached the firm
	belief, that if Dennis and Ken had been in charge, PCRE
	would have been adopted as the standard UNIX regexp library
	on the spot...

	Recognizing, that PCRE is BSD licensed...

	Having in mind, that if the external dependency on PCRE
	causes us grief, we can import PCRE into Varnish, like we
	did with <sys/queue.h> and <sys/sbuf.h>...

	I hereby decide:

	We will add a "vre.c" file to libvarnish, and all the varnish
	code will call vre_comp(), vre_exec() etc. functions from

	By default, this file will simply call PCRE functions, and
	as shipped Varnish will depend in PCRE.

	If somebody for reasons of policy does not want to use PCRE,
	they will only have to change the vre.c file to do so.



Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

More information about the varnish-dev mailing list