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 osvenskan
Recipients jnoller, loewis, osvenskan, pitrou, roudkerk, skip.montanaro
Date 2008-12-18.01:50:45
SpamBayes Score 0.0007615062
Marked as misclassified No
Message-id <1229565047.91.0.506945532267.issue3110@psf.upfronthosting.co.za>
In-reply-to
Content
I'm facing the same problem (getting a good definition of SEM_VALUE_MAX)
for my posix_ipc extension. The patch presented here will get the
compiler to shut up on OpenSolaris, but not for the reason you think. At
least, that's the way I see it.

On OpenSolaris (2008.05 is what I'm testing with), _SEM_VALUE_MAX is
indeed #defined in sys/param.h, but it's inside this #ifdef on line 322:

#if (defined(_KERNEL) || defined(_KMEMUSER))

Since multiprocessing.c doesn't #define either of these, both
SEM_VALUE_MAX and _SEM_VALUE_MAX will remain undefined and so the patch
will always fall back to INT_MAX.

IMHO, given the choice between #defining _KERNEL or _KMEMUSER and
calling sysconf(_SC_SEM_VALUE_MAX), I feel safer doing the latter. 

I did a survey of all the operating systems to which I have access
(OpenSolaris 2008.05, OS X 10.5.5, RHEL?, Ubuntu 8.04, and FreeBSD 7).
OpenSolaris is the only one that doesn't #define SEM_VALUE_MAX, and on
all systems except for the possibly Red Hattish one,
sysconf(_SC_SEM_VALUE_MAX) returned the same value as the definition of
SEM_VALUE_MAX. I attached my code & results.
History
Date User Action Args
2008-12-18 01:50:48osvenskansetrecipients: + osvenskan, loewis, skip.montanaro, pitrou, roudkerk, jnoller
2008-12-18 01:50:47osvenskansetmessageid: <1229565047.91.0.506945532267.issue3110@psf.upfronthosting.co.za>
2008-12-18 01:50:47osvenskanlinkissue3110 messages
2008-12-18 01:50:46osvenskancreate