Hello community,

here is the log from the commit of package mozilla-nspr for openSUSE:Factory 
checked in at 2018-02-24 16:38:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mozilla-nspr (Old)
 and      /work/SRC/openSUSE:Factory/.mozilla-nspr.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mozilla-nspr"

Sat Feb 24 16:38:06 2018 rev:66 rq:573907 version:4.18

Changes:
--------
--- /work/SRC/openSUSE:Factory/mozilla-nspr/mozilla-nspr.changes        
2017-10-10 11:35:11.480000005 +0200
+++ /work/SRC/openSUSE:Factory/.mozilla-nspr.new/mozilla-nspr.changes   
2018-02-24 16:38:08.628117856 +0100
@@ -1,0 +2,8 @@
+Wed Feb  7 21:08:01 UTC 2018 - w...@rosenauer.org
+
+- update to version 4.18
+  * removed HP-UX DCE threads support
+  * improvements for the Windows implementation of PR_SetCurrentThreadName
+  * fixes for the Windows implementation of TCP Fast Open
+
+-------------------------------------------------------------------

Old:
----
  nspr-4.17.tar.gz

New:
----
  nspr-4.18.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mozilla-nspr.spec ++++++
--- /var/tmp/diff_new_pack.QRhrkK/_old  2018-02-24 16:38:10.004068336 +0100
+++ /var/tmp/diff_new_pack.QRhrkK/_new  2018-02-24 16:38:10.008068192 +0100
@@ -1,8 +1,8 @@
 #
 # spec file for package mozilla-nspr
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
-#               2006-2017 Wolfgang Rosenauer
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+#               2006-2018 Wolfgang Rosenauer
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 
 Name:           mozilla-nspr
-Version:        4.17
+Version:        4.18
 Release:        0
 Summary:        Netscape Portable Runtime
 License:        MPL-2.0

++++++ nspr-4.17.tar.gz -> nspr-4.18.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/.hg_archival.txt 
new/nspr-4.18/nspr/.hg_archival.txt
--- old/nspr-4.17/nspr/.hg_archival.txt 2017-09-19 18:32:26.000000000 +0200
+++ new/nspr-4.18/nspr/.hg_archival.txt 2018-01-18 13:37:14.000000000 +0100
@@ -1,4 +1,4 @@
 repo: a4b34919bf34db2ee22acbbc305693c8980b6dc6
-node: 3e67abaf5669114ac87d89c60eb0f0b73a086a2e
+node: 46c961da83710de28c559f3acb66059728c56c2c
 branch: default
-tag: NSPR_4_17_RTM
+tag: NSPR_4_18_RTM
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/configure new/nspr-4.18/nspr/configure
--- old/nspr-4.17/nspr/configure        2017-09-19 18:32:26.000000000 +0200
+++ new/nspr-4.18/nspr/configure        2018-01-18 13:37:14.000000000 +0100
@@ -2488,7 +2488,7 @@
   program_prefix=${target_alias}-
 
 MOD_MAJOR_VERSION=4
-MOD_MINOR_VERSION=17
+MOD_MINOR_VERSION=18
 MOD_PATCH_VERSION=0
 NSPR_MODNAME=nspr20
 _HAVE_PTHREADS=
@@ -6560,11 +6560,13 @@
 
     $as_echo "#define HAVE_POINTER_LOCALTIME_R 1" >>confdefs.h
 
+
     HOST_DARWIN_MAJOR=`echo "$build_os" | sed -E -e 's/^darwin([0-9]+).*$/\1/'`
+
     if test "$HOST_DARWIN_MAJOR" -ge 15 ; then
         $as_echo "#define HAS_CONNECTX 1" >>confdefs.h
-    fi
 
+    fi
     AS='$(CC) -x assembler-with-cpp'
     CFLAGS="$CFLAGS -Wall -fno-common"
     case "${target_cpu}" in
@@ -8472,19 +8474,12 @@
 
     fi
     if test "$USE_PTHREADS"; then
-        if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
-            $as_echo "#define _REENTRANT 1" >>confdefs.h
-
-            $as_echo "#define _PR_DCETHREADS 1" >>confdefs.h
-
-        else
-            cat >>confdefs.h <<_ACEOF
+        cat >>confdefs.h <<_ACEOF
 #define _POSIX_C_SOURCE 199506L
 _ACEOF
 
-            $as_echo "#define _PR_HAVE_THREADSAFE_GETHOST 1" >>confdefs.h
+        $as_echo "#define _PR_HAVE_THREADSAFE_GETHOST 1" >>confdefs.h
 
-        fi
     fi
     if test "$USE_USER_PTHREADS"; then
         cat >>confdefs.h <<_ACEOF
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/configure.in 
new/nspr-4.18/nspr/configure.in
--- old/nspr-4.17/nspr/configure.in     2017-09-19 18:32:26.000000000 +0200
+++ new/nspr-4.18/nspr/configure.in     2018-01-18 13:37:14.000000000 +0100
@@ -15,7 +15,7 @@
 dnl = Defaults
 dnl ========================================================
 MOD_MAJOR_VERSION=4
-MOD_MINOR_VERSION=17
+MOD_MINOR_VERSION=18
 MOD_PATCH_VERSION=0
 NSPR_MODNAME=nspr20
 _HAVE_PTHREADS=
@@ -2889,13 +2889,8 @@
         AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
     fi 
     if test "$USE_PTHREADS"; then
-        if echo "$OS_RELEASE" | egrep '^(B.10.10|B.10.20)' >/dev/null; then
-            AC_DEFINE(_REENTRANT)
-            AC_DEFINE(_PR_DCETHREADS)
-        else
-            AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE,199506L)
-            AC_DEFINE(_PR_HAVE_THREADSAFE_GETHOST)
-        fi
+        AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE,199506L)
+        AC_DEFINE(_PR_HAVE_THREADSAFE_GETHOST)
     fi
     if test "$USE_USER_PTHREADS"; then
         AC_DEFINE_UNQUOTED(_POSIX_C_SOURCE,199506L)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/include/md/_pth.h 
new/nspr-4.18/nspr/pr/include/md/_pth.h
--- old/nspr-4.17/nspr/pr/include/md/_pth.h     2017-09-19 18:32:26.000000000 
+0200
+++ new/nspr-4.18/nspr/pr/include/md/_pth.h     2018-01-18 13:37:14.000000000 
+0100
@@ -14,29 +14,7 @@
 #define _PR_MD_DISABLE_CLOCK_INTERRUPTS()
 #define _PR_MD_ENABLE_CLOCK_INTERRUPTS()
 
-/* In good standards fashion, the DCE threads (based on posix-4) are not
- * quite the same as newer posix implementations.  These are mostly name
- * changes and small differences, so macros usually do the trick
- */
-#ifdef _PR_DCETHREADS
-#define _PT_PTHREAD_MUTEXATTR_INIT        pthread_mutexattr_create
-#define _PT_PTHREAD_MUTEXATTR_DESTROY     pthread_mutexattr_delete
-#define _PT_PTHREAD_MUTEX_INIT(m, a)      pthread_mutex_init(&(m), a)
-#define _PT_PTHREAD_MUTEX_IS_LOCKED(m)    (0 == pthread_mutex_trylock(&(m)))
-#define _PT_PTHREAD_CONDATTR_INIT         pthread_condattr_create
-#define _PT_PTHREAD_COND_INIT(m, a)       pthread_cond_init(&(m), a)
-#define _PT_PTHREAD_CONDATTR_DESTROY      pthread_condattr_delete
-
-/* Notes about differences between DCE threads and pthreads 10:
- *   1. pthread_mutex_trylock returns 1 when it locks the mutex
- *      0 when it does not.  The latest pthreads has a set of errno-like
- *      return values.
- *   2. return values from pthread_cond_timedwait are different.
- *
- *
- *
- */
-#elif defined(BSDI)
+#if defined(BSDI)
 /*
  * Mutex and condition attributes are not supported.  The attr
  * argument to pthread_mutex_init() and pthread_cond_init() must
@@ -106,13 +84,7 @@
  *   PR_EnterMonitor calls any of these functions, infinite
  *   recursion ensues.
  */
