*** ./include/mcom_db.h.orig Tue Mar 31 04:03:49 1998 --- ./include/mcom_db.h Wed Apr 1 04:59:54 1998 *************** *** 224,230 **** #define RET_SUCCESS 0 #define RET_SPECIAL 1 ! #if defined(__386BSD__) || defined(SCO) #define __BIT_TYPES_DEFINED__ #endif --- 224,230 ---- #define RET_SUCCESS 0 #define RET_SPECIAL 1 ! #if defined(__386BSD__) || defined(SCO) || defined(__NetBSD__) #define __BIT_TYPES_DEFINED__ #endif *** ./js/src/prmjtime.c.orig Tue Mar 31 04:04:03 1998 --- ./js/src/prmjtime.c Wed Apr 1 03:13:59 1998 *************** *** 390,396 **** PRInt32 diff; PRInt64 maxtimet; struct tm tm; ! #if defined( XP_PC ) || defined( FREEBSD ) struct tm *ptm; #endif PRMJTime prtm; --- 390,396 ---- PRInt32 diff; PRInt64 maxtimet; struct tm tm; ! #if defined( XP_PC ) || defined( FREEBSD ) || defined( NETBSD ) struct tm *ptm; #endif PRMJTime prtm; *************** *** 409,415 **** } LL_L2UI(local,time); PRMJ_basetime(time,&prtm); ! #if defined( XP_PC ) || defined( FREEBSD ) ptm = localtime(&local); if(!ptm){ return LL_ZERO; --- 409,415 ---- } LL_L2UI(local,time); PRMJ_basetime(time,&prtm); ! #if defined( XP_PC ) || defined( FREEBSD ) || defined( NETBSD ) ptm = localtime(&local); if(!ptm){ return LL_ZERO; *************** *** 844,850 **** /* seconds += dstOffset;*/ #endif ! #if defined(XP_PC) || defined(XP_MAC) || defined( FREEBSD ) lt = *localtime(&seconds); #else localtime_r(&seconds,<); --- 844,850 ---- /* seconds += dstOffset;*/ #endif ! #if defined(XP_PC) || defined(XP_MAC) || defined( FREEBSD ) || defined (NETBSD) lt = *localtime(&seconds); #else localtime_r(&seconds,<); *** ./lib/libnet/mkftp.c.orig Tue Mar 31 04:04:31 1998 --- ./lib/libnet/mkftp.c Wed Apr 1 05:00:28 1998 *************** *** 53,59 **** #endif /* XP_OS2 */ #ifdef XP_UNIX ! #if !defined(__osf__) && !defined(AIXV3) && !defined(_HPUX_SOURCE) && !defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV) #include #endif #endif /* XP_UNIX */ --- 53,59 ---- #endif /* XP_OS2 */ #ifdef XP_UNIX ! #if !defined(__osf__) && !defined(AIXV3) && !defined(_HPUX_SOURCE) && !defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV) || defined(__NetBSD__) #include #endif #endif /* XP_UNIX */ *** ./lib/libnet/mkconect.c.orig Tue Mar 31 04:04:31 1998 --- ./lib/libnet/mkconect.c Wed Apr 1 05:00:58 1998 *************** *** 77,83 **** #include ! #if !defined(__osf__) && !defined(AIXV3) && !defined(_HPUX_SOURCE) && !defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV) #include #endif --- 77,83 ---- #include ! #if !defined(__osf__) && !defined(AIXV3) && !defined(_HPUX_SOURCE) && !defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV) && !defined(__NetBSD__) #include #endif *** ./lib/libnet/mksockrw.c.orig Tue Mar 31 04:04:34 1998 --- ./lib/libnet/mksockrw.c Wed Apr 1 05:01:12 1998 *************** *** 48,54 **** #include ! #if !defined(__osf__) && !defined(AIXV3) && !defined(_HPUX_SOURCE) && !defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV) #include #endif --- 48,54 ---- #include ! #if !defined(__osf__) && !defined(AIXV3) && !defined(_HPUX_SOURCE) && !defined(__386BSD__) && !defined(__linux) && !defined(SCO_SV) && !defined(__NetBSD__) #include #endif *** ./lib/libnet/prefetch.c.orig Tue Mar 31 04:04:34 1998 --- ./lib/libnet/prefetch.c Thu Apr 2 02:16:08 1998 *************** *** 177,183 **** } } ! PRIVATE void pre_Finished(URL_Struct* url_struct, int status, MWContext* context) { /* this should change to update the colors of --- 177,183 ---- } } ! MODULE_PRIVATE void pre_Finished(URL_Struct* url_struct, int status, MWContext* context) { /* this should change to update the colors of *** ./lib/xp/xp_file.c.orig Tue Mar 31 04:04:41 1998 --- ./lib/xp/xp_file.c Wed Apr 1 04:45:00 1998 *************** *** 804,810 **** case xpMimeTypes: case xpSocksConfig: case xpMailFolder: ! #ifdef BSDI /* In bsdi, mkdir fails if the directory name is terminated * with a '/'. - dp */ --- 804,810 ---- case xpMimeTypes: case xpSocksConfig: case xpMailFolder: ! #if defined(BSDI) || defined(NETBSD) /* In bsdi, mkdir fails if the directory name is terminated * with a '/'. - dp */ *** ./modules/libreg/src/vr_stubs.h.orig Tue Mar 31 04:04:54 1998 --- ./modules/libreg/src/vr_stubs.h Wed Apr 1 04:45:46 1998 *************** *** 29,35 **** #ifdef XP_MAC #include #else ! #if defined(BSDI) && !defined(BSDI_2) #include #endif #include --- 29,35 ---- #ifdef XP_MAC #include #else ! #if (defined(BSDI) && !defined(BSDI_2)) || defined(NETBSD) #include #endif #include *** ./modules/schedulr/src/Makefile.orig Tue Mar 31 04:05:31 1998 --- ./modules/schedulr/src/Makefile Sun Apr 5 23:54:52 1998 *************** *** 17,24 **** DEPTH = ../../.. ! MODULE = schedulr ! LIBRARY_NAME = sched REQUIRES = nspr util --- 17,24 ---- DEPTH = ../../.. ! MODULE = schedulr ! LIBRARY_NAME = sched REQUIRES = nspr util *** ./nsprpub/config/NetBSD1.mk.orig Wed Apr 1 01:14:46 1998 --- ./nsprpub/config/NetBSD1.mk Mon Apr 6 23:06:58 1998 *************** *** 0 **** --- 1,58 ---- + # + # The contents of this file are subject to the Netscape Public License + # Version 1.0 (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 NetBSD 1.x + # + + include $(MOD_DEPTH)/config/UNIX.mk + + CC = gcc + CCC = g++ + RANLIB = ranlib + + OS_REL_CFLAGS = + #CPU_ARCH = x86 + + OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DNETBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK + + ifeq ($(USE_PTHREADS),1) + OS_LIBS = -lc_r + # XXX probably should define _THREAD_SAFE too. + else + OS_LIBS = -lc + DEFINES += -D_PR_LOCAL_THREADS_ONLY + endif + + ARCH = netbsd + + DSO_CFLAGS = -fPIC + DSO_LDFLAGS = + DSO_LDOPTS = -Bshareable + ifeq ($(OS_TEST),alpha) + DSO_LDOPTS = -shared + endif + ifeq ($(OS_TEST),mips) + DSO_LDOPTS = -shared + endif + ifeq ($(OS_TEST),pmax) + DSO_LDOPTS = -shared + endif + + MKSHLIB = $(LD) $(DSO_LDOPTS) + + G++INCLUDES = -I/usr/include/g++ *** ./nsprpub/config/arch.mk.orig Wed Apr 1 01:30:26 1998 --- ./nsprpub/config/arch.mk Wed Apr 1 01:33:34 1998 *************** *** 58,64 **** # Handle one dot (2.2-STABLE) and two dot (2.2.5-RELEASE) forms. # ! ifeq ($(OS_ARCH),FreeBSD) OS_RELEASE := $(basename $(shell uname -r)) NEW_OS_RELEASE := $(basename $(OS_RELEASE)) ifneq ($(NEW_OS_RELEASE),"") --- 58,65 ---- # Handle one dot (2.2-STABLE) and two dot (2.2.5-RELEASE) forms. # ! #ifeq ($(OS_ARCH),FreeBSD) ! ifneq (,$(filter FreeBSD NetBSD,$(OS_ARCH))) OS_RELEASE := $(basename $(shell uname -r)) NEW_OS_RELEASE := $(basename $(OS_RELEASE)) ifneq ($(NEW_OS_RELEASE),"") *** ./nsprpub/pr/include/md/_pth.h.orig Tue Mar 31 04:05:25 1998 --- ./nsprpub/pr/include/md/_pth.h Wed Apr 1 03:16:24 1998 *************** *** 69,75 **** (!memcmp(&(t), &pt_zero_tid, sizeof(pthread_t))) #define PTHREAD_COPY_THR_HANDLE(st, dt) (dt) = (st) #elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(SOLARIS) \ ! || defined(HPUX) || defined(LINUX) || defined(FREEBSD) #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) --- 69,76 ---- (!memcmp(&(t), &pt_zero_tid, sizeof(pthread_t))) #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) #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) *************** *** 134,140 **** * These platforms don't have pthread_atfork() */ #if defined(_PR_DCETHREADS) || defined(FREEBSD) \ ! || (defined(LINUX) && defined(__alpha)) #define PT_NO_ATFORK #endif --- 135,142 ---- * These platforms don't have pthread_atfork() */ #if defined(_PR_DCETHREADS) || defined(FREEBSD) \ ! || (defined(LINUX) && defined(__alpha)) \ ! || defined(NETBSD) #define PT_NO_ATFORK #endif *************** *** 142,148 **** * These platforms don't have sigtimedwait() */ #if (defined(AIX) && !defined(AIX4_3)) || defined(LINUX2_0) \ ! || defined(FREEBSD) #define PT_NO_SIGTIMEDWAIT #endif --- 144,150 ---- * These platforms don't have sigtimedwait() */ #if (defined(AIX) && !defined(AIX4_3)) || defined(LINUX2_0) \ ! || defined(FREEBSD) || defined(NETBSD) #define PT_NO_SIGTIMEDWAIT #endif *************** *** 184,190 **** */ #define PT_PRIO_MIN 1 #define PT_PRIO_MAX 127 ! #elif defined(FREEBSD) /* XXX */ #define PT_PRIO_MIN 0 #define PT_PRIO_MAX 126 #else --- 186,192 ---- */ #define PT_PRIO_MIN 1 #define PT_PRIO_MAX 127 ! #elif defined(FREEBSD) || defined(NETBSD)/* XXX */ #define PT_PRIO_MIN 0 #define PT_PRIO_MAX 126 #else *************** *** 210,216 **** #define PTHREAD_YIELD() sched_yield() #elif defined(LINUX) #define PTHREAD_YIELD() sched_yield() ! #elif defined(FREEBSD) #define PTHREAD_YIELD() pthread_yield() #else #error "Need to define PTHREAD_YIELD for this platform" --- 212,218 ---- #define PTHREAD_YIELD() sched_yield() #elif defined(LINUX) #define PTHREAD_YIELD() sched_yield() ! #elif defined(FREEBSD) || defined(NETBSD) #define PTHREAD_YIELD() pthread_yield() #else #error "Need to define PTHREAD_YIELD for this platform" *** ./nsprpub/pr/include/md/prosdep.h.orig Tue Mar 31 04:05:25 1998 --- ./nsprpub/pr/include/md/prosdep.h Wed Apr 1 04:11:48 1998 *************** *** 59,64 **** --- 59,67 ---- #elif defined(FREEBSD) #include "md/_freebsd.h" + #elif defined(NETBSD) + #include "md/_netbsd.h" + #elif defined(BSDI) #include "md/_bsdi.h" *** ./nsprpub/pr/include/md/_netbsd.cfg.orig Wed Apr 1 01:36:34 1998 --- ./nsprpub/pr/include/md/_netbsd.cfg Tue Apr 7 22:38:07 1998 *************** *** 0 **** --- 1,262 ---- + /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ + /* + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (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. + */ + + #ifndef nspr_cpucfg___ + #define nspr_cpucfg___ + + #ifndef XP_UNIX + #define XP_UNIX + #endif + + #ifndef NETBSD + #define NETBSD + #endif + + #ifdef __i386__ + + #define IS_LITTLE_ENDIAN 1 + #undef IS_BIG_ENDIAN + #define HAVE_LONG_LONG + #undef HAVE_ALIGNED_DOUBLES + #undef HAVE_ALIGNED_LONGLONGS + + #define PR_BYTES_PER_BYTE 1 + #define PR_BYTES_PER_SHORT 2 + #define PR_BYTES_PER_INT 4 + #define PR_BYTES_PER_INT64 8 + #define PR_BYTES_PER_LONG 4 + #define PR_BYTES_PER_FLOAT 4 + #define PR_BYTES_PER_DOUBLE 8 + #define PR_BYTES_PER_WORD 4 + #define PR_BYTES_PER_DWORD 8 + #define PR_BYTES_PER_WORD_LOG2 2 + #define PR_BYTES_PER_DWORD_LOG2 3 + + #define PR_BITS_PER_BYTE 8 + #define PR_BITS_PER_SHORT 16 + #define PR_BITS_PER_INT 32 + #define PR_BITS_PER_INT64 64 + #define PR_BITS_PER_LONG 32 + #define PR_BITS_PER_FLOAT 32 + #define PR_BITS_PER_DOUBLE 64 + #define PR_BITS_PER_WORD 32 + + #define PR_BITS_PER_BYTE_LOG2 3 + #define PR_BITS_PER_SHORT_LOG2 4 + #define PR_BITS_PER_INT_LOG2 5 + #define PR_BITS_PER_INT64_LOG2 6 + #define PR_BITS_PER_LONG_LOG2 5 + #define PR_BITS_PER_FLOAT_LOG2 5 + #define PR_BITS_PER_DOUBLE_LOG2 6 + #define PR_BITS_PER_WORD_LOG2 5 + + #define PR_ALIGN_OF_SHORT 2 + #define PR_ALIGN_OF_INT 4 + #define PR_ALIGN_OF_LONG 4 + #define PR_ALIGN_OF_INT64 4 + #define PR_ALIGN_OF_FLOAT 4 + #define PR_ALIGN_OF_DOUBLE 4 + #define PR_ALIGN_OF_POINTER 4 + + #elif defined(__sparc__) + + #undef IS_LITTLE_ENDIAN 1 + #define IS_BIG_ENDIAN 1 + #define HAVE_LONG_LONG + #define HAVE_ALIGNED_DOUBLES + #define HAVE_ALIGNED_LONGLONGS + + #define PR_BYTES_PER_BYTE 1 + #define PR_BYTES_PER_SHORT 2 + #define PR_BYTES_PER_INT 4 + #define PR_BYTES_PER_INT64 8 + #define PR_BYTES_PER_LONG 4 + #define PR_BYTES_PER_FLOAT 4 + #define PR_BYTES_PER_DOUBLE 8 + #define PR_BYTES_PER_WORD 4 + #define PR_BYTES_PER_DWORD 8 + #define PR_BYTES_PER_WORD_LOG2 2 + #define PR_BYTES_PER_DWORD_LOG2 3 + + #define PR_BITS_PER_BYTE 8 + #define PR_BITS_PER_SHORT 16 + #define PR_BITS_PER_INT 32 + #define PR_BITS_PER_INT64 64 + #define PR_BITS_PER_LONG 32 + #define PR_BITS_PER_FLOAT 32 + #define PR_BITS_PER_DOUBLE 64 + #define PR_BITS_PER_WORD 32 + + #define PR_BITS_PER_BYTE_LOG2 3 + #define PR_BITS_PER_SHORT_LOG2 4 + #define PR_BITS_PER_INT_LOG2 5 + #define PR_BITS_PER_INT64_LOG2 6 + #define PR_BITS_PER_LONG_LOG2 5 + #define PR_BITS_PER_FLOAT_LOG2 5 + #define PR_BITS_PER_DOUBLE_LOG2 6 + #define PR_BITS_PER_WORD_LOG2 5 + + #define PR_ALIGN_OF_SHORT 2 + #define PR_ALIGN_OF_INT 4 + #define PR_ALIGN_OF_LONG 4 + #define PR_ALIGN_OF_INT64 8 + #define PR_ALIGN_OF_FLOAT 4 + #define PR_ALIGN_OF_DOUBLE 8 + #define PR_ALIGN_OF_POINTER 4 + + #elif defined(__alpha__) + #define IS_LITTLE_ENDIAN 1 + #undef IS_BIG_ENDIAN + #define IS_64 + + #define PR_BYTES_PER_BYTE 1 + #define PR_BYTES_PER_SHORT 2 + #define PR_BYTES_PER_INT 4 + #define PR_BYTES_PER_INT64 8 + #define PR_BYTES_PER_LONG 8 + #define PR_BYTES_PER_FLOAT 4 + #define PR_BYTES_PER_DOUBLE 8 + #define PR_BYTES_PER_WORD 8 + #define PR_BYTES_PER_DWORD 8 + + #define PR_BITS_PER_BYTE 8 + #define PR_BITS_PER_SHORT 16 + #define PR_BITS_PER_INT 32 + #define PR_BITS_PER_INT64 64 + #define PR_BITS_PER_LONG 64 + #define PR_BITS_PER_FLOAT 32 + #define PR_BITS_PER_DOUBLE 64 + #define PR_BITS_PER_WORD 64 + + #define PR_BITS_PER_BYTE_LOG2 3 + #define PR_BITS_PER_SHORT_LOG2 4 + #define PR_BITS_PER_INT_LOG2 5 + #define PR_BITS_PER_INT64_LOG2 6 + #define PR_BITS_PER_LONG_LOG2 6 + #define PR_BITS_PER_FLOAT_LOG2 5 + #define PR_BITS_PER_DOUBLE_LOG2 6 + #define PR_BITS_PER_WORD_LOG2 6 + + #define PR_ALIGN_OF_SHORT 2 + #define PR_ALIGN_OF_INT 4 + #define PR_ALIGN_OF_LONG 8 + #define PR_ALIGN_OF_INT64 8 + #define PR_ALIGN_OF_FLOAT 4 + #define PR_ALIGN_OF_DOUBLE 8 + #define PR_ALIGN_OF_POINTER 8 + + #define PR_BYTES_PER_WORD_LOG2 3 + #define PR_BYTES_PER_DWORD_LOG2 3 + + #elif defined(__powerpc__) || defined(__m68k__) + + #undef IS_LITTLE_ENDIAN + #define IS_BIG_ENDIAN 1 + + #define PR_BYTES_PER_BYTE 1 + #define PR_BYTES_PER_SHORT 2 + #define PR_BYTES_PER_INT 4 + #define PR_BYTES_PER_INT64 8 + #define PR_BYTES_PER_LONG 4 + #define PR_BYTES_PER_FLOAT 4 + #define PR_BYTES_PER_DOUBLE 8 + #define PR_BYTES_PER_WORD 4 + #define PR_BYTES_PER_DWORD 8 + + #define PR_BITS_PER_BYTE 8 + #define PR_BITS_PER_SHORT 16 + #define PR_BITS_PER_INT 32 + #define PR_BITS_PER_INT64 64 + #define PR_BITS_PER_LONG 32 + #define PR_BITS_PER_FLOAT 32 + #define PR_BITS_PER_DOUBLE 64 + #define PR_BITS_PER_WORD 32 + + #define PR_BITS_PER_BYTE_LOG2 3 + #define PR_BITS_PER_SHORT_LOG2 4 + #define PR_BITS_PER_INT_LOG2 5 + #define PR_BITS_PER_INT64_LOG2 6 + #define PR_BITS_PER_LONG_LOG2 5 + #define PR_BITS_PER_FLOAT_LOG2 5 + #define PR_BITS_PER_DOUBLE_LOG2 6 + #define PR_BITS_PER_WORD_LOG2 5 + + #define PR_ALIGN_OF_SHORT 2 + #define PR_ALIGN_OF_INT 4 + #define PR_ALIGN_OF_LONG 4 + #define PR_ALIGN_OF_INT64 4 + #define PR_ALIGN_OF_FLOAT 4 + #define PR_ALIGN_OF_DOUBLE 4 + #define PR_ALIGN_OF_POINTER 4 + + #define PR_BYTES_PER_WORD_LOG2 2 + #define PR_BYTES_PER_DWORD_LOG2 3 + + #else + + #error Must define constants for type sizes here. + + #endif + + + #ifndef NO_NSPR_10_SUPPORT + + #define BYTES_PER_BYTE PR_BYTES_PER_BYTE + #define BYTES_PER_SHORT PR_BYTES_PER_SHORT + #define BYTES_PER_INT PR_BYTES_PER_INT + #define BYTES_PER_INT64 PR_BYTES_PER_INT64 + #define BYTES_PER_LONG PR_BYTES_PER_LONG + #define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT + #define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE + #define BYTES_PER_WORD PR_BYTES_PER_WORD + #define BYTES_PER_DWORD PR_BYTES_PER_DWORD + + #define BITS_PER_BYTE PR_BITS_PER_BYTE + #define BITS_PER_SHORT PR_BITS_PER_SHORT + #define BITS_PER_INT PR_BITS_PER_INT + #define BITS_PER_INT64 PR_BITS_PER_INT64 + #define BITS_PER_LONG PR_BITS_PER_LONG + #define BITS_PER_FLOAT PR_BITS_PER_FLOAT + #define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE + #define BITS_PER_WORD PR_BITS_PER_WORD + + #define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2 + #define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2 + #define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2 + #define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2 + #define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2 + #define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2 + #define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2 + #define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2 + + #define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT + #define ALIGN_OF_INT PR_ALIGN_OF_INT + #define ALIGN_OF_LONG PR_ALIGN_OF_LONG + #define ALIGN_OF_INT64 PR_ALIGN_OF_INT64 + #define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT + #define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE + #define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER + #define ALIGN_OF_WORD PR_ALIGN_OF_WORD + + #define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2 + #define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2 + #define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2 + + #endif /* NO_NSPR_10_SUPPORT */ + + #endif /* nspr_cpucfg___ */ *** ./nsprpub/pr/include/md/_netbsd.h.orig Wed Apr 1 01:36:40 1998 --- ./nsprpub/pr/include/md/_netbsd.h Thu Apr 9 01:52:41 1998 *************** *** 0 **** --- 1,169 ---- + /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ + /* + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (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. + */ + + #ifndef nspr_netbsd_defs_h___ + #define nspr_netbsd_defs_h___ + + #include + + #define PR_LINKER_ARCH "netbsd" + #define _PR_SI_SYSNAME "NetBSD" + #if defined(__i386__) + #define _PR_SI_ARCHITECTURE "x86" + #elif defined(__alpha__) + #define _PR_SI_ARCHITECTURE "alpha" + #elif defined(__m68k__) + #define _PR_SI_ARCHITECTURE "m68k" + #elif defined(__powerpc__) + #define _PR_SI_ARCHITECTURE "powerpc" + #elif defined(__sparc__) + #define _PR_SI_ARCHITECTURE "sparc" + #elif defined(__arm32__) + #define _PR_SI_ACRHITECTURE "arm32" + #endif + + #define PR_DLL_SUFFIX ".so.1.0" + + #define _PR_VMBASE 0x30000000 + #define _PR_STACK_VMBASE 0x50000000 + #define _MD_DEFAULT_STACK_SIZE 65536L + #define _MD_MMAP_FLAGS MAP_PRIVATE + + #undef HAVE_STACK_GROWING_UP + #define HAVE_DLL + #define USE_DLFCN + + #define USE_SETJMP + + #ifndef _PR_PTHREADS + #include + + #define PR_CONTEXT_TYPE sigjmp_buf + + #define CONTEXT(_th) ((_th)->md.context) + + #if defined(__i386__) || defined(__sparc__) || defined(__m68k__) || defined(__powerpc__) + #define JB_SP_INDEX 2 + #elif defined(__alpha__) + #define JB_SP_INDEX 34 + #elif defined(__arm32__) + #define JB_SP_INDEX JMPBUF_REG_R13 + #else + #error "Need to define SP index in jmp_buf here" + #endif + + #define _MD_GET_SP(_th) (_th)->md.context[JB_SP_INDEX] + + #define PR_NUM_GCREGS _JBLEN + + /* + ** Initialize a thread context to run "_main()" when started + */ + #define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \ + { \ + *status = PR_TRUE; \ + if (sigsetjmp(CONTEXT(_thread), 1)) { \ + _main(); \ + } \ + _MD_GET_SP(_thread) = (unsigned char*) ((_sp) - 64); \ + } + + #define _MD_SWITCH_CONTEXT(_thread) \ + if (!sigsetjmp(CONTEXT(_thread), 1)) { \ + (_thread)->md.errcode = errno; \ + _PR_Schedule(); \ + } + + /* + ** Restore a thread context, saved by _MD_SWITCH_CONTEXT + */ + #define _MD_RESTORE_CONTEXT(_thread) \ + { \ + errno = (_thread)->md.errcode; \ + _MD_SET_CURRENT_THREAD(_thread); \ + siglongjmp(CONTEXT(_thread), 1); \ + } + + /* Machine-dependent (MD) data structures */ + + struct _MDThread { + PR_CONTEXT_TYPE context; + int id; + int errcode; + }; + + struct _MDThreadStack { + PRInt8 notused; + }; + + struct _MDLock { + PRInt8 notused; + }; + + struct _MDSemaphore { + PRInt8 notused; + }; + + struct _MDCVar { + PRInt8 notused; + }; + + struct _MDSegment { + PRInt8 notused; + }; + + struct _MDCPU { + struct _MDCPU_Unix md_unix; + }; + + #define _MD_INIT_LOCKS() + #define _MD_NEW_LOCK(lock) PR_SUCCESS + #define _MD_FREE_LOCK(lock) + #define _MD_LOCK(lock) + #define _MD_UNLOCK(lock) + #define _MD_INIT_IO() + #define _MD_IOQ_LOCK() + #define _MD_IOQ_UNLOCK() + + #define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu) + #define _MD_INIT_THREAD _MD_InitializeThread + #define _MD_EXIT_THREAD(thread) + #define _MD_SUSPEND_THREAD(thread) _MD_suspend_thread + #define _MD_RESUME_THREAD(thread) _MD_resume_thread + #define _MD_CLEAN_THREAD(_thread) + + #endif /* ! _PR_PTHREADS */ + + #define _MD_EARLY_INIT _MD_EarlyInit + #define _MD_FINAL_INIT _PR_UnixInit + #define _MD_GET_INTERVAL _PR_UNIX_GetInterval + #define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond + + /* + * We wrapped the select() call. _MD_SELECT refers to the built-in, + * unwrapped version. + */ + #define _MD_SELECT(nfds,r,w,e,tv) syscall(SYS_select,nfds,r,w,e,tv) + #define _MD_POLL(fds,nfds,timeout) syscall(SYS_poll,fds,nfds,timeout) + + #if defined(NetBSD1_3) && NetBSD1_3 == 1 + typedef unsigned int nfds_t; + #define O_SYNC O_FSYNC + #endif + + #endif /* nspr_netbsd_defs_h___ */ *** ./nsprpub/pr/include/md/Makefile.orig Tue Mar 31 04:05:25 1998 --- ./nsprpub/pr/include/md/Makefile Wed Apr 1 02:48:34 1998 *************** *** 55,60 **** --- 55,64 ---- MDCPUCFG_H = _freebsd.cfg endif + ifeq ($(OS_ARCH),NetBSD) + MDCPUCFG_H = _netbsd.cfg + endif + ifeq ($(OS_ARCH),HP-UX) MDCPUCFG_H = _hpux.cfg endif *** ./nsprpub/pr/include/md/_unixos.h.orig Tue Mar 31 04:05:25 1998 --- ./nsprpub/pr/include/md/_unixos.h Wed Apr 1 03:16:41 1998 *************** *** 49,55 **** || defined(UNIXWARE) || defined(NCR) || defined(SNI) || defined(NEC) \ || defined(BSDI) || defined(SONY) #include ! #elif defined(SUNOS4) || defined(SCO) || defined(FREEBSD) #include #elif defined(LINUX) #include --- 49,55 ---- || defined(UNIXWARE) || defined(NCR) || defined(SNI) || defined(NEC) \ || defined(BSDI) || defined(SONY) #include ! #elif defined(SUNOS4) || defined(SCO) || defined(FREEBSD) || defined(NETBSD) #include #elif defined(LINUX) #include *** ./nsprpub/pr/src/md/unix/Makefile.orig Tue Mar 31 04:05:26 1998 --- ./nsprpub/pr/src/md/unix/Makefile Wed Apr 1 03:50:43 1998 *************** *** 57,62 **** --- 57,66 ---- freebsd.c \ $(NULL) + NETBSD_CSRCS = \ + netbsd.c \ + $(NULL) + BSDI_CSRCS = \ bsdi.c \ $(NULL) *************** *** 118,123 **** --- 122,130 ---- endif ifeq ($(OS_ARCH),FreeBSD) CSRCS += $(FREEBSD_CSRCS) + endif + ifeq ($(OS_ARCH),NetBSD) + CSRCS += $(NETBSD_CSRCS) endif ifeq ($(OS_ARCH),BSD_386) CSRCS += $(BSDI_CSRCS) *** ./nsprpub/pr/src/md/unix/objs.mk.orig Tue Mar 31 04:05:26 1998 --- ./nsprpub/pr/src/md/unix/objs.mk Wed Apr 1 03:51:09 1998 *************** *** 49,54 **** --- 49,58 ---- freebsd.c \ $(NULL) + NETBSD_CSRCS = \ + netbsd.c \ + $(NULL) + BSDI_CSRCS = \ bsdi.c \ $(NULL) *************** *** 111,116 **** --- 115,123 ---- endif ifeq ($(OS_ARCH),FreeBSD) CSRCS += $(FREEBSD_CSRCS) + endif + ifeq ($(OS_ARCH),NetBSD) + CSRCS += $(NETBSD_CSRCS) endif ifeq ($(OS_ARCH),BSD_386) CSRCS += $(BSDI_CSRCS) *** ./nsprpub/pr/src/md/unix/unix.c.orig Tue Mar 31 04:05:26 1998 --- ./nsprpub/pr/src/md/unix/unix.c Wed Apr 1 03:20:06 1998 *************** *** 44,50 **** || defined(SUNOS4) #define _PRSockLen_t int #elif (defined(AIX) && !defined(AIX4_1)) || defined(FREEBSD) \ ! || defined(UNIXWARE) #define _PRSockLen_t size_t #else #error "Cannot determine architecture" --- 44,50 ---- || defined(SUNOS4) #define _PRSockLen_t int #elif (defined(AIX) && !defined(AIX4_1)) || defined(FREEBSD) \ ! || defined(UNIXWARE) || defined(NETBSD) #define _PRSockLen_t size_t #else #error "Cannot determine architecture" *** ./nsprpub/pr/src/md/unix/unix_errors.c.orig Tue Mar 31 04:05:26 1998 --- ./nsprpub/pr/src/md/unix/unix_errors.c Wed Apr 1 03:21:08 1998 *************** *** 160,166 **** case EROFS: PR_SetError(PR_READ_ONLY_FILESYSTEM_ERROR, err); break; ! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) case EMULTIHOP: case ENOLINK: PR_SetError(PR_REMOTE_FILE_ERROR, err); --- 160,166 ---- case EROFS: PR_SetError(PR_READ_ONLY_FILESYSTEM_ERROR, err); break; ! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) && !defined(NETBSD) case EMULTIHOP: case ENOLINK: PR_SetError(PR_REMOTE_FILE_ERROR, err); *************** *** 185,191 **** PR_SetError(PR_PENDING_INTERRUPT_ERROR, err); break; case ETIMEDOUT: ! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) case EMULTIHOP: case ENOLINK: #endif --- 185,191 ---- PR_SetError(PR_PENDING_INTERRUPT_ERROR, err); break; case ETIMEDOUT: ! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) && !defined(NETBSD) case EMULTIHOP: case ENOLINK: #endif *************** *** 278,284 **** case ELOOP: PR_SetError(PR_LOOP_ERROR, err); break; ! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) case EMULTIHOP: case ENOLINK: PR_SetError(PR_REMOTE_FILE_ERROR, err); --- 278,284 ---- case ELOOP: PR_SetError(PR_LOOP_ERROR, err); break; ! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) && !defined(NETBSD) case EMULTIHOP: case ENOLINK: PR_SetError(PR_REMOTE_FILE_ERROR, err); *************** *** 329,335 **** case ELOOP: PR_SetError(PR_LOOP_ERROR, err); break; ! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) case EMULTIHOP: case ENOLINK: #endif --- 329,335 ---- case ELOOP: PR_SetError(PR_LOOP_ERROR, err); break; ! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) && !defined(NETBSD) case EMULTIHOP: case ENOLINK: #endif *************** *** 395,401 **** case EIO: PR_SetError(PR_IO_ERROR, err); break; ! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) case EMULTIHOP: case ENOLINK: PR_SetError(PR_REMOTE_FILE_ERROR, err); --- 395,401 ---- case EIO: PR_SetError(PR_IO_ERROR, err); break; ! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) && !defined(NETBSD) case EMULTIHOP: case ENOLINK: PR_SetError(PR_REMOTE_FILE_ERROR, err); *************** *** 432,438 **** case ELOOP: PR_SetError(PR_LOOP_ERROR, err); break; ! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) case EMULTIHOP: case ENOLINK: #endif --- 432,438 ---- case ELOOP: PR_SetError(PR_LOOP_ERROR, err); break; ! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) && !defined(NETBSD) case EMULTIHOP: case ENOLINK: #endif *************** *** 1345,1351 **** PR_SetError(PR_NO_ACCESS_RIGHTS_ERROR, err); break; case ETIMEDOUT: ! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) case EMULTIHOP: case ENOLINK: #endif --- 1345,1351 ---- PR_SetError(PR_NO_ACCESS_RIGHTS_ERROR, err); break; case ETIMEDOUT: ! #if !defined(OSF1) && !defined(FREEBSD) && !defined(BSDI) && !defined(NETBSD) case EMULTIHOP: case ENOLINK: #endif *** ./nsprpub/pr/src/md/unix/uxwrap.c.orig Tue Mar 31 04:05:26 1998 --- ./nsprpub/pr/src/md/unix/uxwrap.c Wed Apr 1 03:47:19 1998 *************** *** 326,331 **** --- 326,333 ---- int poll(struct pollfd filedes[], unsigned int nfds, int timeout) #elif defined(HPUX9) int poll(struct pollfd filedes[], int nfds, int timeout) + #elif defined(NETBSD) + int poll(struct pollfd *filedes, nfds_t nfds, int timeout) #else int poll(struct pollfd *filedes, unsigned long nfds, int timeout) #endif *** ./nsprpub/pr/src/md/unix/netbsd.c.orig Wed Apr 1 03:26:27 1998 --- ./nsprpub/pr/src/md/unix/netbsd.c Mon Apr 6 00:06:25 1998 *************** *** 0 **** --- 1,102 ---- + /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ + /* + * The contents of this file are subject to the Netscape Public License + * Version 1.0 (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. + */ + + #include "primpl.h" + + #include + #include + #include + + void _MD_EarlyInit(void) + { + /* + * Ignore FPE because coercion of a NaN to an int causes SIGFPE + * to be raised. + */ + struct sigaction act; + + act.sa_handler = SIG_IGN; + sigemptyset(&act.sa_mask); + act.sa_flags = SA_RESTART; + sigaction(SIGFPE, &act, 0); + } + + PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np) + { + #ifndef _PR_PTHREADS + if (isCurrent) { + (void) sigsetjmp(CONTEXT(t), 1); + } + *np = sizeof(CONTEXT(t)) / sizeof(PRWord); + return (PRWord *) CONTEXT(t); + #else + *np = 0; + return NULL; + #endif + } + + #ifndef _PR_PTHREADS + void + _MD_SET_PRIORITY(_MDThread *thread, PRUintn newPri) + { + return; + } + + PRStatus + _MD_InitializeThread(PRThread *thread) + { + return PR_SUCCESS; + } + + PRStatus + _MD_WAIT(PRThread *thread, PRIntervalTime ticks) + { + PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE)); + _PR_MD_SWITCH_CONTEXT(thread); + return PR_SUCCESS; + } + + PRStatus + _MD_WAKEUP_WAITER(PRThread *thread) + { + if (thread) { + PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE)); + } + return PR_SUCCESS; + } + + /* These functions should not be called for OSF1 */ + void + _MD_YIELD(void) + { + PR_NOT_REACHED("_MD_YIELD should not be called for OSF1."); + } + + PRStatus + _MD_CREATE_THREAD( + PRThread *thread, + void (*start) (void *), + PRThreadPriority priority, + PRThreadScope scope, + PRThreadState state, + PRUint32 stackSize) + { + PR_NOT_REACHED("_MD_CREATE_THREAD should not be called for OSF1."); + return PR_FAILURE; + } + #endif /* ! _PR_PTHREADS */ *** ./nsprpub/pr/src/md/prosdep.c.orig Tue Mar 31 04:05:25 1998 --- ./nsprpub/pr/src/md/prosdep.c Wed Apr 1 03:17:59 1998 *************** *** 42,48 **** /* Get page size */ #ifdef XP_UNIX #if defined SUNOS4 || defined LINUX || defined BSDI || defined AIX \ ! || defined FREEBSD _pr_pageSize = getpagesize(); #elif defined(HPUX) /* I have no idea. Don't get me started. --Rob */ --- 42,48 ---- /* Get page size */ #ifdef XP_UNIX #if defined SUNOS4 || defined LINUX || defined BSDI || defined AIX \ ! || defined FREEBSD || defined NETBSD _pr_pageSize = getpagesize(); #elif defined(HPUX) /* I have no idea. Don't get me started. --Rob */ *** ./nsprpub/pr/src/linking/prlink.c.orig Tue Mar 31 04:05:25 1998 --- ./nsprpub/pr/src/linking/prlink.c Wed Apr 1 04:53:37 1998 *************** *** 75,81 **** /************************************************************************/ ! #if ( !defined(USE_DLFCN) && !defined(HAVE_STRERROR) ) || defined(HPUX) || defined(BSDI) || defined(LINUX) static char* errStrBuf = NULL; #define ERR_STR_BUF_LENGTH 20 static char* errno_string(PRIntn oserr) --- 75,81 ---- /************************************************************************/ ! #if ( !defined(USE_DLFCN) && !defined(HAVE_STRERROR) ) || defined(HPUX) || defined(BSDI) || defined(LINUX) || defined(NETBSD) static char* errStrBuf = NULL; #define ERR_STR_BUF_LENGTH 20 static char* errno_string(PRIntn oserr) *** ./nsprpub/pr/src/pthreads/ptio.c.orig Tue Mar 31 04:05:27 1998 --- ./nsprpub/pr/src/pthreads/ptio.c Wed Apr 1 03:22:42 1998 *************** *** 84,90 **** #elif defined(IRIX) || (defined(AIX) && !defined(AIX4_1)) \ || defined(OSF1) || defined(SOLARIS) \ || defined(HPUX10_30) || defined(HPUX11) || defined(LINUX) \ ! || defined(FREEBSD) #define _PRSelectFdSetArg_t fd_set * #else #error "Cannot determine architecture" --- 84,90 ---- #elif defined(IRIX) || (defined(AIX) && !defined(AIX4_1)) \ || defined(OSF1) || defined(SOLARIS) \ || defined(HPUX10_30) || defined(HPUX11) || defined(LINUX) \ ! || defined(FREEBSD) || defined(NETBSD) #define _PRSelectFdSetArg_t fd_set * #else #error "Cannot determine architecture" *************** *** 2385,2391 **** #endif #if defined(HPUX) || defined(OSF1) || defined(SOLARIS) || defined (IRIX) \ ! || defined(AIX) || defined(LINUX) || defined(FREEBSD) #define _PR_FCNTL_FLAGS O_NONBLOCK #else #error "Can't determine architecture" --- 2385,2391 ---- #endif #if defined(HPUX) || defined(OSF1) || defined(SOLARIS) || defined (IRIX) \ ! || defined(AIX) || defined(LINUX) || defined(FREEBSD) || defined(NETBSD) #define _PR_FCNTL_FLAGS O_NONBLOCK #else #error "Can't determine architecture" *** ./nsprpub/pr/src/pthreads/ptthread.c.orig Tue Mar 31 04:05:27 1998 --- ./nsprpub/pr/src/pthreads/ptthread.c Wed Apr 1 03:24:16 1998 *************** *** 191,201 **** if (EPERM != pt_schedpriv) { ! #if !defined(_PR_DCETHREADS) && !defined(FREEBSD) struct sched_param schedule; #endif ! #if !defined(FREEBSD) rv = pthread_attr_setinheritsched(&tattr, PTHREAD_EXPLICIT_SCHED); PR_ASSERT(0 == rv); #endif --- 191,201 ---- if (EPERM != pt_schedpriv) { ! #if !defined(_PR_DCETHREADS) && !defined(FREEBSD) && !defined(NETBSD) struct sched_param schedule; #endif ! #if !defined(FREEBSD) && !defined(NETBSD) rv = pthread_attr_setinheritsched(&tattr, PTHREAD_EXPLICIT_SCHED); PR_ASSERT(0 == rv); #endif *************** *** 205,211 **** #if defined(_PR_DCETHREADS) rv = pthread_attr_setprio(&tattr, pt_PriorityMap(priority)); PR_ASSERT(0 == rv); ! #elif !defined(FREEBSD) rv = pthread_attr_getschedparam(&tattr, &schedule); PR_ASSERT(0 == rv); schedule.sched_priority = pt_PriorityMap(priority); --- 205,211 ---- #if defined(_PR_DCETHREADS) rv = pthread_attr_setprio(&tattr, pt_PriorityMap(priority)); PR_ASSERT(0 == rv); ! #elif !defined(FREEBSD) && !defined(NETBSD) rv = pthread_attr_getschedparam(&tattr, &schedule); PR_ASSERT(0 == rv); schedule.sched_priority = pt_PriorityMap(priority); *************** *** 539,545 **** rv = pthread_setprio(thred->id, pt_PriorityMap(newPri)); /* pthread_setprio returns the old priority */ PR_ASSERT(-1 != rv); ! #elif !defined(FREEBSD) if (EPERM != pt_schedpriv) { int policy; --- 539,545 ---- rv = pthread_setprio(thred->id, pt_PriorityMap(newPri)); /* pthread_setprio returns the old priority */ PR_ASSERT(-1 != rv); ! #elif !defined(FREEBSD) && !defined(NETBSD) if (EPERM != pt_schedpriv) { int policy; *************** *** 730,736 **** * conflict with the use of these two signals in our GC support. * So we don't know how to support GC on Linux pthreads. */ ! #if !defined(LINUX2_0) && !defined(FREEBSD) init_pthread_gc_support(); #endif --- 730,736 ---- * conflict with the use of these two signals in our GC support. * So we don't know how to support GC on Linux pthreads. */ ! #if !defined(LINUX2_0) && !defined(FREEBSD) && !defined(NETBSD) init_pthread_gc_support(); #endif *************** *** 1015,1021 **** pthread_cond_signal(&me->suspendResumeCV); while (me->suspend & PT_THREAD_SUSPENDED) { ! #if !defined(FREEBSD) /*XXX*/ PRIntn rv; sigwait(&sigwait_set, &rv); #endif --- 1015,1021 ---- pthread_cond_signal(&me->suspendResumeCV); while (me->suspend & PT_THREAD_SUSPENDED) { ! #if !defined(FREEBSD) && !defined(NETBSD) /*XXX*/ PRIntn rv; sigwait(&sigwait_set, &rv); #endif *** ./dbm/include/mcom_db.h.orig Tue Mar 31 04:05:30 1998 --- ./dbm/include/mcom_db.h Wed Apr 1 05:01:27 1998 *************** *** 200,206 **** #define RET_SUCCESS 0 #define RET_SPECIAL 1 ! #if defined(__386BSD__) || defined(SCO) #define __BIT_TYPES_DEFINED__ #endif --- 200,206 ---- #define RET_SUCCESS 0 #define RET_SPECIAL 1 ! #if defined(__386BSD__) || defined(SCO) || defined(__NetBSD__) #define __BIT_TYPES_DEFINED__ #endif *** ./cmd/stubfe/Makefile.orig Tue Mar 31 04:05:33 1998 --- ./cmd/stubfe/Makefile Wed Apr 1 04:49:28 1998 *************** *** 542,547 **** --- 542,553 ---- endif ######################################## + # NetBSD + ifeq ($(OS_ARCH),NetBSD) + OTHER_LIBS = -lm $(OS_LIBS) + endif + + ######################################## # BSDI ifeq ($(OS_ARCH),BSD_OS) OTHER_LIBS = -lm $(OS_LIBS) *** ./cmd/xfe/Microline3.0/XmL/Grid.c.orig Tue Mar 31 04:05:42 1998 --- ./cmd/xfe/Microline3.0/XmL/Grid.c Thu Apr 2 01:35:01 1998 *************** *** 30,35 **** --- 30,38 ---- #include #include #include + #ifndef MOTIF11 + #include + #endif #include #include #include *** ./cmd/xfe/src/HTMLView.cpp.orig Tue Mar 31 04:06:22 1998 --- ./cmd/xfe/src/HTMLView.cpp Wed Apr 1 04:52:19 1998 *************** *** 343,349 **** scroller = fe_MakeScrolledWindow (m_contextData, pane, "scroller"); XtVaSetValues (CONTEXT_DATA (m_contextData)->scrolled, XmNborderWidth, 0, ! #if defined(__FreeBSD__)||defined(BSDI)||defined(LINUX)||defined(IRIX) // Allow for resolutions > 1000 pixels. // This causes the vertical scrollbar not to show // up on Solaris 2.4, bug in Motif (77998). --- 343,349 ---- scroller = fe_MakeScrolledWindow (m_contextData, pane, "scroller"); XtVaSetValues (CONTEXT_DATA (m_contextData)->scrolled, XmNborderWidth, 0, ! #if defined(__FreeBSD__)||defined(BSDI)||defined(LINUX)||defined(IRIX)||defined(__NetBSD__) // Allow for resolutions > 1000 pixels. // This causes the vertical scrollbar not to show // up on Solaris 2.4, bug in Motif (77998). *** ./cmd/xfe/src/context_funcs.cpp.orig Tue Mar 31 04:06:29 1998 --- ./cmd/xfe/src/context_funcs.cpp Thu Apr 9 01:36:26 1998 *************** *** 65,71 **** #include /* for statfs() */ extern "C" int statfs(char *, struct statfs *); #define STATFS statfs ! #elif defined(BSDI) #include /* for statfs() */ #define STATFS statfs #else --- 65,71 ---- #include /* for statfs() */ extern "C" int statfs(char *, struct statfs *); #define STATFS statfs ! #elif defined(BSDI) || defined(NETBSD) #include /* for statfs() */ #define STATFS statfs #else *** ./cmd/xfe/Makefile.orig Tue Mar 31 04:05:35 1998 --- ./cmd/xfe/Makefile Wed Apr 8 23:43:07 1998 *************** *** 485,490 **** --- 485,504 ---- endif ######################################## + # NetBSD + # Work around linker semantics that will never find our own libutil on 1.3.x + ifeq ($(OS_ARCH),NetBSD) + ifeq ($(OS_MINOR),3) + FOOL_GMAKE = $(EXPORT_LDFLAGS:$(DIST)/lib/lib%.a=-l%) + DSO_EX_LIBS = $(FOOL_GMAKE:-lutil=$(DIST)/lib/libutil.a) + endif + ifdef LIBRUNPATH + OS_LIBS += -R$(LIBRUNPATH) + endif + OTHER_LIBS = -L/usr/X11R6/lib -lXm -lXt -lXmu -lXext -lX11 -lSM -lICE -lm $(OS_LIBS) + endif + + ######################################## # BSDI ifeq ($(OS_ARCH),BSD_OS) OTHER_LIBS = $(MOTIF)/libXm.a $(LOC_LIB_DIR)/libXt.a $(X11R6LIBS) $(LOC_LIB_DIR)/libXmu.a \ *** ./cmd/xfe/mozilla.c.orig Wed Apr 1 04:59:26 1998 --- ./cmd/xfe/mozilla.c Thu Apr 2 01:49:10 1998 *************** *** 1886,1891 **** --- 1886,1893 ---- strcat (buf, "IRIX"); #elif defined(__FreeBSD__) strcat (buf, "FreeBSD"); + #elif defined(__NetBSD__) + strcat (buf, "NetBSD"); #elif defined(__386BSD__) strcat (buf, "BSD/386"); #elif defined(__osf__) *************** *** 3477,3483 **** #else /* !OLD_UNIX_FILES */ ! #if !defined(__FreeBSD__) && !defined(MACLINUX) && !defined(LINUX_GLIBC_2) extern char *sys_errlist[]; extern int sys_nerr; #endif --- 3479,3485 ---- #else /* !OLD_UNIX_FILES */ ! #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(MACLINUX) && !defined(LINUX_GLIBC_2) extern char *sys_errlist[]; extern int sys_nerr; #endif *** ./cmd/xfe/dialogs.c.orig Tue Mar 31 04:05:37 1998 --- ./cmd/xfe/dialogs.c Thu Apr 2 01:44:10 1998 *************** *** 239,245 **** (void) fe_dialog (parent, "error", message, FALSE, 0, FALSE, FALSE, 0); } ! #if !defined(__FreeBSD__) && !defined(MACLINUX) && !defined(LINUX_GLIBC_2) #include extern char *sys_errlist[]; extern int sys_nerr; --- 239,245 ---- (void) fe_dialog (parent, "error", message, FALSE, 0, FALSE, FALSE, 0); } ! #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(MACLINUX) && !defined(LINUX_GLIBC_2) #include extern char *sys_errlist[]; extern int sys_nerr; *** ./cmd/xfe/movemail.c.orig Tue Mar 31 04:05:40 1998 --- ./cmd/xfe/movemail.c Thu Apr 2 01:48:34 1998 *************** *** 40,46 **** #include "xfe.h" #include ! #if !defined(__FreeBSD__) && !defined(LINUX_GLIBC_2) extern char *sys_errlist[]; extern int sys_nerr; #endif --- 40,46 ---- #include "xfe.h" #include ! #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(LINUX_GLIBC_2) extern char *sys_errlist[]; extern int sys_nerr; #endif *** ./cmd/xfe/prefdialogs.c.orig Tue Mar 31 04:05:40 1998 --- ./cmd/xfe/prefdialogs.c Thu Apr 2 01:49:23 1998 *************** *** 77,83 **** /* For sys_errlist and sys_nerr */ #include ! #if !defined(__FreeBSD__) && !defined(LINUX_GLIBC_2) extern char *sys_errlist[]; extern int sys_nerr; #endif --- 77,83 ---- /* For sys_errlist and sys_nerr */ #include ! #if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(LINUX_GLIBC_2) extern char *sys_errlist[]; extern int sys_nerr; #endif *** ./config/NetBSD.mk.orig Wed Apr 1 00:16:52 1998 --- ./config/NetBSD.mk Thu Apr 9 01:45:31 1998 *************** *** 0 **** --- 1,106 ---- + # + # The contents of this file are subject to the Netscape Public License + # Version 1.0 (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 FreeBSD + ###################################################################### + # + ###################################################################### + # Version-independent + ###################################################################### + + ARCH := netbsd + ifeq (86,$(findstring 86,$(OS_TEST))) + CPU_ARCH := x86 + else + CPU_ARCH := $(OS_TEST) + endif + GFX_ARCH := x + + OS_INCLUDES = -I/usr/X11R6/include + G++INCLUDES = -I/usr/include/g++ + LOC_LIB_DIR = + MOTIF = + MOTIFLIB = + OS_LIBS = + + OS_MINOR = $(shell echo $(OS_VERSION) | cut -f2 -d.) + + # Don't define BSD, because it's already defined in /usr/include/sys/param.h. + PLATFORM_FLAGS = -DNETBSD $(DSO_CFLAGS) + MOVEMAIL_FLAGS = -DHAVE_STRERROR + PORT_FLAGS = -DSW_THREADS -DNEED_UINT -DHAVE_LCHOWN -DNTOHL_ENDIAN_H -DHAVE_FILIO_H -DNEED_SYS_TIME_H -DNEED_UINT_T -DHAVE_BSD_FLOCK + PDJAVA_FLAGS = -mx128m + OS_GPROF_FLAGS = -pg + LD_FLAGS = -L/usr/X11R6/lib -lXm + + OS_CFLAGS = $(PLATFORM_FLAGS) $(PORT_FLAGS) $(MOVEMAIL_FLAGS) + + LOCALE_MAP = $(DEPTH)/cmd/xfe/intl/bsd386.lm + EN_LOCALE = C + DE_LOCALE = de_DE.ISO8859-1 + FR_LOCALE = fr_FR.ISO8859-1 + JP_LOCALE = ja + SJIS_LOCALE = ja_JP.SJIS + KR_LOCALE = ko_KR.EUC + CN_LOCALE = zh + TW_LOCALE = zh + I2_LOCALE = i2 + + ###################################################################### + # Version-specific stuff + ###################################################################### + + ###################################################################### + # Overrides for defaults in config.mk (or wherever) + ###################################################################### + + DLL_SUFFIX = so.1.0 + EMACS = /usr/bin/true + JAVA_PROG = $(JAVA_BIN)java + RANLIB = /usr/bin/ranlib + + ###################################################################### + # Other + ###################################################################### + + ifeq ($(USE_PTHREADS),1) + OS_LIBS = -lc_r + else + OS_LIBS = -lc + PORT_FLAGS += -D_PR_LOCAL_THREADS_ONLY + endif + + BUILD_UNIX_PLUGINS = 1 + + MKSHLIB = $(LD) $(DSO_LDOPTS) + + # + # For NetBSD > 1.3, this can all be -shared. + # + DSO_CFLAGS = -fpic + DSO_LDFLAGS = + DSO_LDOPTS = -Bshareable + ifeq ($(OS_TEST),alpha) + DSO_LDOPTS = -shared + endif + ifeq ($(OS_TEST),mips) + DSO_LDOPTS = -shared + endif + ifeq ($(OS_TEST),pmax) + DSO_LDOPTS = -shared + endif *** ./config/rules.mk.orig Tue Mar 31 04:07:28 1998 --- ./config/rules.mk Tue Apr 7 01:36:14 1998 *************** *** 102,107 **** --- 102,110 ---- ifeq ($(OS_ARCH),FreeBSD) SHARED_LIBRARY := $(LIBRARY:.a=.so.1.0) else + ifeq ($(OS_ARCH),NetBSD) + SHARED_LIBRARY := $(LIBRARY:.a=.so.1.0) + else ifeq ($(OS_ARCH)$(OS_RELEASE),SunOS4.1) SHARED_LIBRARY := $(LIBRARY:.a=.so.1.0) else *************** *** 109,114 **** --- 112,118 ---- SHARED_LIBRARY := $(LIBRARY:.a=)_shr.a else SHARED_LIBRARY := $(LIBRARY:.a=.so) + endif endif endif endif *** ./config/config.mk.orig Tue Mar 31 04:06:41 1998 --- ./config/config.mk Tue Apr 7 22:04:05 1998 *************** *** 83,89 **** # but save the version to allow multiple versions of the same base # platform to be built in the same tree. # ! ifneq (,$(filter FreeBSD HP-UX IRIX Linux OSF1 SunOS,$(OS_ARCH))) OS_VERS := $(suffix $(OS_RELEASE)) OS_RELEASE := $(basename $(OS_RELEASE)) OS_VERSION := $(shell echo $(OS_VERS) | sed 's/-.*//') --- 83,89 ---- # but save the version to allow multiple versions of the same base # platform to be built in the same tree. # ! ifneq (,$(filter FreeBSD HP-UX IRIX Linux OSF1 SunOS NetBSD,$(OS_ARCH))) OS_VERS := $(suffix $(OS_RELEASE)) OS_RELEASE := $(basename $(OS_RELEASE)) OS_VERSION := $(shell echo $(OS_VERS) | sed 's/-.*//') *** ./sun-java/stubs/include/typedefs_md.h.orig Tue Mar 31 04:07:55 1998 --- ./sun-java/stubs/include/typedefs_md.h Wed Apr 1 05:11:54 1998 *************** *** 38,44 **** typedef prword_t uintVP_t; /* unsigned that is same size as a void pointer */ ! #if !defined(BSDI) && !defined(IRIX6_2) && !defined(IRIX6_3) && !defined(LINUX2_0) && !defined(MACLINUX) && !defined(SOLARIS2_6) && !defined(HPUX10_20) && !defined(HPUX10_30) && !defined(HPUX11) typedef int64 int64_t; #else /* --- 38,44 ---- typedef prword_t uintVP_t; /* unsigned that is same size as a void pointer */ ! #if !defined(BSDI) && !defined(IRIX6_2) && !defined(IRIX6_3) && !defined(LINUX2_0) && !defined(MACLINUX) && !defined(SOLARIS2_6) && !defined(HPUX10_20) && !defined(HPUX10_30) && !defined(HPUX11) && !defined(NETBSD) typedef int64 int64_t; #else /*