Largefile fallout: postgres.h MUST be included first

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Largefile fallout: postgres.h MUST be included first
Date: 2002-09-04 23:40:38
Message-ID: 23039.1031182838@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-hackers by date

  From Date Subject
Next Message Sean Chittenden 2002-09-05 00:38:00 Re: Schemas not available for pl/pgsql %TYPE....
Previous Message Bruce Momjian 2002-09-04 23:08:52 Re: Beta1 schedule