-#if defined(_PR_DCETHREADS)
-#define _PT_PTHREAD_INVALIDATE_THR_HANDLE(t) \
-       memset(&(t), 0, sizeof(pthread_t))
-#define _PT_PTHREAD_THR_HANDLE_IS_INVALID(t) \
-       (!memcmp(&(t), &pt_zero_tid, sizeof(pthread_t)))
-#define _PT_PTHREAD_COPY_THR_HANDLE(st, dt)   (dt) = (st)
-#elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(SOLARIS) \
+#if defined(IRIX) || defined(OSF1) || defined(AIX) || defined(SOLARIS) \
        || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
        || defined(HPUX) || defined(FREEBSD) \
        || defined(NETBSD) || defined(OPENBSD) || defined(BSDI) \
@@ -125,17 +97,7 @@
 #error "pthreads is not supported for this architecture"
 #endif
 
-#if defined(_PR_DCETHREADS)
-#define _PT_PTHREAD_ATTR_INIT            pthread_attr_create
-#define _PT_PTHREAD_ATTR_DESTROY         pthread_attr_delete
-#define _PT_PTHREAD_CREATE(t, a, f, r)   pthread_create(t, a, f, r) 
-#define _PT_PTHREAD_KEY_CREATE           pthread_keycreate
-#define _PT_PTHREAD_ATTR_SETSCHEDPOLICY  pthread_attr_setsched
-#define _PT_PTHREAD_ATTR_GETSTACKSIZE(a, s) \
-                                     (*(s) = pthread_attr_getstacksize(*(a)), 
0)
-#define _PT_PTHREAD_GETSPECIFIC(k, r) \
-               pthread_getspecific((k), (pthread_addr_t *) &(r))
-#elif defined(_PR_PTHREADS)
+#if defined(_PR_PTHREADS)
 #define _PT_PTHREAD_ATTR_INIT            pthread_attr_init
 #define _PT_PTHREAD_ATTR_DESTROY         pthread_attr_destroy
 #define _PT_PTHREAD_CREATE(t, a, f, r)   pthread_create(t, &a, f, r) 
@@ -147,22 +109,6 @@
 #error "Cannot determine pthread strategy"
 #endif
 
-#if defined(_PR_DCETHREADS)
-#define _PT_PTHREAD_EXPLICIT_SCHED      _PT_PTHREAD_DEFAULT_SCHED
-#endif
-
-/*
- * pthread_mutex_trylock returns different values in DCE threads and
- * pthreads.
- */
-#if defined(_PR_DCETHREADS)
-#define PT_TRYLOCK_SUCCESS 1
-#define PT_TRYLOCK_BUSY    0
-#else
-#define PT_TRYLOCK_SUCCESS 0
-#define PT_TRYLOCK_BUSY    EBUSY
-#endif
-
 /*
  * These platforms don't have sigtimedwait()
  */
@@ -190,16 +136,9 @@
 #define PT_PRIO_MIN            DEFAULT_PRIO
 #define PT_PRIO_MAX            DEFAULT_PRIO
 #elif defined(HPUX)
-
-#if defined(_PR_DCETHREADS)
-#define PT_PRIO_MIN            PRI_OTHER_MIN
-#define PT_PRIO_MAX            PRI_OTHER_MAX
-#else /* defined(_PR_DCETHREADS) */
 #include <sys/sched.h>
 #define PT_PRIO_MIN            sched_get_priority_min(SCHED_OTHER)
 #define PT_PRIO_MAX            sched_get_priority_max(SCHED_OTHER)
-#endif /* defined(_PR_DCETHREADS) */
-
 #elif defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
        || defined(FREEBSD) || defined(SYMBIAN)
 #define PT_PRIO_MIN            sched_get_priority_min(SCHED_OTHER)
@@ -238,9 +177,7 @@
  * Needed for garbage collection -- Look at PR_Suspend/PR_Resume
  * implementation.
  */
-#if defined(_PR_DCETHREADS)
-#define _PT_PTHREAD_YIELD()                    pthread_yield()
-#elif defined(OSF1)
+#if defined(OSF1)
 /*
  * sched_yield can't be called from a signal handler.  Must use
  * the _np version.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/include/prinit.h 
new/nspr-4.18/nspr/pr/include/prinit.h
--- old/nspr-4.17/nspr/pr/include/prinit.h      2017-09-19 18:32:26.000000000 
+0200
+++ new/nspr-4.18/nspr/pr/include/prinit.h      2018-01-18 13:37:14.000000000 
+0100
@@ -31,9 +31,9 @@
 ** The format of the version string is
 **     "<major version>.<minor version>[.<patch level>] [<Beta>]"
 */
-#define PR_VERSION  "4.17"
+#define PR_VERSION  "4.18"
 #define PR_VMAJOR   4
-#define PR_VMINOR   17
+#define PR_VMINOR   18
 #define PR_VPATCH   0
 #define PR_BETA     PR_FALSE
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/include/private/pprio.h 
new/nspr-4.18/nspr/pr/include/private/pprio.h
--- old/nspr-4.17/nspr/pr/include/private/pprio.h       2017-09-19 
18:32:26.000000000 +0200
+++ new/nspr-4.18/nspr/pr/include/private/pprio.h       2018-01-18 
13:37:14.000000000 +0100
@@ -237,20 +237,6 @@
 
 #endif /* WIN32 */
 
-/* FUNCTION: PR_EXPERIMENTAL_ONLY_IN_4_17_GetOverlappedIOHandle
-** DESCRIPTION:
-** This function will be available only in nspr version 4.17
-** This functionality is only available on windows. Some windows operation use
-** asynchronous (call overlapped) io. One of them is ConnectEx. NSPR uses
-** ConnectEx for enabling TCP Fast Open.
-** This function returns an OVERLAPPED structure associated with ConnectEx 
call.
-** If ConnectEx has not been called or the io has already finished, the
-** function will return PR_INVALID_ARGUMENT_ERROR.
-** PRFileDesc continues to be owner of the structure and the structure must not
-** be destroyed.
-*/
-NSPR_API(PRStatus) 
PR_EXPERIMENTAL_ONLY_IN_4_17_GetOverlappedIOHandle(PRFileDesc *fd, void **ol);
-
 PR_END_EXTERN_C
 
 #endif /* pprio_h___ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/include/private/primpl.h 
new/nspr-4.18/nspr/pr/include/private/primpl.h
--- old/nspr-4.17/nspr/pr/include/private/primpl.h      2017-09-19 
18:32:26.000000000 +0200
+++ new/nspr-4.18/nspr/pr/include/private/primpl.h      2018-01-18 
13:37:14.000000000 +0100
@@ -6,14 +6,6 @@
 #ifndef primpl_h___
 #define primpl_h___
 
-/*
- * HP-UX 10.10's pthread.h (DCE threads) includes dce/cma.h, which
- * has:
- *     #define sigaction _sigaction_sys
- * This macro causes chaos if signal.h gets included before pthread.h.
- * To be safe, we include pthread.h first.
- */
-
 #if defined(_PR_PTHREADS)
 #include <pthread.h>
 #endif
@@ -1877,7 +1869,7 @@
 ** and functions with macros that expand to the native thread
 ** types and functions on each platform.
 */
-#if defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)
+#if defined(_PR_PTHREADS)
 #define _PR_ZONE_ALLOCATOR
 #endif
 
@@ -2165,6 +2157,18 @@
 
 #endif /* XP_BEOS */
 
+#if defined(_WIN64) && defined(WIN95)
+typedef struct _PRFileDescList {
+  PRFileDesc *fd;
+  struct _PRFileDescList *next;
+} PRFileDescList;
+
+extern PRLock *_fd_waiting_for_overlapped_done_lock;
+extern PRFileDescList *_fd_waiting_for_overlapped_done;
+extern void CheckOverlappedPendingSocketsAreDone();
+#endif
+
+
 PR_END_EXTERN_C
 
 #endif /* primpl_h___ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/src/Makefile.in 
