summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Hirlimann <ludovic@mozilla.com>2022-09-07 21:14:24 +0000
committerLudovic Hirlimann <ludovic@mozilla.com>2022-09-07 21:14:24 +0000
commit775b3508090719d554640958ba5bce3baf74c654 (patch)
tree43c790ac7f3cb2aee60e9d8fd0c61af2f6ce83ae
parent0e775c98fd0fbfa50012c4a6254351a8e12f4811 (diff)
downloadnss-hg-775b3508090719d554640958ba5bce3baf74c654.tar.gz
Bug 1563221 remove older oses that are unused part3/ BeOS r=nss-reviewers,djackson
Depends on D36757 Differential Revision: https://phabricator.services.mozilla.com/D37215
-rw-r--r--cmd/lib/secpwd.c3
-rw-r--r--coreconf/BeOS.mk47
-rw-r--r--coreconf/config.mk2
-rw-r--r--coreconf/nsinstall/nsinstall.c6
-rw-r--r--lib/certhigh/ocsp.c3
-rw-r--r--lib/dbm/include/mcom_db.h4
-rw-r--r--lib/freebl/sysrand.c4
-rw-r--r--lib/freebl/unix_rand.c44
-rw-r--r--lib/jar/jar.h2
-rw-r--r--lib/jar/jarfile.c6
-rw-r--r--lib/nss/nssinit.c2
-rw-r--r--lib/ssl/config.mk4
-rw-r--r--lib/ssl/sslimpl.h4
-rw-r--r--lib/ssl/sslmutex.c4
-rw-r--r--lib/ssl/sslmutex.h2
-rw-r--r--lib/ssl/sslnonce.c2
-rw-r--r--lib/ssl/sslsnce.c16
-rw-r--r--lib/ssl/sslsock.c2
-rw-r--r--lib/ssl/unix_err.c2
-rw-r--r--lib/util/secport.c2
-rw-r--r--lib/util/secport.h8
-rw-r--r--lib/zlib/zconf.h12
-rw-r--r--lib/zlib/zutil.h2
23 files changed, 31 insertions, 152 deletions
diff --git a/cmd/lib/secpwd.c b/cmd/lib/secpwd.c
index e8ca792e8..a1af6f541 100644
--- a/cmd/lib/secpwd.c
+++ b/cmd/lib/secpwd.c
@@ -13,9 +13,6 @@
#ifdef XP_UNIX
#include <termios.h>
-#endif
-
-#if defined(XP_UNIX) || defined(XP_BEOS)
#include <unistd.h> /* for isatty() */
#endif
diff --git a/coreconf/BeOS.mk b/coreconf/BeOS.mk
deleted file mode 100644
index 750696da5..000000000
--- a/coreconf/BeOS.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-#
-# 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
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-include $(CORE_DEPTH)/coreconf/UNIX.mk
-
-XP_DEFINE := $(XP_DEFINE:-DXP_UNIX=-DXP_BEOS)
-
-USE_PTHREADS =
-
-ifeq ($(USE_PTHREADS),1)
- IMPL_STRATEGY = _PTH
-endif
-
-CC = gcc
-CCC = g++
-RANLIB = ranlib
-
-DEFAULT_COMPILER = gcc
-
-ifeq ($(OS_TEST),ppc)
- OS_REL_CFLAGS = -Dppc
- CPU_ARCH = ppc
-else
- OS_REL_CFLAGS = -Di386
- CPU_ARCH = x86
-endif
-
-MKSHLIB = $(CC) -nostart -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so)
-ifdef BUILD_OPT
- OPTIMIZER = -O2
-endif
-
-OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wall -Wno-switch -pipe
-OS_LIBS = -lbe
-
-DEFINES += -DBEOS
-
-ifdef USE_PTHREADS
- DEFINES += -D_REENTRANT
-endif
-
-ARCH = beos
-
-DSO_CFLAGS = -fPIC
-DSO_LDOPTS =
diff --git a/coreconf/config.mk b/coreconf/config.mk
index d4c9ccaa1..2ee4797bb 100644
--- a/coreconf/config.mk
+++ b/coreconf/config.mk
@@ -30,7 +30,7 @@ endif
# one for each OS release. #
#######################################################################
-TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \
+TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin OpenBSD \
AIX RISCOS WINNT WIN95 Linux Android
ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET)))
diff --git a/coreconf/nsinstall/nsinstall.c b/coreconf/nsinstall/nsinstall.c
index 3df0ae6b0..952c4e418 100644
--- a/coreconf/nsinstall/nsinstall.c
+++ b/coreconf/nsinstall/nsinstall.c
@@ -26,16 +26,12 @@ typedef unsigned int mode_t;
#define HAVE_LCHOWN
-#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) || defined(NTO) || defined(DARWIN) || defined(BEOS) || defined(__riscos__)
+#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) || defined(NTO) || defined(DARWIN) || defined(__riscos__)
#undef HAVE_LCHOWN
#endif
#define HAVE_FCHMOD
-#if defined(BEOS)
-#undef HAVE_FCHMOD
-#endif
-
#ifdef LINUX
#include <getopt.h>
#endif
diff --git a/lib/certhigh/ocsp.c b/lib/certhigh/ocsp.c
index cea845660..834e72b1a 100644
--- a/lib/certhigh/ocsp.c
+++ b/lib/certhigh/ocsp.c
@@ -146,8 +146,7 @@ cert_DupOCSPCertID(const CERTOCSPCertID *src);
#define OCSP_TRACE_CERT(cert) dumpCertificate(cert)
#define OCSP_TRACE_CERTID(certid) dumpCertID(certid)
-#if defined(XP_UNIX) || defined(XP_WIN32) || defined(XP_BEOS) || \
- defined(XP_MACOSX)
+#if defined(XP_UNIX) || defined(XP_WIN32) || defined(XP_MACOSX)
#define NSS_HAVE_GETENV 1
#endif
diff --git a/lib/dbm/include/mcom_db.h b/lib/dbm/include/mcom_db.h
index e961dd1b4..c299728cd 100644
--- a/lib/dbm/include/mcom_db.h
+++ b/lib/dbm/include/mcom_db.h
@@ -40,7 +40,7 @@
#endif
#include "prtypes.h"
-#if !defined(XP_BEOS) && !defined(XP_OS2) && !defined(XP_UNIX) || defined(NTO)
+#if !defined(XP_OS2) && !defined(XP_UNIX) || defined(NTO)
typedef PRUintn uint;
#endif
typedef PRUint8 uint8;
@@ -60,7 +60,7 @@ typedef PRUint32 uint32;
#include <sys/byteorder.h>
#endif
-#if defined(__linux) || defined(__BEOS__)
+#if defined(__linux)
#include <endian.h>
#ifndef BYTE_ORDER
#define BYTE_ORDER __BYTE_ORDER
diff --git a/lib/freebl/sysrand.c b/lib/freebl/sysrand.c
index 763f6af11..814dd6e51 100644
--- a/lib/freebl/sysrand.c
+++ b/lib/freebl/sysrand.c
@@ -8,9 +8,9 @@
#include "seccomon.h"
-#if (defined(XP_UNIX) || defined(XP_BEOS)) && defined(SEED_ONLY_DEV_URANDOM)
+#if defined(XP_UNIX) && defined(SEED_ONLY_DEV_URANDOM)
#include "unix_urandom.c"
-#elif defined(XP_UNIX) || defined(XP_BEOS)
+#elif defined(XP_UNIX)
#include "unix_rand.c"
#endif
#ifdef XP_WIN
diff --git a/lib/freebl/unix_rand.c b/lib/freebl/unix_rand.c
index d0c00a8ef..e46bac623 100644
--- a/lib/freebl/unix_rand.c
+++ b/lib/freebl/unix_rand.c
@@ -543,39 +543,6 @@ GiveSystemInfo(void)
}
#endif /* sinix */
-#ifdef BEOS
-#include <be/kernel/OS.h>
-
-static size_t
-GetHighResClock(void *buf, size_t maxbytes)
-{
- bigtime_t bigtime; /* Actually a int64 */
-
- bigtime = real_time_clock_usecs();
- return CopyLowBits(buf, maxbytes, &bigtime, sizeof(bigtime));
-}
-
-static void
-GiveSystemInfo(void)
-{
- system_info *info = NULL;
- PRInt32 val;
- get_system_info(info);
- if (info) {
- val = info->boot_time;
- RNG_RandomUpdate(&val, sizeof(val));
- val = info->used_pages;
- RNG_RandomUpdate(&val, sizeof(val));
- val = info->used_ports;
- RNG_RandomUpdate(&val, sizeof(val));
- val = info->used_threads;
- RNG_RandomUpdate(&val, sizeof(val));
- val = info->used_teams;
- RNG_RandomUpdate(&val, sizeof(val));
- }
-}
-#endif /* BEOS */
-
#if defined(nec_ews)
#include <sys/systeminfo.h>
@@ -649,16 +616,6 @@ RNG_SystemInfoForRNG(void)
#else
extern char **environ;
#endif
-#ifdef BEOS
- static const char *const files[] = {
- "/boot/var/swap",
- "/boot/var/log/syslog",
- "/boot/var/tmp",
- "/boot/home/config/settings",
- "/boot/home",
- 0
- };
-#else
static const char *const files[] = {
"/etc/passwd",
"/etc/utmp",
@@ -667,7 +624,6 @@ RNG_SystemInfoForRNG(void)
"/usr/tmp",
0
};
-#endif
GiveSystemInfo();
diff --git a/lib/jar/jar.h b/lib/jar/jar.h
index d337cef37..8b0c26d95 100644
--- a/lib/jar/jar.h
+++ b/lib/jar/jar.h
@@ -140,7 +140,7 @@ typedef struct JAR_Physical_ {
unsigned long offset;
unsigned long length;
unsigned long uncompressed_length;
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#if defined(XP_UNIX)
PRUint16 mode;
#endif
} JAR_Physical;
diff --git a/lib/jar/jarfile.c b/lib/jar/jarfile.c
index c1eab5251..248c8336c 100644
--- a/lib/jar/jarfile.c
+++ b/lib/jar/jarfile.c
@@ -16,7 +16,7 @@
/* commercial compression */
#include "jzlib.h"
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#if defined(XP_UNIX)
#include "sys/stat.h"
#endif
@@ -219,7 +219,7 @@ JAR_extract(JAR *jar, char *path, char *outpath)
(unsigned int)phy->compression);
}
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#if defined(XP_UNIX)
if (phy->mode)
chmod(outpath, 0400 | (mode_t)phy->mode);
#endif
@@ -762,7 +762,7 @@ jar_listzip(JAR *jar, JAR_FILE fp)
goto loser;
}
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#if defined(XP_UNIX)
/* with unix we need to locate any bits from
the protection mask in the external attributes. */
attr = Central->external_attributes[2]; /* magic */
diff --git a/lib/nss/nssinit.c b/lib/nss/nssinit.c
index 9b6012771..fd0684f83 100644
--- a/lib/nss/nssinit.c
+++ b/lib/nss/nssinit.c
@@ -261,7 +261,7 @@ static const char *dllname =
"libnssckbi.sl";
#elif defined(DARWIN)
"libnssckbi.dylib";
-#elif defined(XP_UNIX) || defined(XP_BEOS)
+#elif defined(XP_UNIX)
"libnssckbi.so";
#else
#error "Uh! Oh! I don't know about this platform."
diff --git a/lib/ssl/config.mk b/lib/ssl/config.mk
index df4ab35e6..309c5bc17 100644
--- a/lib/ssl/config.mk
+++ b/lib/ssl/config.mk
@@ -44,10 +44,6 @@ EXTRA_SHARED_LIBS += \
-lnspr4 \
$(NULL)
-ifeq ($(OS_ARCH), BeOS)
-EXTRA_SHARED_LIBS += -lbe
-endif
-
endif
ifdef NSS_DISABLE_TLS_1_3
diff --git a/lib/ssl/sslimpl.h b/lib/ssl/sslimpl.h
index 5a9da21a0..8d8be7c56 100644
--- a/lib/ssl/sslimpl.h
+++ b/lib/ssl/sslimpl.h
@@ -24,7 +24,7 @@
#include "hasht.h"
#include "nssilock.h"
#include "pkcs11t.h"
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#if defined(XP_UNIX)
#include "unistd.h"
#endif
#include "nssrwlk.h"
@@ -1982,7 +1982,7 @@ SECStatus SSLExp_CallExtensionWriterOnEchInner(PRFileDesc *fd, PRBool enabled);
SEC_END_PROTOS
-#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
+#if defined(XP_UNIX) || defined(XP_OS2)
#define SSL_GETPID getpid
#elif defined(WIN32)
extern int __cdecl _getpid(void);
diff --git a/lib/ssl/sslmutex.c b/lib/ssl/sslmutex.c
index 10b6cf55f..0d75a0d38 100644
--- a/lib/ssl/sslmutex.c
+++ b/lib/ssl/sslmutex.c
@@ -4,7 +4,7 @@
#include "seccomon.h"
/* This ifdef should match the one in sslsnce.c */
-#if defined(XP_UNIX) || defined(XP_WIN32) || defined(XP_OS2) || defined(XP_BEOS)
+#if defined(XP_UNIX) || defined(XP_WIN32) || defined(XP_OS2)
#include "sslmutex.h"
#include "prerr.h"
@@ -60,7 +60,7 @@ single_process_sslMutex_Lock(sslMutex* pMutex)
return SECSuccess;
}
-#if defined(LINUX) || defined(AIX) || defined(BEOS) || defined(BSDI) || \
+#if defined(LINUX) || defined(AIX) || defined(BSDI) || \
(defined(NETBSD) && __NetBSD_Version__ < 500000000) || defined(OPENBSD) || defined(__GLIBC__)
#include <unistd.h>
diff --git a/lib/ssl/sslmutex.h b/lib/ssl/sslmutex.h
index 3f63ed80d..f99b4d024 100644
--- a/lib/ssl/sslmutex.h
+++ b/lib/ssl/sslmutex.h
@@ -49,7 +49,7 @@ typedef struct {
typedef int sslPID;
-#elif defined(LINUX) || defined(AIX) || defined(BEOS) || defined(BSDI) || \
+#elif defined(LINUX) || defined(AIX) || defined(BSDI) || \
(defined(NETBSD) && __NetBSD_Version__ < 500000000) || defined(OPENBSD) || defined(__GLIBC__)
#include <sys/types.h>
diff --git a/lib/ssl/sslnonce.c b/lib/ssl/sslnonce.c
index 3daab4b75..35f67a351 100644
--- a/lib/ssl/sslnonce.c
+++ b/lib/ssl/sslnonce.c
@@ -16,7 +16,7 @@
#include "sslproto.h"
#include "nssilock.h"
#include "sslencode.h"
-#if defined(XP_UNIX) || defined(XP_WIN) || defined(_WINDOWS) || defined(XP_BEOS)
+#if defined(XP_UNIX) || defined(XP_WIN) || defined(_WINDOWS)
#include <time.h>
#endif
diff --git a/lib/ssl/sslsnce.c b/lib/ssl/sslsnce.c
index fcb680b14..6fa66e740 100644
--- a/lib/ssl/sslsnce.c
+++ b/lib/ssl/sslsnce.c
@@ -45,7 +45,7 @@
*/
#include "seccomon.h"
-#if defined(XP_UNIX) || defined(XP_WIN32) || defined(XP_OS2) || defined(XP_BEOS)
+#if defined(XP_UNIX) || defined(XP_WIN32) || defined(XP_OS2)
#include "cert.h"
#include "ssl.h"
@@ -60,7 +60,7 @@
#include "selfencrypt.h"
#include <stdio.h>
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#if defined(XP_UNIX)
#include <syslog.h>
#include <fcntl.h>
@@ -266,11 +266,11 @@ typedef struct inheritanceStr inheritance;
#endif /* _win32 */
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#if defined(XP_UNIX)
#define DEFAULT_CACHE_DIRECTORY "/tmp"
-#endif /* XP_UNIX || XP_BEOS */
+#endif /* XP_UNIX */
/************************************************************************/
@@ -1045,7 +1045,7 @@ InitCache(cacheDesc *cache, int maxCacheEntries, int maxCertCacheEntries,
if (shared) {
/* Create file names */
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#if defined(XP_UNIX)
/* there's some confusion here about whether PR_OpenAnonFileMap wants
** a directory name or a file name for its first argument.
cfn = PR_smprintf("%s/.sslsvrcache.%d", directory, myPid);
@@ -1229,7 +1229,7 @@ SSL_ShutdownServerSessionIDCacheInstance(cacheDesc *cache)
SECStatus
SSL_ShutdownServerSessionIDCache(void)
{
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#if defined(XP_UNIX)
/* Stop the thread that polls cache for expired locks on Unix */
StopLockPoller(&globalCache);
#endif
@@ -1293,7 +1293,7 @@ ssl_ConfigMPServerSIDCacheWithOpt(PRUint32 ssl3_timeout,
result = SECFailure;
}
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#if defined(XP_UNIX)
/* Launch thread to poll cache for expired locks on Unix */
LaunchLockPoller(cache);
#endif
@@ -1517,7 +1517,7 @@ SSL_InheritMPServerSIDCache(const char *envString)
return SSL_InheritMPServerSIDCacheInstance(&globalCache, envString);
}
-#if defined(XP_UNIX) || defined(XP_BEOS)
+#if defined(XP_UNIX)
#define SID_LOCK_EXPIRATION_TIMEOUT 30 /* seconds */
diff --git a/lib/ssl/sslsock.c b/lib/ssl/sslsock.c
index 6b40be759..4843b990e 100644
--- a/lib/ssl/sslsock.c
+++ b/lib/ssl/sslsock.c
@@ -3890,7 +3890,7 @@ loser:
return SECFailure;
}
-#if defined(XP_UNIX) || defined(XP_WIN32) || defined(XP_BEOS)
+#if defined(XP_UNIX) || defined(XP_WIN32)
#define NSS_HAVE_GETENV 1
#endif
diff --git a/lib/ssl/unix_err.c b/lib/ssl/unix_err.c
index d4390b8c7..6cd450f69 100644
--- a/lib/ssl/unix_err.c
+++ b/lib/ssl/unix_err.c
@@ -18,7 +18,7 @@
#include "prerror.h"
#endif
-#if defined(__bsdi__) || defined(NTO) || defined(DARWIN) || defined(BEOS)
+#if defined(__bsdi__) || defined(NTO) || defined(DARWIN)
#undef _PR_POLL_AVAILABLE
#endif
diff --git a/lib/util/secport.c b/lib/util/secport.c
index 8b4ceb061..8594072df 100644
--- a/lib/util/secport.c
+++ b/lib/util/secport.c
@@ -31,7 +31,7 @@
#include "prthread.h"
#endif /* THREADMARK */
-#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
+#if defined(XP_UNIX) || defined(XP_OS2)
#include <stdlib.h>
#else
#include "wtypes.h"
diff --git a/lib/util/secport.h b/lib/util/secport.h
index b3021afaf..fc1e1f538 100644
--- a/lib/util/secport.h
+++ b/lib/util/secport.h
@@ -13,7 +13,7 @@
#include "prlink.h"
/*
- * define XP_WIN, XP_BEOS, or XP_UNIX, in case they are not defined
+ * define XP_WIN, or XP_UNIX, in case they are not defined
* by anyone else
*/
#ifdef _WINDOWS
@@ -27,12 +27,6 @@
#endif
#endif
-#ifdef __BEOS__
-#ifndef XP_BEOS
-#define XP_BEOS
-#endif
-#endif
-
#ifdef unix
#ifndef XP_UNIX
#define XP_UNIX
diff --git a/lib/zlib/zconf.h b/lib/zlib/zconf.h
index 5e1d68a00..fd9b538a0 100644
--- a/lib/zlib/zconf.h
+++ b/lib/zlib/zconf.h
@@ -361,18 +361,6 @@
# endif
#endif
-#if defined (__BEOS__)
-# ifdef ZLIB_DLL
-# ifdef ZLIB_INTERNAL
-# define ZEXPORT __declspec(dllexport)
-# define ZEXPORTVA __declspec(dllexport)
-# else
-# define ZEXPORT __declspec(dllimport)
-# define ZEXPORTVA __declspec(dllimport)
-# endif
-# endif
-#endif
-
#ifndef ZEXTERN
# define ZEXTERN extern
#endif
diff --git a/lib/zlib/zutil.h b/lib/zlib/zutil.h
index d9a20ae1b..a84bc5eff 100644
--- a/lib/zlib/zutil.h
+++ b/lib/zlib/zutil.h
@@ -170,7 +170,7 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define OS_CODE 19
#endif
-#if defined(_BEOS_) || defined(RISCOS)
+#if defined(RISCOS)
# define fdopen(fd,mode) NULL /* No fdopen() */
#endif