bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dfa.c order of include problem


From: Eric Blake
Subject: Re: dfa.c order of include problem
Date: Thu, 31 Jan 2013 11:16:49 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

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

[Prev in Thread] Current Thread [Next in Thread]