new/nspr-4.18/nspr/pr/src/Makefile.in
--- old/nspr-4.17/nspr/pr/src/Makefile.in       2017-09-19 18:32:26.000000000 
+0200
+++ new/nspr-4.18/nspr/pr/src/Makefile.in       2018-01-18 13:37:14.000000000 
+0100
@@ -138,12 +138,8 @@
 
 ifeq ($(OS_ARCH),HP-UX)
 ifeq ($(USE_PTHREADS), 1)
-ifeq (,$(filter-out B.10.10 B.10.20,$(OS_RELEASE)))
-OS_LIBS        = -ldce
-else
 OS_LIBS        = -lpthread -lrt
 endif
-endif
 ifeq ($(PTHREADS_USER), 1)
 OS_LIBS        = -lpthread
 endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/src/io/prio.c 
new/nspr-4.18/nspr/pr/src/io/prio.c
--- old/nspr-4.17/nspr/pr/src/io/prio.c 2017-09-19 18:32:26.000000000 +0200
+++ new/nspr-4.18/nspr/pr/src/io/prio.c 2018-01-18 13:37:14.000000000 +0100
@@ -137,11 +137,82 @@
     _PR_Putfd(fd);
 }
 
+#if defined(_WIN64) && defined(WIN95)
+
+PRFileDescList *_fd_waiting_for_overlapped_done = NULL;
+PRLock *_fd_waiting_for_overlapped_done_lock = NULL;
+
+void CheckOverlappedPendingSocketsAreDone()
+{
+  if (!_fd_waiting_for_overlapped_done_lock ||
+      !_fd_waiting_for_overlapped_done) {
+    return;
+  }
+
+  PR_Lock(_fd_waiting_for_overlapped_done_lock);
+
+  PRFileDescList *cur = _fd_waiting_for_overlapped_done;
+  PRFileDescList *previous = NULL;
+  while (cur) {
+    PR_ASSERT(cur->fd->secret->overlappedActive);
+    PRFileDesc *fd = cur->fd;
+    DWORD rvSent;
+    if (GetOverlappedResult((HANDLE)fd->secret->md.osfd, &fd->secret->ol, 
&rvSent, FALSE) == TRUE) {
+      fd->secret->overlappedActive = PR_FALSE;
+      PR_LOG(_pr_io_lm, PR_LOG_MIN,
+             ("CheckOverlappedPendingSocketsAreDone GetOverlappedResult 
succeeded\n"));
+    } else {
+      DWORD err = WSAGetLastError();
+      PR_LOG(_pr_io_lm, PR_LOG_MIN,
+             ("CheckOverlappedPendingSocketsAreDone GetOverlappedResult failed 
%d\n", err));
+      if (err != ERROR_IO_INCOMPLETE) {
+        fd->secret->overlappedActive = PR_FALSE;
+      }
+    }
+
+    if (!fd->secret->overlappedActive) {
+
+      _PR_MD_CLOSE_SOCKET(fd->secret->md.osfd);
+      fd->secret->state = _PR_FILEDESC_CLOSED;
+#ifdef _PR_HAVE_PEEK_BUFFER
+      if (fd->secret->peekBuffer) {
+        PR_ASSERT(fd->secret->peekBufSize > 0);
+        PR_DELETE(fd->secret->peekBuffer);
+        fd->secret->peekBufSize = 0;
+        fd->secret->peekBytes = 0;
+      }
+#endif
+
+      PR_FreeFileDesc(fd);
+
+      if (previous) {
+        previous->next = cur->next;
+      } else {
+        _fd_waiting_for_overlapped_done = cur->next;
+      }
+      PRFileDescList *del = cur;
+      cur = cur->next;
+      PR_Free(del);
+    } else {
+      previous = cur;
+      cur = cur->next;
+    }
+  }
+
+  PR_Unlock(_fd_waiting_for_overlapped_done_lock);
+}
+#endif
+
 /*
 ** Wait for some i/o to finish on one or more more poll descriptors.
 */
 PR_IMPLEMENT(PRInt32) PR_Poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime 
timeout)
 {
+#if defined(_WIN64) && defined(WIN95)
+  // For each iteration check if TFO overlapped IOs are down.
+  CheckOverlappedPendingSocketsAreDone();
+#endif
+
        return(_PR_MD_PR_POLL(pds, npds, timeout));
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/src/io/prsocket.c 
new/nspr-4.18/nspr/pr/src/io/prsocket.c
--- old/nspr-4.17/nspr/pr/src/io/prsocket.c     2017-09-19 18:32:26.000000000 
+0200
+++ new/nspr-4.18/nspr/pr/src/io/prsocket.c     2018-01-18 13:37:14.000000000 
+0100
@@ -737,6 +737,56 @@
        }
 
        if (fd->secret->state == _PR_FILEDESC_OPEN) {
+#if defined(_WIN64) && defined(WIN95)
+    /* TCP Fast Open on Windows must use ConnectEx, which uses overlapped
+     * input/output. Before closing such a socket we must cancelIO.
+     */
+    if (fd->secret->overlappedActive) {
+      PR_ASSERT(fd->secret->nonblocking);
+      if (CancelIo((HANDLE) fd->secret->md.osfd) == TRUE) {
+        PR_LOG(_pr_io_lm, PR_LOG_MIN,
+               ("SocketClose - CancelIo succeeded\n"));
+      } else {
+        DWORD err = WSAGetLastError();
+        PR_LOG(_pr_io_lm, PR_LOG_MIN,
+               ("SocketClose - CancelIo failed err=%x\n", err));
+      }
+
+      DWORD rvSent;
+      if (GetOverlappedResult((HANDLE)fd->secret->md.osfd, &fd->secret->ol, 
&rvSent, FALSE) == TRUE) {
+        fd->secret->overlappedActive = PR_FALSE;
+        PR_LOG(_pr_io_lm, PR_LOG_MIN,
+               ("SocketClose GetOverlappedResult succeeded\n"));
+      } else {
+        DWORD err = WSAGetLastError();
+        PR_LOG(_pr_io_lm, PR_LOG_MIN,
+               ("SocketClose GetOverlappedResult failed %d\n", err));
+        if (err != ERROR_IO_INCOMPLETE) {
+          _PR_MD_MAP_CONNECT_ERROR(err);
+          fd->secret->overlappedActive = PR_FALSE;
+        }
+      }
+    }
+
+    if (fd->secret->overlappedActive &&
+        _fd_waiting_for_overlapped_done_lock) {
+      // Put osfd into the list to be checked later.
+      PRFileDescList *forWaiting = PR_NEW(PRFileDescList);
+      if (!forWaiting) {
+        PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
+        return PR_FAILURE;
+      }
+      forWaiting->fd = fd;
+
+      PR_Lock(_fd_waiting_for_overlapped_done_lock);
+      forWaiting->next = _fd_waiting_for_overlapped_done;
+      _fd_waiting_for_overlapped_done = forWaiting;
+      PR_Unlock(_fd_waiting_for_overlapped_done_lock);
+
+      return PR_SUCCESS;
+    }
+#endif
+
                if (_PR_MD_CLOSE_SOCKET(fd->secret->md.osfd) < 0) {
                        return PR_FAILURE;
                }
@@ -1684,33 +1734,6 @@
                fd->secret->md.osfd = handle;
 }
 
-/* Expose OVERLAPPED if present. OVERLAPPED is implemented only on WIN95. */
-PR_IMPLEMENT(PRStatus)
-PR_EXPERIMENTAL_ONLY_IN_4_17_GetOverlappedIOHandle(PRFileDesc *fd, void **ol)
-{
-#if defined(_WIN64) && defined(WIN95)
-    *ol = NULL;
-    if (fd) {
-        fd = PR_GetIdentitiesLayer(fd, PR_NSPR_IO_LAYER);
-    }
-    if (!fd) {
-        PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
-        return PR_FAILURE;
-    }
-
-    if (!fd->secret->overlappedActive) {
-        PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
-        return PR_FAILURE;
-    }
-
-    *ol = &fd->secret->ol;
-    return PR_SUCCESS;
-#else
-    PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
-    return PR_FAILURE;
-#endif
-}
-
 /*
 ** Select compatibility
 **
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/src/md/unix/unix.c 
new/nspr-4.18/nspr/pr/src/md/unix/unix.c
--- old/nspr-4.17/nspr/pr/src/md/unix/unix.c    2017-09-19 18:32:26.000000000 
+0200
+++ new/nspr-4.18/nspr/pr/src/md/unix/unix.c    2018-01-18 13:37:14.000000000 
+0100
@@ -2854,28 +2854,11 @@
 #endif
 #endif  /* !defined(_PR_PTHREADS) */
 
-    /*
-     * Under HP-UX DCE threads, sigaction() installs a per-thread
-     * handler, so we use sigvector() to install a process-wide
-     * handler.
-     */
-#if defined(HPUX) && defined(_PR_DCETHREADS)
-    {
-        struct sigvec vec;
-
-        vec.sv_handler = SIG_IGN;
-        vec.sv_mask = 0;
-        vec.sv_flags = 0;
-        rv = sigvector(SIGPIPE, &vec, NULL);
-        PR_ASSERT(0 == rv);
-    }
-#else
     sigact.sa_handler = SIG_IGN;
     sigemptyset(&sigact.sa_mask);
     sigact.sa_flags = 0;
     rv = sigaction(SIGPIPE, &sigact, 0);
     PR_ASSERT(0 == rv);
-#endif /* HPUX && _PR_DCETHREADS */
 
     _pr_rename_lock = PR_NewLock();
     PR_ASSERT(NULL != _pr_rename_lock);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/src/md/unix/uxproces.c 
new/nspr-4.18/nspr/pr/src/md/unix/uxproces.c
--- old/nspr-4.17/nspr/pr/src/md/unix/uxproces.c        2017-09-19 
18:32:26.000000000 +0200
+++ new/nspr-4.18/nspr/pr/src/md/unix/uxproces.c        2018-01-18 
13:37:14.000000000 +0100
@@ -685,10 +685,6 @@
 
 static void pr_InstallSigchldHandler()
 {
-#if defined(HPUX) && defined(_PR_DCETHREADS)
-#error "HP-UX DCE threads have their own SIGCHLD handler"
-#endif
-
     struct sigaction act, oact;
     int rv;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/src/md/windows/ntthread.c 
new/nspr-4.18/nspr/pr/src/md/windows/ntthread.c
--- old/nspr-4.17/nspr/pr/src/md/windows/ntthread.c     2017-09-19 
18:32:26.000000000 +0200
+++ new/nspr-4.18/nspr/pr/src/md/windows/ntthread.c     2018-01-18 
13:37:14.000000000 +0100
@@ -27,6 +27,9 @@
 extern __declspec(thread) PRThread *_pr_io_restarted_io;
 extern DWORD _pr_io_restartedIOIndex;
 
+typedef HRESULT (WINAPI *SETTHREADDESCRIPTION)(HANDLE, PCWSTR);
+static SETTHREADDESCRIPTION sSetThreadDescription = NULL;
+
 /* Must check the restarted_io *before* decrementing no_sched to 0 */
 #define POST_SWITCH_WORK() \
     PR_BEGIN_MACRO \
@@ -79,6 +82,8 @@
 void
 _PR_MD_EARLY_INIT()
 {
+    HMODULE hModule;
+
     _MD_NEW_LOCK( &_nt_idleLock );
     _nt_idleCount = 0;
     PR_INIT_CLIST(&_nt_idleList);
@@ -98,6 +103,15 @@
         _pr_intsOffIndex = TlsAlloc();
         _pr_io_restartedIOIndex = TlsAlloc();
     }
+
+    // SetThreadDescription is Windows 10 build 1607+
+    hModule = GetModuleHandleW(L"kernel32.dll");
+    if (hModule) {
+        sSetThreadDescription =
+            (SETTHREADDESCRIPTION) GetProcAddress(
+                                       hModule,
+                                       "SetThreadDescription");
+    }
 }
 
 void _PR_MD_CLEANUP_BEFORE_EXIT(void)
@@ -293,7 +307,16 @@
 {
 #ifdef _MSC_VER
    THREADNAME_INFO info;
+#endif
+
+   if (sSetThreadDescription) {
+      WCHAR wideName[MAX_PATH];
+      if (MultiByteToWideChar(CP_ACP, 0, name, -1, wideName, MAX_PATH)) {
+         sSetThreadDescription(GetCurrentThread(), wideName);
+      }
+   }
 
+#ifdef _MSC_VER
    if (!IsDebuggerPresent())
       return;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/src/md/windows/w95sock.c 
new/nspr-4.18/nspr/pr/src/md/windows/w95sock.c
--- old/nspr-4.17/nspr/pr/src/md/windows/w95sock.c      2017-09-19 
18:32:26.000000000 +0200
+++ new/nspr-4.18/nspr/pr/src/md/windows/w95sock.c      2018-01-18 
13:37:14.000000000 +0100
@@ -382,6 +382,11 @@
 _PR_MD_TCPSENDTO(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
                  const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime 
timeout)
 {
+    if (!_fd_waiting_for_overlapped_done_lock) {
+        PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
+        return PR_FAILURE;
+    }
+
     if (PR_CallOnce(&_pr_has_connectex_once, _pr_set_connectex) != PR_SUCCESS) 
{
         PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
         return PR_FAILURE;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/src/md/windows/w95thred.c 
new/nspr-4.18/nspr/pr/src/md/windows/w95thred.c
--- old/nspr-4.17/nspr/pr/src/md/windows/w95thred.c     2017-09-19 
18:32:26.000000000 +0200
+++ new/nspr-4.18/nspr/pr/src/md/windows/w95thred.c     2018-01-18 
13:37:14.000000000 +0100
@@ -1,3 +1,4 @@
+
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -27,14 +28,32 @@
 int                           _pr_intsOff = 0; 
 _PRInterruptTable             _pr_interruptTable[] = { { 0 } };
 
+typedef HRESULT (WINAPI *SETTHREADDESCRIPTION)(HANDLE, PCWSTR);
+static SETTHREADDESCRIPTION sSetThreadDescription = NULL;
+
 void
 _PR_MD_EARLY_INIT()
 {
+    HMODULE hModule;
+
 #ifndef _PR_USE_STATIC_TLS
     _pr_currentThreadIndex = TlsAlloc();
     _pr_lastThreadIndex = TlsAlloc();
     _pr_currentCPUIndex = TlsAlloc();
 #endif
+
+#if defined(_WIN64) && defined(WIN95)
+    _fd_waiting_for_overlapped_done_lock = PR_NewLock();
+#endif
+
+    // SetThreadDescription is Windows 10 build 1607+
+    hModule = GetModuleHandleW(L"kernel32.dll");
+    if (hModule) {
+        sSetThreadDescription =
+            (SETTHREADDESCRIPTION) GetProcAddress(
+                                       hModule,
+                                       "SetThreadDescription");
+    }
 }
 
 void _PR_MD_CLEANUP_BEFORE_EXIT(void)
@@ -50,6 +69,29 @@
     TlsFree(_pr_lastThreadIndex);
     TlsFree(_pr_currentCPUIndex);
 #endif
+
+#if defined(_WIN64) && defined(WIN95)
+    // For each iteration check if TFO overlapped IOs are down.
+    if (_fd_waiting_for_overlapped_done_lock) {
+        PRIntervalTime delay = PR_MillisecondsToInterval(1000);
+        PRFileDescList *cur;
+        do {
+            CheckOverlappedPendingSocketsAreDone();
+
+            PR_Lock(_fd_waiting_for_overlapped_done_lock);
+            cur = _fd_waiting_for_overlapped_done;
+            PR_Unlock(_fd_waiting_for_overlapped_done_lock);
+#if defined(DO_NOT_WAIT_FOR_CONNECT_OVERLAPPED_OPERATIONS)
+            cur = NULL;
+#endif
+            if (cur) {
+                PR_Sleep(delay); // wait another 1s.
+            }
+        } while (cur);
+
+        PR_DestroyLock(_fd_waiting_for_overlapped_done_lock);
+    }
+#endif
 }
 
 PRStatus
@@ -190,7 +232,16 @@
 {
 #ifdef _MSC_VER
    THREADNAME_INFO info;
+#endif
+
+   if (sSetThreadDescription) {
+      WCHAR wideName[MAX_PATH];
+      if (MultiByteToWideChar(CP_ACP, 0, name, -1, wideName, MAX_PATH)) {
+         sSetThreadDescription(GetCurrentThread(), wideName);
+      }
+   }
 
+#ifdef _MSC_VER
    if (!IsDebuggerPresent())
       return;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/src/misc/pratom.c 
new/nspr-4.18/nspr/pr/src/misc/pratom.c
--- old/nspr-4.17/nspr/pr/src/misc/pratom.c     2017-09-19 18:32:26.000000000 
+0200
+++ new/nspr-4.18/nspr/pr/src/misc/pratom.c     2018-01-18 13:37:14.000000000 
+0100
@@ -23,7 +23,7 @@
 
 #if !defined(_PR_HAVE_ATOMIC_OPS)
 
-#if defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)
+#if defined(_PR_PTHREADS)
 /*
  * PR_AtomicDecrement() is used in NSPR's thread-specific data
  * destructor.  Because thread-specific data destructors may be
@@ -190,7 +190,7 @@
     pthread_mutex_unlock(&atomic_locks[idx]);
     return rv;
 }
-#else  /* _PR_PTHREADS && !_PR_DCETHREADS */
+#else  /* _PR_PTHREADS */
 /*
  * We use a single lock for all the emulated atomic operations.
  * The lock contention should be acceptable.
@@ -259,7 +259,7 @@
     PR_Unlock(atomic_lock);
     return rv;
 }
-#endif  /* _PR_PTHREADS && !_PR_DCETHREADS */
+#endif  /* _PR_PTHREADS */
 
 #endif  /* !_PR_HAVE_ATOMIC_OPS */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/src/pthreads/ptio.c 
new/nspr-4.18/nspr/pr/src/pthreads/ptio.c
--- old/nspr-4.17/nspr/pr/src/pthreads/ptio.c   2017-09-19 18:32:26.000000000 
+0200
+++ new/nspr-4.18/nspr/pr/src/pthreads/ptio.c   2018-01-18 13:37:14.000000000 
+0100
@@ -1895,19 +1895,6 @@
        PRInt32 tmp_amount = amount;
 #endif
 
-    /*
-     * Under HP-UX DCE threads, pthread.h includes dce/cma_ux.h,
-     * which has the following:
-     *     #  define send        cma_send
-     *     extern int  cma_send (int , void *, int, int );
-     * So we need to cast away the 'const' of argument #2 for send().
-     */
-#if defined (HPUX) && defined(_PR_DCETHREADS)
-#define PT_SENDBUF_CAST (void *)
-#else
-#define PT_SENDBUF_CAST
-#endif
-
     if (pt_TestAbort()) return bytes;
 
     /*
@@ -1918,9 +1905,9 @@
 #if defined(SOLARIS)
     PR_ASSERT(0 == flags);
 retry:
-    bytes = write(fd->secret->md.osfd, PT_SENDBUF_CAST buf, tmp_amount);
+    bytes = write(fd->secret->md.osfd, buf, tmp_amount);
 #else
-    bytes = send(fd->secret->md.osfd, PT_SENDBUF_CAST buf, amount, flags);
+    bytes = send(fd->secret->md.osfd, buf, amount, flags);
 #endif
     syserrno = errno;
 
@@ -4744,14 +4731,6 @@
     return osfd;
 }  /* PR_FileDesc2NativeHandle */
 
-/* Expose OVERLAPPED if present. OVERLAPPED is implemented only on WIN95. */
-PR_IMPLEMENT(PRStatus)
-PR_EXPERIMENTAL_ONLY_IN_4_17_GetOverlappedIOHandle(PRFileDesc *fd, void **ol)
-{
-    PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
-    return PR_FAILURE;
-}
-
 PR_IMPLEMENT(void) PR_ChangeFileDescNativeHandle(PRFileDesc *fd,
     PRInt32 handle)
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/src/pthreads/ptsynch.c 
new/nspr-4.18/nspr/pr/src/pthreads/ptsynch.c
--- old/nspr-4.17/nspr/pr/src/pthreads/ptsynch.c        2017-09-19 
18:32:26.000000000 +0200
+++ new/nspr-4.18/nspr/pr/src/pthreads/ptsynch.c        2018-01-18 
13:37:14.000000000 +0100
@@ -23,11 +23,6 @@
 
 #if defined(DEBUG)
 extern PTDebug pt_debug;  /* this is shared between several modules */
-
-#if defined(_PR_DCETHREADS)
-static pthread_t pt_zero_tid;  /* a null pthread_t (pthread_t is a struct
-                                * in DCE threads) to compare with */
-#endif  /* defined(_PR_DCETHREADS) */
 #endif  /* defined(DEBUG) */
 
 #if defined(FREEBSD)
@@ -263,12 +258,7 @@
     rv = pthread_cond_timedwait(cv, ml, &tmo);
 
     /* NSPR doesn't report timeouts */
-#ifdef _PR_DCETHREADS
-    if (rv == -1) return (errno == EAGAIN) ? 0 : errno;
-    else return rv;
-#else
     return (rv == ETIMEDOUT) ? 0 : rv;
-#endif
 }  /* pt_TimedWait */
 
 
@@ -1171,14 +1161,14 @@
 PR_IMPLEMENT(PRStatus) PRP_TryLock(PRLock *lock)
 {
     PRIntn rv = pthread_mutex_trylock(&lock->mutex);
-    if (rv == PT_TRYLOCK_SUCCESS)
+    if (rv == 0)
     {
         PR_ASSERT(PR_FALSE == lock->locked);
         lock->locked = PR_TRUE;
         lock->owner = pthread_self();
     }
     /* XXX set error code? */
-    return (PT_TRYLOCK_SUCCESS == rv) ? PR_SUCCESS : PR_FAILURE;
+    return (0 == rv) ? PR_SUCCESS : PR_FAILURE;
 }  /* PRP_TryLock */
 
 PR_IMPLEMENT(PRCondVar*) PRP_NewNakedCondVar(void)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/src/pthreads/ptthread.c 
new/nspr-4.18/nspr/pr/src/pthreads/ptthread.c
--- old/nspr-4.17/nspr/pr/src/pthreads/ptthread.c       2017-09-19 
18:32:26.000000000 +0200
+++ new/nspr-4.18/nspr/pr/src/pthreads/ptthread.c       2018-01-18 
13:37:14.000000000 +0100
@@ -9,7 +9,7 @@
 ** Exports:            ptthread.h
 */
 
-#if defined(_PR_PTHREADS) || defined(_PR_DCETHREADS)
+#if defined(_PR_PTHREADS)
 
 #include "prlog.h"
 #include "primpl.h"
@@ -58,7 +58,7 @@
     pthread_key_t key;          /* thread private data key */
     PRBool keyCreated;          /* whether 'key' should be deleted */
     PRThread *first, *last;     /* list of threads we know about */
-#if defined(_PR_DCETHREADS) || _POSIX_THREAD_PRIORITY_SCHEDULING > 0
+#if _POSIX_THREAD_PRIORITY_SCHEDULING > 0
     PRInt32 minPrio, maxPrio;   /* range of scheduling priorities */
 #endif
 } pt_book = {0};
@@ -67,7 +67,7 @@
 static void _pt_thread_death_internal(void *arg, PRBool callDestructors);
 static void init_pthread_gc_support(void);
 
-#if defined(_PR_DCETHREADS) || _POSIX_THREAD_PRIORITY_SCHEDULING > 0
+#if _POSIX_THREAD_PRIORITY_SCHEDULING > 0
 static PRIntn pt_PriorityMap(PRThreadPriority pri)
 {
 #ifdef NTO
@@ -148,21 +148,6 @@
     }
 #endif
 
-    /*
-    ** DCE Threads can't detach during creation, so do it late.
-    ** I would like to do it only here, but that doesn't seem
-    ** to work.
-    */
-#if defined(_PR_DCETHREADS)
-    if (detached)
-    {
-        /* pthread_detach() modifies its argument, so we must pass a copy */
-        pthread_t self = id;
-        rv = pthread_detach(&self);
-        PR_ASSERT(0 == rv);
-    }
-#endif /* defined(_PR_DCETHREADS) */
-
     /* Set up the thread stack information */
     _PR_InitializeStack(thred->stack);
 
@@ -329,7 +314,7 @@
 
     if (EPERM != pt_schedpriv)
     {
-#if !defined(_PR_DCETHREADS) && _POSIX_THREAD_PRIORITY_SCHEDULING > 0
+#if _POSIX_THREAD_PRIORITY_SCHEDULING > 0
         struct sched_param schedule;
 #endif
 
@@ -340,10 +325,7 @@
 
         /* Use the default scheduling policy */
 
-#if defined(_PR_DCETHREADS)
-        rv = pthread_attr_setprio(&tattr, pt_PriorityMap(priority));
-        PR_ASSERT(0 == rv);
-#elif _POSIX_THREAD_PRIORITY_SCHEDULING > 0
+#if _POSIX_THREAD_PRIORITY_SCHEDULING > 0
         rv = pthread_attr_getschedparam(&tattr, &schedule);
         PR_ASSERT(0 == rv);
         schedule.sched_priority = pt_PriorityMap(priority);
@@ -353,19 +335,13 @@
         rv = pthread_attr_setschedpolicy(&tattr, SCHED_RR); /* Round Robin */
         PR_ASSERT(0 == rv);
 #endif
-#endif /* !defined(_PR_DCETHREADS) */
+#endif /* _POSIX_THREAD_PRIORITY_SCHEDULING > 0 */
     }
 
-    /*
-     * DCE threads can't set detach state before creating the thread.
-     * AIX can't set detach late. Why can't we all just get along?
-     */
-#if !defined(_PR_DCETHREADS)
     rv = pthread_attr_setdetachstate(&tattr,
         ((PR_JOINABLE_THREAD == state) ?
             PTHREAD_CREATE_JOINABLE : PTHREAD_CREATE_DETACHED));
     PR_ASSERT(0 == rv);
-#endif /* !defined(_PR_DCETHREADS) */
 
     /*
      * If stackSize is 0, we use the default pthread stack size.
@@ -456,7 +432,6 @@
          */
         rv = _PT_PTHREAD_CREATE(&id, tattr, _pt_root, thred);
 
-#if !defined(_PR_DCETHREADS)
         if (EPERM == rv)
         {
 #if defined(IRIX)
@@ -482,15 +457,10 @@
 #endif /* IRIX */
             rv = _PT_PTHREAD_CREATE(&id, tattr, _pt_root, thred);
         }
-#endif
 
         if (0 != rv)
         {
-#if defined(_PR_DCETHREADS)
-            PRIntn oserr = errno;
-#else
             PRIntn oserr = rv;
-#endif
             PR_Lock(pt_book.ml);
             if (thred->state & PT_THREAD_SYSTEM)
                 pt_book.system -= 1;
@@ -602,10 +572,6 @@
         PR_ASSERT(rv == 0 && result == NULL);
         if (0 == rv)
         {
-#ifdef _PR_DCETHREADS
-            rv = pthread_detach(&id);
-            PR_ASSERT(0 == rv);
-#endif
             /*
              * PR_FALSE, because the thread already called the TPD
              * destructors before exiting _pt_root.
@@ -693,10 +659,7 @@
     else if ((PRIntn)PR_PRIORITY_LAST < (PRIntn)newPri)
         newPri = PR_PRIORITY_LAST;
 
-#if defined(_PR_DCETHREADS)
-    rv = pthread_setprio(thred->id, pt_PriorityMap(newPri));
-    /* pthread_setprio returns the old priority */
-#elif _POSIX_THREAD_PRIORITY_SCHEDULING > 0
+#if _POSIX_THREAD_PRIORITY_SCHEDULING > 0
     if (EPERM != pt_schedpriv)
     {
         int policy;
@@ -927,7 +890,7 @@
     pthread_init();
 #endif
 
-#if defined(_PR_DCETHREADS) || _POSIX_THREAD_PRIORITY_SCHEDULING > 0
+#if _POSIX_THREAD_PRIORITY_SCHEDULING > 0
 #if defined(FREEBSD)
     {
     pthread_attr_t attr;
@@ -1161,11 +1124,7 @@
 
 PR_IMPLEMENT(PRUint32) PR_GetThreadID(PRThread *thred)
 {
-#if defined(_PR_DCETHREADS)
-    return (PRUint32)&thred->id;  /* this is really a sham! */
-#else
     return (PRUint32)thred->id;  /* and I don't know what they will do with it 
*/
-#endif
 }
 
 /*
@@ -1197,18 +1156,6 @@
  * Garbage collection support follows.
  */
 
-#if defined(_PR_DCETHREADS)
-
-/*
- * statics for Garbage Collection support.  We don't need to protect these
- * signal masks since the garbage collector itself is protected by a lock
- * and multiple threads will not be garbage collecting at the same time.
- */
-static sigset_t javagc_vtalarm_sigmask;
-static sigset_t javagc_intsoff_sigmask;
-
-#else /* defined(_PR_DCETHREADS) */
-
 /* a bogus signal mask for forcing a timed wait */
 /* Not so bogus in AIX as we really do a sigwait */
 static sigset_t sigwait_set;
@@ -1224,8 +1171,6 @@
 static void null_signal_handler(PRIntn sig);
 #endif
 
-#endif /* defined(_PR_DCETHREADS) */
-
 /*
  * Linux pthreads use SIGUSR1 and SIGUSR2 internally, which
  * conflict with the use of these two signals in our GC support.
@@ -1236,12 +1181,6 @@
 #ifndef SYMBIAN
     PRIntn rv;
 
-#if defined(_PR_DCETHREADS)
-       rv = sigemptyset(&javagc_vtalarm_sigmask);
-    PR_ASSERT(0 == rv);
-       rv = sigaddset(&javagc_vtalarm_sigmask, SIGVTALRM);
-    PR_ASSERT(0 == rv);
-#else  /* defined(_PR_DCETHREADS) */
        {
            struct sigaction sigact_usr2;
 
@@ -1269,7 +1208,6 @@
            PR_ASSERT(0 ==rv); 
     }
 #endif  /* defined(PT_NO_SIGTIMEDWAIT) */
-#endif /* defined(_PR_DCETHREADS) */
 #endif /* SYMBIAN */
 }
 
@@ -1300,10 +1238,8 @@
     PRThread* thred = pt_book.first;
 
 #if defined(DEBUG) || defined(FORCE_PR_ASSERT)
-#if !defined(_PR_DCETHREADS)
     PRThread *me = PR_GetCurrentThread();
 #endif
-#endif
 
     PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("Begin PR_EnumerateThreads\n"));
     /*
@@ -1331,9 +1267,7 @@
 
         if (_PT_IS_GCABLE_THREAD(thred))
         {
-#if !defined(_PR_DCETHREADS)
             PR_ASSERT((thred == me) || (thred->suspend & PT_THREAD_SUSPENDED));
-#endif
             PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, 
                    ("In PR_EnumerateThreads callback thread %p thid = %X\n", 
                     thred, thred->id));
@@ -1361,8 +1295,6 @@
  * proceed until the thread is suspended or resumed.
  */
 
-#if !defined(_PR_DCETHREADS)
-
 /*
  * In the signal handler, we can not use condition variable notify or wait.
  * This does not work consistently across all pthread platforms.  We also can 
not 
@@ -1661,78 +1593,6 @@
     return thred->sp;
 }  /* PR_GetSP */
 
-#else /* !defined(_PR_DCETHREADS) */
-
-static pthread_once_t pt_gc_support_control = pthread_once_init;
-
-/*
- * For DCE threads, there is no pthread_kill or a way of suspending or 
resuming a
- * particular thread.  We will just disable the preemption (virtual timer 
alarm) and
- * let the executing thread finish the garbage collection.  This stops all 
other threads
- * (GC able or not) and is very inefficient but there is no other choice.
- */
-PR_IMPLEMENT(void) PR_SuspendAll()
-{
-    PRIntn rv;
-
-    rv = pthread_once(&pt_gc_support_control, init_pthread_gc_support);
-    PR_ASSERT(0 == rv);  /* returns -1 on failure */
-#ifdef DEBUG
-    suspendAllOn = PR_TRUE;
-#endif
-    PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("Begin PR_SuspendAll\n"));
-    /* 
-     * turn off preemption - i.e add virtual alarm signal to the set of 
-     * blocking signals 
-     */
-    rv = sigprocmask(
-        SIG_BLOCK, &javagc_vtalarm_sigmask, &javagc_intsoff_sigmask);
-    PR_ASSERT(0 == rv);
-    suspendAllSuspended = PR_TRUE;
-    PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("End PR_SuspendAll\n"));
-}  /* PR_SuspendAll */
-
-PR_IMPLEMENT(void) PR_ResumeAll()
-{
-    PRIntn rv;
-    
-    suspendAllSuspended = PR_FALSE;
-    PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("Begin PR_ResumeAll\n"));
-    /* turn on preemption - i.e re-enable virtual alarm signal */
-
-    rv = sigprocmask(SIG_SETMASK, &javagc_intsoff_sigmask, (sigset_t *)NULL);
-    PR_ASSERT(0 == rv);
-#ifdef DEBUG
-    suspendAllOn = PR_FALSE;
-#endif
-
-    PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("End PR_ResumeAll\n"));
-}  /* PR_ResumeAll */
-
-/* Return the stack pointer for the given thread- used by the GC */
-PR_IMPLEMENT(void*)PR_GetSP(PRThread *thred)
-{
-       pthread_t tid = thred->id;
-       char *thread_tcb, *top_sp;
-
-       /*
-        * For HPUX DCE threads, pthread_t is a struct with the
-        * following three fields (see pthread.h, dce/cma.h):
-        *     cma_t_address       field1;
-        *     short int           field2;
-        *     short int           field3;
-        * where cma_t_address is typedef'd to be either void*
-        * or char*.
-        */
-       PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("Begin PR_GetSP\n"));
-       thread_tcb = (char*)tid.field1;
-       top_sp = *(char**)(thread_tcb + 128);
-       PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("End PR_GetSP %p \n", top_sp));
-       return top_sp;
-}  /* PR_GetSP */
-
-#endif /* !defined(_PR_DCETHREADS) */
-
 PR_IMPLEMENT(PRStatus) PR_SetCurrentThreadName(const char *name)
 {
     PRThread *thread;
@@ -1817,6 +1677,6 @@
     return thread->name;
 }
 
-#endif  /* defined(_PR_PTHREADS) || defined(_PR_DCETHREADS) */
+#endif  /* defined(_PR_PTHREADS) */
 
 /* ptthread.c */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/src/threads/prrwlock.c 
new/nspr-4.18/nspr/pr/src/threads/prrwlock.c
--- old/nspr-4.17/nspr/pr/src/threads/prrwlock.c        2017-09-19 
18:32:26.000000000 +0200
+++ new/nspr-4.18/nspr/pr/src/threads/prrwlock.c        2018-01-18 
13:37:14.000000000 +0100
@@ -7,7 +7,7 @@
 
 #include <string.h>
 
-#if defined(HPUX) && defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)
+#if defined(HPUX) && defined(_PR_PTHREADS)
 
 #include <pthread.h>
 #define HAVE_UNIX98_RWLOCK
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/tests/Makefile.in 
new/nspr-4.18/nspr/pr/tests/Makefile.in
--- old/nspr-4.17/nspr/pr/tests/Makefile.in     2017-09-19 18:32:26.000000000 
+0200
+++ new/nspr-4.18/nspr/pr/tests/Makefile.in     2018-01-18 13:37:14.000000000 
+0100
@@ -373,9 +373,6 @@
 ifeq (,$(filter-out FreeBSD OpenBSD BSD_OS QNX Darwin OpenUNIX,$(OS_ARCH)))
 LIBPTHREAD =
 endif
-ifeq ($(OS_ARCH)$(basename $(OS_RELEASE)),HP-UXB.10)
-LIBPTHREAD = -ldce
-endif
 endif
 
 ifeq ($(OS_TARGET),Android)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/tests/attach.c 
new/nspr-4.18/nspr/pr/tests/attach.c
--- old/nspr-4.17/nspr/pr/tests/attach.c        2017-09-19 18:32:26.000000000 
+0200
+++ new/nspr-4.18/nspr/pr/tests/attach.c        2018-01-18 13:37:14.000000000 
+0100
@@ -111,16 +111,6 @@
 static void * threadStartFunc(void *arg)
 #endif
 {
-#ifdef _PR_DCETHREADS
-    {
-        int rv;
-        pthread_t self = pthread_self();
-        rv = pthread_detach(&self);
-        if (debug_mode) PR_ASSERT(0 == rv);
-               else if (0 != rv) failed_already=1;
-    }
-#endif
-
     Measure(AttachDetach, "Attach/Detach");
 
 #ifndef IRIX
@@ -206,14 +196,12 @@
                goto exit_now;
        }
        
-#ifndef _PR_DCETHREADS
     rv = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
     if (debug_mode) PR_ASSERT(0 == rv);
        else if (0 != rv) {
                failed_already=1;
                goto exit_now;
        }
-#endif  /* !_PR_DCETHREADS */
     rv = _PT_PTHREAD_CREATE(&threadID, attr, threadStartFunc, NULL);
     if (rv != 0) {
                        fprintf(stderr, "thread creation failed: error code 
%d\n", rv);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/tests/dceemu.c 
new/nspr-4.18/nspr/pr/tests/dceemu.c
--- old/nspr-4.17/nspr/pr/tests/dceemu.c        2017-09-19 18:32:26.000000000 
+0200
+++ new/nspr-4.18/nspr/pr/tests/dceemu.c        2018-01-18 13:37:14.000000000 
+0100
@@ -29,8 +29,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#if defined(_PR_DCETHREADS)
-
 PRIntn failed_already=0;
 PRIntn debug_mode=0;
 
@@ -80,20 +78,13 @@
 
 }  /* prmain */
 
-#endif /* #if defined(_PR_DCETHREADS) */
-
 int main(int argc, char **argv)
 {
-
-#if defined(_PR_DCETHREADS)
     PR_Initialize(prmain, argc, argv, 0);
     if(failed_already)    
         return 1;
     else
         return 0;
-#else
-    return 0;
-#endif
 }  /* main */
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/tests/foreign.c 
new/nspr-4.18/nspr/pr/tests/foreign.c
--- old/nspr-4.17/nspr/pr/tests/foreign.c       2017-09-19 18:32:26.000000000 
+0200
+++ new/nspr-4.18/nspr/pr/tests/foreign.c       2018-01-18 13:37:14.000000000 
+0100
@@ -52,7 +52,7 @@
 
 #define DPRINTF(arg)   if (_debug_on) PR_fprintf arg
 
-#if defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)
+#if defined(_PR_PTHREADS)
 #include <pthread.h>
 #include "md/_pth.h"
 static void *pthread_start(void *arg)
@@ -63,7 +63,7 @@
     start(data);
     return NULL;
 }  /* pthread_start */
-#endif /* defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) */
+#endif /* defined(_PR_PTHREADS) */
 
 #if defined(IRIX) && !defined(_PR_PTHREADS)
 #include <sys/types.h>
@@ -109,7 +109,7 @@
         }
         break;
     case thread_pthread:
-#if defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)
+#if defined(_PR_PTHREADS)
         {
             int rv;
             pthread_t id;
@@ -137,7 +137,7 @@
         PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
         rv = PR_FAILURE;
         break;
-#endif /* defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) */
+#endif /* defined(_PR_PTHREADS) */
 
     case thread_sproc:
 #if defined(IRIX) && !defined(_PR_PTHREADS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/tests/forktest.c 
new/nspr-4.18/nspr/pr/tests/forktest.c
--- old/nspr-4.17/nspr/pr/tests/forktest.c      2017-09-19 18:32:26.000000000 
+0200
+++ new/nspr-4.18/nspr/pr/tests/forktest.c      2018-01-18 13:37:14.000000000 
+0100
@@ -196,51 +196,6 @@
     return;
 }
 
-#ifdef _PR_DCETHREADS
-
-#include <syscall.h>
-
-pid_t PR_UnixFork1(void)
-{
-    pid_t parent = getpid();
-    int rv = syscall(SYS_fork);
-
-    if (rv == -1) {
-        return (pid_t) -1;
-    } else {
-        /* For each process, rv is the pid of the other process */
-        if (rv == parent) {
-            /* the child */
-            return 0;
-        } else {
-            /* the parent */
-            return rv;
-        }
-    }
-}
-
-#elif defined(SOLARIS)
-
-/*
- * It seems like that in Solaris 2.4 one must call fork1() if the
- * the child process is going to use thread functions.  Solaris 2.5
- * doesn't have this problem. Calling fork() also works. 
- */
-
-pid_t PR_UnixFork1(void)
-{
-    return fork1();
-}
-
-#else
-
-pid_t PR_UnixFork1(void)
-{
-    return fork();
-}
-
-#endif  /* PR_DCETHREADS */
-
 int main(int argc, char **argv)
 {
     pid_t pid;
@@ -250,7 +205,7 @@
 
     DoIO();
 
-    pid = PR_UnixFork1();
+    pid = fork();
 
     if (pid  == (pid_t) -1) {
         fprintf(stderr, "Fork failed: errno %d\n", errno);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/tests/provider.c 
new/nspr-4.18/nspr/pr/tests/provider.c
--- old/nspr-4.17/nspr/pr/tests/provider.c      2017-09-19 18:32:26.000000000 
+0200
+++ new/nspr-4.18/nspr/pr/tests/provider.c      2018-01-18 13:37:14.000000000 
+0100
@@ -606,7 +606,7 @@
     void *arg;
 } StartObject;
 
-#if defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)
+#if defined(_PR_PTHREADS)
 #include "md/_pth.h"
 #include <pthread.h>
 
@@ -619,7 +619,7 @@
     start(data);
     return NULL;
 }  /* pthread_start */
-#endif /* defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) */
+#endif /* defined(_PR_PTHREADS) */
 
 #if defined(IRIX) && !defined(_PR_PTHREADS)
 #include <sys/types.h>
@@ -657,10 +657,10 @@
         rv = PR_JoinThread(thread);
         break;
     case thread_pthread:
-#if defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)
+#if defined(_PR_PTHREADS)
         rv = PR_SUCCESS;
         break;
-#endif /* defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) */
+#endif /* defined(_PR_PTHREADS) */
     case thread_win32:
 #if defined(WIN32)
         rv = PR_SUCCESS;
@@ -690,7 +690,7 @@
         }
         break;
     case thread_pthread:
-#if defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)
+#if defined(_PR_PTHREADS)
         {
             int rv;
             pthread_t id;
@@ -717,7 +717,7 @@
 #else
         PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
         rv = PR_FAILURE;
-#endif /* defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS) */
+#endif /* defined(_PR_PTHREADS) */
         break;
 
     case thread_sproc:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/tests/socket.c 
new/nspr-4.18/nspr/pr/tests/socket.c
--- old/nspr-4.17/nspr/pr/tests/socket.c        2017-09-19 18:32:26.000000000 
+0200
+++ new/nspr-4.18/nspr/pr/tests/socket.c        2018-01-18 13:37:14.000000000 
+0100
@@ -21,7 +21,7 @@
 #ifdef XP_UNIX
 #include <sys/mman.h>
 #endif
-#if defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)
+#if defined(_PR_PTHREADS)
 #include <pthread.h>
 #endif
 
@@ -313,7 +313,7 @@
 PRInt32 native_thread = 0;
 
        PR_ASSERT(state == PR_UNJOINABLE_THREAD);
-#if (defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)) || defined(WIN32)
+#if defined(_PR_PTHREADS) || defined(WIN32)
        switch(index %  4) {
                case 0:
                        scope = (PR_LOCAL_THREAD);
@@ -332,7 +332,7 @@
                        break;
        }
        if (native_thread) {
-#if defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)
+#if defined(_PR_PTHREADS)
                pthread_t tid;
                if (!pthread_create(&tid, NULL, (void * (*)(void *)) start, 
arg))
                        return((PRThread *) tid);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/tests/testfile.c 
new/nspr-4.18/nspr/pr/tests/testfile.c
--- old/nspr-4.17/nspr/pr/tests/testfile.c      2017-09-19 18:32:26.000000000 
+0200
+++ new/nspr-4.18/nspr/pr/tests/testfile.c      2018-01-18 13:37:14.000000000 
+0100
@@ -13,7 +13,7 @@
 #include <windows.h>
 #include <process.h>
 #endif
-#if defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)
+#if defined(_PR_PTHREADS)
 #include <pthread.h>
 #endif
 #ifdef SYMBIAN
@@ -104,7 +104,7 @@
 
        PR_ASSERT(state == PR_UNJOINABLE_THREAD);
 
-#if (defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)) || defined(WIN32) || 
defined(XP_OS2)
+#if defined(_PR_PTHREADS) || defined(WIN32) || defined(XP_OS2)
 
        switch(index %  4) {
                case 0:
@@ -124,7 +124,7 @@
                        break;
        }
        if (native_thread) {
-#if defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)
+#if defined(_PR_PTHREADS)
                pthread_t tid;
                if (!pthread_create(&tid, NULL, start, arg))
                        return((PRThread *) tid);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/tests/thrpool_client.c 
new/nspr-4.18/nspr/pr/tests/thrpool_client.c
--- old/nspr-4.17/nspr/pr/tests/thrpool_client.c        2017-09-19 
18:32:26.000000000 +0200
+++ new/nspr-4.18/nspr/pr/tests/thrpool_client.c        2018-01-18 
13:37:14.000000000 +0100
@@ -21,7 +21,7 @@
 #ifdef XP_UNIX
 #include <sys/mman.h>
 #endif
-#if defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)
+#if defined(_PR_PTHREADS)
 #include <pthread.h>
 #endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/tests/thrpool_server.c 
new/nspr-4.18/nspr/pr/tests/thrpool_server.c
--- old/nspr-4.17/nspr/pr/tests/thrpool_server.c        2017-09-19 
18:32:26.000000000 +0200
+++ new/nspr-4.18/nspr/pr/tests/thrpool_server.c        2018-01-18 
13:37:14.000000000 +0100
@@ -21,7 +21,7 @@
 #ifdef XP_UNIX
 #include <sys/mman.h>
 #endif
-#if defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)
+#if defined(_PR_PTHREADS)
 #include <pthread.h>
 #endif
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/nspr-4.17/nspr/pr/tests/vercheck.c 
new/nspr-4.18/nspr/pr/tests/vercheck.c
--- old/nspr-4.17/nspr/pr/tests/vercheck.c      2017-09-19 18:32:26.000000000 
+0200
+++ new/nspr-4.18/nspr/pr/tests/vercheck.c      2018-01-18 13:37:14.000000000 
+0100
@@ -40,7 +40,7 @@
     "4.10", "4.10.1", "4.10.2", "4.10.3", "4.10.4",
     "4.10.5", "4.10.6", "4.10.7", "4.10.8", "4.10.9",
     "4.10.10", "4.11", "4.12", "4.13", "4.14", "4.15",
-    "4.16",
+    "4.16", "4.17",
     PR_VERSION
 };
 
@@ -56,8 +56,8 @@
     "3.0", "3.0.1",
     "3.1", "3.1.1", "3.1.2", "3.1.3",
     "3.5", "3.5.1",
-    "4.17.1",
-    "4.18", "4.18.1",
+    "4.18.1",
+    "4.19", "4.19.1",
     "10.0", "11.1", "12.14.20"
 };
 


Reply via email to