rpms/nspr/devel nspr-static-assert.patch, NONE, 1.1 nspr-thread-cleanup.patch, 1.1, 1.2 nspr.spec, 1.21, 1.22
Kai Engert (kengert)
fedora-extras-commits at redhat.com
Fri Jul 6 18:38:09 UTC 2007
Author: kengert
Update of /cvs/extras/rpms/nspr/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21271
Modified Files:
nspr-thread-cleanup.patch nspr.spec
Added Files:
nspr-static-assert.patch
Log Message:
* Fri Jul 06 2007 Kai Engert <kengert at redhat.com> - 4.6.6-2
- Update thread-cleanup patch to latest upstream version
- Add upstream patch to support PR_STATIC_ASSERT
nspr-static-assert.patch:
--- NEW FILE nspr-static-assert.patch ---
Index: mozilla/nsprpub/pr/include/prlog.h
diff -u mozilla/nsprpub/pr/include/prlog.h:3.14 mozilla/nsprpub/pr/include/prlog.h:3.15
--- mozilla/nsprpub/pr/include/prlog.h:3.14 Sun Apr 25 15:00:47 2004
+++ mozilla/nsprpub/pr/include/prlog.h Mon May 28 14:48:26 2007
@@ -251,6 +251,14 @@
#endif /* defined(DEBUG) || defined(FORCE_PR_ASSERT) */
+/*
+** Compile-time assert. "condition" must be a constant expression.
+** The macro can be used only in places where an "extern" declaration is
+** allowed.
+*/
+#define PR_STATIC_ASSERT(condition) \
+ extern void pr_static_assert(int arg[(condition) ? 1 : -1])
+
PR_END_EXTERN_C
#endif /* prlog_h___ */
nspr-thread-cleanup.patch:
Index: nspr-thread-cleanup.patch
===================================================================
RCS file: /cvs/extras/rpms/nspr/devel/nspr-thread-cleanup.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- nspr-thread-cleanup.patch 24 Feb 2007 08:29:22 -0000 1.1
+++ nspr-thread-cleanup.patch 6 Jul 2007 18:38:00 -0000 1.2
@@ -1,16 +1,37 @@
-Index: mozilla/nsprpub/pr/src/pthreads/ptthread.c
-===================================================================
-RCS file: /cvsroot/mozilla/nsprpub/pr/src/pthreads/ptthread.c,v
-retrieving revision 3.66
-diff -p -U8 -r3.66 ptthread.c
---- mozilla/nsprpub/pr/src/pthreads/ptthread.c 1 Jul 2005 22:26:37 -0000 3.66
-+++ mozilla/nsprpub/pr/src/pthreads/ptthread.c 4 Dec 2006 22:50:55 -0000
-@@ -919,16 +919,42 @@ void _PR_InitThreads(
- */
- rv = _PT_PTHREAD_KEY_CREATE(&pt_book.key, _pt_thread_death);
- PR_ASSERT(0 == rv);
- rv = pthread_setspecific(pt_book.key, thred);
- PR_ASSERT(0 == rv);
+--- ./mozilla/nsprpub/pr/src/pthreads/ptthread.c.pre2nd 2007-06-27 22:05:30.000000000 +0200
++++ ./mozilla/nsprpub/pr/src/pthreads/ptthread.c 2007-06-27 22:10:33.000000000 +0200
+@@ -75,6 +75,7 @@
+ } pt_book = {0};
+
+ static void _pt_thread_death(void *arg);
++static void _pt_thread_death_internal(void *arg, PRBool callDestructors);
+ static void init_pthread_gc_support(void);
+
+ #if defined(_PR_DCETHREADS) || defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
+@@ -797,6 +798,12 @@
+
+ static void _pt_thread_death(void *arg)
+ {
++ /* PR_TRUE for: call destructors */
++ _pt_thread_death_internal(arg, PR_TRUE);
++}
++
++static void _pt_thread_death_internal(void *arg, PRBool callDestructors)
++{
+ PRThread *thred = (PRThread*)arg;
+
+ if (thred->state & (PT_THREAD_FOREIGN|PT_THREAD_PRIMORD))
+@@ -812,7 +819,8 @@
+ thred->next->prev = thred->prev;
+ PR_Unlock(pt_book.ml);
+ }
+- _PR_DestroyThreadPrivate(thred);
++ if (callDestructors)
++ _PR_DestroyThreadPrivate(thred);
+ PR_Free(thred->privateData);
+ if (NULL != thred->errorString)
+ PR_Free(thred->errorString);
+@@ -924,6 +932,36 @@
PR_SetThreadPriority(thred, priority);
} /* _PR_InitThreads */
@@ -31,7 +52,11 @@
+ _PT_PTHREAD_GETSPECIFIC(pt_book.key, thred);
+ if (NULL != thred)
+ {
-+ _pt_thread_death(thred);
++ /*
++ * PR_FALSE, because it is unsafe to call back to the
++ * thread private data destructors at final cleanup.
++ */
++ _pt_thread_death_internal(thred, PR_FALSE);
+ rv = pthread_setspecific(pt_book.key, NULL);
+ PR_ASSERT(0 == rv);
+ }
@@ -43,8 +68,3 @@
PR_IMPLEMENT(PRStatus) PR_Cleanup(void)
{
PRThread *me = PR_CurrentThread();
- int rv;
- PR_LOG(_pr_thread_lm, PR_LOG_MIN, ("PR_Cleanup: shutting down NSPR"));
- PR_ASSERT(me->state & PT_THREAD_PRIMORD);
- if (me->state & PT_THREAD_PRIMORD)
- {
Index: nspr.spec
===================================================================
RCS file: /cvs/extras/rpms/nspr/devel/nspr.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- nspr.spec 7 Mar 2007 18:01:47 -0000 1.21
+++ nspr.spec 6 Jul 2007 18:38:00 -0000 1.22
@@ -1,7 +1,7 @@
Summary: Netscape Portable Runtime
Name: nspr
Version: 4.6.6
-Release: 1
+Release: 2
License: MPL/GPL/LGPL
URL: http://www.mozilla.org/projects/nspr/
Group: System Environment/Libraries
@@ -13,6 +13,7 @@
Patch1: nspr-config-pc.patch
Patch2: nspr-ipv6-numerichost.patch
Patch3: nspr-thread-cleanup.patch
+Patch4: nspr-static-assert.patch
Provides: mozilla-nspr
Obsoletes: mozilla-nspr
@@ -49,6 +50,7 @@
%patch1 -p0
%patch2 -p0
%patch3 -p0
+%patch4 -p0
cp %{SOURCE2} ./mozilla/nsprpub/config/
@@ -125,6 +127,10 @@
%{_bindir}/nspr-config
%changelog
+* Fri Jul 06 2007 Kai Engert <kengert at redhat.com> - 4.6.6-2
+- Update thread-cleanup patch to latest upstream version
+- Add upstream patch to support PR_STATIC_ASSERT
+
* Wed Mar 07 2007 Kai Engert <kengert at redhat.com> - 4.6.6-1
- Update to 4.6.6
- Adjust IPv6 patch to latest upstream version
More information about the fedora-extras-commits
mailing list