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.

Author loewis
Recipients jnoller, loewis, pitrou, roudkerk, skip.montanaro
Date 2008-09-11.09:51:59
SpamBayes Score 2.82675e-10
Marked as misclassified No
Message-id <>
According to POSIX, if no determinate value for SEM_VALUE_MAX can be
given, the actual value should be queried with
sysconf(_SC_SEM_VALUE_MAX), and SEM_VALUE_MAX should not be defined;
this is in particular the case when the value depends on the system
configuration (such as available memory). _POSIX_SEM_VALUE_MAX specifies
the minimum value guaranteed by POSIX.

Now, it is not plausible why SEM_VALUE_MAX should vary by installation,
as it just depends on what integer type is used to represent the
counter. So more likely, Sun wrote its header files at a time when the
spec was not finished, so they didn't want to clutter the global namespace.

IOW, I think the patch is fine as it stands. If you are over-cautious,
you should test whether _SC_SEM_VALUE_MAX is defined, and use sysconf in
that case, and only fall back to _SEM_VALUE_MAX, then
_POSIX_SEM_VALUE_MAX, then fail, if sysconf isn't available.

If you do make this change, please stop using Py_BuildValue to convert a
C int to a Python int; use PyInt_FromLong instead.
Date User Action Args
2008-09-11 09:53:08loewissetrecipients: + loewis, skip.montanaro, pitrou, roudkerk, jnoller
2008-09-11 09:53:07loewissetmessageid: <>
2008-09-11 09:52:01loewislinkissue3110 messages
2008-09-11 09:52:00loewiscreate