diff --git a/security/coreconf/BeOS.mk b/security/coreconf/BeOS.mk new file mode 100644 index 000000000000..4e8f3b2390de --- /dev/null +++ b/security/coreconf/BeOS.mk @@ -0,0 +1,79 @@ +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is the Netscape security libraries. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 2002 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the +# terms of the GNU General Public License Version 2 or later (the +# "GPL"), in which case the provisions of the GPL are applicable +# instead of those above. If you wish to allow use of your +# version of this file only under the terms of the GPL and not to +# allow others to use your version of this file under the MPL, +# indicate your decision by deleting the provisions above and +# replace them with the notice and other provisions required by +# the GPL. If you do not delete the provisions above, a recipient +# may use your version of this file under either the MPL or the +# GPL. +# +# Config stuff for BeOS +# + +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 -pipe +OS_LIBS = -lbe + +DEFINES += -DBEOS + +ifdef USE_PTHREADS + DEFINES += -D_REENTRANT +endif + +ARCH = beos + +DSO_CFLAGS = -fPIC +DSO_LDOPTS = +DSO_LDFLAGS = + diff --git a/security/coreconf/config.mk b/security/coreconf/config.mk index 97c4c7724bd8..7ad0d1e16b4f 100644 --- a/security/coreconf/config.mk +++ b/security/coreconf/config.mk @@ -58,7 +58,7 @@ endif # one for each OS release. # ####################################################################### -TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin +TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET))) include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk diff --git a/security/coreconf/nsinstall/nsinstall.c b/security/coreconf/nsinstall/nsinstall.c index 759a41746d58..f1d52cac453f 100644 --- a/security/coreconf/nsinstall/nsinstall.c +++ b/security/coreconf/nsinstall/nsinstall.c @@ -55,10 +55,16 @@ typedef unsigned int mode_t; #define HAVE_LCHOWN -#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) || defined(VMS) || defined(NTO) || defined(DARWIN) +#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) || defined(VMS) || defined(NTO) || defined(DARWIN) || defined(BEOS) #undef HAVE_LCHOWN #endif +#define HAVE_FCHMOD + +#if defined(BEOS) +#undef HAVE_FCHMOD +#endif + #ifdef LINUX #include #endif @@ -403,7 +409,11 @@ retry: if (utime(toname, &utb) < 0) fail("cannot set times of %s", toname); } +#ifdef HAVE_FCHMOD if (fchmod(tofd, mode) < 0) +#else + if (chmod(toname, mode) < 0) +#endif fail("cannot change mode of %s", toname); if ((owner || group) && fchown(tofd, uid, gid) < 0) fail("cannot change owner of %s", toname); diff --git a/security/nss/lib/fortcrypt/fpkmem.h b/security/nss/lib/fortcrypt/fpkmem.h index c35370be0e9b..5097828c6442 100644 --- a/security/nss/lib/fortcrypt/fpkmem.h +++ b/security/nss/lib/fortcrypt/fpkmem.h @@ -41,7 +41,7 @@ #define NUM_SLOTS 32 -#if !defined (XP_UNIX) && !defined (_WINDOWS) && !defined(XP_OS2) +#if !defined (XP_UNIX) && !defined (_WINDOWS) && !defined (XP_OS2) && !defined (XP_BEOS) #define XP_MAC 1 /*Make sure we get this define in for Mac builds*/ #endif diff --git a/security/nss/lib/fortcrypt/genci.h b/security/nss/lib/fortcrypt/genci.h index f12ec9a772d0..6a44cd7a7869 100644 --- a/security/nss/lib/fortcrypt/genci.h +++ b/security/nss/lib/fortcrypt/genci.h @@ -39,7 +39,7 @@ #define _GENCI_H_ 1 #include "seccomon.h" -#if defined (XP_UNIX) || defined (XP_WIN32) || defined (XP_OS2) +#if defined (XP_UNIX) || defined (XP_WIN32) || defined (XP_OS2) || defined (XP_BEOS) /* * On unix, NT, Windows '95, and OS/2 we use full maci diff --git a/security/nss/lib/fortcrypt/swfort/swflib.c b/security/nss/lib/fortcrypt/swfort/swflib.c index c7970ddd0145..c41a878fb1a4 100644 --- a/security/nss/lib/fortcrypt/swfort/swflib.c +++ b/security/nss/lib/fortcrypt/swfort/swflib.c @@ -54,7 +54,7 @@ /*#include "keylow.h" */ #include "secder.h" -#ifdef XP_UNIX +#if defined(XP_UNIX) || defined(XP_BEOS) #include #endif diff --git a/security/nss/lib/fortcrypt/swfort/swfutl.c b/security/nss/lib/fortcrypt/swfort/swfutl.c index f6927c841ee5..eee677f65897 100644 --- a/security/nss/lib/fortcrypt/swfort/swfutl.c +++ b/security/nss/lib/fortcrypt/swfort/swfutl.c @@ -406,8 +406,8 @@ fort_GenerateRandom(unsigned char *buf, int bytes) /* * NOTE: that MAC is missing below. */ -#if defined (XP_UNIX) || defined (XP_OS2) -#ifdef XP_UNIX +#if defined (XP_UNIX) || defined (XP_OS2) || defined (XP_BEOS) +#if defined (XP_UNIX) || defined (XP_BEOS) #define NS_PATH_SEP ':' #define NS_DIR_SEP '/' #define NS_DEFAULT_PATH ".:/bin/netscape:/etc/netscape/:/etc" @@ -448,7 +448,7 @@ local_getFileInfo(const char *fn, PRFileInfo *info) } return rv; } -#endif /* UNIX & OS/2 */ +#endif /* UNIX, OS/2, and BEOS */ #ifdef XP_WIN #define NS_PATH_SEP ';' diff --git a/security/nss/lib/freebl/sysrand.c b/security/nss/lib/freebl/sysrand.c index 2f647041a580..410ab9cc7883 100644 --- a/security/nss/lib/freebl/sysrand.c +++ b/security/nss/lib/freebl/sysrand.c @@ -32,7 +32,7 @@ */ #include "seccomon.h" -#ifdef XP_UNIX +#if defined(XP_UNIX) || defined(XP_BEOS) #include "unix_rand.c" #endif #ifdef XP_WIN diff --git a/security/nss/lib/freebl/unix_rand.c b/security/nss/lib/freebl/unix_rand.c index 21af5fdc6c9f..aa64c8866d75 100644 --- a/security/nss/lib/freebl/unix_rand.c +++ b/security/nss/lib/freebl/unix_rand.c @@ -550,6 +550,39 @@ GetHighResClock(void *buf, size_t maxbytes) #endif /* VMS */ +#ifdef BEOS +#include + +static size_t +GetHighResClock(void *buf, size_t maxbytes) +{ + bigtime_t bigtime; /* Actually an int64 */ + + bigtime = real_time_clock_usecs(); + return CopyLowBits(buf, maxbytes, &bigtime, sizeof(bigtime)); +} + +static void +GiveSystemInfo(void) +{ + system_info *info = NULL; + int32 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 @@ -735,6 +768,16 @@ void 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", @@ -743,6 +786,7 @@ void RNG_SystemInfoForRNG(void) "/usr/tmp", 0 }; +#endif #ifdef DO_PS For now it is considered that it is too expensive to run the ps command diff --git a/security/nss/lib/jar/jar.h b/security/nss/lib/jar/jar.h index 4308e7a958e1..d132f2579152 100644 --- a/security/nss/lib/jar/jar.h +++ b/security/nss/lib/jar/jar.h @@ -203,7 +203,7 @@ typedef struct JAR_Physical_ unsigned long offset; unsigned long length; unsigned long uncompressed_length; -#ifdef XP_UNIX +#if defined(XP_UNIX) || defined(XP_BEOS) uint16 mode; #endif } diff --git a/security/nss/lib/jar/jarfile.c b/security/nss/lib/jar/jarfile.c index 315ec0d6921d..19a3eaa02d11 100644 --- a/security/nss/lib/jar/jarfile.c +++ b/security/nss/lib/jar/jarfile.c @@ -47,7 +47,7 @@ /* commercial compression */ #include "jzlib.h" -#ifdef XP_UNIX +#if defined(XP_UNIX) || defined(XP_BEOS) #include "sys/stat.h" #endif @@ -252,7 +252,7 @@ int JAR_extract (unsigned int) phy->compression); } -#ifdef XP_UNIX +#if defined(XP_UNIX) || defined(XP_BEOS) if (phy->mode) chmod (outpath, 0400 | (mode_t) phy->mode); #endif @@ -891,7 +891,7 @@ static int jar_listzip (JAR *jar, JAR_FILE fp) goto loser; } -#ifdef XP_UNIX +#if defined(XP_UNIX) || defined(XP_BEOS) /* with unix we need to locate any bits from the protection mask in the external attributes. */ { diff --git a/security/nss/lib/nss/nssinit.c b/security/nss/lib/nss/nssinit.c index 07b9085b36dd..a6c308b0521a 100644 --- a/security/nss/lib/nss/nssinit.c +++ b/security/nss/lib/nss/nssinit.c @@ -32,7 +32,7 @@ * may use your version of this file under either the MPL or the * GPL. * - # $Id: nssinit.c,v 1.38 2002/01/29 22:27:15 relyea%netscape.com Exp $ + # $Id: nssinit.c,v 1.39 2002/02/22 04:23:20 wtc%netscape.com Exp $ */ #include @@ -261,7 +261,7 @@ static const char *dllname = "nssckbi.dll"; #elif defined(HPUX) "libnssckbi.sl"; -#elif defined(XP_UNIX) +#elif defined(XP_UNIX) || defined(XP_BEOS) "libnssckbi.so"; #elif defined(XP_MAC) "NSS Builtin Root Certs"; diff --git a/security/nss/lib/ssl/config.mk b/security/nss/lib/ssl/config.mk index 530dcde399d2..e6f9123f6ba0 100644 --- a/security/nss/lib/ssl/config.mk +++ b/security/nss/lib/ssl/config.mk @@ -59,6 +59,10 @@ EXTRA_SHARED_LIBS += \ -lnspr4 \ $(NULL) +ifeq ($(OS_ARCH), BeOS) +EXTRA_SHARED_LIBS += -lbe +endif + ifeq ($(OS_ARCH), Darwin) EXTRA_SHARED_LIBS += -dylib_file @executable_path/libsoftokn3.dylib:$(DIST)/lib/libsoftokn3.dylib endif diff --git a/security/nss/lib/ssl/emulate.c b/security/nss/lib/ssl/emulate.c index a4ffd51a4c4c..9a0a2e9cc4ee 100644 --- a/security/nss/lib/ssl/emulate.c +++ b/security/nss/lib/ssl/emulate.c @@ -34,12 +34,12 @@ * may use your version of this file under either the MPL or the * GPL. * - * $Id: emulate.c,v 1.4 2001/12/07 02:04:24 relyea%netscape.com Exp $ + * $Id: emulate.c,v 1.5 2002/02/22 04:23:22 wtc%netscape.com Exp $ */ #include "nspr.h" -#if defined( XP_UNIX ) +#if defined( XP_UNIX ) || defined( XP_BEOS ) #include #endif #if defined(WIN32) @@ -95,7 +95,7 @@ ssl_EmulateAcceptRead( PRFileDesc * sd, } -#if !defined( XP_UNIX ) && !defined( WIN32 ) +#if !defined( XP_UNIX ) && !defined( WIN32 ) && !defined( XP_BEOS ) /* * _PR_EmulateTransmitFile * @@ -293,12 +293,12 @@ done: PR_CloseFileMap(mapHandle); return count; } -#endif /* XP_UNIX */ +#endif /* XP_UNIX || WIN32 || XP_BEOS */ -#if !defined( XP_UNIX ) && !defined( WIN32 ) +#if !defined( XP_UNIX ) && !defined( WIN32 ) && !defined( XP_BEOS ) /* * _PR_EmulateSendFile * @@ -442,7 +442,7 @@ done: return rv; } -#else /* UNIX and NT handled below */ +#else /* UNIX, NT, and BEOS handled below */ /* * _PR_UnixSendFile @@ -630,4 +630,4 @@ done: PR_Close(sd); return count; } -#endif /* UNIX and NT */ +#endif /* UNIX, NT, and BEOS */ diff --git a/security/nss/lib/ssl/sslimpl.h b/security/nss/lib/ssl/sslimpl.h index 33778b49237d..eaeb022e1d3f 100644 --- a/security/nss/lib/ssl/sslimpl.h +++ b/security/nss/lib/ssl/sslimpl.h @@ -34,7 +34,7 @@ * may use your version of this file under either the MPL or the * GPL. * - * $Id: sslimpl.h,v 1.21 2001/11/22 00:46:48 jpierre%netscape.com Exp $ + * $Id: sslimpl.h,v 1.22 2002/02/22 04:23:24 wtc%netscape.com Exp $ */ #ifndef __sslimpl_h_ @@ -53,7 +53,7 @@ #include "hasht.h" #include "nssilock.h" #include "pkcs11t.h" -#ifdef XP_UNIX +#if defined(XP_UNIX) || defined(XP_BEOS) #include "unistd.h" #endif #include "nssrwlk.h" @@ -1273,7 +1273,7 @@ SEC_END_PROTOS #include #endif -#if defined(XP_UNIX) || defined(XP_OS2) +#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS) #define SSL_GETPID() getpid() #elif defined(WIN32) diff --git a/security/nss/lib/ssl/sslmutex.c b/security/nss/lib/ssl/sslmutex.c index 7707532f8989..d5cbf890458e 100644 --- a/security/nss/lib/ssl/sslmutex.c +++ b/security/nss/lib/ssl/sslmutex.c @@ -30,7 +30,7 @@ * may use your version of this file under either the MPL or the * GPL. * - * $Id: sslmutex.c,v 1.7 2002/02/16 02:52:06 wtc%netscape.com Exp $ + * $Id: sslmutex.c,v 1.8 2002/02/22 04:23:24 wtc%netscape.com Exp $ */ #include "sslmutex.h" @@ -83,7 +83,7 @@ static SECStatus single_process_sslMutex_Lock(sslMutex* pMutex) return SECSuccess; } -#if defined(LINUX) || defined(AIX) || defined(VMS) +#if defined(LINUX) || defined(AIX) || defined(VMS) || defined(BEOS) #include #include diff --git a/security/nss/lib/ssl/sslmutex.h b/security/nss/lib/ssl/sslmutex.h index d5c1cb17be2a..dcc5470205e9 100644 --- a/security/nss/lib/ssl/sslmutex.h +++ b/security/nss/lib/ssl/sslmutex.h @@ -30,7 +30,7 @@ * may use your version of this file under either the MPL or the * GPL. * - * $Id: sslmutex.h,v 1.4 2002/02/16 02:52:07 wtc%netscape.com Exp $ + * $Id: sslmutex.h,v 1.5 2002/02/22 04:23:24 wtc%netscape.com Exp $ */ #ifndef __SSLMUTEX_H_ #define __SSLMUTEX_H_ 1 @@ -77,7 +77,7 @@ typedef struct typedef int sslPID; -#elif defined(LINUX) || defined(AIX) || defined(VMS) +#elif defined(LINUX) || defined(AIX) || defined(VMS) || defined(BEOS) #include #include "prtypes.h" diff --git a/security/nss/lib/ssl/sslnonce.c b/security/nss/lib/ssl/sslnonce.c index b69f0e987773..0e1cf37706b7 100644 --- a/security/nss/lib/ssl/sslnonce.c +++ b/security/nss/lib/ssl/sslnonce.c @@ -32,7 +32,7 @@ * may use your version of this file under either the MPL or the * GPL. * - * $Id: sslnonce.c,v 1.9 2001/11/09 05:39:36 nelsonb%netscape.com Exp $ + * $Id: sslnonce.c,v 1.10 2002/02/22 04:23:24 wtc%netscape.com Exp $ */ #include "nssrenam.h" @@ -44,7 +44,7 @@ #include "sslproto.h" #include "nssilock.h" #include "nsslocks.h" -#if defined(XP_UNIX) || defined(XP_WIN) || defined(_WINDOWS) +#if defined(XP_UNIX) || defined(XP_WIN) || defined(_WINDOWS) || defined(XP_BEOS) #include #endif @@ -348,7 +348,7 @@ PRUint32 ssl_Time(void) { PRUint32 myTime; -#if defined(XP_UNIX) || defined(XP_WIN) || defined(_WINDOWS) +#if defined(XP_UNIX) || defined(XP_WIN) || defined(_WINDOWS) || defined(XP_BEOS) myTime = time(NULL); /* accurate until the year 2038. */ #else /* portable, but possibly slower */ diff --git a/security/nss/lib/ssl/sslsecur.c b/security/nss/lib/ssl/sslsecur.c index 2d75f569f975..3af7439b01d2 100644 --- a/security/nss/lib/ssl/sslsecur.c +++ b/security/nss/lib/ssl/sslsecur.c @@ -32,7 +32,7 @@ * may use your version of this file under either the MPL or the * GPL. * - * $Id: sslsecur.c,v 1.14 2001/11/08 02:15:38 nelsonb%netscape.com Exp $ + * $Id: sslsecur.c,v 1.15 2002/02/22 04:23:25 wtc%netscape.com Exp $ */ #include "cert.h" #include "secitem.h" @@ -47,6 +47,8 @@ #include "winsock.h" /* for MSG_PEEK */ #elif defined(XP_MAC) #include "macsocket.h" +#elif defined(BEOS) +#define MSG_PEEK 0x2 #else #include /* for MSG_PEEK */ #endif diff --git a/security/nss/lib/ssl/sslsnce.c b/security/nss/lib/ssl/sslsnce.c index 502857b72ae9..e7d2ce19ccc5 100644 --- a/security/nss/lib/ssl/sslsnce.c +++ b/security/nss/lib/ssl/sslsnce.c @@ -32,7 +32,7 @@ * may use your version of this file under either the MPL or the * GPL. * - * $Id: sslsnce.c,v 1.19 2002/02/16 02:52:07 wtc%netscape.com Exp $ + * $Id: sslsnce.c,v 1.20 2002/02/22 04:23:26 wtc%netscape.com Exp $ */ /* Note: ssl_FreeSID() in sslnonce.c gets used for both client and server @@ -69,7 +69,7 @@ #include "nssrenam.h" #include "seccomon.h" -#if defined(XP_UNIX) || defined(XP_WIN32) || defined (XP_OS2) +#if defined(XP_UNIX) || defined(XP_WIN32) || defined (XP_OS2) || defined(XP_BEOS) #include "cert.h" #include "ssl.h" @@ -80,7 +80,7 @@ #include -#ifdef XP_UNIX +#if defined(XP_UNIX) || defined(XP_BEOS) #include #include @@ -282,11 +282,11 @@ typedef struct inheritanceStr inheritance; #endif /* _win32 */ -#ifdef XP_UNIX +#if defined(XP_UNIX) || defined(XP_BEOS) #define DEFAULT_CACHE_DIRECTORY "/tmp" -#endif /* XP_UNIX */ +#endif /* XP_UNIX || XP_BEOS */ /************************************************************************/ @@ -294,7 +294,7 @@ typedef struct inheritanceStr inheritance; static void IOError(int rv, char *type) { -#ifdef XP_UNIX +#if defined(XP_UNIX) || defined(XP_BEOS) syslog(LOG_ALERT, "SSL: %s error with session-id cache, pid=%d, rv=%d, error='%m'", type, myPid, rv); @@ -992,7 +992,7 @@ InitCache(cacheDesc *cache, int maxCacheEntries, PRUint32 ssl2_timeout, } /* Create file names */ -#ifdef XP_UNIX +#if defined(XP_UNIX) || defined(XP_BEOS) /* 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); @@ -1206,7 +1206,7 @@ SSL_ConfigMPServerSIDCache( int maxCacheEntries, result = SECFailure; } -#if defined(XP_UNIX) +#if defined(XP_UNIX) || defined(XP_BEOS) /* Launch thread to poll cache for expired locks on Unix */ LaunchLockPoller(cache); #endif @@ -1359,7 +1359,7 @@ SSL_InheritMPServerSIDCache(const char * envString) return SSL_InheritMPServerSIDCacheInstance(&globalCache, envString); } -#if defined(XP_UNIX) +#if defined(XP_UNIX) || defined(XP_BEOS) #define SID_LOCK_EXPIRATION_TIMEOUT 30 /* seconds */ diff --git a/security/nss/lib/ssl/sslsock.c b/security/nss/lib/ssl/sslsock.c index 0e3987c35014..b563a5483dfd 100644 --- a/security/nss/lib/ssl/sslsock.c +++ b/security/nss/lib/ssl/sslsock.c @@ -35,7 +35,7 @@ * may use your version of this file under either the MPL or the * GPL. * - * $Id: sslsock.c,v 1.23 2001/12/07 01:36:23 relyea%netscape.com Exp $ + * $Id: sslsock.c,v 1.24 2002/02/22 04:23:26 wtc%netscape.com Exp $ */ #include "seccomon.h" #include "cert.h" @@ -1800,7 +1800,7 @@ ssl_NewSocket(void) #endif #ifdef DEBUG -#if defined(XP_UNIX) || defined(XP_WIN32) +#if defined(XP_UNIX) || defined(XP_WIN32) || defined(XP_BEOS) if (firsttime) { firsttime = 0; diff --git a/security/nss/lib/ssl/unix_err.c b/security/nss/lib/ssl/unix_err.c index 3c2738d12060..171df5c4d99b 100644 --- a/security/nss/lib/ssl/unix_err.c +++ b/security/nss/lib/ssl/unix_err.c @@ -38,7 +38,7 @@ * may use your version of this file under either the MPL or the * GPL. * - * $Id: unix_err.c,v 1.5 2002/02/10 05:24:49 wtc%netscape.com Exp $ + * $Id: unix_err.c,v 1.6 2002/02/22 04:23:26 wtc%netscape.com Exp $ */ #if 0 @@ -48,7 +48,7 @@ #include "prerror.h" #endif -#if defined (__bsdi__) || defined(NTO) || defined(DARWIN) +#if defined (__bsdi__) || defined(NTO) || defined(DARWIN) || defined(BEOS) #undef _PR_POLL_AVAILABLE #endif diff --git a/security/nss/lib/util/secport.c b/security/nss/lib/util/secport.c index 6b146648e816..471a5963035e 100644 --- a/security/nss/lib/util/secport.c +++ b/security/nss/lib/util/secport.c @@ -38,7 +38,7 @@ * * NOTE - These are not public interfaces * - * $Id: secport.c,v 1.10 2002/02/05 22:20:43 jpierre%netscape.com Exp $ + * $Id: secport.c,v 1.11 2002/02/22 04:23:29 wtc%netscape.com Exp $ */ #include "seccomon.h" @@ -60,7 +60,7 @@ #include "prthread.h" #endif /* THREADMARK */ -#if defined(XP_UNIX) || defined(XP_MAC) || defined(XP_OS2) +#if defined(XP_UNIX) || defined(XP_MAC) || defined(XP_OS2) || defined(XP_BEOS) #include #else #include "wtypes.h" diff --git a/security/nss/lib/util/secport.h b/security/nss/lib/util/secport.h index 3342829ae3f7..0cfc0cb4f61f 100644 --- a/security/nss/lib/util/secport.h +++ b/security/nss/lib/util/secport.h @@ -38,14 +38,14 @@ * * NOTE - These are not public interfaces * - * $Id: secport.h,v 1.2 2001/05/21 21:25:32 wtc%netscape.com Exp $ + * $Id: secport.h,v 1.3 2002/02/22 04:23:30 wtc%netscape.com Exp $ */ #ifndef _SECPORT_H_ #define _SECPORT_H_ /* - * define XP_MAC, XP_WIN, or XP_UNIX, in case they are not defined + * define XP_MAC, XP_WIN, XP_BEOS, or XP_UNIX, in case they are not defined * by anyone else */ #ifdef macintosh @@ -69,6 +69,12 @@ #endif #endif +#ifdef __BEOS__ +# ifndef XP_BEOS +# define XP_BEOS +# endif +#endif + #ifdef unix # ifndef XP_UNIX # define XP_UNIX