diff options
author | srinivas%netscape.com <devnull@localhost> | 1999-05-19 01:14:12 +0000 |
---|---|---|
committer | srinivas%netscape.com <devnull@localhost> | 1999-05-19 01:14:12 +0000 |
commit | eb0559b9062ff8748968acea566c90e8d1dadd73 (patch) | |
tree | 0518a5a155f85724393485029a700e17f99399da | |
parent | d0d60fc768fbe74d538283d12a5c896c0217e54d (diff) | |
parent | 7c0041fa568c1ae538c87f0fb2f495c39218c878 (diff) | |
download | nspr-hg-eb0559b9062ff8748968acea566c90e8d1dadd73.tar.gz |
Fixed a typo in previous checkin
-rw-r--r-- | config/OpenVMS.mk | 8 | ||||
-rw-r--r-- | config/SunOS5.mk | 10 | ||||
-rw-r--r-- | config/arch.mk | 21 | ||||
-rw-r--r-- | lib/ds/plevent.c | 81 | ||||
-rw-r--r-- | lib/prstreams/prstrms.cpp | 4 | ||||
-rw-r--r-- | pr/include/md/_openvms.cfg | 4 | ||||
-rw-r--r-- | pr/include/md/_openvms.h | 30 | ||||
-rw-r--r-- | pr/include/md/_pth.h | 9 | ||||
-rw-r--r-- | pr/include/md/_unixos.h | 4 | ||||
-rw-r--r-- | pr/include/md/prosdep.h | 3 | ||||
-rw-r--r-- | pr/include/obsolete/protypes.h | 11 | ||||
-rw-r--r-- | pr/src/Makefile | 4 | ||||
-rw-r--r-- | pr/src/io/prpolevt.c | 2 | ||||
-rw-r--r-- | pr/src/md/unix/Makefile | 7 | ||||
-rw-r--r-- | pr/src/md/unix/objs.mk | 7 | ||||
-rw-r--r-- | pr/src/md/unix/unix.c | 2 | ||||
-rw-r--r-- | pr/src/md/unix/unix_errors.c | 5 | ||||
-rw-r--r-- | pr/src/pthreads/ptio.c | 17 | ||||
-rw-r--r-- | pr/src/pthreads/ptthread.c | 10 | ||||
-rw-r--r-- | pr/tests/op_filok.c | 4 |
20 files changed, 204 insertions, 39 deletions
diff --git a/config/OpenVMS.mk b/config/OpenVMS.mk index ca5005a7..12ba6178 100644 --- a/config/OpenVMS.mk +++ b/config/OpenVMS.mk @@ -23,18 +23,18 @@ include $(MOD_DEPTH)/config/UNIX.mk ifdef INTERNAL_TOOLS CC = c89 +CCC = cxx OPTIMIZER = -O else CC = ccc +CCC = ccc endif RANLIB = /bin/true CPU_ARCH_TAG = _$(CPU_ARCH) -NON_LD_FLAGS = -ieee_with_inexact - -OS_CFLAGS = -DOSF1 -DVMS +OS_CFLAGS = -DVMS # The command to build a shared library in POSIX on OpenVMS. -MKSHLIB = c89 -wl,share +XXXMKSHLIB = c89 -Wl,share diff --git a/config/SunOS5.mk b/config/SunOS5.mk index f91ba10e..557376b3 100644 --- a/config/SunOS5.mk +++ b/config/SunOS5.mk @@ -106,6 +106,16 @@ ifeq (,$(filter-out 5.3 5.4,$(OS_RELEASE))) OS_DEFINES += -D_PR_NO_LARGE_FILES else OS_DEFINES += -D_PR_HAVE_OFF64_T +# The lfcompile64(5) man page on Solaris 2.6 says: +# For applications that do not wish to conform to the POSIX or +# X/Open specifications, the 64-bit transitional interfaces +# are available by default. No compile-time flags need to be +# set. +# But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default. +# The native compiler, gcc 2.8.x, and egcs don't have this problem. +ifdef NS_USE_GCC +OS_DEFINES += -D_LARGEFILE64_SOURCE +endif endif endif diff --git a/config/arch.mk b/config/arch.mk index ee56c9c7..d8b8ed3d 100644 --- a/config/arch.mk +++ b/config/arch.mk @@ -155,6 +155,10 @@ ifeq ($(OS_ARCH),Windows_95) OS_ARCH := Windows_NT OS_TARGET := WIN95 endif +ifeq ($(OS_ARCH),CYGWIN_95-4.0) + OS_ARCH := CYGWIN_NT-4.0 + OS_TARGET := WIN95 +endif ifeq ($(OS_ARCH),OS2) OS_ARCH := WINNT OS_TARGET := OS2 @@ -198,6 +202,22 @@ ifeq ($(OS_ARCH), Windows_NT) endif else # +# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using +# the uname.exe in the Cygwin tools. +# +ifeq (CYGWIN_NT,$(findstring CYGWIN_NT,$(OS_ARCH))) + OS_RELEASE := $(patsubst CYGWIN_NT-%,%,$(OS_ARCH)) + OS_ARCH = WINNT + CPU_ARCH := $(shell uname -m) + # + # Cygwin's uname -m returns "i686" on a Pentium Pro machine. + # + ifneq (,$(findstring 86,$(CPU_ARCH))) + CPU_ARCH = x86 + endif +else +# +# Prior to the Beta 20 release, Cygwin was called GNU-Win32. # If uname -s returns "CYGWIN32/NT", we assume that we are using # the uname.exe in the GNU-Win32 tools. # @@ -213,6 +233,7 @@ ifeq ($(OS_ARCH), CYGWIN32_NT) endif endif endif +endif ifndef OS_TARGET OS_TARGET := $(OS_ARCH) diff --git a/lib/ds/plevent.c b/lib/ds/plevent.c index 4d42e93a..5ac6aaf5 100644 --- a/lib/ds/plevent.c +++ b/lib/ds/plevent.c @@ -50,6 +50,18 @@ typedef MPARAM WPARAM,LPARAM; #include "private/primpl.h" #endif /* XP_MAC */ +#if defined(VMS) +/* +** On OpenVMS, XtAppAddInput doesn't want a regular fd, instead it +** wants an event flag. So, we don't create and use a pipe for +** notification of when an event queue has something ready, instead +** we use an event flag. Shouldn't be a problem if we only have +** a few event queues. +*/ +#include <lib$routines.h> +#include <starlet.h> +#include <stsdef.h> +#endif /* VMS */ static PRLogModuleInfo *event_lm = NULL; @@ -75,7 +87,10 @@ struct PLEventQueue { PRThread* handlerThread; EventQueueType type; PRBool processingEvents; -#if defined(XP_UNIX) +#if defined(VMS) + int efn; + int notifyCount; +#elif defined(XP_UNIX) PRInt32 eventPipe[2]; int notifyCount; #elif defined(_WIN32) || defined(WIN16) @@ -585,7 +600,26 @@ _pl_SetupNativeNotifier(PLEventQueue* self) #pragma unused (self) #endif -#if defined(XP_UNIX) +#if defined(VMS) + { +#ifdef VMS_USE_GETEF + unsigned int status; + status = LIB$GET_EF(&self->efn); + if (!$VMS_STATUS_SUCCESS(status)) + return PR_FAILURE; +#else + static int next_event_flag = 2; + if (next_event_flag <= 23) { + self->efn = next_event_flag++; + } + else { + printf("ERROR: Out of event flags\n"); + return PR_FAILURE; + } +#endif + return PR_SUCCESS; + } +#elif defined(XP_UNIX) int err; int flags; @@ -629,7 +663,14 @@ _pl_CleanupNativeNotifier(PLEventQueue* self) #pragma unused (self) #endif -#if defined(XP_UNIX) +#if defined(VMS) +#ifdef VMS_USE_GETEF + { + unsigned int status; + status = LIB$FREE_EF(&self->efn); + } +#endif /* VMS_USE_GETEF */ +#elif defined(XP_UNIX) close(self->eventPipe[0]); close(self->eventPipe[1]); #endif @@ -655,7 +696,20 @@ _pl_NativeNotify(PLEventQueue* self) }/* --- end _pl_NativeNotify() --- */ #endif /* XP_OS2 */ -#if defined(XP_UNIX) +#if defined(VMS) +/* Just set the event flag */ +static PRStatus +_pl_NativeNotify(PLEventQueue* self) +{ + unsigned int status; + status = SYS$SETEF(self->efn); + self->notifyCount++; + if ($VMS_STATUS_SUCCESS(status)) + return PR_SUCCESS; + else + return PR_FAILURE; +}/* --- end _pl_NativeNotify() --- */ +#elif defined(XP_UNIX) static PRStatus _pl_NativeNotify(PLEventQueue* self) { @@ -690,7 +744,20 @@ _pl_NativeNotify(PLEventQueue* self) static PRStatus _pl_AcknowledgeNativeNotify(PLEventQueue* self) { -#if defined(XP_UNIX) +#if defined(VMS) +/* Clear the event flag if we're all done */ +/* NOTE that we might want to always clear the event flag, even if the */ +/* notifyCount says we shouldn't. */ + if (self->notifyCount <= 0) return PR_SUCCESS; + self->notifyCount--; + if (self->notifyCount == 0) { + unsigned int status; + status = SYS$CLREF(self->efn); + if (!$VMS_STATUS_SUCCESS(status)) + return PR_FAILURE; + } + return PR_SUCCESS; +#elif defined(XP_UNIX) PRInt32 count; unsigned char c; @@ -720,7 +787,9 @@ PL_GetEventQueueSelectFD(PLEventQueue* self) if (self == NULL) return -1; -#if defined(XP_UNIX) +#if defined(VMS) + return self->efn; +#elif defined(XP_UNIX) return self->eventPipe[0]; #else return -1; /* other platforms don't handle this (yet) */ diff --git a/lib/prstreams/prstrms.cpp b/lib/prstreams/prstrms.cpp index 7c9972a8..00c641bc 100644 --- a/lib/prstreams/prstrms.cpp +++ b/lib/prstreams/prstrms.cpp @@ -45,6 +45,10 @@ #define _PRSTR_BP bp #define _PRSTR_DELBUF(x) delbuf(x) #define _PRSTR_DELBUF_C(c, x) c::_PRSTR_DELBUF(x) +#elif defined(VMS) +#undef _PRSTR_BP /* as nothing */ +#define _PRSTR_DELBUF(x) /* as nothing */ +#define _PRSTR_DELBUF_C(c, x) /* as nothing */ #elif defined(OSF1) #define _PRSTR_BP m_psb #define _PRSTR_DELBUF(x) /* as nothing */ diff --git a/pr/include/md/_openvms.cfg b/pr/include/md/_openvms.cfg index b1bc96a4..b9dd6d97 100644 --- a/pr/include/md/_openvms.cfg +++ b/pr/include/md/_openvms.cfg @@ -23,10 +23,6 @@ #define XP_UNIX #endif -#ifndef OSF1 -#define OSF1 -#endif - #ifndef VMS #define VMS #endif diff --git a/pr/include/md/_openvms.h b/pr/include/md/_openvms.h index 4de41431..ebc12887 100644 --- a/pr/include/md/_openvms.h +++ b/pr/include/md/_openvms.h @@ -34,12 +34,28 @@ #define _PR_SI_ARCHITECTURE "alpha" #else #define _PR_SI_ARCHITECTURE "vax" -endif -#define PR_DLL_SUFFIX ".so" +#endif +#define PR_DLL_SUFFIX ".exe" #define _PR_VMBASE 0x30000000 #define _PR_STACK_VMBASE 0x50000000 #define _MD_DEFAULT_STACK_SIZE 131072L + +/* +** This is not defined on OpenVMS. I believe its only used in GC code, and +** isn't that only used in Java? Anyway, for now, let's keep the compiler +** happy. +*/ +#define SA_RESTART 0 + +/* +** OpenVMS doesn't have these in socket.h. +*/ +struct ip_mreq { + struct in_addr imr_multiaddr; /* IP multicast address of group */ + struct in_addr imr_interface; /* local IP address of interface */ +}; + /* * OSF1 needs the MAP_FIXED flag to ensure that mmap returns a pointer * with the upper 32 bits zero. This is because Java sticks a pointer @@ -50,16 +66,17 @@ endif #undef HAVE_STACK_GROWING_UP #undef HAVE_WEAK_IO_SYMBOLS #undef HAVE_WEAK_MALLOC_SYMBOLS -#undef HAVE_DLL #undef HAVE_BSD_FLOCK #define NEED_TIME_R + +#undef HAVE_DLL #undef USE_DLFCN #define _PR_POLL_AVAILABLE #define _PR_USE_POLL #define _PR_STAT_HAS_ONLY_ST_ATIME -#define _PR_HAVE_LARGE_OFF_T +#define _PR_NO_LARGE_FILES #undef USE_SETJMP @@ -197,9 +214,7 @@ struct _MDCPU { #define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond #define _MD_EARLY_INIT _MD_EarlyInit -#ifdef __VMS void _MD_EarlyInit(void); -#endif #define _MD_FINAL_INIT _PR_UnixInit #define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) #define _MD_INIT_THREAD _MD_InitializeThread @@ -237,4 +252,7 @@ PR_EXTERN(void) _PR_MD_START_INTERRUPTS(void); #define _MD_ATOMIC_DECREMENT(val) (__ATOMIC_DECREMENT_LONG(val) - 1) #define _MD_ATOMIC_SET(val, newval) __ATOMIC_EXCH_LONG(val, newval) +extern int thread_suspend(PRThread *thr_id); +extern int thread_resume(PRThread *thr_id); + #endif /* nspr_openvms_defs_h___ */ diff --git a/pr/include/md/_pth.h b/pr/include/md/_pth.h index fec73471..280542cb 100644 --- a/pr/include/md/_pth.h +++ b/pr/include/md/_pth.h @@ -92,7 +92,8 @@ #define PTHREAD_COPY_THR_HANDLE(st, dt) (dt) = (st) #elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(SOLARIS) \ || defined(HPUX) || defined(LINUX) || defined(FREEBSD) \ - || defined(NETBSD) || defined(OPENBSD) || defined(BSDI) + || defined(NETBSD) || defined(OPENBSD) || defined(BSDI) \ + || defined(VMS) #define PTHREAD_ZERO_THR_HANDLE(t) (t) = 0 #define PTHREAD_THR_HANDLE_IS_ZERO(t) (t) == 0 #define PTHREAD_COPY_THR_HANDLE(st, dt) (dt) = (st) @@ -152,11 +153,11 @@ */ #if (defined(AIX) && !defined(AIX4_3)) || defined(LINUX) \ || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \ - || defined(BSDI) + || defined(BSDI) || defined(VMS) #define PT_NO_SIGTIMEDWAIT #endif -#if defined(OSF1) +#if defined(OSF1) || defined(VMS) #define PT_PRIO_MIN PRI_OTHER_MIN #define PT_PRIO_MAX PRI_OTHER_MAX #elif defined(IRIX) @@ -209,7 +210,7 @@ */ #if defined(_PR_DCETHREADS) #define PTHREAD_YIELD() pthread_yield() -#elif defined(OSF1) +#elif defined(OSF1) || defined(VMS) /* * sched_yield can't be called from a signal handler. Must use * the _np version. diff --git a/pr/include/md/_unixos.h b/pr/include/md/_unixos.h index fb5fea17..10b3c6be 100644 --- a/pr/include/md/_unixos.h +++ b/pr/include/md/_unixos.h @@ -568,7 +568,11 @@ typedef PRInt64 _MDOff64_t; typedef PRIntn (*_MD_Fstat64)(PRIntn osfd, _MDStat64 *buf); typedef PRIntn (*_MD_Open64)(const char *path, int oflag, ...); +#if defined(VMS) +typedef PRIntn (*_MD_Stat64)(const char *path, _MDStat64 *buf, ...); +#else typedef PRIntn (*_MD_Stat64)(const char *path, _MDStat64 *buf); +#endif typedef _MDOff64_t (*_MD_Lseek64)(PRIntn osfd, _MDOff64_t, PRIntn whence); typedef void* (*_MD_Mmap64)( void *addr, PRSize len, PRIntn prot, PRIntn flags, diff --git a/pr/include/md/prosdep.h b/pr/include/md/prosdep.h index 6b5c6744..39f8abee 100644 --- a/pr/include/md/prosdep.h +++ b/pr/include/md/prosdep.h @@ -113,6 +113,9 @@ PR_BEGIN_EXTERN_C #elif defined(QNX) #include "md/_qnx.h" +#elif defined(VMS) +#include "md/_openvms.h" + #else #error unknown Unix flavor diff --git a/pr/include/obsolete/protypes.h b/pr/include/obsolete/protypes.h index 8eb492d4..d1875b7b 100644 --- a/pr/include/obsolete/protypes.h +++ b/pr/include/obsolete/protypes.h @@ -39,7 +39,14 @@ typedef PRIntn intn; #include <support/SupportDefs.h> -#else /* XP_BEOS */ +#elif VMS +/* + * OpenVMS already defines the integer types below in its standard + * header files ints.h and types.h. + */ +#include <ints.h> +#include <types.h> +#else /* SVR4 typedef of uint is commonly found on UNIX machines. */ #ifdef XP_UNIX @@ -84,7 +91,7 @@ typedef PRInt8 int8; #endif /* HPUX */ #endif /* AIX4_3 */ -#endif /* XP_BEOS */ +#endif /* XP_BEOS VMS */ typedef PRFloat64 float64; typedef PRUptrdiff uptrdiff_t; diff --git a/pr/src/Makefile b/pr/src/Makefile index f37545da..ae988c03 100644 --- a/pr/src/Makefile +++ b/pr/src/Makefile @@ -91,6 +91,10 @@ endif endif endif +ifeq ($(OS_ARCH),OpenVMS) +OS_LIBS = -lvms_jackets +endif + ifeq ($(OS_ARCH),OSF1) ifeq ($(USE_PTHREADS), 1) OS_LIBS = -lpthread -lrt diff --git a/pr/src/io/prpolevt.c b/pr/src/io/prpolevt.c index 9df2d81a..5151afd1 100644 --- a/pr/src/io/prpolevt.c +++ b/pr/src/io/prpolevt.c @@ -32,7 +32,7 @@ typedef struct MyFilePrivate { PRFilePrivate *oldSecret; } MyFilePrivate; -#ifndef XP_UNIX +#if !defined(XP_UNIX) || defined(VMS) #define USE_TCP_SOCKETPAIR #endif diff --git a/pr/src/md/unix/Makefile b/pr/src/md/unix/Makefile index 9d887b6a..0f7b3da6 100644 --- a/pr/src/md/unix/Makefile +++ b/pr/src/md/unix/Makefile @@ -74,6 +74,10 @@ HPUX_CSRCS = \ hpux.c \ $(NULL) +OPENVMS_CSRCS = \ + openvms.c \ + $(NULL) + OSF1_CSRCS = \ osf1.c \ $(NULL) @@ -156,6 +160,9 @@ endif ifeq ($(OS_ARCH),HP-UX) CSRCS += $(HPUX_CSRCS) endif +ifeq ($(OS_ARCH),OpenVMS) +CSRCS += $(OPENVMS_CSRCS) +endif ifeq ($(OS_ARCH),OSF1) CSRCS += $(OSF1_CSRCS) endif diff --git a/pr/src/md/unix/objs.mk b/pr/src/md/unix/objs.mk index c87d4b88..a6e50900 100644 --- a/pr/src/md/unix/objs.mk +++ b/pr/src/md/unix/objs.mk @@ -70,6 +70,10 @@ OSF1_CSRCS = \ osf1.c \ $(NULL) +OPENVMS_CSRCS = \ + openvms.c \ + $(NULL) + LINUX_CSRCS = \ linux.c \ $(NULL) @@ -152,6 +156,9 @@ endif ifeq ($(OS_ARCH),OSF1) CSRCS += $(OSF1_CSRCS) endif +ifeq ($(OS_ARCH),OpenVMS) +CSRCS += $(OPENVMS_CSRCS) +endif ifeq ($(OS_ARCH),Linux) CSRCS += $(LINUX_CSRCS) endif diff --git a/pr/src/md/unix/unix.c b/pr/src/md/unix/unix.c index 85c7c0de..c4731823 100644 --- a/pr/src/md/unix/unix.c +++ b/pr/src/md/unix/unix.c @@ -52,7 +52,7 @@ #define _PRSockLen_t int #elif (defined(AIX) && !defined(AIX4_1)) || defined(FREEBSD) \ || defined(NETBSD) || defined(OPENBSD) || defined(UNIXWARE) \ - || defined(DGUX) + || defined(DGUX) || defined(VMS) #define _PRSockLen_t size_t #else #error "Cannot determine architecture" diff --git a/pr/src/md/unix/unix_errors.c b/pr/src/md/unix/unix_errors.c index 7de62418..e7240814 100644 --- a/pr/src/md/unix/unix_errors.c +++ b/pr/src/md/unix/unix_errors.c @@ -128,7 +128,10 @@ static void _MD_unix_map_default_error(int err) case ENFILE: prError = PR_SYS_DESC_TABLE_FULL_ERROR; break; -#ifdef ENOBUFS + /* + * On SCO OpenServer 5, ENOBUFS is defined as ENOSR. + */ +#if defined(ENOBUFS) && (ENOBUFS != ENOSR) case ENOBUFS: prError = PR_INSUFFICIENT_RESOURCES_ERROR; break; diff --git a/pr/src/pthreads/ptio.c b/pr/src/pthreads/ptio.c index 01a289a9..b44c45fd 100644 --- a/pr/src/pthreads/ptio.c +++ b/pr/src/pthreads/ptio.c @@ -123,7 +123,7 @@ static ssize_t (*pt_aix_sendfile_fptr)() = NULL; #if defined(SOLARIS) #define _PRSockOptVal_t char * #elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(HPUX) \ - || defined(LINUX) || defined(FREEBSD) || defined(BSDI) + || defined(LINUX) || defined(FREEBSD) || defined(BSDI) || defined(VMS) #define _PRSockOptVal_t void * #else #error "Cannot determine architecture" @@ -137,7 +137,7 @@ static ssize_t (*pt_aix_sendfile_fptr)() = NULL; || defined(OSF1) || defined(SOLARIS) \ || defined(HPUX10_30) || defined(HPUX11) || defined(LINUX) \ || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \ - || defined(BSDI) + || defined(BSDI) || defined(VMS) #define _PRSelectFdSetArg_t fd_set * #else #error "Cannot determine architecture" @@ -201,7 +201,8 @@ static PRBool IsValidNetAddrLen(const PRNetAddr *addr, PRInt32 addr_len) && !defined(__alpha)) typedef socklen_t pt_SockLen; #elif (defined(AIX) && !defined(AIX4_1)) \ - || (defined(LINUX) && defined(__alpha)) + || (defined(LINUX) && defined(__alpha)) \ + || defined(VMS) typedef PRSize pt_SockLen; #else typedef PRIntn pt_SockLen; @@ -2813,7 +2814,7 @@ static PRIOMethods _pr_socketpollfd_methods = { #if defined(HPUX) || defined(OSF1) || defined(SOLARIS) || defined (IRIX) \ || defined(AIX) || defined(LINUX) || defined(FREEBSD) || defined(NETBSD) \ - || defined(OPENBSD) || defined(BSDI) + || defined(OPENBSD) || defined(BSDI) || defined(VMS) #define _PR_FCNTL_FLAGS O_NONBLOCK #else #error "Can't determine architecture" @@ -3707,21 +3708,21 @@ PR_IMPLEMENT(PRStatus) PR_UnlockFile(PRFileDesc *fd) PRInt32 PR_GetSysfdTableMax(void) { -#if defined(XP_UNIX) && !defined(AIX) +#if defined(XP_UNIX) && !defined(AIX) && !defined(VMS) struct rlimit rlim; if ( getrlimit(RLIMIT_NOFILE, &rlim) < 0) return -1; return rlim.rlim_max; -#elif defined(AIX) +#elif defined(AIX) || defined(VMS) return sysconf(_SC_OPEN_MAX); #endif } PRInt32 PR_SetSysfdTableSize(PRIntn table_size) { -#if defined(XP_UNIX) && !defined(AIX) +#if defined(XP_UNIX) && !defined(AIX) && !defined(VMS) struct rlimit rlim; PRInt32 tableMax = PR_GetSysfdTableMax(); @@ -3738,7 +3739,7 @@ PRInt32 PR_SetSysfdTableSize(PRIntn table_size) return -1; return rlim.rlim_cur; -#elif defined(AIX) +#elif defined(AIX) || defined(VMS) return -1; #endif } diff --git a/pr/src/pthreads/ptthread.c b/pr/src/pthreads/ptthread.c index 4aacf9b0..6e06e652 100644 --- a/pr/src/pthreads/ptthread.c +++ b/pr/src/pthreads/ptthread.c @@ -1146,7 +1146,7 @@ static void suspend_signal_handler(PRIntn sig) while (me->suspend & PT_THREAD_SUSPENDED) { #if !defined(FREEBSD) && !defined(NETBSD) && !defined(OPENBSD) \ - && !defined(BSDI) /*XXX*/ + && !defined(BSDI) && !defined(VMS) /*XXX*/ PRIntn rv; sigwait(&sigwait_set, &rv); #endif @@ -1190,7 +1190,11 @@ static void PR_SuspendSet(PRThread *thred) PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("doing pthread_kill in PR_SuspendSet thred %X tid = %X\n", thred, thred->id)); +#if defined(VMS) + rv = thread_suspend(thred); +#else rv = pthread_kill (thred->id, SIGUSR2); +#endif PR_ASSERT(0 == rv); } @@ -1244,8 +1248,12 @@ PR_IMPLEMENT(void) PR_ResumeSet(PRThread *thred) thred->suspend &= ~PT_THREAD_SUSPENDED; #if defined(PT_NO_SIGTIMEDWAIT) +#if defined(VMS) + thread_resume(thred); +#else pthread_kill(thred->id, SIGUSR1); #endif +#endif } /* PR_ResumeSet */ diff --git a/pr/tests/op_filok.c b/pr/tests/op_filok.c index 2e47844e..a7e33fdd 100644 --- a/pr/tests/op_filok.c +++ b/pr/tests/op_filok.c @@ -46,7 +46,9 @@ * The name of a file that is guaranteed to exist * on every machine of a particular OS. */ -#ifdef XP_UNIX +#ifdef VMS +#define EXISTING_FILENAME "SYS$LOGIN:LOGIN.COM" +#elif XP_UNIX #define EXISTING_FILENAME "/bin/sh" #elif defined(WIN32) #define EXISTING_FILENAME "c:/autoexec.bat" |