Skip to content

Commit b9d9771

Browse files
author
loewis
committed
Patch #650415: Avoid redefinition of macros.
git-svn-id: http://svn.python.org/projects/python/trunk@30076 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 6198a11 commit b9d9771

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Python/thread_pthread.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,26 @@
7979
/* set default attribute object for different versions */
8080

8181
#if defined(PY_PTHREAD_D4) || defined(PY_PTHREAD_D7)
82+
#if !defined(pthread_attr_default)
8283
# define pthread_attr_default pthread_attr_default
84+
#endif
85+
#if !defined(pthread_mutexattr_default)
8386
# define pthread_mutexattr_default pthread_mutexattr_default
87+
#endif
88+
#if !defined(pthread_condattr_default)
8489
# define pthread_condattr_default pthread_condattr_default
90+
#endif
8591
#elif defined(PY_PTHREAD_STD) || defined(PY_PTHREAD_D6)
92+
#if !defined(pthread_attr_default)
8693
# define pthread_attr_default ((pthread_attr_t *)NULL)
94+
#endif
95+
#if !defined(pthread_mutexattr_default)
8796
# define pthread_mutexattr_default ((pthread_mutexattr_t *)NULL)
97+
#endif
98+
#if !defined(pthread_condattr_default)
8899
# define pthread_condattr_default ((pthread_condattr_t *)NULL)
89100
#endif
101+
#endif
90102

91103

92104
/* Whether or not to use semaphores directly rather than emulating them with

0 commit comments

Comments
 (0)