diff -urN mozilla/ef/gc/include/smpage.h mozilla.beos/ef/gc/include/smpage.h
--- mozilla/ef/gc/include/smpage.h	Thu Dec 17 07:00:01 1998
+++ mozilla.beos/ef/gc/include/smpage.h	Mon Oct 18 04:07:01 1999
@@ -35,6 +35,9 @@
 
 #include "sm.h"
 #include "prmon.h"
+#if defined(XP_BEOS)
+#include <kernel/OS.h>
+#endif
 
 SM_BEGIN_EXTERN_C
 
@@ -221,6 +224,8 @@
     PRUint8*            segMap;
     SMSegmentDesc*      segTable;
     PRWord              segTableCount;
+#elif defined(XP_BEOS)
+    area_id             segArea;
 #endif
 
     /* the page table */
diff -urN mozilla/ef/gc/src/smpage.c mozilla.beos/ef/gc/src/smpage.c
--- mozilla/ef/gc/src/smpage.c	Sun Feb 28 15:20:34 1999
+++ mozilla.beos/ef/gc/src/smpage.c	Mon Oct 18 04:08:19 1999
@@ -39,6 +39,8 @@
 #include <Types.h>
 #include <Memory.h>
 #include <stdlib.h>
+#elif defined(XP_BEOS)
+#include <kernel/OS.h>
 #elif defined(XP_UNIX)
 #include <sys/mman.h>
 #include <sys/fcntl.h>
@@ -318,6 +320,36 @@
     }
     return PR_FAILURE;
     
+#elif defined(XP_BEOS)
+
+    SMPage* addr = NULL;
+    SMPageCount size = maxPages;
+    area_id my_area = -1;
+
+    while (my_area < 0) {
+        my_area = create_area("ef_gc_area",
+                              (void *)&addr,
+                              B_ANY_ADDRESS,
+                              size << SM_PAGE_BITS,
+                              B_NO_LOCK,
+                              B_READ_AREA | B_WRITE_AREA);
+        if (my_area < 0) {
+            size--;
+            if (size < minPages) {
+                return PR_FAILURE;
+            }
+        }
+    }
+    SM_ASSERT(SM_IS_ALIGNED(addr, SM_PAGE_BITS));
+    pm->memoryBase = addr;
+    pm->pageCount = size;
+    pm->boundary = addr;
+    pm->minPage = SM_PAGE_NUMBER(addr);
+
+    pm->segArea = my_area;
+
+    return PR_SUCCESS;
+
 #else
 
     SMPage* addr = NULL;
@@ -365,6 +397,8 @@
 
 #elif defined(XP_MAC)
     
+#elif defined(XP_BEOS)
+    delete_area(pm->segArea);
 #else
     munmap((caddr_t)pm->memoryBase, pm->pageCount << SM_PAGE_BITS);
 #endif
