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: arnold
Subject: Re: dfa.c order of include problem
Date: Thu, 31 Jan 2013 11:39:54 -0700
User-agent: Heirloom mailx 12.4 7/29/08

Hi.

> 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?

That would be nice, but hell will likely freeze over before glibc
updates it for us.

> 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>.

The problem is dfa.c that includes limits.h after regex.h is included.
If you leave it as is you are then relying on all systems to have header
files that guard against multiple includes. On GLIBC systems you can
make that assumption.  I'm not willing to do so for the broader range
of systems out there.

I personally prefer to include all system headers first, which allows me,
in the files that I control, to then compensate for system idiosyncracies.

To each his own.

Thanks,

Arnold



reply via email to

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