Re: python cleanup
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Peter Eisentraut <peter_e@gmx.net>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-07-25T15:09:16Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Move include for Python.h above postgres.h to eliminate compiler warning.
- ab6ee1f9fc70 8.0.0 cited
On 07/25/2011 10:52 AM, Tom Lane wrote:
> Andrew Dunstan<andrew@dunslane.net> writes:
>> On 07/25/2011 10:36 AM, Tom Lane wrote:
>>> Andrew Dunstan<andrew@dunslane.net> 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, rather the application sets them to indicate which POSIX feature
>>> level it would like. So perhaps the real question here is where the
>>> heck are your conflicting values coming from ...
>> _POSIX_C_SOURCE at least is defined in features.h, which is included by
>> huge numbers of system headers, many of which are included by c.h.
> 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
[andrew@emma ~]$ cat foo.c
#include <stdio.h>
#include <Python.h>
main() {}
[andrew@emma ~]$ gcc -I/usr/include/python2.7/ -c foo.c
In file included from /usr/include/python2.7/pyconfig.h:6:0,
from /usr/include/python2.7/Python.h:8,
from foo.c:2:
/usr/include/python2.7/pyconfig-64.h:1158:0: warning:
"_POSIX_C_SOURCE" redefined
/usr/include/features.h:214:0: note: this is the location of the
previous definition
See now?
cheers
andrew