mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Issue 3110: Additional protection for SEM_VALUE_MAX on platforms, thanks to Martin Loewis
This commit is contained in:
parent
569fc96f99
commit
b502bc7a1a
2 changed files with 12 additions and 5 deletions
|
@ -202,6 +202,8 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #3110: Add additional protect around SEM_VALUE_MAX for multiprocessing
|
||||||
|
|
||||||
- In Pdb, prevent the reassignment of __builtin__._ by sys.displayhook on
|
- In Pdb, prevent the reassignment of __builtin__._ by sys.displayhook on
|
||||||
printing out values.
|
printing out values.
|
||||||
|
|
||||||
|
|
|
@ -45,13 +45,18 @@
|
||||||
* Issue 3110 - Solaris does not define SEM_VALUE_MAX
|
* Issue 3110 - Solaris does not define SEM_VALUE_MAX
|
||||||
*/
|
*/
|
||||||
#ifndef SEM_VALUE_MAX
|
#ifndef SEM_VALUE_MAX
|
||||||
# ifdef _SEM_VALUE_MAX
|
#if defined(HAVE_SYSCONF) && defined(_SC_SEM_VALUE_MAX)
|
||||||
# define SEM_VALUE_MAX _SEM_VALUE_MAX
|
# define SEM_VALUE_MAX sysconf(_SC_SEM_VALUE_MAX)
|
||||||
# else
|
#elif defined(_SEM_VALUE_MAX)
|
||||||
# define SEM_VALUE_MAX INT_MAX
|
# define SEM_VALUE_MAX _SEM_VALUE_MAX
|
||||||
# endif
|
#elif definef(_POSIX_SEM_VALUE_MAX)
|
||||||
|
# define SEM_VALUE_MAX _POSIX_SEM_VALUE_MAX
|
||||||
|
#else
|
||||||
|
# define SEM_VALUE_MAX INT_MAX
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make sure Py_ssize_t available
|
* Make sure Py_ssize_t available
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue