On 01/31/2013 11:10 AM, Aharon Robbins wrote:
> Hello All.
> 
> On systems where limits.h defines RE_DUP_MAX to be very small (such as
> OpenVMS, which defines it to be -1) compiling a regexp can fail.
> 
> Although <regex.h> undefs and redefines RE_DUP_MAX, it's included too
> early in the process. I am pushing the following change to gawk's copy
> of dfa.c. I submit it for your review, as well.

Rather, doesn't that mean that <regex.h> should #include <limits.h>
prior to redefining RE_DUP_MAX, to be sure that it overrides any limits
that would otherwise be present in the system headers?

> 
> Thanks,
> 
> Arnold
> -------------------------------------
> diff --git a/dfa.c b/dfa.c
> index 8782e46..88d34d5 100644
> --- a/dfa.c
> +++ b/dfa.c
> @@ -22,8 +22,6 @@
>  
>  #include <config.h>
>  
> -#include "dfa.h"

Having dfa.h be included first is a feature - it proves that our header
is self-contained.  I'd rather fix the real problem in <regex.h>.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to