Re: [RFH] Loki bug #409370: missing 64-bit executablex
On Mon, 24 Mar 2008, brian m. carlson wrote:
Here's the difference: in <sys/stat.h>, the following occurs:
#if __WORDSIZE == 64
long int __unused;
# ifndef __USE_FILE_OFFSET64
unsigned long int __unused4;
unsigned long int __unused5;
__ino64_t st_ino; /* File serial number. */
So on 64-bit platforms, a field called __unused is defined. But in
param_lex.c, the following code exists:
So that code in <sys/stat.h> comes out to:
long int ;
which isn't valid.
The solution is not to define things that aren't in your
namespace, so flex shouldn't #define __unused, or use it, for that matter.
Well, the file param_lex.c was autogenerated in the first place
/* A lexical scanner generated by flex */
/* Scanner skeleton version:
* $Header: /home/daffy/u0/vern/flex/RCS/flex.skl,v 2.91 96/09/10 16:58:48 vern Exp $
* $FreeBSD: src/usr.bin/lex/flex.skl,v 1.8 2004/01/06 19:03:44 nectar Exp $
and I get
$ grep -A2 -B2 __unused *
param_lex.c-static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
param_lex.c:static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )) __unused;
param_lex.c-static void yy_flex_free YY_PROTO(( void * ));
So while I probably might be able to patch this via
this might break on som Debian/FREEBSD port and it would be better to
fix the according flex input.
I also wonder whether there is some hidden quirk in flex. It might be that
this only happens in old versions of flex and I have to admit that I have
no idea at all about flex and what I would have to do to.