> > configure somehow thinks it needs to #define _LARGE_FILES though, which
> > then clashes with pg_config.h's _LARGE_FILES. I think the test needs to
> > #include unistd.h .
>
> _LARGE_FILES is defined because it's necessary to make off_t 64 bits. If
> you disagree, please post compiler output.
Ah, if we want off_t to be 64 bits, then we need _LARGE_FILES.
The problem is, that scan.c includes unistd.h before postgres.h
and thus unistd.h defines _LARGE_FILE_API which is not allowed
together with _LARGE_FILES. Do you know an answer ?
Offhand I can only think of using -D_LARGE_FILES as a compiler flag :-(
Do we really want a general 64 bit off_t or would it be sufficient in the
two places that use fseeko ?
Andreas