Largefile fallout: postgres.h MUST be included first - Mailing list pgsql-hackers

From Tom Lane
Subject Largefile fallout: postgres.h MUST be included first
Date
Msg-id 23039.1031182838@sss.pgh.pa.us
Whole thread Raw
List pgsql-hackers
A long time ago you mentioned in passing that postgres.h should be
included before including any system headers.  I have been desultorily
changing files to meet that rule, but AFAIK no one's made a pass to
ensure that it's followed everywhere.

Well, now we have a reason it had better be that way: largefile support
will break otherwise.  Since we've arranged to define stuff like
_FILE_OFFSET_BITS in pg_config.h which is included by postgres.h, it
is *critical* to read postgres.h before reading any system headers.
Otherwise you are likely to see non-64-bit-aware definitions of library
routines, FILE structs, etc.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Beta1 schedule
Next
From: Larry Rosenman
Date:
Subject: Re: PL/Perl?