diff -urN mozilla/ef/config/BeOS.mk mozilla.beos/ef/config/BeOS.mk
--- mozilla/ef/config/BeOS.mk	Thu Jan  1 00:00:00 1970
+++ mozilla.beos/ef/config/BeOS.mk	Mon Jul 26 23:34:00 1999
@@ -0,0 +1,118 @@
+#
+# The contents of this file are subject to the Netscape Public License
+# Version 1.1 (the "NPL"); you may not use this file except in
+# compliance with the NPL.  You may obtain a copy of the NPL at
+# http://www.mozilla.org/NPL/
+# 
+# Software distributed under the NPL is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+# for the specific language governing rights and limitations under the
+# NPL.
+# 
+# The Initial Developer of this code under the NPL is Netscape
+# Communications Corporation.  Portions created by Netscape are
+# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
+# Reserved.
+#
+
+######################################################################
+# Config stuff for BeOS (all architectures)
+######################################################################
+
+######################################################################
+# Version-independent
+######################################################################
+
+DEFINES			+= 
+XP_DEFINE		= -DXP_BEOS
+
+OBJ_SUFFIX              = o
+LIB_SUFFIX              = a
+DLL_SUFFIX              = so
+AR                      = ar cr $@
+
+ifdef BUILD_OPT
+DEFINES                 = -UDEBUG -DNDEBUG
+OBJDIR_TAG              = _OPT
+else
+DEFINES                 = -DDEBUG -UNDEBUG
+OBJDIR_TAG              = _DBG
+endif
+
+ifeq (PC,$(findstring PC,$(OS_TEST)))
+CPU_ARCH		= x86
+CC                      = gcc
+CCC                     = g++
+LD                      = gcc
+RANLIB                  = ranlib
+DSO_LDOPTS              = -nostart
+PORT_FLAGS		= -DHAVE_STRERROR
+ifdef BUILD_OPT
+OPTIMIZER		= -O2
+LDFLAGS			+= -s
+else
+OPTIMIZER		= -gdwarf-2 -O0
+endif
+else
+CPU_ARCH		= ppc
+CC                      = mwcc
+CCC                     = mwcc
+LD                      = mwld
+RANLIB                  = ranlib
+DSO_LDOPTS              = -xms -export pragma \
+					-init _init_routine_ \
+					-term _term_routine_ \
+					-lroot -lnet \
+					/boot/develop/lib/ppc/glue-noinit.a \
+					/boot/develop/lib/ppc/init_term_dyn.o \
+					/boot/develop/lib/ppc/start_dyn.o 
+
+PORT_FLAGS		= -DHAVE_STRERROR -D_POSIX_SOURCE
+ifdef BUILD_OPT
+OPTIMIZER		= -O2
+else
+OPTIMIZER		= -g -O0
+endif
+endif
+CPU_ARCH_TAG		= _$(CPU_ARCH)
+
+OS_INCLUDES		=  -I- -I. 
+#G++INCLUDES		= -I/usr/include/g++
+
+PLATFORM_FLAGS		= -DBeOS -DBEOS $(OS_INCLUDES)
+
+OS_CFLAGS		= $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
+
+USE_BTHREADS = 1
+
+MKSHLIB			= $(LD) $(DSO_LDOPTS)
+
+OBJDIR_NAME	= $(OS_CONFIG)_$(CPU_ARCH)$(OBJDIR_TAG).OBJ
+NSPR_OBJDIR     = $(OS_CONFIG)_$(CPU_ARCH)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
+
+####################################################################
+#
+# One can define the makefile variable NSDISTMODE to control
+# how files are published to the 'dist' directory.  If not
+# defined, the default is "install using relative symbolic
+# links".  The two possible values are "copy", which copies files
+# but preserves source mtime, and "absolute_symlink", which
+# installs using absolute symbolic links.  The "absolute_symlink"
+# option requires NFSPWD.
+#
+####################################################################
+
+NSINSTALL       = $(DEPTH)/config/$(OBJDIR_NAME)/nsinstall
+
+ifeq ($(NSDISTMODE),copy)
+# copy files, but preserve source mtime
+INSTALL         = $(NSINSTALL) -t
+else
+ifeq ($(NSDISTMODE),absolute_symlink)
+# install using absolute symbolic links
+INSTALL         = $(NSINSTALL) -L `$(NFSPWD)`
+else
+# install using relative symbolic links
+INSTALL         = $(NSINSTALL) -R
+endif
+endif
diff -urN mozilla/ef/config/mkdepend/main.c mozilla.beos/ef/config/mkdepend/main.c
--- mozilla/ef/config/mkdepend/main.c	Thu Dec 10 08:02:59 1998
+++ mozilla.beos/ef/config/mkdepend/main.c	Sat Jul 31 16:35:26 1999
@@ -637,7 +637,7 @@
 	    }
 	}
 	fflush(fdout);
-#if defined(USGISH) || defined(_SEQUENT_) || defined(USE_CHMOD)
+#if defined(USGISH) || defined(_SEQUENT_) || defined(USE_CHMOD) || defined(BEOS)
 	chmod(makefile, st.st_mode);
 #else
         fchmod(fileno(fdout), st.st_mode);
diff -urN mozilla/ef/config/nsinstall.c mozilla/ef.beos/config/nsinstall.c
--- mozilla/ef/config/nsinstall.c	Thu Dec  3 21:10:40 1998
+++ mozilla.beos/ef/config/nsinstall.c	Sat Jul 31 16:34:20 1999
@@ -36,7 +36,7 @@
 
 #define HAVE_LCHOWN
 
-#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE)
+#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) || defined(BEOS)
 #undef HAVE_LCHOWN
 #endif
 
@@ -296,8 +296,13 @@
 		if (utime(toname, &utb) < 0)
 		    fail("cannot set times of %s", toname);
 	    }
+#ifdef HAVE_FCHMOD
 	    if (fchmod(tofd, mode) < 0)
 		fail("cannot change mode of %s", toname);
+#else
+	    if (chmod(tofd, mode) < 0)
+		fail("cannot change mode of %s", toname);
+#endif
 	    if ((owner || group) && fchown(tofd, uid, gid) < 0)
 		fail("cannot change owner of %s", toname);
 
