[Patches] [ python-Patches-1163249 ] _POSIX_SEMAPHORES checked
incorrectly
SourceForge.net
noreply at sourceforge.net
Wed Mar 16 05:15:59 CET 2005
Patches item #1163249, was opened at 2005-03-15 07:27
Message generated for change (Comment added) made by anthonybaxter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1163249&group_id=5470
Category: Core (C code)
Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Bob Ippolito (etrepum)
>Assigned to: Anthony Baxter (anthonybaxter)
Summary: _POSIX_SEMAPHORES checked incorrectly
Initial Comment:
The POSIX spec states that these may be defined as (-1) to state
non-compliance. Python doesn't respect that. This patch (against
2.4.1rc1, CVS is borked) fixes that.
Without this patch, Python will not work on "some operating
systems" unless threading is disabled entirely.
----------------------------------------------------------------------
>Comment By: Anthony Baxter (anthonybaxter)
Date: 2005-03-16 15:15
Message:
Logged In: YES
user_id=29957
Checked in on the 2.4 branch and the trunk. Thanks for the
patch!
----------------------------------------------------------------------
Comment By: Bob Ippolito (etrepum)
Date: 2005-03-16 10:08
Message:
Logged In: YES
user_id=139309
uh oh, must be another bug in the OS I'm using (or sourceforge)...
Hopefully this is suitable for now, the patch is near trivial anyway:
--- Python-2.4.1c1/Python/thread_pthread.h 2004-07-07
13:44:12.000000000 -0400
+++ /Users/bob/src/Python-2.4.1c1/Python/thread_pthread.h
2005-03-14 14:54:00.000000000 -0500
@@ -16,9 +16,13 @@
family of functions must indicate this by defining
_POSIX_SEMAPHORES. */
#ifdef _POSIX_SEMAPHORES
+#if _POSIX_SEMAPHORES == -1
+#define HAVE_BROKEN_POSIX_SEMAPHORES
+#else
#include <semaphore.h>
#include <errno.h>
#endif
+#endif
#if !defined(pthread_attr_default)
# define pthread_attr_default ((pthread_attr_t *)NULL)
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2005-03-16 10:00
Message:
Logged In: YES
user_id=21627
The attached file appears not to be a patch file, but a file
containing a single line
/Volumes/Crack/download/posix_semaphores-2.4.1rc1.patch
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1163249&group_id=5470
More information about the Patches
mailing list