"Albe Laurenz" <laurenz.albe@wien.gv.at> writes:
>> Why the "OBJECT_MODE" exported to 32 is not sufficient ?
> I dug around a little, and the problem is in psqlscan.c which is generated
> from psqlscan.l by flex.
> The problem is that both _LARGE_FILES and _LARGE_FILE_API are #defined
> in this case, which makes #include <unistd.h> fail.
Yeah. We solved this and other problems years ago by decreeing that
we would never try to compile flex output files on their own; they'd
always be #include'd into some other source file so that pg_config.h
would get read first. psqlscan.l seems to have escaped that dictum
somehow, but I guess we'd better make it fall into line.
In most of the other cases the #include is done in an associated .y
file, but there is none in psql. Anyone have a thought which of
psql's .c files would be the most appropriate host?
regards, tom lane