diff options
author | wtc%netscape.com <devnull@localhost> | 2002-07-23 23:54:12 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2002-07-23 23:54:12 +0000 |
commit | ee7504382d9547a265b8211a84da0cadbba903cb (patch) | |
tree | 04316c9691b69e43840cc1d57565faab9e2e8dcb | |
parent | 7f73018aa62e438a8bdaf662e49282aedcf84b67 (diff) | |
download | nspr-hg-ee7504382d9547a265b8211a84da0cadbba903cb.tar.gz |
Bug 153525: fixed build problems under gcc3 on Mac OS X. r=bryner.
Modified Files: _pth.h darwin.c
-rw-r--r-- | pr/include/md/_pth.h | 23 | ||||
-rw-r--r-- | pr/src/md/unix/darwin.c | 27 |
2 files changed, 13 insertions, 37 deletions
diff --git a/pr/include/md/_pth.h b/pr/include/md/_pth.h index 8a3ef295..4cfbfe9a 100644 --- a/pr/include/md/_pth.h +++ b/pr/include/md/_pth.h @@ -91,7 +91,11 @@ #define _PT_PTHREAD_MUTEXATTR_DESTROY pthread_mutexattr_destroy #define _PT_PTHREAD_MUTEX_INIT(m, a) pthread_mutex_init(&(m), &(a)) #define _PT_PTHREAD_MUTEX_IS_LOCKED(m) (EBUSY == pthread_mutex_trylock(&(m))) +#if defined(DARWIN) +#define _PT_PTHREAD_CONDATTR_INIT(x) 0 +#else #define _PT_PTHREAD_CONDATTR_INIT pthread_condattr_init +#endif #define _PT_PTHREAD_CONDATTR_DESTROY pthread_condattr_destroy #define _PT_PTHREAD_COND_INIT(m, a) pthread_cond_init(&(m), &(a)) #endif @@ -182,23 +186,22 @@ #endif /* - * These platforms don't have pthread_atfork() - */ -#if defined(_PR_DCETHREADS) || defined(FREEBSD) \ - || (defined(LINUX) && defined(__alpha)) \ - || defined(NETBSD) || defined(OPENBSD) -#define PT_NO_ATFORK -#endif - -/* * These platforms don't have sigtimedwait() */ #if (defined(AIX) && !defined(AIX4_3)) || defined(LINUX) \ || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \ - || defined(BSDI) || defined(VMS) || defined(UNIXWARE) + || defined(BSDI) || defined(VMS) || defined(UNIXWARE) \ + || defined(DARWIN) #define PT_NO_SIGTIMEDWAIT #endif +/* + * These platforms don't have pthread_kill() + */ +#if defined(DARWIN) +#define pthread_kill(thread, sig) ENOSYS +#endif + #if defined(OSF1) || defined(VMS) #define PT_PRIO_MIN PRI_OTHER_MIN #define PT_PRIO_MAX PRI_OTHER_MAX diff --git a/pr/src/md/unix/darwin.c b/pr/src/md/unix/darwin.c index 43988b8d..90179feb 100644 --- a/pr/src/md/unix/darwin.c +++ b/pr/src/md/unix/darwin.c @@ -103,32 +103,5 @@ _MD_CREATE_THREAD( } #endif /* ! _PR_PTHREADS */ -#if defined(_PR_PTHREADS) - -/* -** Stubs for unimplemented functions -*/ - -int pthread_condattr_init(pthread_condattr_t *attr) -{ - return 0; -} - -int pthread_kill(pthread_t thread, int sig) -{ - return ENOSYS; -} - -typedef struct siginfo_t siginfo_t; - -int sigtimedwait(const sigset_t *set, siginfo_t *info, - const struct timespec *timeout) -{ - errno = ENOSYS; - return -1; -} - -#endif /* _PR_PTHREADS */ - /* darwin.c */ |