apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r501151 - /apr/apr/branches/1.2.x/threadproc/unix/thread.c
Date Mon, 29 Jan 2007 19:28:28 GMT
Author: trawick
Date: Mon Jan 29 11:28:24 2007
New Revision: 501151

URL: http://svn.apache.org/viewvc?view=rev&rev=501151
Log:
merge from trunk:

Fix compile failure in pthread_attr_setdetachstate() logic on z/OS.

Submitted by: David Jones <oscaremma gmail.com>
Reviewed by:  trawick

Modified:
    apr/apr/branches/1.2.x/threadproc/unix/thread.c

Modified: apr/apr/branches/1.2.x/threadproc/unix/thread.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/threadproc/unix/thread.c?view=diff&rev=501151&r1=501150&r2=501151
==============================================================================
--- apr/apr/branches/1.2.x/threadproc/unix/thread.c (original)
+++ apr/apr/branches/1.2.x/threadproc/unix/thread.c Mon Jan 29 11:28:24 2007
@@ -58,14 +58,18 @@
     return stat;
 }
 
+#if defined(PTHREAD_CREATE_DETACHED)
 #define DETACH_ARG(v) ((v) ? PTHREAD_CREATE_DETACHED : PTHREAD_CREATE_JOINABLE)
+#else
+#define DETACH_ARG(v) ((v) ? 1 : 0)
+#endif
 
 APR_DECLARE(apr_status_t) apr_threadattr_detach_set(apr_threadattr_t *attr,
                                                     apr_int32_t on)
 {
     apr_status_t stat;
 #ifdef PTHREAD_ATTR_SETDETACHSTATE_ARG2_ADDR
-    int arg = DETACH_ARG(v);
+    int arg = DETACH_ARG(on);
 
     if ((stat = pthread_attr_setdetachstate(&attr->attr, &arg)) == 0) {
 #else



Mime
View raw message