[issue1045893] warning '"_POSIX_C_SOURCE" redefined' when include Python.h
Jonathan Wakely
report at bugs.python.org
Fri May 10 17:37:26 CEST 2013
Jonathan Wakely added the comment:
Insisting on including Python.h first is just broken.
GNU libc's /usr/include/features.h will override it anyway when _GNU_SOURCE is defined:
# undef _POSIX_C_SOURCE
# define _POSIX_C_SOURCE 200809L
# undef _XOPEN_SOURCE
# define _XOPEN_SOURCE 700
So if you define _GNU_SOURCE ( which happens automatically when using G++) the annoying defines in pyconfig.h are overridden anyway, so why not just only define them if not already defined?
Either you include Python.h first and its settings get ignored by glibc, or you don't include it first and you get annoying warnings.
----------
nosy: +Jonathan.Wakely
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1045893>
_______________________________________
More information about the Python-bugs-list
mailing list