summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwchang0222%aol.com <devnull@localhost>2003-11-16 00:52:16 +0000
committerwchang0222%aol.com <devnull@localhost>2003-11-16 00:52:16 +0000
commit000ebacaa40e7ac4f3607491bb2d72d61b93a34a (patch)
treeadd9be8e0ee62c26437c779bc9eccae56b1199a2
parent3df84d7afc2d05076263daf545553e67c2175fcd (diff)
downloadnspr-hg-000ebacaa40e7ac4f3607491bb2d72d61b93a34a.tar.gz
Brought the NSPRPUB_PRE_4_2_CLIENT_BRANCH in sync with the tip.
Modified Files: os_Linux_x86.s solaris.c prtime.c pr/tests/Makefile.in runtests.ksh runtests.sh Added File: pr/tests/formattm.c
-rw-r--r--pr/src/md/unix/os_Linux_x86.s3
-rw-r--r--pr/src/md/unix/solaris.c23
-rw-r--r--pr/src/misc/prtime.c3
-rw-r--r--pr/tests/Makefile.in1
-rwxr-xr-xpr/tests/runtests.ksh1
-rwxr-xr-xpr/tests/runtests.sh1
6 files changed, 21 insertions, 11 deletions
diff --git a/pr/src/md/unix/os_Linux_x86.s b/pr/src/md/unix/os_Linux_x86.s
index 4eacdc40..d691badd 100644
--- a/pr/src/md/unix/os_Linux_x86.s
+++ b/pr/src/md/unix/os_Linux_x86.s
@@ -109,3 +109,6 @@ _PR_x86_AtomicAdd:
xaddl %eax, (%ecx)
addl %edx, %eax
ret
+
+/ Magic indicating no need for an executable stack
+.section .note.GNU-stack, "", @progbits ; .previous
diff --git a/pr/src/md/unix/solaris.c b/pr/src/md/unix/solaris.c
index 3313ac83..0437903a 100644
--- a/pr/src/md/unix/solaris.c
+++ b/pr/src/md/unix/solaris.c
@@ -187,16 +187,19 @@ static void
threadid_key_destructor(void *value)
{
PRThread *me = (PRThread *)value;
- PR_ASSERT((me != NULL) && (me->flags & _PR_ATTACHED));
- /*
- * The Solaris thread library sets the thread specific
- * data (the current thread) to NULL before invoking
- * the destructor. We need to restore it to prevent the
- * _PR_MD_CURRENT_THREAD() call in _PRI_DetachThread()
- * from attaching the thread again.
- */
- _PR_MD_SET_CURRENT_THREAD(me);
- _PRI_DetachThread();
+ PR_ASSERT(me != NULL);
+ /* the thread could be PRIMORDIAL (thus not ATTACHED) */
+ if (me->flags & _PR_ATTACHED) {
+ /*
+ * The Solaris thread library sets the thread specific
+ * data (the current thread) to NULL before invoking
+ * the destructor. We need to restore it to prevent the
+ * _PR_MD_CURRENT_THREAD() call in _PRI_DetachThread()
+ * from attaching the thread again.
+ */
+ _PR_MD_SET_CURRENT_THREAD(me);
+ _PRI_DetachThread();
+ }
}
void _MD_EarlyInit(void)
diff --git a/pr/src/misc/prtime.c b/pr/src/misc/prtime.c
index 3035a9a2..55da78ea 100644
--- a/pr/src/misc/prtime.c
+++ b/pr/src/misc/prtime.c
@@ -1666,7 +1666,8 @@ PR_FormatTime(char *buf, int buflen, const char *fmt, const PRExplodedTime *tm)
*/
#if defined(SUNOS4) || (__GLIBC__ >= 2) || defined(XP_BEOS) \
- || defined(NETBSD) || defined(OPENBSD) || defined(FREEBSD)
+ || defined(NETBSD) || defined(OPENBSD) || defined(FREEBSD) \
+ || defined(DARWIN)
a.tm_zone = NULL;
a.tm_gmtoff = tm->tm_params.tp_gmt_offset + tm->tm_params.tp_dst_offset;
#endif
diff --git a/pr/tests/Makefile.in b/pr/tests/Makefile.in
index 62e7e18c..c3079f1e 100644
--- a/pr/tests/Makefile.in
+++ b/pr/tests/Makefile.in
@@ -75,6 +75,7 @@ CSRCS = \
fileio.c \
foreign.c \
forktest.c \
+ formattm.c \
fsync.c \
getai.c \
gethost.c \
diff --git a/pr/tests/runtests.ksh b/pr/tests/runtests.ksh
index 6c64cb4a..9a3b8171 100755
--- a/pr/tests/runtests.ksh
+++ b/pr/tests/runtests.ksh
@@ -114,6 +114,7 @@ exit
fdcach
fileio
foreign
+formattm
fsync
gethost
getproto
diff --git a/pr/tests/runtests.sh b/pr/tests/runtests.sh
index 959b5d50..e4810d9c 100755
--- a/pr/tests/runtests.sh
+++ b/pr/tests/runtests.sh
@@ -114,6 +114,7 @@ exit
fdcach
fileio
foreign
+formattm
fsync
gethost
getproto