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.

Title: os.sysconf(): return type of the C function sysconf() is long, not int
Type: Stage:
Components: Versions: Python 3.3, Python 3.4, Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, python-dev, vstinner
Priority: normal Keywords: patch

Created on 2013-05-12 23:58 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

File name Uploaded Description Edit
sysconf_long.patch vstinner, 2013-05-12 23:58 review
Messages (4)
msg189078 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-05-12 23:58
According to POSIX and my manual page on Linux, sysconf() return type is long (and not int).

It may not mater in practice because most sysconf() results are smaller than 1000, and I failed to find a value bigger than 2 millions.
msg189080 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2013-05-13 00:05
That looks reasonable to me.
msg189404 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-05-16 20:27
New changeset 7c60cf756097 by Victor Stinner in branch 'default':
Issue #17964: Fix os.sysconf(): the return type of the C sysconf() function
msg189406 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-05-16 20:28
The bug does also exist in Python 2.7, 3.2 and 3.3, but I prefer to not fix it in these versions because I'm not 100% sure that the return type is long on all platforms and because nobody noticed the issue since years. So if I broke something, I prefer to only break the development branch ;-)

I applied the fix to Python 3.4 and so I'm closing the issue.
Date User Action Args
2022-04-11 14:57:45adminsetgithub: 62164
2013-05-16 20:28:42vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg189406
2013-05-16 20:27:00python-devsetnosy: + python-dev
messages: + msg189404
2013-05-13 00:05:46benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg189080
2013-05-12 23:58:36vstinnercreate