From: Jesse Noller <jnoller@gmail.com>
Date: Wed, 3 Sep 2008 18:22:19 +0000 (+0000)
Subject: merge 66184 to fix issue3110 to py3k
X-Git-Tag: v3.0rc1~121
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=338f5786eac83f473bcdde27fea6280c762fd92d;p=python

merge 66184 to fix issue3110 to py3k
---

diff --git a/Misc/NEWS b/Misc/NEWS
index 355633d042..e33e6c50cc 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -71,6 +71,9 @@ Library
 
 - The deprecation warnings for the camelCase threading API names were removed.
 
+- Issue #3110: multiprocessing fails to compiel on solaris 10 due to missing 
+  SEM_VALUE_MAX.
+
 Extension Modules
 -----------------
 
diff --git a/Modules/_multiprocessing/multiprocessing.h b/Modules/_multiprocessing/multiprocessing.h
index 57eb7b4b98..ec5042c9d6 100644
--- a/Modules/_multiprocessing/multiprocessing.h
+++ b/Modules/_multiprocessing/multiprocessing.h
@@ -36,6 +36,17 @@
 #  define INVALID_HANDLE_VALUE (-1)
 #endif
 
+/*
+ * Issue 3110 - Solaris does not define SEM_VALUE_MAX
+ */
+#ifndef SEM_VALUE_MAX
+#  ifdef _SEM_VALUE_MAX
+#    define SEM_VALUE_MAX _SEM_VALUE_MAX
+#  else
+#    define SEM_VALUE_MAX INT_MAX
+#  endif
+#endif
+
 /*
  * Make sure Py_ssize_t available
  */