pkgsrc/devel/nspr/patches/patch-ah
bjs 0400b542c1 Update to version 4.6.7 (bugfix release). See new patches
for more information about them.  While here, fix pkglint warnings.

ok'd by joerg@
2007-09-25 04:18:25 +00:00

54 lines
1.7 KiB
Text

$NetBSD: patch-ah,v 1.1 2007/09/25 04:18:26 bjs Exp $
Does this package really ever need priority scheduling? #undef it.
If _DONT_CAST_PTHREAD_T is defined, then do as the macro says. After
all, it could be 64-bit. From FreeBSD ports.
--- pr/src/pthreads/ptthread.c.orig 2006-11-30 19:34:12.000000000 -0500
+++ pr/src/pthreads/ptthread.c
@@ -52,6 +52,10 @@
#include <string.h>
#include <signal.h>
+/* XXX should nspr ever really need to set priority? */
+
+#undef _POSIX_THREAD_PRIORITY_SCHEDULING
+
/*
* Record whether or not we have the privilege to set the scheduling
* policy and priority of threads. 0 means that privilege is available.
@@ -979,12 +983,20 @@ PR_IMPLEMENT(void) PR_ProcessExit(PRIntn
_exit(status);
}
+#ifndef _DONT_CAST_PTHREAD_T
PR_IMPLEMENT(PRUint32) PR_GetThreadID(PRThread *thred)
+#else
+PR_IMPLEMENT(pthread_t) PR_GetThreadID(PRThread *thred)
+#endif /* _DONT_CAST_PTHREAD_T */
{
#if defined(_PR_DCETHREADS)
return (PRUint32)&thred->id; /* this is really a sham! */
#else
+#ifndef _DONT_CAST_PTHREAD_T
return (PRUint32)thred->id; /* and I don't know what they will do with it */
+#else
+ return thred->id; /* and I don't know what they will do with it */
+#endif /* _DONT_CAST_PTHREAD_T */
#endif
}
@@ -1116,7 +1128,13 @@ PR_IMPLEMENT(PRStatus) PR_EnumerateThrea
PRIntn count = 0;
PRStatus rv = PR_SUCCESS;
PRThread* thred = pt_book.first;
+#ifdef _DONT_CAST_PTHREAD_T
+#if !defined(_PR_DCETHREADS) && (defined(DEBUG) || defined(FORCE_PR_ASSERT))
+#endif /* _DONT_CAST_PTHREAD_T */
PRThread *me = PR_CurrentThread();
+#ifdef _DONT_CAST_PTHREAD_T
+#endif
+#endif /* _DONT_CAST_PTHREAD_T */
PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("Begin PR_EnumerateThreads\n"));
/*