[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
dfa.c - order of include files
From: |
Aharon Robbins |
Subject: |
dfa.c - order of include files |
Date: |
Tue, 15 Jan 2013 20:17:18 +0200 |
User-agent: |
Heirloom mailx 12.5 6/20/10 |
Hi Guys,
I just got the below bug report. Apparently it has to do with the
fact that xalloc.h includes <stddef.h>.
Any objection to changing the order of includes as suggested? Or
how about moving the include of <stddef.h> into dfa.c itself?
Thoughts welcome,
Thanks,
Arnold
> Date: Tue, 15 Jan 2013 18:37:51 +0100
> From: Manuel Collado <address@hidden>
> To: address@hidden
> Subject: [bug-gawk] gawk-4.0.2 build problem
>
> The last release gawk-4.0.2 fails to build on the following machine:
>
> $ uname -a
> Linux lml 2.6.26-2-amd64 #1 SMP Sun Mar 4 21:48:06 UTC 2012 x86_64 GNU/Linux
>
> I've been told it is a Debian "lenny" Linux distribution.
>
> The error given is:
>
> $ make
> ....
> dfa.h:85: error: expected ?)? before ?struct?
>
> Previous gawk versions, up to 4.0.1, build ok. The problem seems to be
> the introduction of the ptrdiff_t type in 4.0.2.
>
> After tweaking a bit the source code, I've found that the problem
> disappears by slightly changing the order of #include(s) in dfa.c.
>
> Instead of (fail)
>
> #include "dfa.h"
> #include "xalloc.h"
>
> I've used (works)
>
> #include "xalloc.h"
> #include "dfa.h"
>
> I have little experience with the libc internals. Don't know if this
> patch is safe.
>
> Regards.
> --
> Manuel Collado - http://lml.ls.fi.upm.es/~mcollado
- dfa.c - order of include files,
Aharon Robbins <=