problem building 0.15.7
David Relson
relson at osagesoftware.com
Mon Dec 8 21:55:27 CET 2003
On Mon, 8 Dec 2003 15:45:49 -0500 (EST)
Dave Lovelace <dave at firstcomp.biz> wrote:
> A followup, after a bit more investigation:
> I tried running globals.c, with all the same command-line stuff (well,
> the appropriate parts) but doing gcc -E to just look at the
> preprocessor output. That section that I posted in the previous
> message, that read:
> > ----snip----snip----snip----snip----snip----snip----snip----snip---
> > -snip---- 88:
> > 89:typedef enum ex_e { EX_SPAM = RC_SPAM,
> > 90: EX_HAM = RC_HAM,
> > 91: EX_UNSURE = RC_UNSURE,
> > 92: EX_OK = 0,
> > 93: EX_ERROR = 3 } ex_t;
> > ----snip----snip----snip----snip----snip----snip----snip----snip---
> > -snip----
>
> comes out of the preprocessor as:
> ----snip----snip----snip----snip----snip----snip----snip----snip----s
> nip---- typedef enum ex_e { EX_SPAM = RC_SPAM,
> EX_HAM = RC_HAM,
> EX_UNSURE = RC_UNSURE,
> 020 = 0,
> EX_ERROR = 3 } ex_t;
> ----snip----snip----snip----snip----snip----snip----snip----snip----s
> nip----
>
> So it looks as though EX_OK is defined somewhere as 020 (or 16
> decimal), and that this is getting in the way. Searching through all
> the standard header files, I find it in
> /usr/include/sys/_int_unistd.h:#define EX_OK 020
> I presume this is ultimately included from /usr/include/unistd.h or
> something like that, but don't know. The relevant line is buried
> inside all kinds of dependencies, or appears at a glance to be.
>
> Again, any help is most appreciated. I suppose I can just grep for it
> in all the source files & change EX_OK everywhere to something else.
> I really hate to have to use a hack like that.
Dave,
Good work! Every compiler and operating system has preprocessor symbols
that are unique to it. Assuming __DGUX__ is such a symbol, try adding
the following before the typedef:
#ifdef __DGUX__
#undef EX_OK
#endif
Let me know what the unique symbol is, and we'll add something to
system.h
More information about the Bogofilter
mailing list