Re: [HACKERS] python cleanup

2011-07-31 Thread Andrew Dunstan
On 07/25/2011 12:03 PM, Tom Lane wrote: Andrew Dunstan writes: On 07/25/2011 10:52 AM, Tom Lane wrote: What is features.h, and have its authors read the POSIX standard? AFAICS they have no business defining this symbol. [andrew@emma ~]$ rpm -q -f /usr/include/features.h glibc-head

Re: [HACKERS] python cleanup

2011-07-25 Thread Tom Lane
Andrew Dunstan writes: > On 07/25/2011 10:52 AM, Tom Lane wrote: >> What is features.h, and have its authors read the POSIX standard? >> AFAICS they have no business defining this symbol. > [andrew@emma ~]$ rpm -q -f /usr/include/features.h > glibc-headers-2.13-1.x86_64 Oh, for some reas

Re: [HACKERS] python cleanup

2011-07-25 Thread Andrew Dunstan
On 07/25/2011 10:52 AM, Tom Lane wrote: Andrew Dunstan writes: On 07/25/2011 10:36 AM, Tom Lane wrote: Andrew Dunstan writes: [python headers set _POSIX_C_SOURCE and _XOPEN_SOURCE] BTW ... so far as I can find, there is no attempt anywhere in the Postgres sources to set either of these m

Re: [HACKERS] python cleanup

2011-07-25 Thread Tom Lane
Andrew Dunstan writes: > On 07/25/2011 10:36 AM, Tom Lane wrote: >> Andrew Dunstan writes: >>> [python headers set _POSIX_C_SOURCE and _XOPEN_SOURCE] >> BTW ... so far as I can find, there is no attempt anywhere in the >> Postgres sources to set either of these macros. And my understanding of >

Re: [HACKERS] python cleanup

2011-07-25 Thread Andrew Dunstan
On 07/25/2011 10:36 AM, Tom Lane wrote: Andrew Dunstan writes: [python headers set _POSIX_C_SOURCE and _XOPEN_SOURCE] BTW ... so far as I can find, there is no attempt anywhere in the Postgres sources to set either of these macros. And my understanding of their purpose is that *system* head

Re: [HACKERS] python cleanup

2011-07-25 Thread Tom Lane
Andrew Dunstan writes: > [python headers set _POSIX_C_SOURCE and _XOPEN_SOURCE] BTW ... so far as I can find, there is no attempt anywhere in the Postgres sources to set either of these macros. And my understanding of their purpose is that *system* headers should not be setting them at all, rath

Re: [HACKERS] python cleanup

2011-07-25 Thread Tom Lane
Andrew Dunstan writes: > On 07/24/2011 11:46 PM, Tom Lane wrote: >>> [python headers set _POSIX_C_SOURCE and _XOPEN_SOURCE] >> What in the world are the python headers doing fooling with these >> macros, anyway?? > The reason we get warnings about these and not about many other things it > defi

Re: [HACKERS] python cleanup

2011-07-25 Thread Andrew Dunstan
On 07/24/2011 11:46 PM, Tom Lane wrote: [python headers set _POSIX_C_SOURCE and _XOPEN_SOURCE] What in the world are the python headers doing fooling with these macros, anyway?? Good question. It seems unfriendly. It looks like you're just about guaranteed to get a warning if you include a

Re: [HACKERS] python cleanup

2011-07-24 Thread Tom Lane
Andrew Dunstan writes: > On my Linux system the attached compiles without warnings. If this seems > like the way to go I'll investigate more on Windows. Hmm ... > +/* > + * Save settings the Python headers might override > + */ > +#ifdef _POSIX_C_SOURCE > +#define _PGSAVE_POSIX_C_SOURCE _POSIX

[HACKERS] python cleanup

2011-07-24 Thread Andrew Dunstan
On 04/24/2011 07:31 PM, Peter Eisentraut wrote: On sön, 2011-04-24 at 12:25 -0400, Tom Lane wrote: This file is in fundamental violation of the first commandment of Postgres #includes, which is "thou shalt have no other gods before c.h". We need to put postgres.h *before* the Python.h include.