Re: [HACKERS] 6.5.1 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] 6.5.1
Date
Msg-id 10704.931644961@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] 6.5.1  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] 6.5.1
List pgsql-hackers
I wrote:
> And, right offhand, I'm not seeing where <time.h> gets included before
> heapam.h is read.

I dug into this and found that on my own machine, <sys/time.h> is pulled
in by <arpa/inet.h> which is pulled in by config.h (if the right
configuration symbols are defined).  It looks to me like there is
noplace that explicitly pulls in <time.h> before heapam.h is read.

In short, what we've got here is code that only works because of
interdependencies among system headers.  Not too portable.

I added "#include <time.h>" to heapam.h, which I think will fix Oleg's
problem, but I'm a little bit mystified why we didn't find this long
ago.  Someone must have removed an #include somewhere that covered up
the problem...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] 6.5.1
Next
From: pgsql-hackers@thewrittenword.com
Date:
Subject: ...