On Wednesday December 2, 2009, I wrote:
> On Wednesday December 2, 2009, Simon Marlow wrote:

> > Can we rely on the availability of regex.h and POSIX regexes?  Does
> >  this need a configure test?
> 
> I don't know the answer to this. Isn't POSIX part of the baseline
> assumption? If not, I would need some help with the autoconf changes,
> since I haven't done any before.

Googling this subject, I came across Jan Wolter's "Unix Incompatibility 
Notes: Regular Expression Libraries" (see 
http://unixpapa.com/incnote/regex.html). Wolter's advice is:

"All Unix systems seem to have some form of regular expression parsing 
library that can be invoked from C programs, however they are not very 
compatible with each other. Both the regular expression syntax and C-
language API vary considerably.

"The best solution for programmers wishing to use regular expression 
routines in portable C programs is probably not to depend on the regular 
expression libraries that may be found on the host computer, but to 
include a copy of Henry Spencer's implementation of the POSIX 1003.2 
standard (http://arglist.com/regex/) or Philip Hazel's Perl-Compatible 
Regular Expression Library (http://arglist.com/regex/) in your 
distribution. This is what Apache, MSQL and many other packages do. The 
copyright terms on for these libraries are liberal enough so that almost 
anyone should be able to make use of them, and both packages work well."

This advice seems reasonable to me. (Perhaps one of these libraries is 
already being included in GHC? If so, that is what I will use.) 
Otherwise, I think either would work fine for my minimal use.

Please give me feedback on how to deal with this. Thanks.

Regards,

Howard

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to