New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
warning '"_POSIX_C_SOURCE" redefined' when include Python.h #41011
Comments
""" The above message is shown whenever program (extending OS: Fedora Core 2 |
Logged In: YES This is a bug in your program. See |
Logged In: YES But why not made it more compliant in Python.h : #ifndef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE
#endif ??? |
Logged In: YES Python itself and Python extensions must be compiled with If you include Python.h first, as you should, |
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 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. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: