mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
Revert "Update NSPR to 4.18"
This reverts commit 8781f745556be5d7402d0f3adc67ecfe32fe04a0.
This commit is contained in:
parent
9e32522120
commit
cd3167e35d
32 changed files with 395 additions and 295 deletions
|
|
@ -14,7 +14,29 @@
|
|||
#define _PR_MD_DISABLE_CLOCK_INTERRUPTS()
|
||||
#define _PR_MD_ENABLE_CLOCK_INTERRUPTS()
|
||||
|
||||
#if defined(BSDI)
|
||||
/* 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)
|
||||
/*
|
||||
* Mutex and condition attributes are not supported. The attr
|
||||
* argument to pthread_mutex_init() and pthread_cond_init() must
|
||||
|
|
@ -84,7 +106,13 @@
|
|||
* PR_EnterMonitor calls any of these functions, infinite
|
||||
* recursion ensues.
|
||||
*/
|
||||
#if defined(IRIX) || defined(OSF1) || defined(AIX) || defined(SOLARIS) \
|
||||
#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) \
|
||||
|| defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
|
||||
|| defined(HPUX) || defined(FREEBSD) \
|
||||
|| defined(NETBSD) || defined(OPENBSD) || defined(BSDI) \
|
||||
|
|
@ -97,7 +125,17 @@
|
|||
#error "pthreads is not supported for this architecture"
|
||||
#endif
|
||||
|
||||
#if defined(_PR_PTHREADS)
|
||||
#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)
|
||||
#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)
|
||||
|
|
@ -109,6 +147,22 @@
|
|||
#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()
|
||||
*/
|
||||
|
|
@ -136,9 +190,16 @@
|
|||
#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)
|
||||
|
|
@ -177,7 +238,9 @@
|
|||
* Needed for garbage collection -- Look at PR_Suspend/PR_Resume
|
||||
* implementation.
|
||||
*/
|
||||
#if defined(OSF1)
|
||||
#if defined(_PR_DCETHREADS)
|
||||
#define _PT_PTHREAD_YIELD() pthread_yield()
|
||||
#elif defined(OSF1)
|
||||
/*
|
||||
* sched_yield can't be called from a signal handler. Must use
|
||||
* the _np version.
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ struct sockaddr_dl;
|
|||
#endif /* XP_UNIX */
|
||||
#include <netdb.h>
|
||||
|
||||
#if defined(BSDI) || defined(QNX)
|
||||
#if defined(FREEBSD) || defined(BSDI) || defined(QNX)
|
||||
#include <rpc/types.h> /* the only place that defines INADDR_LOOPBACK */
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ PR_BEGIN_EXTERN_C
|
|||
** The format of the version string is
|
||||
** "<major version>.<minor version>[.<patch level>] [<Beta>]"
|
||||
*/
|
||||
#define PR_VERSION "4.18"
|
||||
#define PR_VERSION "4.16"
|
||||
#define PR_VMAJOR 4
|
||||
#define PR_VMINOR 18
|
||||
#define PR_VMINOR 16
|
||||
#define PR_VPATCH 0
|
||||
#define PR_BETA PR_FALSE
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,14 @@
|
|||
#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
|
||||
|
|
@ -1869,7 +1877,7 @@ extern PRFileDesc *_pr_stderr;
|
|||
** and functions with macros that expand to the native thread
|
||||
** types and functions on each platform.
|
||||
*/
|
||||
#if defined(_PR_PTHREADS)
|
||||
#if defined(_PR_PTHREADS) && !defined(_PR_DCETHREADS)
|
||||
#define _PR_ZONE_ALLOCATOR
|
||||
#endif
|
||||
|
||||
|
|
@ -2157,18 +2165,6 @@ extern PRUint32 connectCount;
|
|||
|
||||
#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___ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue