Initial import of mozilla-stable

This is a stable branch of mozilla.
A select group of APIs have been marked "@FROZEN. Mozilla.org intends
to maintain API compatibility for this set until next major release.
This branch is targeted at the developer community and enables
the creation of Internet-based applications.
This commit is contained in:
taya 2002-10-04 15:47:07 +00:00
parent 81026e8880
commit af891841ed
24 changed files with 3705 additions and 0 deletions

9
www/mozilla-stable/DESCR Normal file
View file

@ -0,0 +1,9 @@
Mozilla is the freely available version of Netscape's browser. Because
only freely distributable code is included, some features are not
present. But that will change.
This is a stable branch of mozilla.
A select group of APIs have been marked "@FROZEN. Mozilla.org intends
to maintain API compatibility for this set until next major release.
This branch is targeted at the developer community and enables
the creation of Internet-based applications.

View file

@ -0,0 +1,9 @@
# $NetBSD: Makefile,v 1.1.1.1 2002/10/04 15:47:07 taya Exp $
MOZILLA= mozilla-stable
MOZ_VER= 1.0.1
EXTRACT_SUFX= .tar.bz2
COMMENT= Stable branch of mozilla, open source browser
.include "../../www/mozilla/Makefile.common"

2789
www/mozilla-stable/PLIST Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,17 @@
$NetBSD: distinfo,v 1.1.1.1 2002/10/04 15:47:08 taya Exp $
SHA1 (mozilla-source-1.0.1.tar.bz2) = d2cd4af1ef433a1ebae1087a59e9deea27c1bd03
Size (mozilla-source-1.0.1.tar.bz2) = 29943174 bytes
SHA1 (patch-aa) = 0dea9e2cc5852781e57a1786ea244054225c1f2c
SHA1 (patch-ab) = 70ced122812a1bad346e572bc9a2f7d3b6bb57ef
SHA1 (patch-ac) = ed04786ce666280be5e95e52ed404facd42ad798
SHA1 (patch-ad) = 321fc86def80b80caa8be6469ddd4f663fc8d2e0
SHA1 (patch-ae) = cc8ef186f967cd0684f142039cf54f5eba1fc0bd
SHA1 (patch-am) = 726942d51727e27c233b8a98081973cb2c66f767
SHA1 (patch-aw) = 6f680d54668a11aa71c10c57e9181c38fc1ff636
SHA1 (patch-ba) = c308675ce2d0d41eef22bc12603f176b2eebb6bf
SHA1 (patch-bb) = 57e6ebfcb1b769b0029f063617cbd131a3372522
SHA1 (patch-be) = af39ab40279f40752414f8e7e8ec630beb3ed695
SHA1 (patch-bf) = 6362416e45ebc2c8c41ec929c807bab908dce5ff
SHA1 (patch-bj) = 04cc1b4abe55ae41b8a5e19eacd4f11eda788b77
SHA1 (patch-bm) = db4d44d9ca3a6ed9eb2ba4604555f80a02f987e8

View file

@ -0,0 +1,59 @@
#!/bin/sh
#
# $NetBSD: moz-install,v 1.1.1.1 2002/10/04 15:47:17 taya Exp $
${SED} -e "s,@PREFIX@,${PREFIX},g" -e "s,@MOZILLA@,${MOZILLA}," ${FILESDIR}/mozilla-${OBJECT_FMT}.in > ${PREFIX}/bin/${MOZILLA}
${CHOWN} ${BINOWN} ${PREFIX}/bin/${MOZILLA}
${CHGRP} ${BINGRP} ${PREFIX}/bin/${MOZILLA}
${CHMOD} ${BINMODE} ${PREFIX}/bin/${MOZILLA}
#
# Substitute variables
#
TMP_PLIST=/tmp/TMP_PLIST.$$
trap "${RM} -f ${TMP_PLIST}" 1 2 3 10 11
${SED} -e "s/\${MOZILLA}/${MOZILLA}/g" -e "s/\${SO_SUFFIX}/${SO_SUFFIX}/" < ${PLIST_SRC} > ${TMP_PLIST}
# make directories
for i in `${SED} -n -e '/^@comment begin DIRS$/,/^@comment end DIRS$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment | ${SED} -e 's/^@dirrm//'` ; do
${BSD_INSTALL_DATA_DIR} ${PREFIX}/$i
done
# install programs
for i in `${SED} -n -e '/^@comment begin PROGRAMS$/,/^@comment end PROGRAMS$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
src=`echo $i | sed -e "s@lib/${MOZILLA}@dist/bin@"`;
${BSD_INSTALL_PROGRAM} ${WRKSRC}/${src} ${PREFIX}/$i
done
# install scripts
for i in `${SED} -n -e '/^@comment begin SCRIPTS$/,/^@comment end SCRIPTS$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
src=`echo $i | sed -e "s@lib/${MOZILLA}@dist/bin@"`;
${BSD_INSTALL_SCRIPT} ${WRKSRC}/${src} ${PREFIX}/$i
done
# install DSO
for i in `${SED} -n -e '/^@comment begin DSO$/,/^@comment end DSO$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
src=`echo $i | sed -e "s@lib/${MOZILLA}@dist/bin@"`;
${BSD_INSTALL_PROGRAM} ${WRKSRC}/${src} ${PREFIX}/$i
done
# install DATA
for i in `${SED} -n -e '/^@comment begin DATA$/,/^@comment end DATA$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
src=`echo $i | sed -e "s@lib/${MOZILLA}@dist/bin@"`;
${BSD_INSTALL_DATA} ${WRKSRC}/${src} ${PREFIX}/$i
done
# install INCLUDE
for i in `${SED} -n -e '/^@comment begin INCLUDE$/,/^@comment end INCLUDE$/p' ${TMP_PLIST} | ${EGREP} -v ^@comment` ; do
src=`echo $i | sed -e "s@include/${MOZILLA}@dist/include@"`;
${BSD_INSTALL_DATA} ${WRKSRC}/${src} ${PREFIX}/$i
done
#${RM} -f ${TMP_PLIST}
#
#
#
cd ${PREFIX}/lib/${MOZILLA}
${SETENV} LD_LIBRARY_PATH=. MOZILLA_FIVE_HOME=. ./regxpcom
${SETENV} LD_LIBRARY_PATH=. MOZILLA_FIVE_HOME=. ./regchrome

View file

@ -0,0 +1,4 @@
#!/bin/sh
MOZILLA_FIVE_HOME=@PREFIX@/lib/@MOZILLA@
export MOZILLA_FIVE_HOME
exec @PREFIX@/lib/@MOZILLA@/mozilla-bin "$@"

View file

@ -0,0 +1,6 @@
#!/bin/sh
MOZILLA_FIVE_HOME=@PREFIX@/lib/@MOZILLA@
LD_LIBRARY_PATH=@PREFIX@/lib/@MOZILLA@
export MOZILLA_FIVE_HOME
export LD_LIBRARY_PATH
exec @PREFIX@/lib/@MOZILLA@/mozilla-bin "$@"

View file

@ -0,0 +1,98 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/* Platform specific code to invoke XPCOM methods on native objects */
.global XPTC_InvokeByIndex
/*
XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params);
*/
/*
* Note: To simplify stack handling we allocate an extra stack
* frame here. In principle invoke_copy_to_stack() could
* save the parameters our caller's frame and we could
* reclaim the stackframe and do a tail call to the
* function. However, this gets complicated....
*
* The vtable consist of be:
*
* struct {
* short __delta;
* short __index;
* union {
* P __pfn;
* short __delta2;
* } __pfn_or_delta2;
* };
*
* See gcc/cp/cp-tree.h
*/
XPTC_InvokeByIndex:
save %sp,-(128+8),%sp ! room for the register window and this
sllx %i2,3,%l0 ! required stack size in bytes
sub %sp,%l0,%sp ! create the additional stack space
add %sp,0x7ff+128,%l2 ! pointer to parameter save area
add %l2,8,%o0 ! %o1's parameter save area
mov %i2,%o1 ! paramCount
call invoke_copy_to_stack
mov %i3,%o2 ! params
!
! calculate the target address from the vtable
!
inc %i1 ! vTable is zero-based, index is 1 based (?)
ldx [%i0],%l1 ! *that --> vTable
sllx %i1,4,%i1 ! Each vtable entry is 16-bytes long
add %i1,%l1,%l1
ldsh [%l1],%l0 ! this adjustor
add %l0,%i0,%i0 ! adjust this
ldx [%l1 + 8],%l0 ! target address
.L15: ldd [%sp + 0x7ff + 128 + 120],%f30
.L14: ldd [%sp + 0x7ff + 128 + 112],%f28
.L13: ldd [%sp + 0x7ff + 128 + 104],%f26
.L12: ldd [%sp + 0x7ff + 128 + 96],%f24
.L11: ldd [%sp + 0x7ff + 128 + 88],%f22
.L10: ldd [%sp + 0x7ff + 128 + 80],%f20
.L9: ldd [%sp + 0x7ff + 128 + 72],%f18
.L8: ldd [%sp + 0x7ff + 128 + 64],%f16
.L7: ldd [%sp + 0x7ff + 128 + 56],%f14
.L6: ldd [%sp + 0x7ff + 128 + 48],%f12
.L5: ldx [%sp + 0x7ff + 128 + 40],%o5
ldd [%sp + 0x7ff + 128 + 40],%f10
.L4: ldx [%sp + 0x7ff + 128 + 32],%o4
ldd [%sp + 0x7ff + 128 + 32],%f8
.L3: ldx [%sp + 0x7ff + 128 + 24],%o3
ldd [%sp + 0x7ff + 128 + 24],%f6
.L2: ldx [%sp + 0x7ff + 128 + 16],%o2
ldd [%sp + 0x7ff + 128 + 16],%f4
.L1: ldx [%sp + 0x7ff + 128 + 8],%o1
ldd [%sp + 0x7ff + 128 + 8],%f2
.L0:
jmpl %l0,%o7 ! call the routine
! always have a 'this', from the incoming 'that'
mov %i0,%o0
ret
restore %o0,0,%o0 ! propogate return value

View file

@ -0,0 +1,129 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/* Platform specific code to invoke XPCOM methods on native objects */
#include "xptcprivate.h"
/* solaris defines __sparc for workshop compilers and
linux defines __sparc__ */
#if !defined(__sparc64__) && !defined(__sparc_v9__)
#error "This code is for Sparc64 only"
#endif
typedef unsigned nsXPCVariant;
extern "C" PRUint32
invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
{
PRUint32 result = 0;
for(PRUint32 i = 0; i < paramCount; i++, s++)
{
if(s->IsPtrData())
{
result++;
continue;
}
switch(s->type)
{
case nsXPTType::T_I8 :
case nsXPTType::T_I16 :
case nsXPTType::T_I32 :
case nsXPTType::T_I64 :
result++;
break;
case nsXPTType::T_U8 :
case nsXPTType::T_U16 :
case nsXPTType::T_U32 :
case nsXPTType::T_U64 :
result++;
break;
case nsXPTType::T_FLOAT :
case nsXPTType::T_DOUBLE :
result++;
break;
case nsXPTType::T_BOOL :
case nsXPTType::T_CHAR :
case nsXPTType::T_WCHAR :
result++;
break;
default:
// all the others are plain pointer types
result++;
break;
}
}
// nuts, I know there's a cooler way of doing this, but it's late
// now and it'll probably come to me in the morning.
if (result & 0x7) result += 8 - (result & 0x7); // ensure 16-byte alignment
return result;
}
extern "C" PRUint32
invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
{
/*
We need to copy the parameters for this function to locals and use them
from there since the parameters occupy the same stack space as the stack
we're trying to populate.
*/
uint64 *l_d = d;
nsXPTCVariant *l_s = s;
uint32 l_paramCount = paramCount;
uint32 regCount = 0; // return the number of registers to load from the stack
for(uint32 i = 0; i < l_paramCount; i++, l_d++, l_s++)
{
if (regCount < 5) regCount++;
if(l_s->IsPtrData())
{
*((void**)l_d) = l_s->ptr;
continue;
}
switch(l_s->type)
{
case nsXPTType::T_I8 : *((int64*) l_d) = l_s->val.i8; break;
case nsXPTType::T_I16 : *((int64*) l_d) = l_s->val.i16; break;
case nsXPTType::T_I32 : *((int64*) l_d) = l_s->val.i32; break;
case nsXPTType::T_I64 : *((int64*) l_d) = l_s->val.i64; break;
case nsXPTType::T_U64 : *((uint64*) l_d) = l_s->val.u64; break;
case nsXPTType::T_U8 : *((uint64*) l_d) = l_s->val.u8; break;
case nsXPTType::T_U16 : *((uint64*) l_d) = l_s->val.u16; break;
case nsXPTType::T_U32 : *((uint64*) l_d) = l_s->val.u32; break;
case nsXPTType::T_FLOAT :
struct floats { float pad; float data; };
((floats*) l_d)->pad = 0;
((floats*) l_d)->data = l_s->val.f; break;
case nsXPTType::T_DOUBLE : *((uint64*) l_d) = l_s->val.u64; break;
case nsXPTType::T_BOOL : *((uint64*) l_d) = l_s->val.b; break;
case nsXPTType::T_CHAR : *((uint64*) l_d) = l_s->val.c; break;
case nsXPTType::T_WCHAR : *((uint64*) l_d) = l_s->val.wc; break;
default:
// all the others are plain pointer types
*((void**)l_d) = l_s->val.p;
break;
}
}
return regCount;
}

View file

@ -0,0 +1,67 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
.global SharedStub
/*
in the frame for the function that called SharedStub are the
rest of the parameters we need
*/
SharedStub:
! we don't create a new frame yet, but work within the frame of the calling
! function to give ourselves the other parameters we want
mov %o0, %o1 ! shuffle the index up to 2nd place
mov %i0, %o0 ! the original 'this'
add %fp, 0x7ff+128+(2*8), %o2 ! previous stack top adjusted to the first argument slot (beyond 'this')
! save off the original incoming parameters that arrived in
! registers, the ABI guarantees the space for us to do this
st %i1, [%o2 + 0]
st %i2, [%o2 + 8]
st %i3, [%o2 + 16]
st %i4, [%o2 + 24]
st %i5, [%o2 + 32]
! now we can build our own stack frame
save %sp,-(176),%sp ! room for the register window
! our function now appears to have been called
! as SharedStub(nsISupports* that, PRUint32 index, PRUint32* args)
! so we can just copy these through
mov %i0, %o0
mov %i1, %o1
mov %i2, %o2
call PrepareAndDispatch
nop
ret
restore %o0,0,%o0
! XXXX what's all the rest of this for?
mov %o0,%i0 ! propogate return value
b .LL1
nop
.LL1:
ret
restore
.size SharedStub, .-SharedStub
.type SharedStub, #function

View file

@ -0,0 +1,122 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape 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/NPL/
*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1999 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
/* Implement shared vtbl methods. */
#include "xptcprivate.h"
#if defined(__sparc64__) || defined(__sparc_v9__)
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, uint64* args)
{
#define PARAM_BUFFER_COUNT 16
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
nsXPTCMiniVariant* dispatchParams = NULL;
nsIInterfaceInfo* iface_info = NULL;
const nsXPTMethodInfo* info;
PRUint8 paramCount;
PRUint8 i;
nsresult result = NS_ERROR_FAILURE;
NS_ASSERTION(self,"no self");
self->GetInterfaceInfo(&iface_info);
NS_ASSERTION(iface_info,"no interface info");
iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
NS_ASSERTION(info,"no interface info");
paramCount = info->GetParamCount();
// setup variant array pointer
if(paramCount > PARAM_BUFFER_COUNT)
dispatchParams = new nsXPTCMiniVariant[paramCount];
else
dispatchParams = paramBuffer;
NS_ASSERTION(dispatchParams,"no place for params");
PRUint64* ap = args;
for(i = 0; i < paramCount; i++, ap++)
{
const nsXPTParamInfo& param = info->GetParam(i);
const nsXPTType& type = param.GetType();
nsXPTCMiniVariant* dp = &dispatchParams[i];
if(param.IsOut() || !type.IsArithmetic())
{
dp->val.p = (void*) *ap;
continue;
}
// else
switch(type)
{
case nsXPTType::T_I8 : dp->val.i8 = *((PRInt64*) ap); break;
case nsXPTType::T_I16 : dp->val.i16 = *((PRInt64*) ap); break;
case nsXPTType::T_I32 : dp->val.i32 = *((PRInt64*) ap); break;
case nsXPTType::T_I64 : dp->val.i64 = *((PRInt64*) ap); break;
case nsXPTType::T_U8 : dp->val.u8 = *((PRUint64*)ap); break;
case nsXPTType::T_U16 : dp->val.u16 = *((PRUint64*)ap); break;
case nsXPTType::T_U32 : dp->val.u32 = *((PRUint64*)ap); break;
case nsXPTType::T_U64 : dp->val.u64 = *((PRUint64*)ap); break;
case nsXPTType::T_DOUBLE : dp->val.u64 = *((PRUint64*)ap); break;
case nsXPTType::T_FLOAT : dp->val.f = *((double*) ap); break;
case nsXPTType::T_BOOL : dp->val.b = *((PRUint64*)ap); break;
case nsXPTType::T_CHAR : dp->val.c = *((PRUint64*)ap); break;
case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt64*) ap); break;
default:
NS_ASSERTION(0, "bad type");
break;
}
}
result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
NS_RELEASE(iface_info);
if(dispatchParams != paramBuffer)
delete [] dispatchParams;
return result;
}
extern "C" int SharedStub(int, int*);
#define STUB_ENTRY(n) \
nsresult nsXPTCStubBase::Stub##n() \
{ \
int dummy; /* defeat tail-call optimization */ \
return SharedStub(n, &dummy); \
}
#define SENTINEL_ENTRY(n) \
nsresult nsXPTCStubBase::Sentinel##n() \
{ \
NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
return NS_ERROR_NOT_IMPLEMENTED; \
}
#include "xptcstubsdef.inc"
#endif /* sparc || __sparc__ */

View file

@ -0,0 +1,12 @@
diff -ru ../Orig/mozilla/nsprpub/pr/src/pthreads/ptthread.c ./nsprpub/pr/src/pthreads/ptthread.c
--- ../Orig/mozilla/nsprpub/pr/src/pthreads/ptthread.c Wed Apr 10 12:17:39 2002
+++ ./nsprpub/pr/src/pthreads/ptthread.c Wed Sep 11 23:47:35 2002
@@ -360,7 +360,7 @@
/*
* Linux doesn't have pthread_attr_setstacksize.
*/
-#ifndef LINUX
+#if !defined(LINUX) && !defined(NETBSD)
rv = pthread_attr_setstacksize(&tattr, stackSize);
PR_ASSERT(0 == rv);
#endif

View file

@ -0,0 +1,27 @@
diff -ru ../Orig/mozilla/configure.in ./configure.in
--- ../Orig/mozilla/configure.in Tue Jul 2 02:52:59 2002
+++ ./configure.in Wed Sep 11 23:47:37 2002
@@ -1014,6 +1014,13 @@
if test "$LIBRUNPATH"; then
DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
fi
+
+ case "${target_cpu}" in
+ alpha*)
+ CFLAGS="$CFLAGS -mieee"
+ CXXFLAGS="$CXXFLAGS -mieee"
+ ;;
+ esac
;;
*-nto*)
@@ -1853,9 +1860,6 @@
CXXFLAGS="$CXXFLAGS -mt"
fi
;;
- *-*-netbsd*)
- USE_PTHREADS=
- _PTHREAD_LDFLAGS=
esac
fi

View file

@ -0,0 +1,32 @@
diff -ru ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in ./xpcom/reflect/xptcall/src/md/unix/Makefile.in
--- ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in Wed Apr 10 12:37:34 2002
+++ ./xpcom/reflect/xptcall/src/md/unix/Makefile.in Wed Sep 11 23:47:39 2002
@@ -149,6 +149,14 @@
#
ifeq ($(OS_ARCH),NetBSD)
ifneq (,$(filter amiga atari hp300 mac68k mvme68k next68k sun3 sun3x x68k,$(OS_TEST)))
+ifneq (,$(findstring elf,$(TARGET_OS)))
+# ELF format
+SYMBOLPREFIX=\"\"
+else
+# aout format
+SYMBOLPREFIX=\"_\"
+endif
+CXXFLAGS += -DSYMBOLPREFIX=$(SYMBOLPREFIX)
CPPSRCS := xptcinvoke_netbsd_m68k.cpp xptcstubs_netbsd_m68k.cpp
endif
endif
@@ -253,6 +261,13 @@
ifeq ($(OS_ARCH)$(OS_TEST),NetBSDsparc)
CPPSRCS := xptcinvoke_sparc_netbsd.cpp xptcstubs_sparc_netbsd.cpp
ASFILES := xptcinvoke_asm_sparc_netbsd.s xptcstubs_asm_sparc_netbsd.s
+endif
+#
+# NetBSD/SPARC64
+#
+ifeq ($(OS_ARCH)$(OS_TEST),NetBSDsparc64)
+CPPSRCS := xptcinvoke_sparc64_netbsd.cpp xptcstubs_sparc64_netbsd.cpp
+ASFILES := xptcinvoke_asm_sparc64_netbsd.s xptcstubs_asm_sparc64_netbsd.s
endif
#
# Solaris/SPARC

View file

@ -0,0 +1,69 @@
diff -ru ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp ./xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp
--- ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp Wed Apr 10 12:37:38 2002
+++ ./xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp Wed Sep 11 23:47:42 2002
@@ -132,6 +132,10 @@
}
}
+/*
+ * SYMBOL PREFIX must be "_" for aout symbols and "" for ELF
+ */
+
XPTC_PUBLIC_API(nsresult)
XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params)
@@ -139,30 +143,30 @@
PRUint32 result;
__asm__ __volatile__(
- "movl %4, sp@-\n\t"
- "movl %3, sp@-\n\t"
- "jbsr _invoke_count_words\n\t" /* count words */
- "addql #8, sp\n\t"
- "lsll #2, d0\n\t" /* *= 4 */
- "movl sp, a2\n\t" /* save original sp */
- "subl d0, sp\n\t" /* make room for params */
- "movl sp, a0\n\t"
- "movl %4, sp@-\n\t"
- "movl %3, sp@-\n\t"
- "movl a0, sp@-\n\t"
- "jbsr _invoke_copy_to_stack\n\t" /* copy params */
- "addl #12, sp\n\t"
- "movl %1, a0\n\t"
- "movl a0@, a1\n\t"
- "movl %2, d0\n\t" /* function index */
- "movl a0, d1\n\t"
- "movw a1@(8,d0:l:8), a0\n\t"
- "addl a0, d1\n\t"
- "movl a1@(12,d0:l:8), a1\n\t"
- "movl d1, sp@-\n\t"
- "jbsr a1@\n\t"
- "movl a2, sp\n\t" /* restore original sp */
- "movl d0, %0\n\t"
+ "movl %4, %%sp@-\n\t"
+ "movl %3, %%sp@-\n\t"
+ "jbsr "SYMBOLPREFIX"invoke_count_words\n\t" /* count words */
+ "addql #8, %%sp\n\t"
+ "lsll #2, %%d0\n\t" /* *= 4 */
+ "movl %%sp, %%a2\n\t" /* save original sp */
+ "subl %%d0, %%sp\n\t" /* make room for params */
+ "movl %%sp, %%a0\n\t"
+ "movl %4, %%sp@-\n\t"
+ "movl %3, %%sp@-\n\t"
+ "movl %%a0, %%sp@-\n\t"
+ "jbsr "SYMBOLPREFIX"invoke_copy_to_stack\n\t" /* copy params */
+ "addl #12, %%sp\n\t"
+ "movl %1, %%a0\n\t"
+ "movl %%a0@, %%a1\n\t"
+ "movl %2, %%d0\n\t" /* function index */
+ "movl %%a0, %%d1\n\t"
+ "movw %%a1@(8,%%d0:l:8), %%a0\n\t"
+ "addl %%a0, %%d1\n\t"
+ "movl %%a1@(12,%%d0:l:8), %%a1\n\t"
+ "movl %%d1, %%sp@-\n\t"
+ "jbsr %%a1@\n\t"
+ "movl %%a2, %%sp\n\t" /* restore original sp */
+ "movl %%d0, %0\n\t"
: "=g" (result) /* %0 */
: "g" (that), /* %1 */
"g" (methodIndex), /* %2 */

View file

@ -0,0 +1,35 @@
diff -ru ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp
--- ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp Wed Apr 10 12:37:42 2002
+++ ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp Wed Sep 11 23:47:43 2002
@@ -123,17 +123,22 @@
}
}
+/*
+ * Beware: use % instead of %% for register identifiers in a preprocessor macro
+ * SYMBOL PREFIX must be "_" for aout and "" for ELF
+ */
+
#define STUB_ENTRY(n) \
__asm__( \
- ".global _Stub"#n"__14nsXPTCStubBase\n\t" \
-"_Stub"#n"__14nsXPTCStubBase:\n\t" \
- "link a6,#0 \n\t" \
- "lea a6@(12), a0 \n\t" /* pointer to args */ \
- "movl a0, sp@- \n\t" \
- "movl #"#n", sp@- \n\t" /* method index */ \
- "movl a6@(8), sp@- \n\t" /* this */ \
- "jbsr _PrepareAndDispatch \n\t" \
- "unlk a6 \n\t" \
+ ".global "SYMBOLPREFIX"Stub"#n"__14nsXPTCStubBase\n\t" \
+SYMBOLPREFIX"Stub"#n"__14nsXPTCStubBase:\n\t" \
+ "link %a6,#0 \n\t" \
+ "lea %a6@(12), %a0 \n\t" /* pointer to args */ \
+ "movl %a0, %sp@- \n\t" \
+ "movl #"#n", %sp@- \n\t" /* method index */ \
+ "movl %a6@(8), %sp@- \n\t" /* this */ \
+ "jbsr "SYMBOLPREFIX"PrepareAndDispatch\n\t" \
+ "unlk %a6 \n\t" \
"rts \n\t" \
);

View file

@ -0,0 +1,12 @@
diff -ru ../Orig/mozilla/nsprpub/pr/src/pthreads/ptio.c ./nsprpub/pr/src/pthreads/ptio.c
--- ../Orig/mozilla/nsprpub/pr/src/pthreads/ptio.c Sat Jun 22 06:40:13 2002
+++ ./nsprpub/pr/src/pthreads/ptio.c Thu Sep 12 00:19:49 2002
@@ -192,7 +192,7 @@
#elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(HPUX) \
|| defined(LINUX) || defined(FREEBSD) || defined(BSDI) || defined(VMS) \
|| defined(NTO) || defined(OPENBSD) || defined(DARWIN) \
- || defined(UNIXWARE)
+ || defined(UNIXWARE) || defined(NETBSD)
#define _PRSockOptVal_t void *
#else
#error "Cannot determine architecture"

View file

@ -0,0 +1,11 @@
diff -ru ../Orig/mozilla/widget/src/gtksuperwin/Makefile.in ./widget/src/gtksuperwin/Makefile.in
--- ../Orig/mozilla/widget/src/gtksuperwin/Makefile.in Wed Apr 10 12:35:09 2002
+++ ./widget/src/gtksuperwin/Makefile.in Thu Sep 12 00:26:30 2002
@@ -25,6 +25,7 @@
MODULE = widget
LIBRARY_NAME = gtksuperwin
EXPORT_LIBRARY = 1
+MKSHLIB = $(MKCSHLIB)
CSRCS = \

View file

@ -0,0 +1,68 @@
diff -ru ../Orig/mozilla/nsprpub/pr/include/md/_netbsd.cfg ./nsprpub/pr/include/md/_netbsd.cfg
--- ../Orig/mozilla/nsprpub/pr/include/md/_netbsd.cfg Wed Apr 10 12:16:42 2002
+++ ./nsprpub/pr/include/md/_netbsd.cfg Wed Sep 11 23:47:52 2002
@@ -45,7 +45,8 @@
#define PR_AF_INET6 24 /* same as AF_INET6 */
-#if defined(__i386__) || defined(__arm32__) || defined(__MIPSEL__)
+#if defined(__i386__) || defined(__arm32__) || defined(__arm__) || \
+ defined(__armel__) || defined(__MIPSEL__)
#define IS_LITTLE_ENDIAN 1
#undef IS_BIG_ENDIAN
@@ -91,7 +92,53 @@
#define PR_ALIGN_OF_DOUBLE 4
#define PR_ALIGN_OF_POINTER 4
-#elif defined(__sparc__) || defined(__MIPSEB__)
+#elif defined(__sparc_v9__)
+
+#undef IS_LITTLE_ENDIAN
+#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 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_BYTES_PER_WORD_LOG2 3
+#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 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
+
+#elif defined(__sparc__) || defined(__MIPSEB__) || defined(__armeb__)
#undef IS_LITTLE_ENDIAN
#define IS_BIG_ENDIAN 1

View file

@ -0,0 +1,52 @@
diff -ru ../Orig/mozilla/nsprpub/pr/include/md/_netbsd.h ./nsprpub/pr/include/md/_netbsd.h
--- ../Orig/mozilla/nsprpub/pr/include/md/_netbsd.h Wed Apr 10 12:16:43 2002
+++ ./nsprpub/pr/include/md/_netbsd.h Wed Sep 11 23:47:54 2002
@@ -48,12 +48,20 @@
#define _PR_SI_ARCHITECTURE "m68k"
#elif defined(__powerpc__)
#define _PR_SI_ARCHITECTURE "powerpc"
+#elif defined(__sparc_v9__)
+#define _PR_SI_ARCHITECTURE "sparc64"
#elif defined(__sparc__)
#define _PR_SI_ARCHITECTURE "sparc"
#elif defined(__mips__)
#define _PR_SI_ARCHITECTURE "mips"
#elif defined(__arm32__)
#define _PR_SI_ARCHITECTURE "arm32"
+#elif defined(__arm__)
+#define _PR_SI_ARCHITECTURE "arm"
+#elif defined(__armel__)
+#define _PR_SI_ARCHITECTURE "armel"
+#elif defined(__armeb__)
+#define _PR_SI_ARCHITECTURE "armeb"
#endif
#if defined(__ELF__)
@@ -106,7 +114,17 @@
}
#define _MD_GET_SP(_thread) CONTEXT(_thread)[2]
#endif
-#ifdef __sparc__
+#ifdef __sparc_v9__
+#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
+{ \
+ sigsetjmp(CONTEXT(_thread), 1); \
+ CONTEXT(_thread)[1] = (unsigned char*) ((_sp) - 176 - 0x7ff); \
+ CONTEXT(_thread)[2] = (long) _main; \
+ CONTEXT(_thread)[3] = (long) _main + 4; \
+ *status = PR_TRUE; \
+}
+#define _MD_GET_SP(_thread) (CONTEXT(_thread)[2]+0x7ff)
+#elif defined(__sparc__)
#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
{ \
sigsetjmp(CONTEXT(_thread), 1); \
@@ -148,7 +166,7 @@
}
#define _MD_GET_SP(_thread) CONTEXT(_thread)[32]
#endif
-#ifdef __arm32__
+#if defined(__arm32__) || defined(__arm__) || defined(__armel__) || defined(__armeb__)
#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
{ \
sigsetjmp(CONTEXT(_thread), 1); \

View file

@ -0,0 +1,19 @@
diff -ru ../Orig/mozilla/nsprpub/pr/src/io/prsocket.c ./nsprpub/pr/src/io/prsocket.c
--- ../Orig/mozilla/nsprpub/pr/src/io/prsocket.c Wed Apr 10 12:17:03 2002
+++ ./nsprpub/pr/src/io/prsocket.c Wed Sep 11 23:47:59 2002
@@ -1299,6 +1299,15 @@
if (osfd == -1) {
return 0;
}
+#if defined(__NetBSD__) && defined(_PR_INET6) && defined(IPV6_V6ONLY)
+ if(domain == PR_AF_INET6){
+ int opt = 0;
+ if(setsockopt(osfd, IPPROTO_IPV6, IPV6_V6ONLY, &opt, sizeof(opt))){
+ close(osfd);
+ return -1;
+ }
+ }
+#endif
if (type == SOCK_STREAM)
fd = PR_AllocFileDesc(osfd, PR_GetTCPMethods());
else

View file

@ -0,0 +1,12 @@
diff -ru ../Orig/mozilla/xpfe/browser/resources/locale/en-US/navigator-title.dtd ./xpfe/browser/resources/locale/en-US/navigator-title.dtd
--- ../Orig/mozilla/xpfe/browser/resources/locale/en-US/navigator-title.dtd Wed May 8 08:43:59 2002
+++ ./xpfe/browser/resources/locale/en-US/navigator-title.dtd Wed Sep 11 23:48:01 2002
@@ -1,6 +1,6 @@
<!-- LOCALIZATION NOTE (mainWindow.title): DONT_TRANSLATE -->
-<!ENTITY mainWindow.title "&brandShortName; {&buildId.label;}">
+<!ENTITY mainWindow.title "&brandShortName;">
<!-- LOCALIZATION NOTE (mainWindow.titlemodifier) : DONT_TRANSLATE -->
-<!ENTITY mainWindow.titlemodifier "&brandShortName; {&buildId.label;}">
+<!ENTITY mainWindow.titlemodifier "&brandShortName;">
<!-- LOCALIZATION NOTE (mainWindow.titlemodifiermenuseparator): DONT_TRANSLATE -->
<!ENTITY mainWindow.titlemodifiermenuseparator " - ">

View file

@ -0,0 +1,15 @@
diff -ru ../Orig/mozilla/directory/c-sdk/ldap/libraries/libprldap/ldappr-error.c ./directory/c-sdk/ldap/libraries/libprldap/ldappr-error.c
--- ../Orig/mozilla/directory/c-sdk/ldap/libraries/libprldap/ldappr-error.c Mon Jun 17 14:00:43 2002
+++ ./directory/c-sdk/ldap/libraries/libprldap/ldappr-error.c Wed Sep 11 23:49:04 2002
@@ -187,6 +187,11 @@
#define EDEADLOCK -1
#endif
+#if defined(NETBSD)
+#define ENOTSUP -1
+#define EDEADLOCK -1
+#endif
+
/* XXX: need to verify that the -1 entries are correct (no mapping) */
static struct prldap_errormap_entry prldap_errormap[] = {
{ PR_OUT_OF_MEMORY_ERROR, ENOMEM },

View file

@ -0,0 +1,32 @@
$NetBSD: patch-bm,v 1.1.1.1 2002/10/04 15:47:18 taya Exp $
diff -ru ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp
--- ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp Sat Sep 29 05:12:52 2001
+++ ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp Sun Sep 8 00:45:55 2002
@@ -118,18 +118,23 @@
* so they are contiguous with values passed on the stack, and then calls
* PrepareAndDispatch() to do the dirty work.
*/
+#ifndef __ELF__
+#define SYMBOLPREFIX "_"
+#else
+#define SYMBOLPREFIX
+#endif
#define STUB_ENTRY(n) \
__asm__( \
- ".global _Stub"#n"__14nsXPTCStubBase\n\t" \
-"_Stub"#n"__14nsXPTCStubBase:\n\t" \
+ ".global "SYMBOLPREFIX"Stub"#n"__14nsXPTCStubBase\n\t" \
+SYMBOLPREFIX"Stub"#n"__14nsXPTCStubBase:\n\t" \
"stmfd sp!, {r1, r2, r3} \n\t" \
"mov ip, sp \n\t" \
"stmfd sp!, {fp, ip, lr, pc} \n\t" \
"sub fp, ip, #4 \n\t" \
"mov r1, #"#n" \n\t" /* = methodIndex */ \
"add r2, sp, #16 \n\t" \
- "bl _PrepareAndDispatch__FP14nsXPTCStubBaseUiPUi \n\t" \
+ "bl "SYMBOLPREFIX"PrepareAndDispatch__FP14nsXPTCStubBaseUiPUi \n\t" \
"ldmea fp, {fp, sp, lr} \n\t" \
"add sp, sp, #12 \n\t" \
"mov pc, lr \n\t" \