diff options
author | wtc%netscape.com <devnull@localhost> | 1998-12-16 05:58:43 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 1998-12-16 05:58:43 +0000 |
commit | 94e3ffb7c85c4ae0dd4c91e211f3689e15bf0fb4 (patch) | |
tree | eeb032d19575eb95e4d2c8cbec0b38994ac41519 | |
parent | 21c99ee31398f3a8d892b7a7da2c2a2ef2fd137a (diff) | |
download | nspr-hg-94e3ffb7c85c4ae0dd4c91e211f3689e15bf0fb4.tar.gz |
Replaced all but one use of IRIX5_3 by feature-based macros.
(Thanks to Brian Ostrom <briano@netscape.com>.)
Modified files: IRIX.mk and irix.c.
-rw-r--r-- | config/IRIX.mk | 12 | ||||
-rw-r--r-- | pr/src/md/unix/irix.c | 8 |
2 files changed, 12 insertions, 8 deletions
diff --git a/config/IRIX.mk b/config/IRIX.mk index 24c1f7ba..1dfa0614 100644 --- a/config/IRIX.mk +++ b/config/IRIX.mk @@ -32,13 +32,13 @@ endif endif # -# On IRIX 5.3, classic nspr (user-level threads on top of sprocs) +# On IRIX 5.x, classic nspr (user-level threads on top of sprocs) # is the default (and only) implementation strategy. # -# On IRIX 6.2 and later, the default implementation strategy is +# On IRIX 6.x and later, the default implementation strategy is # pthreads. Classic nspr is also available. # -ifeq ($(OS_RELEASE),5.3) +ifeq ($(basename $(OS_RELEASE)),5) CLASSIC_NSPR = 1 endif @@ -111,7 +111,11 @@ RANLIB = /bin/true NOMD_OS_CFLAGS = $(ODD_CFLAGS) -D_SGI_MP_SOURCE ifeq ($(OS_RELEASE),5.3) -OS_CFLAGS += -DIRIX5_3 +OS_CFLAGS += -DIRIX5_3 +endif + +ifneq ($(basename $(OS_RELEASE)),5) +OS_CFLAGS += -D_PR_HAVE_SGI_PRDA_PROCMASK endif ifeq (,$(filter-out 6.5,$(OS_RELEASE))) diff --git a/pr/src/md/unix/irix.c b/pr/src/md/unix/irix.c index 2432838d..611d469f 100644 --- a/pr/src/md/unix/irix.c +++ b/pr/src/md/unix/irix.c @@ -831,7 +831,7 @@ _MD_CleanupBeforeExit(void) } } -#ifndef IRIX5_3 +#ifdef _PR_HAVE_SGI_PRDA_PROCMASK extern void __sgi_prda_procmask(int); #endif @@ -871,7 +871,7 @@ _MD_InitThread(PRThread *thread, PRBool wakeup_parent) thread->md.id = getpid(); setblockproccnt(thread->md.id, 0); _MD_SET_SPROC_PID(getpid()); -#ifndef IRIX5_3 +#ifdef _PR_HAVE_SGI_PRDA_PROCMASK /* * enable user-level processing of sigprocmask(); this is an * undocumented feature available in Irix 6.2, 6.3, 6.4 and 6.5 @@ -1442,7 +1442,7 @@ void _MD_IrixInit() PRThread *me = _PR_MD_CURRENT_THREAD(); int rv; -#ifndef IRIX5_3 +#ifdef _PR_HAVE_SGI_PRDA_PROCMASK /* * enable user-level processing of sigprocmask(); this is an undocumented * feature available in Irix 6.2, 6.3, 6.4 and 6.5 @@ -1463,7 +1463,7 @@ void _MD_IrixInit() * Change the name of the core file from core to core.pid, * This is inherited by the sprocs created by this process */ -#ifndef IRIX5_3 +#ifdef PR_COREPID prctl(PR_COREPID, 0, 1); #endif /* |