This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Autoconf tests in python not portably correct
Type: compile error Stage: resolved
Components: Build Versions: Python 3.2
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, doko, eric.araujo, ngie
Priority: normal Keywords:

Created on 2010-05-18 09:13 by ngie, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (6)
msg105958 - (view) Author: Enji Cooper (ngie) * Date: 2010-05-18 09:13
A number of features are being blindly enabled on python that aren't correct from a porting standpoint; a handful in configure.in I noticed are:

# The later defininition of _XOPEN_SOURCE disables certain features
# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
AC_DEFINE(_GNU_SOURCE, 1, [Define on Linux to activate all library features])

# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
# them.
AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features])

# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
# them.
AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library features])

# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
AC_DEFINE(_BSD_TYPES, 1, [Define on Irix to enable u_int])

# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
# them.
AC_DEFINE(_DARWIN_C_SOURCE, 1, [Define on Darwin to activate all library features])

these are only applicable on certain platforms and thus, shouldn't be enabled on all platforms (the default should be off, and then the values should be tuned according to the platform detection performed by autoconf).
msg112236 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-08-01 00:31
Garrett, does the bug still exist in 3.2 (branch named py3k in subversion)?
msg112237 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-08-01 00:33
doko, I made you nosy because of your autotools expertise. Hope it’s okay.
msg112274 - (view) Author: Enji Cooper (ngie) * Date: 2010-08-01 07:24
The issue is still present.

The overall problem I suppose is with consistency and presentation of features in the python language.

Many features cannot be presented in a 100% portable manner, and the problem is that such features that aren't POSIX conforming should be 100% spelled out instead of being implied functional on all Unix based platforms.

So, again... if these platforms can't function with these preprocessor defines, the platforms need to be fixed -- not python.
msg227782 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-09-28 23:31
From msg112274 "if these platforms can't function with these preprocessor defines, the platforms need to be fixed -- not python." so I believe this can be closed.
msg336593 - (view) Author: Enji Cooper (ngie) * Date: 2019-02-26 01:56
This issue has been superseded by other work.
History
Date User Action Args
2022-04-11 14:57:01adminsetgithub: 52993
2019-02-26 01:56:56ngiesetstatus: open -> closed

messages: + msg336593
stage: resolved
2014-09-28 23:31:56BreamoreBoysetnosy: + BreamoreBoy
messages: + msg227782
2010-08-01 07:24:17ngiesetmessages: + msg112274
2010-08-01 00:33:28eric.araujosetmessages: + msg112237
2010-08-01 00:31:00eric.araujosetnosy: + eric.araujo, doko

messages: + msg112236
versions: + Python 3.2, - Python 2.6
2010-05-18 09:13:29ngiecreate