> >> Yeah. AFAICS the only way around this is to avoid doing any I/O
> >> operations in the flex-generated files. Fortunately,
> that's not much
> >> of a restriction.
>
> > Unfortunately I do not think that is sufficient, since the problem is already
> > at the #include level. The compiler barfs on the second #include <unistd.h>
> > from postgres.h
>
> AIX is too stupid to wrap unistd.h in an "#ifndef" to protect against
> double inclusion? I suppose we could do that for them...
I guess that is exactly not wanted, since that would hide the actual
problem, namely that _LARGE_FILE_API gets defined (off_t --> 32bit).
Thus I think IBM did not protect unistd.h on purpose.
Andreas