bug-grep
[Top][All Lists]
Advanced

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

bug#17157: [PATCH 1/5] Partially revert "dfa: improve port to freestandi


From: arnold
Subject: bug#17157: [PATCH 1/5] Partially revert "dfa: improve port to freestanding DJGPP"
Date: Wed, 02 Apr 2014 01:59:02 -0600
User-agent: Heirloom mailx 12.4 7/29/08

Paolo Bonzini <address@hidden> wrote:

> Il 01/04/2014 20:36, address@hidden ha scritto:
> > Not really such a good idea. mbsupport.h is used in multiple places
> > in gawk to define if MBS support is availble. It needs to stay
> > that way. Since we're discussing keeping dfa simple in both its
> > environments, then it needs to be in a header that only dfa uses.
> >
> > At the moment, the best candidate is xalloc.h, which differs somewhat
> > grep vs. gawk.
> >
> > But here too, in reality that file is mainly for allocation stuff
> > and dfa portability doesn't really belong there.
> >
> > I respectfully suggest dfaconfig.h (or dfacustom.h) with
> >
> >     #ifdef GAWK
> >     #ifndef HAVE_SETLOCALE
> >     #define selocale(x, y)  NULL
> >     #endif
> >     #define static_assert(cond) ...
> >     #endif
> >
> > as the initial contents.
>
> Couldn't gawk's dfaconfig.h include gawk's mbsupport.h?

Yes, but why? dfa.c needs mbsuport.h no matter what.

Using Paul's separation of concerns:

* mbsupport.h - provide definition for MBSUPPORT. Opaque to dfa.c.
* xalloc.h - provide declarations (and maybe definitions) for **alloc,
             opaque to dfa.c
* dfaconfg.h - provide other definitions needed by dfa.c which may not be
               in standard headers for when gnulib isn't being used

Thanks,

Arnold





reply via email to

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