Send firefox3 on it's way to the happy hunting ground.

This commit is contained in:
tnn 2009-09-22 13:17:27 +00:00
parent 15ed507f60
commit 1b82e2538f
64 changed files with 1 additions and 5881 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.660 2009/08/27 10:44:04 abs Exp $
# $NetBSD: Makefile,v 1.661 2009/09/22 13:17:27 tnn Exp $
#
COMMENT= Packages related to the World Wide Web
@ -123,7 +123,6 @@ SUBDIR+= firefox-bin-flash
SUBDIR+= firefox-bin-java
SUBDIR+= firefox-bin-nightly
SUBDIR+= firefox-bin-realplayer
SUBDIR+= firefox3
SUBDIR+= firefox3-bin
SUBDIR+= galeon
SUBDIR+= galway

View file

@ -1,32 +0,0 @@
# $NetBSD: Makefile-firefox.common,v 1.66 2009/08/05 02:49:19 tnn Exp $
# used by www/firefox3/Makefile
# XXX this file should go away.
MOZILLA_BIN= firefox-bin
MOZ_VER= 2.0.0.19
EXTRACT_SUFX= .tar.bz2
DISTNAME= firefox-${MOZ_VER}-source
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_MOZILLA:=firefox/releases/${MOZ_VER}/source/}
MAINTAINER= taya@NetBSD.org
HOMEPAGE= http://www.mozilla.com/en-US/firefox/
DISTINFO_FILE= ${.CURDIR}/../../www/firefox/distinfo
PATCHDIR= ${.CURDIR}/../../www/firefox/patches
CONFIGURE_ARGS+= --enable-application=browser
CONFIGURE_ARGS+= --without-gssapi
CONFIGURE_ARGS+= --enable-canvas
USE_LANGUAGES+= c++
BUILD_SVG= # yes
BUILD_MATHML= # yes
MOZILLA_EXTENSIONS= default
CONFIGURE_ARGS+= --enable-extensions=${MOZILLA_EXTENSIONS:Q}
PKG_DESTDIR_SUPPORT= user-destdir
.include "../../www/seamonkey/Makefile.common"

View file

@ -1,118 +0,0 @@
# $NetBSD: Makefile,v 1.37 2009/09/10 00:05:21 tnn Exp $
MOZILLA= firefox3 # allow coexisting with firefox2
COMMENT= Web browser with support for extensions
MOZILLA_USE_GTK2= # yes
MOZILLA_USE_XFT= YES
INSTALLATION_DIRS= lib/pkgconfig share/applications share/pixmaps
CHECK_PORTABILITY_SKIP= security/nss/tests/libpkix/libpkix.sh
BUILDLINK_API_DEPENDS.cairo+= cairo>=1.6.4
# Pull in standard firefox build framework, and override some things below.
# This include must appear first, to ensure that USE_LANGUAGES is set
# correctly before mk/compiler.mk may be loaded.
.include "../../www/firefox/Makefile-firefox.common"
MAINTAINER= tnn@NetBSD.org
MOZ_VER= 3.0.14
XPTCFILES:= ${XPTCFILES:C,^,../../firefox3/files/,}
DESCR_SRC= ${.CURDIR}/../../www/firefox/DESCR
DISTINFO_FILE= ${.CURDIR}/../../www/firefox3/distinfo
PATCHDIR= ${.CURDIR}/../../www/firefox3/patches
.PHONY: copy-pkgconfig
post-extract: copy-pkgconfig
copy-pkgconfig:
cp ${.CURDIR}/../../www/firefox3/files/*.pc ${WRKSRC:Q}/build/unix
SUBST_CLASSES+= fix-pc
SUBST_STAGE.fix-pc= pre-configure
SUBST_MESSAGE.fix-pc= Substituting prefix in pkg-config files.
SUBST_FILES.fix-pc+= build/unix/*.pc
SUBST_SED.fix-pc= -e 's,@PREFIX@,${PREFIX},g'
# Need this to be able to reuse existing firefox pkgsrc infrastructure
.PHONY: create-dummy-c-sdk
pre-configure: create-dummy-c-sdk
create-dummy-c-sdk:
mkdir -p ${WRKSRC:Q}/directory/c-sdk
touch ${WRKSRC:Q}/directory/c-sdk/configure.in
# Makefiles sometimes call "rm -f" without more arguments. Kludge around ...
.PHONY: create-rm-wrapper
pre-configure: create-rm-wrapper
create-rm-wrapper:
printf '#!/bin/sh\n[ "$$*" = "-f" ] && exit 0\nexec /bin/rm $$@\n' > \
${WRAPPER_DIR}/bin/rm
chmod +x ${WRAPPER_DIR}/bin/rm
# Link browser.xpt
.PHONY: stage-package
post-build: stage-package
stage-package:
cd ${WRKSRC}/browser/installer && \
${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} stage-package
cp ${WRKSRC}/dist/firefox/components/browser.xpt \
${WRKSRC}/dist/bin/components/browser.xpt
.if !empty(PKG_OPTIONS:Mmozilla-jemalloc)
PLIST_SUBST+= JEMALLOC=
SCRIPTS_ENV+= JEMALLOC=
.PHONY: install-libjemalloc
post-install: install-libjemalloc
install-libjemalloc:
${INSTALL_LIB} ${WRKSRC}/dist/lib/libjemalloc.${SO_SUFFIX} \
${DESTDIR}${PREFIX}/lib/${MOZILLA}/libjemalloc.${SO_SUFFIX}
.else
PLIST_SUBST+= JEMALLOC="@comment "
SCRIPTS_ENV+= JEMALLOC="@comment "
.endif
.if !empty(PKG_OPTIONS:Mofficial-mozilla-branding)
MOZILLA_NAME= Firefox 3
MOZILLA_ICON= ${WRKSRC}/other-licenses/branding/firefox/default48.png
.else
MOZILLA_NAME= Minefield 3
MOZILLA_ICON= ${WRKSRC}/browser/branding/unofficial/default48.png
.endif
.PHONY: install-desktop
post-install: install-desktop
install-desktop:
${SED} \
-e 's|@MOZILLA@|${MOZILLA}|g' \
-e 's|@MOZILLA_NAME@|${MOZILLA_NAME}|g' \
-e 's|@FIREFOX_ICON@|${MOZILLA}.png|g' \
<${.CURDIR}/../../www/firefox3/files/${MOZILLA}.desktop.in \
>${WRKDIR}/${MOZILLA}.desktop
${INSTALL_DATA} ${WRKDIR}/${MOZILLA}.desktop \
${DESTDIR}${PREFIX}/share/applications/${MOZILLA}.desktop
${INSTALL_DATA} ${MOZILLA_ICON} \
${DESTDIR}${PREFIX}/share/pixmaps/${MOZILLA}.png
INSTALLATION_DIRS+= lib/${MOZILLA}/modules
# configure says: "Can't use system PNG because it doesn't have APNG support"
CONFIGURE_ARGS+= --without-system-png
# Override www/firefox's idea of toolkit
CONFIGURE_ARGS+= --enable-default-toolkit=cairo-gtk2
# Is dbus support useful for anything?
CONFIGURE_ARGS+= --disable-dbus
# Avoids needing curl on Linux
CONFIGURE_ARGS+= --disable-crashreporter
PYTHON_FOR_BUILD_ONLY= yes
.include "../../lang/python/application.mk"
CONFIGURE_ENV+= PYTHON=${PYTHONBIN:Q}
CONFIGURE_ARGS+= --enable-system-sqlite
BUILDLINK_API_DEPENDS.sqlite3+= sqlite3>=3.5.9
.include "../../databases/sqlite3/buildlink3.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../mk/bsd.pkg.mk"

File diff suppressed because it is too large Load diff

View file

@ -1,14 +0,0 @@
- Fix SDK installation
- Fix pkg-config files
Patch status relative to firefox-2.0
------------------------------------
Obsolete patches(?):
da dt af ag ah ai aj ak al an ao aq aw by cd cq
ch ci cj ck cl cm cn db dc dd dw ec
Patches that had to be updated to apply cleanly:
aa ab ac ap ba bb bz ca ed de
Patches that are "work in progress" and need to be reviewed/revisited:
wc wd we wf

View file

@ -1,20 +0,0 @@
# $NetBSD: buildlink3.mk,v 1.2 2009/03/20 19:25:36 joerg Exp $
BUILDLINK_TREE+= firefox3
.if !defined(FIREFOX3_BUILDLINK3_MK)
FIREFOX3_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.firefox3+= firefox3>=3.0
BUILDLINK_PKGSRCDIR.firefox3?= ../../www/firefox3
# XXX wip
GECKO_EXTRA_INC_DIRS= \
. caps chardet commandhandler content docshell dom downloads exthandler \
fastfind gfx gtkembedmoz intl js layout mimetype necko pipboot pipnss \
shistory uriloader webbrowserpersist webbrwsr widget windowwatcher xpcom \
xpconnect
GECKO_EXTRA_INCLUDE= ${GECKO_EXTRA_INC_DIRS:C,^,-I${BUILDLINK_PREFIX.firefox3}/include/firefox3/,}
.endif # FIREFOX3_BUILDLINK3_MK
BUILDLINK_TREE+= -firefox3

View file

@ -1,51 +0,0 @@
$NetBSD: distinfo,v 1.28 2009/09/10 00:05:21 tnn Exp $
SHA1 (firefox-3.0.14-source.tar.bz2) = 807b770674c9486eb731e4d4b927f416c464ecd3
RMD160 (firefox-3.0.14-source.tar.bz2) = f26887bbab95f6a0c6ed39628d096080eb03e5e4
Size (firefox-3.0.14-source.tar.bz2) = 37353041 bytes
SHA1 (patch-aa) = f995b5e53fa11ecb659ab2dd10551db1c71cc5f3
SHA1 (patch-ab) = 4a1704e96b74c76adca615fdf2c9069ca17e9d70
SHA1 (patch-ac) = af80f061bdd918a61197c9c499e7d1f5b7d10ebd
SHA1 (patch-ad) = 20f2184a7e5e98b065e884c67e4c17fc52019a79
SHA1 (patch-ae) = fea251aabc772c3d4ad3044c8295af45cc9cab2d
SHA1 (patch-ap) = 552694ac2d6ca713aec98ec394f1215c048c2392
SHA1 (patch-ax) = cbfe7a6392d5d2fefff123679ba1c056b1cc0aa9
SHA1 (patch-ba) = ea087c405bb8cda70f3320e9b3948528f7a82b0c
SHA1 (patch-bb) = c0e244974f79179520ad2a9ad85f6b08be0c45e9
SHA1 (patch-bm) = a0a69ca516e8a569d5e61293d5610b236192bf85
SHA1 (patch-bo) = 546149e3d80a9e2b0d1bddf32e7ea12fb76d613f
SHA1 (patch-bq) = 2b29436d138fea4e1941d537be1a636969db9a77
SHA1 (patch-br) = 66940666497e82bfb39dcc9381ecd85942ab222c
SHA1 (patch-bs) = 79cb84a5ed67780e124e7c595ee4ae6ffc7617a6
SHA1 (patch-bu) = 0714f658001c363f4abbfb248ac77c4862e3ccf9
SHA1 (patch-bv) = ef06a6a774c9d4da7b3fbf6f4e274ab042926e49
SHA1 (patch-bx) = 498f1c06acc670ba6dc9095ba2ce0d14ccad600c
SHA1 (patch-bz) = f2f6cf120133b23d1d3f182bce90b1b2fbf81142
SHA1 (patch-ca) = 7ff10fca5e11433b3016612417c6852db8607eb1
SHA1 (patch-cb) = d046b6eb23a96f75d339e7b7afbf0316f121d4d5
SHA1 (patch-de) = 18e481c3e69fe95b1af87bc800d93f47388fb60a
SHA1 (patch-df) = 17912d183f754ab6661d2be8092e6a07d142632b
SHA1 (patch-dh) = 7592a6238acd5ef6e802d32103c897acb576825a
SHA1 (patch-dj) = 70360dffb20dd1029866d2e81899d003c9e17473
SHA1 (patch-dk) = 1a8f3a9330397c183766cc71a4c0b4fb6c295460
SHA1 (patch-dl) = cba07cba5717a75c89f007aba36295dccc1c25ab
SHA1 (patch-do) = bdb018e157dcb5ef706b69184d8b739cfd32d8c3
SHA1 (patch-dr) = 377b1d83079ada4d819b6702c1010cdd900575fc
SHA1 (patch-ds) = 1e2e371b9ff7ab9049a947d8e0a63483a1fd244e
SHA1 (patch-du) = c6e66bb420ce9ea988f89b57d1c20a247704cfcf
SHA1 (patch-dv) = a380d261d4c2771a672d2b0f4f1f23821e3e5266
SHA1 (patch-ea) = 30fee4794317da23a358f183718dae75501f5121
SHA1 (patch-eb) = 176f71af302b1067c301e9cffa2d13a5837e45fe
SHA1 (patch-ed) = 3c6281a75373843c5767fc1213d8cc67dc549e03
SHA1 (patch-ee) = d5aeca91305ed2e1f522b2c0ed4bb17f7f8b881b
SHA1 (patch-eh) = 60aca7f94ee04c957386014f7d4df9e3c8ac8ff1
SHA1 (patch-ei) = 4484d57e19e39ef86760716d5886ebf2a3e69f63
SHA1 (patch-ej) = 9b9c708483399fa89c6bf5bdc15e79b31793c89d
SHA1 (patch-ek) = b94debcf16ba6f0dccc0a812b5e5fa38a150c413
SHA1 (patch-el) = 8a1586e4ebb76f584dc7b1cbc19f0c389ea206f7
SHA1 (patch-em) = 6b8b470fc78a4a56400e77af1057b9266634dcc9
SHA1 (patch-en) = 39926ce5669119c358e8600e2d70d08236e67443
SHA1 (patch-eo) = 281ec932efe607eee4c020aad3851c2aa44dddd2
SHA1 (patch-wc) = 2de8665ed6c23c26566ca6d50165c0cf413a753d
SHA1 (patch-wd) = fc5c3103ae6f2a2eccc01911a8207f3ca614008b
SHA1 (patch-we) = f7fecce05454e9794ff7a4e7789031a5ef49c42d

View file

@ -1,11 +0,0 @@
prefix=@PREFIX@
exec_prefix=@PREFIX@
libdir=@PREFIX@/lib/firefox3
includedir=@PREFIX@/include/firefox3
Name: JavaScript
Description: The Mozilla JavaScript Library
Version: 3.0
Requires: firefox3-nspr >= 4.6.8
Libs: -Wl,-R${libdir} -L${libdir} -lmozjs
Cflags: -I${includedir}/js -DXP_UNIX -DJS_THREADSAFE

View file

@ -1,11 +0,0 @@
prefix=@PREFIX@
exec_prefix=@PREFIX@
libdir=@PREFIX@/lib/firefox3
includedir=@PREFIX@/include/firefox3
Name: XUL
Description: There is no data. Only XUL.
Version: 3.0
Requires: firefox3-xpcom
Libs: -Wl,-R${libdir} -L${libdir} -lxul
Cflags: -I${includedir}

View file

@ -1,10 +0,0 @@
prefix=@PREFIX@
exec_prefix=@PREFIX@
libdir=@PREFIX@/lib/firefox3
includedir=@PREFIX@/include/firefox3
Name: NSPR
Description: The Netscape Portable Runtime
Version: 4.6.8
Libs: -Wl,-R${libdir} -L${libdir} -lplds4 -lplc4 -lnspr4 -pthread
Cflags: -I${includedir}

View file

@ -1,11 +0,0 @@
prefix=@PREFIX@
exec_prefix=@PREFIX@
libdir=@PREFIX@/lib/firefox3
includedir=@PREFIX@/include/firefox3
Name: NSS
Description: Mozilla Network Security Services
Version: 3.0
Requires: firefox3-nspr >= 4.6.8
Libs: -Wl,-R${libdir} -L${libdir} -lnss3 -lsmime3 -lssl3 -lsoftokn3
Cflags: -I${includedir}

View file

@ -1,10 +0,0 @@
prefix=@PREFIX@
exec_prefix=@PREFIX@
libdir=@PREFIX@/lib/firefox3
includedir=@PREFIX@/include/firefox3
Name: Mozilla Plug-In API
Description: Mozilla Plug-In API
Version: 3.0
Requires: firefox3-nspr >= 4.6.8
Cflags: -I${includedir}

View file

@ -1,12 +0,0 @@
prefix=@PREFIX@
exec_prefix=@PREFIX@
libdir=@PREFIX@/lib/firefox3
includedir=@PREFIX@/include/firefox3
idldir=@PREFIX@/share/idl/firefox3
Name: XPCOM
Description: The Mozilla Cross Platform Component Library
Version: 3.0
Requires: firefox3-nspr >= 4.6.8
Libs: -Wl,-R${libdir} -L${libdir} -lxpcom
Cflags: -I${includedir}

View file

@ -1,191 +0,0 @@
[Desktop Entry]
Encoding=UTF-8
Name=@MOZILLA_NAME@ Web Browser
Name[am]=
Name[ar]=
Name[az]=@MOZILLA_NAME@ Veb Səyyahı
Name[be]=
Name[bg]=Интернет браузър @MOZILLA_NAME@
Name[bn]=
Name[bs]=@MOZILLA_NAME@ web preglednik
Name[ca]=Navegador web @MOZILLA_NAME@
Name[cs]=Prohlížeč WWW @MOZILLA_NAME@
Name[cy]=Y Porwr Gwe @MOZILLA_NAME@
Name[da]=@MOZILLA_NAME@ - internetsurfning
Name[de]=@MOZILLA_NAME@ Webbrowser
Name[el]=Περιηγητής Διαδικτύου @MOZILLA_NAME@
Name[en_CA]=@MOZILLA_NAME@ Web Browser
Name[en_GB]=@MOZILLA_NAME@ Web Browser
Name[es]=Navegador Web @MOZILLA_NAME@
Name[et]=@MOZILLA_NAME@ veebibrauser
Name[eu]=@MOZILLA_NAME@ web arakatzailea
Name[fi]=@MOZILLA_NAME@, WWW-selain
Name[fr]=Navigateur Web @MOZILLA_NAME@
Name[ga]=Brabhsálaí Lín @MOZILLA_NAME@
Name[gu]=
Name[he]=דפדפן @MOZILLA_NAME@
Name[hi]=
Name[hr]=@MOZILLA_NAME@ Web preglednik
Name[hu]=@MOZILLA_NAME@ webböngésző
Name[id]=Web Browser @MOZILLA_NAME@
Name[it]=Browser web @MOZILLA_NAME@
Name[ja]=@MOZILLA_NAME@
Name[ko]=@MOZILLA_NAME@
Name[li]=@MOZILLA_NAME@ Web Browser
Name[lt]=@MOZILLA_NAME@ web naršyklė
Name[mk]=@MOZILLA_NAME@ веб прелистувач
Name[ml]=ിി
Name[mn]=@MOZILLA_NAME@ веб хөтөч
Name[ms]=Pelungsur Web @MOZILLA_NAME@
Name[nb]=@MOZILLA_NAME@ nettleser
Name[nl]=@MOZILLA_NAME@ Webbrowser
Name[nn]=@MOZILLA_NAME@ nettlesar
Name[no]=@MOZILLA_NAME@ nettleser
Name[pa]=
Name[pl]=Przeglądarka WWW @MOZILLA_NAME@
Name[pt]=Navegador Web @MOZILLA_NAME@
Name[pt_BR]=Navegador Web @MOZILLA_NAME@
Name[ro]=Navigatorul @MOZILLA_NAME@
Name[ru]=Веб-браузер @MOZILLA_NAME@
Name[sk]=
Name[sl]=Spletni brskalnik @MOZILLA_NAME@
Name[sq]=@MOZILLA_NAME@ - Shfletuesi Web
Name[sr]=
Name[sr@Latn]=Veb čitač Spoznaja
Name[sv]=Webbläsaren @MOZILLA_NAME@
Name[ta]=ிி ி
Name[tk]=@MOZILLA_NAME@ Web Ahtarçisi
Name[tr]=@MOZILLA_NAME@ Web Tarayıcı
Name[uk]=Переглядач web @MOZILLA_NAME@
Name[vi]=Trình Duyt Web @MOZILLA_NAME@
Name[wa]=Betchteu waibe epiphany
Name[zh_CN]=@MOZILLA_NAME@ Web
Name[zh_TW]=@MOZILLA_NAME@
GenericName=Web Browser
GenericName[ar]=متصفّح الانترنت
GenericName[az]=Veb Səyyahı
GenericName[be]=Вандроўнік па павуціньню
GenericName[bg]=Браузър
GenericName[bn]=
GenericName[bs]=Web preglednik
GenericName[ca]=Navegador web
GenericName[cs]=Prohlížeč WWW
GenericName[cy]=Porwr Gwe
GenericName[da]=Internetsurfning
GenericName[de]=Webbrowser
GenericName[el]=Περιηγητής Ιστοσελίδων
GenericName[en_CA]=Web Browser
GenericName[en_GB]=Web Browser
GenericName[es]=Navegador web
GenericName[et]=Veebilehitseja
GenericName[eu]=Web arakatzailea
GenericName[fi]=WWW-selain
GenericName[fr]=Navigateur Web @MOZILLA_NAME@
GenericName[ga]=Brabhsálaí Lín
GenericName[gu]=
GenericName[he]=דפדפן אינטרנט
GenericName[hi]=
GenericName[hr]=Web preglednik
GenericName[hu]=Webböngésző
GenericName[id]=Browser Web
GenericName[it]=Browser web
GenericName[ja]=GNOME
GenericName[ko]=
GenericName[li]=Wèb Browser
GenericName[lt]=Web naršyklė
GenericName[mk]=Веб прелистувач
GenericName[mn]=Веб хөтөч
GenericName[ms]=Pelungsur Web
GenericName[nb]=Nettleser
GenericName[nl]=Web-browser
GenericName[nn]=Nettlesar
GenericName[no]=Nettleser
GenericName[pa]=
GenericName[pl]=Przeglądarka WWW
GenericName[pt]=Navegador Web
GenericName[pt_BR]=Navegador Web
GenericName[ro]=Navigator Internet
GenericName[ru]=Веб-браузер
GenericName[sk]=WWW prehliadač
GenericName[sl]=Spletni brskalnik
GenericName[sq]=Shfletuesi Web
GenericName[sr]=Веб читач
GenericName[sr@Latn]=Veb čitač
GenericName[sv]=Webbläsare
GenericName[ta]= ி
GenericName[th]=
GenericName[tk]=Web Ahtarçysy
GenericName[tr]=Web Tarayıcı
GenericName[uk]=Переглядач web-сторінок
GenericName[vi]=Trình duyt Web
GenericName[wa]=Betchteu waibe
GenericName[zh_CN]=Web
GenericName[zh_TW]=
Comment=Browse the web
Comment[ar]=تصفح الانترنت
Comment[az]=Vebi gəzin
Comment[be]=Вандраваць па павуціньню
Comment[bg]=Сърфиране в интернет
Comment[bn]=
Comment[bs]=Pregledaj na internetu
Comment[ca]=Navegueu per la web
Comment[cs]=Prohlížet WWW
Comment[cy]=Pori'r we
Comment[da]=Surf på internettet
Comment[de]=Im Web surfen
Comment[el]=Περιήγηση στον παγκόσμιο ιστό
Comment[en_CA]=Browse the web
Comment[en_GB]=Browse the web
Comment[es]=Navegar por la web
Comment[et]=Sirvi veebi
Comment[eu]=Arakatu web-a
Comment[fi]=Selaa WWW:tä
Comment[fr]=Naviguer sur Internet
Comment[ga]=Brabhsáil an Líon
Comment[gu]=
Comment[he]=גלוש ברשת
Comment[hi]=
Comment[hr]=Pregledaj Web
Comment[hu]=A világháló böngészése
Comment[id]=Jelajah web
Comment[it]=Esplora il web
Comment[ja]=
Comment[ko]=
Comment[li]=Blajere op internet
Comment[lt]=Naršyti internete
Comment[mk]=Прелистувајте на веб
Comment[ml]= ി
Comment[mn]=Веб броузе хийх
Comment[ms]=Layari web
Comment[nb]=Surf på nettet
Comment[nl]=Websurfen
Comment[nn]=Surf på nettet
Comment[no]=Surf på nettet
Comment[pa]=
Comment[pl]=Przeglądanie stron WWW
Comment[pt]=Navegar na web
Comment[pt_BR]=Navegar na web
Comment[ro]=Navigare Internet
Comment[ru]=Веб-браузер
Comment[sk]=Prehliadať internet
Comment[sl]=Brskaj po spletu
Comment[sq]=Eksploro web-in
Comment[sr]=Прегледај веб
Comment[sr@Latn]=Pregledaj veb
Comment[sv]=Surfa på nätet
Comment[ta]=ி
Comment[th]= @MOZILLA_NAME@
Comment[tk]=Webi Ahtar
Comment[tr]=Web'e Gözat
Comment[uk]=Програма перегляду web-сторінок
Comment[vi]=Duyt web
Comment[wa]=Naivyî avå les waibes
Comment[zh_CN]= Web
Comment[zh_TW]=
Exec=@MOZILLA@ %u
Icon=@FIREFOX_ICON@
StartupNotify=false
Terminal=false
Type=Application
Categories=Application;Network;
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;

View file

@ -1,112 +0,0 @@
/* -*- 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 NS_InvokeByIndex_P
.type NS_InvokeByIndex_P, #function
/*
NS_InvokeByIndex_P(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
*/
NS_InvokeByIndex_P:
save %sp,-(128 + 64),%sp ! room for the register window and
! struct pointer, rounded up to 0 % 64
sll %i2,4,%l0 ! assume the worst case
! paramCount * 2 * 8 bytes
cmp %l0, 0 ! are there any args? If not,
be .invoke ! no need to copy args to stack
nop
sub %sp,%l0,%sp ! create the additional stack space
add %sp,0x7ff+136,%o0 ! step past the register window, the
! struct result pointer and the 'this' slot
mov %i2,%o1 ! paramCount
call invoke_copy_to_stack
mov %i3,%o2 ! params
!
! load arguments from stack into the outgoing registers
! BIAS is 0x7ff (2047)
!
! load the %o1..5 64bit (extended word) output registers registers
ldx [%sp + 0x7ff + 136],%o1 ! %i1
ldx [%sp + 0x7ff + 144],%o2 ! %i2
ldx [%sp + 0x7ff + 152],%o3 ! %i3
ldx [%sp + 0x7ff + 160],%o4 ! %i4
ldx [%sp + 0x7ff + 168],%o5 ! %i5
! load the even number double registers starting with %f2
ldd [%sp + 0x7ff + 136],%f2
ldd [%sp + 0x7ff + 144],%f4
ldd [%sp + 0x7ff + 152],%f6
ldd [%sp + 0x7ff + 160],%f8
ldd [%sp + 0x7ff + 168],%f10
ldd [%sp + 0x7ff + 176],%f12
ldd [%sp + 0x7ff + 184],%f14
ldd [%sp + 0x7ff + 192],%f16
ldd [%sp + 0x7ff + 200],%f18
ldd [%sp + 0x7ff + 208],%f20
ldd [%sp + 0x7ff + 216],%f22
ldd [%sp + 0x7ff + 224],%f24
ldd [%sp + 0x7ff + 232],%f26
ldd [%sp + 0x7ff + 240],%f28
ldd [%sp + 0x7ff + 248],%f30
!
! calculate the target address from the vtable
!
.invoke:
sll %i1,3,%l0 ! index *= 8
ldx [%i0],%l1 ! *this --> address of vtable
ldx [%l0 + %l1],%l0 ! this->vtable[index] --> address
jmpl %l0,%o7 ! call the routine
mov %i0,%o0 ! move 'this' pointer to out register
mov %o0,%i0 ! propagate return value
ret
restore
.size NS_InvokeByIndex_P, .-NS_InvokeByIndex_P

View file

@ -1,84 +0,0 @@
/* -*- 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"
#if !defined(__sparc64__) && !defined(_LP64)
#error "This code is for Sparc64 only"
#endif
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.
*/
PRUint64 *l_d = d;
nsXPTCVariant *l_s = s;
PRUint64 l_paramCount = paramCount;
PRUint64 regCount = 0; // return the number of registers to load from the stack
for(PRUint64 i = 0; i < l_paramCount; i++, l_d++, l_s++)
{
if (regCount < 5) regCount++;
if (l_s->IsPtrData())
{
*l_d = (PRUint64)l_s->ptr;
continue;
}
switch (l_s->type)
{
case nsXPTType::T_I8 : *((PRInt64*)l_d) = l_s->val.i8; break;
case nsXPTType::T_I16 : *((PRInt64*)l_d) = l_s->val.i16; break;
case nsXPTType::T_I32 : *((PRInt64*)l_d) = l_s->val.i32; break;
case nsXPTType::T_I64 : *((PRInt64*)l_d) = l_s->val.i64; break;
case nsXPTType::T_U8 : *((PRUint64*)l_d) = l_s->val.u8; break;
case nsXPTType::T_U16 : *((PRUint64*)l_d) = l_s->val.u16; break;
case nsXPTType::T_U32 : *((PRUint64*)l_d) = l_s->val.u32; break;
case nsXPTType::T_U64 : *((PRUint64*)l_d) = l_s->val.u64; break;
/* in the case of floats, we want to put the bits in to the
64bit space right justified... floats in the paramter array on
sparcv9 use odd numbered registers.. %f1, %f3, so we have to skip
the space that would be occupied by %f0, %f2, etc.
*/
case nsXPTType::T_FLOAT : *(((float*)l_d) + 1) = l_s->val.f; break;
case nsXPTType::T_DOUBLE: *((double*)l_d) = l_s->val.d; break;
case nsXPTType::T_BOOL : *((PRInt64*)l_d) = l_s->val.b; break;
case nsXPTType::T_CHAR : *((PRUint64*)l_d) = l_s->val.c; break;
case nsXPTType::T_WCHAR : *((PRInt64*)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

@ -1,66 +0,0 @@
/* -*- 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 + 136, %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
stx %i1, [%fp + 0x7ff + 136]
stx %i2, [%fp + 0x7ff + 144]
stx %i3, [%fp + 0x7ff + 152]
stx %i4, [%fp + 0x7ff + 160]
stx %i5, [%fp + 0x7ff + 168]
! now we can build our own stack frame
save %sp,-(128 + 64),%sp ! room for the register window and
! struct pointer, rounded up to 0 % 64
! 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
mov %o0,%i0 ! propagate return value
b .LL1
nop
.LL1:
ret
restore
.size SharedStub, .-SharedStub
.type SharedStub, #function

View file

@ -1,119 +0,0 @@
/* -*- 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"
#include "xptiprivate.h"
#if defined(sparc) || defined(__sparc__)
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self, PRUint64 methodIndex, PRUint64* args)
{
#define PARAM_BUFFER_COUNT 16
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
nsXPTCMiniVariant* dispatchParams = NULL;
const nsXPTMethodInfo* info;
PRUint8 paramCount;
PRUint8 i;
nsresult result = NS_ERROR_FAILURE;
NS_ASSERTION(self,"no self");
self->mEntry->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");
if (!dispatchParams)
return NS_ERROR_OUT_OF_MEMORY;
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_BOOL : dp->val.b = *((PRInt64*) ap); break;
case nsXPTType::T_CHAR : dp->val.c = *((PRUint64*) ap); break;
case nsXPTType::T_WCHAR : dp->val.wc = *((PRInt64*) ap); break;
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_FLOAT : dp->val.f = ((float*) ap)[1]; break;
case nsXPTType::T_DOUBLE : dp->val.d = *((double*) ap); break;
default:
NS_ASSERTION(0, "bad type");
break;
}
}
result = self->mOuter->CallMethod((PRUint16)methodIndex, info, dispatchParams);
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

@ -1,23 +0,0 @@
$NetBSD: patch-aa,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
--- config/autoconf.mk.in.orig 2008-02-26 19:30:21.000000000 +0100
+++ config/autoconf.mk.in
@@ -58,14 +58,14 @@ MOZ_PKG_SPECIAL = @MOZ_PKG_SPECIAL@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
-includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+includedir = @includedir@/$(MOZILLA_PKG_NAME)
libdir = @libdir@
datadir = @datadir@
mandir = @mandir@
-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+idldir = @datadir@/idl/$(MOZILLA_PKG_NAME)
-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
+installdir = $(libdir)/$(MOZILLA_PKG_NAME)
+sdkdir = $(libdir)/$(MOZILLA_PKG_NAME)-sdk
DIST = $(DEPTH)/dist
LIBXUL_SDK = @LIBXUL_SDK@

View file

@ -1,57 +0,0 @@
$NetBSD: patch-ab,v 1.3 2009/04/20 12:13:03 hasso Exp $
--- configure.in.orig 2008-11-21 21:37:59 +0200
+++ configure.in 2009-04-20 13:37:54 +0300
@@ -1700,7 +1700,7 @@ case "$target" in
LDFLAGS=$_SAVE_LDFLAGS
;;
-*-freebsd*)
+*-freebsd* | *-dragonfly*)
if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` != "elf"; then
DLL_SUFFIX=".so.1.0"
DSO_LDOPTS="-shared"
@@ -1714,6 +1714,9 @@ case "$target" in
# MKSHLIB_FORCE_ALL='-Wl,-Bforcearchive'
# MKSHLIB_UNFORCE_ALL=''
# fi
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
+ fi
;;
*-hpux*)
@@ -2230,7 +2233,14 @@ case "$target" in
if test "$LIBRUNPATH"; then
DSO_LDOPTS="-R$LIBRUNPATH $DSO_LDOPTS"
fi
+ case "${target_cpu}" in
+ alpha*)
+ CFLAGS="$CFLAGS -mieee"
+ CXXFLAGS="$CXXFLAGS -mieee"
;;
+ esac
+ ;;
+
*-openvms*)
AC_DEFINE(NO_PW_GECOS)
@@ -2979,6 +2989,9 @@ dnl ====================================
case $target in
*-hpux11.*)
;;
+*-dragonfly*)
+ AC_CHECK_LIB(c, gethostbyname_r)
+ ;;
*)
AC_CHECK_LIB(c_r, gethostbyname_r)
;;
@@ -6142,7 +6155,7 @@ dnl ====================================
dnl = Enable code optimization. ON by default.
dnl ========================================================
if test -z "$MOZ_OPTIMIZE_FLAGS"; then
- MOZ_OPTIMIZE_FLAGS="-O"
+ MOZ_OPTIMIZE_FLAGS=""
fi
MOZ_ARG_ENABLE_STRING(optimize,

View file

@ -1,72 +0,0 @@
$NetBSD: patch-ac,v 1.2 2009/04/21 12:58:22 tnn Exp $
--- xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2008-04-09 08:34:20.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in
@@ -64,14 +64,21 @@ include $(topsrcdir)/config/config.mk
#
# Lots of Unixish x86 flavors
#
-ifneq (,$(filter FreeBSD NetBSD OpenBSD BSD_OS Darwin,$(OS_ARCH)))
+ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD BSD_OS Darwin,$(OS_ARCH)))
+ifeq (x86_64,$(OS_TEST))
+CPPSRCS := xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_linux.cpp
+else
ifeq (86,$(findstring 86,$(OS_TEST)))
CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp
+endif
+ifeq (amd64,$(OS_TEST))
+CPPSRCS := xptcinvoke_x86_64_linux.cpp xptcstubs_x86_64_linux.cpp
+endif
+endif
ifeq (Darwin,$(OS_ARCH))
DEFINES += -DKEEP_STACK_16_BYTE_ALIGNED
endif
endif
-endif
#
# New code for Linux, et. al., with gcc
# Migrate other platforms here after testing
@@ -185,7 +192,7 @@ endif
# NetBSD/ARM
#
ifeq ($(OS_ARCH),NetBSD)
-ifneq (,$(filter arm% sa110,$(OS_TEST)))
+ifneq (,$(filter arm%,$(TARGET_CPU)))
CPPSRCS := xptcinvoke_arm_netbsd.cpp xptcstubs_arm_netbsd.cpp
endif
endif
@@ -240,7 +247,7 @@ endif
# NetBSD/m68k
#
ifeq ($(OS_ARCH),NetBSD)
-ifneq (,$(filter amiga atari hp300 mac68k mvme68k next68k sun3 sun3x x68k,$(OS_TEST)))
+ifneq (,$(filter m68k,$(TARGET_CPU)))
CPPSRCS := xptcinvoke_netbsd_m68k.cpp xptcstubs_netbsd_m68k.cpp
endif
endif
@@ -329,9 +336,10 @@ endif
#
# NetBSD/PPC
#
-ifneq (,$(filter NetBSDmacppc NetBSDbebox NetBSDofppc NetBSDprep NetBSDamigappc,$(OS_ARCH)$(OS_TEST)))
+ifeq ($(OS_ARCH)$(OS_TEST),NetBSDpowerpc)
CPPSRCS := xptcinvoke_ppc_netbsd.cpp xptcstubs_ppc_netbsd.cpp
ASFILES := xptcinvoke_asm_ppc_netbsd.s xptcstubs_asm_ppc_netbsd.s
+AS := $(CC) -c -x assembler-with-cpp
endif
#
@@ -403,6 +411,13 @@ CPPSRCS := xptcinvoke_sparc64_openbsd.c
ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.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
#
ifeq ($(OS_ARCH),SunOS)

View file

@ -1,76 +0,0 @@
$NetBSD: patch-ad,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../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 2004-04-18 23:18:18.000000000 +0900
+++ ./xpcom/reflect/xptcall/src/md/unix/xptcinvoke_netbsd_m68k.cpp 2005-12-04 19:03:09.000000000 +0900
@@ -132,6 +132,15 @@
}
}
+/*
+ * SYMBOL PREFIX must be "_" for aout symbols and "" for ELF
+ */
+#ifndef __ELF__
+#define SYMBOLPREFIX "_"
+#else
+#define SYMBOLPREFIX
+#endif
+
XPTC_PUBLIC_API(nsresult)
XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params)
@@ -139,30 +148,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

@ -1,42 +0,0 @@
$NetBSD: patch-ae,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../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 2004-04-18 23:18:18.000000000 +0900
+++ ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_netbsd_m68k.cpp 2005-12-04 19:03:11.000000000 +0900
@@ -123,17 +123,27 @@
}
}
+/*
+ * Beware: use % instead of %% for register identifiers in a preprocessor macro
+ * SYMBOL PREFIX must be "_" for aout and "" for ELF
+ */
+#ifndef __ELF__
+#define SYMBOLPREFIX "_"
+#else
+#define SYMBOLPREFIX
+#endif
+
#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

@ -1,13 +0,0 @@
$NetBSD: patch-ap,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
--- security/coreconf/command.mk.orig 2007-10-23 23:55:00.000000000 +0200
+++ security/coreconf/command.mk
@@ -45,7 +45,7 @@ ASFLAGS += $(CFLAGS)
CCF = $(CC) $(CFLAGS)
LINK_DLL = $(LINK) $(OS_DLLFLAGS) $(DLLFLAGS)
LINK_EXE = $(LINK) $(OS_LFLAGS) $(LFLAGS)
-CFLAGS = $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
+CFLAGS = $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
$(XCFLAGS)
PERL = perl
RANLIB = echo

View file

@ -1,15 +0,0 @@
$NetBSD: patch-ax,v 1.2 2008/10/26 15:31:33 tnn Exp $
--- security/coreconf/SunOS5.mk.orig 2007-11-22 05:39:56.000000000 +0100
+++ security/coreconf/SunOS5.mk
@@ -156,6 +156,10 @@ endif
endif
DSO_LDOPTS += -z combreloc -z defs -z ignore
+ifdef LIBRUNPATH
+DSO_LDOPTS += -R$(LIBRUNPATH)
+endif
+
# -KPIC generates position independent code for use in shared libraries.
# (Similarly for -fPIC in case of gcc.)
ifdef NS_USE_GCC

View file

@ -1,60 +0,0 @@
$NetBSD: patch-ba,v 1.2 2009/07/27 12:56:01 tnn Exp $
--- nsprpub/pr/include/md/_netbsd.cfg.orig 2008-12-20 07:26:34.000000000 +0100
+++ nsprpub/pr/include/md/_netbsd.cfg
@@ -282,6 +282,55 @@
#define PR_BYTES_PER_WORD_LOG2 3
#define PR_BYTES_PER_DWORD_LOG2 3
+#elif defined(__amd64__)
+#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_ALIGN_OF_WORD 8
+
+#define PR_BYTES_PER_WORD_LOG2 3
+#define PR_BYTES_PER_DWORD_LOG2 3
+
+#define HAVE_LONG_LONG
+#define HAVE_ALIGNED_DOUBLES
+#define HAVE_ALIGNED_LONGLONGS
+
#elif defined(__powerpc__) || defined(__m68k__)
#undef IS_LITTLE_ENDIAN

View file

@ -1,26 +0,0 @@
$NetBSD: patch-bb,v 1.2 2009/07/27 12:56:01 tnn Exp $
--- nsprpub/pr/include/md/_netbsd.h.orig 2008-12-20 07:15:23.000000000 +0100
+++ nsprpub/pr/include/md/_netbsd.h
@@ -94,6 +94,12 @@
#define _PR_INET6_PROBE
#endif
+#if __NetBSD_Version__ >= 106370000
+/* NetBSD 1.6ZK */
+#define _PR_HAVE_GETPROTO_R
+#define _PR_HAVE_GETPROTO_R_INT
+#endif
+
#define USE_SETJMP
#ifndef _PR_PTHREADS
@@ -107,6 +113,8 @@
#define JB_SP_INDEX 2
#elif defined(__mips__)
#define JB_SP_INDEX 4
+#elif defined(__amd64__)
+#define JB_SP_INDEX 6
#elif defined(__alpha__)
#define JB_SP_INDEX 34
#elif defined(__arm32__)

View file

@ -1,32 +0,0 @@
$NetBSD: patch-bm,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../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 2004-04-18 23:18:18.000000000 +0900
+++ ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm_netbsd.cpp 2005-12-04 19:17:13.000000000 +0900
@@ -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" \

View file

@ -1,83 +0,0 @@
$NetBSD: patch-bo,v 1.2 2009/07/27 12:56:01 tnn Exp $
--- nsprpub/configure.in.orig 2009-04-07 03:16:58.000000000 +0200
+++ nsprpub/configure.in
@@ -62,7 +62,7 @@ USE_CPLUS=
USE_IPV6=
USE_MDUPDATE=
_MACOSX_DEPLOYMENT_TARGET=
-_OPTIMIZE_FLAGS=-O
+_OPTIMIZE_FLAGS=
_DEBUG_FLAGS=-g
MOZ_DEBUG=1
MOZ_OPTIMIZE=
@@ -1180,6 +1180,34 @@ tools are selected during the Xcode/Deve
DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
MDCPUCFG_H=_freebsd.cfg
PR_MD_CSRCS=freebsd.c
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
+ fi
+ ;;
+
+*-dragonfly*)
+ if test -z "$USE_NSPR_THREADS"; then
+ USE_PTHREADS=1
+ fi
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(FREEBSD)
+ AC_DEFINE(HAVE_BSD_FLOCK)
+ AC_DEFINE(HAVE_SOCKLEN_T)
+ CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
+ MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ if test "$MOZ_OBJFORMAT" = "elf"; then
+ DLL_SUFFIX=so
+ else
+ DLL_SUFFIX=so.1.0
+ fi
+ MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
+ DSO_CFLAGS=-fPIC
+ DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
+ MDCPUCFG_H=_freebsd.cfg
+ PR_MD_CSRCS=freebsd.c
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="$DSO_LDOPTS -Wl,-R$LIBRUNPATH"
+ fi
;;
*-hpux*)
@@ -1729,6 +1757,7 @@ mips-nec-sysv*)
AC_DEFINE(XP_UNIX)
AC_DEFINE(NETBSD)
AC_DEFINE(HAVE_BSD_FLOCK)
+ AC_DEFINE(HAVE_SOCKLEN_T)
if test -z "$USE_NSPR_THREADS"; then
USE_PTHREADS=1
fi
@@ -2456,7 +2485,7 @@ if test -n "$USE_PTHREADS"; then
if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
ac_cv_have_dash_pthread=yes
case "$target_os" in
- freebsd*)
+ freebsd* | dragonfly*)
# Freebsd doesn't use -pthread for compiles, it uses them for linking
;;
*)
@@ -2494,7 +2523,7 @@ if test -n "$USE_PTHREADS"; then
_PTHREAD_LDFLAGS=
fi
;;
- *-freebsd*)
+ *-freebsd* | *-dragonfly*)
AC_DEFINE(_REENTRANT)
AC_DEFINE(_THREAD_SAFE)
dnl -pthread links in -lc_r, so don't specify it explicitly.
@@ -2575,7 +2604,7 @@ case "$target" in
AC_DEFINE(_PR_NEED_PTHREAD_INIT)
fi
;;
-*-freebsd*)
+*-freebsd* | *-dragonfly*)
if test -n "$USE_NSPR_THREADS"; then
AC_DEFINE(_PR_LOCAL_THREADS_ONLY)
fi

View file

@ -1,14 +0,0 @@
$NetBSD: patch-bq,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../Orig/mozilla/xpcom/io/nsLocalFileUnix.h ./xpcom/io/nsLocalFileUnix.h
--- ../Orig/mozilla/xpcom/io/nsLocalFileUnix.h 2004-04-18 23:18:14.000000000 +0900
+++ ./xpcom/io/nsLocalFileUnix.h 2005-12-04 19:18:04.000000000 +0900
@@ -73,7 +73,7 @@
#endif
// so we can statfs on freebsd
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || ((defined(__DragonFly__) || defined(__NetBSD__)) && !defined(HAVE_STATVFS))
#define HAVE_SYS_STATFS_H
#define STATFS statfs
#include <sys/param.h>

View file

@ -1,43 +0,0 @@
$NetBSD: patch-br,v 1.2 2009/04/07 08:01:01 hasso Exp $
--- nsprpub/pr/src/misc/prnetdb.c.orig 2008-05-02 11:18:14 +0300
+++ nsprpub/pr/src/misc/prnetdb.c 2009-04-04 19:53:32 +0300
@@ -114,6 +114,11 @@ PRLock *_pr_dnsLock = NULL;
#define _PR_HAVE_5_ARG_GETPROTO_R
#endif
+#if __DragonFly_version >= 200202
+#define _PR_HAVE_GETPROTO_R
+#define _PR_HAVE_5_ARG_GETPROTO_R
+#endif
+
/* BeOS has glibc but not the glibc-style getprotobyxxx_r functions. */
#if (defined(__GLIBC__) && __GLIBC__ >= 2 && !defined(XP_BEOS))
#define _PR_HAVE_GETPROTO_R
@@ -331,7 +336,7 @@ _pr_QueryNetIfs(void)
}
#elif (defined(DARWIN) && defined(HAVE_GETIFADDRS)) || defined(FREEBSD) \
- || defined(NETBSD) || defined(OPENBSD)
+ || defined(NETBSD) || defined(OPENBSD) || defined(DRAGONFLY)
/*
* Use the BSD getifaddrs function.
@@ -2023,7 +2028,17 @@ PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInf
*/
hints.ai_socktype = SOCK_STREAM;
+/* NetBSD >= 2.99.9 has a thread-safe resolver */
+#if defined(__NetBSD_Version__) && __NetBSD_Version__ < 299000900
+ LOCK_DNS();
+#endif
+
rv = GETADDRINFO(hostname, NULL, &hints, &res);
+
+#if defined(__NetBSD_Version__) && __NetBSD_Version__ < 299000900
+ UNLOCK_DNS();
+#endif
+
if (rv == 0)
return (PRAddrInfo *) res;

View file

@ -1,33 +0,0 @@
$NetBSD: patch-bs,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../Orig/mozilla/config/mkdepend/imakemdep.h ./config/mkdepend/imakemdep.h
--- ../Orig/mozilla/config/mkdepend/imakemdep.h 2004-04-21 06:38:14.000000000 +0900
+++ ./config/mkdepend/imakemdep.h 2005-12-04 19:21:01.000000000 +0900
@@ -235,7 +235,7 @@
#ifdef _CRAY
#define DEFAULT_CPP "/lib/pcpp"
#endif
-#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
#define DEFAULT_CPP "/usr/libexec/cpp"
#endif
#ifdef MACH
@@ -273,7 +273,7 @@
#ifdef unix
"-Uunix", /* remove unix symbol so that filename unix.c okay */
#endif
-#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(MACH)
+#if defined(__386BSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(MACH) || defined(__DragonFly__)
# ifdef __i386__
"-D__i386__",
# endif
@@ -713,6 +713,9 @@
#ifdef __sgi
{"__sgi", "1"},
#endif
+#ifdef __DragonFly__
+ {"__DragonFly__", "1"},
+#endif
#ifdef __FreeBSD__
{"__FreeBSD__", "1"},
#endif

View file

@ -1,180 +0,0 @@
$NetBSD: patch-bu,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_amd64.cpp ./xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_amd64.cpp
--- ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_amd64.cpp 1970-01-01 09:00:00.000000000 +0900
+++ ./xpcom/reflect/xptcall/src/md/unix/xptcinvoke_unixish_amd64.cpp 2005-12-07 00:07:35.000000000 +0900
@@ -0,0 +1,174 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+// Platform specific code to invoke XPCOM methods on native objects
+
+#include "xptcprivate.h"
+
+// 6 integral parameters are passed in registers
+const PRUint32 GPR_COUNT = 6;
+
+// 8 floating point parameters are passed in SSE registers
+const PRUint32 FPR_COUNT = 8;
+
+// Remember that these 'words' are 64-bit long
+static inline void
+invoke_count_words(PRUint32 paramCount, nsXPTCVariant * s,
+ PRUint32 & nr_gpr, PRUint32 & nr_fpr, PRUint32 & nr_stack)
+{
+ nr_gpr = 1; // skip one GP register for 'that'
+ nr_fpr = 0;
+ nr_stack = 0;
+
+ /* Compute number of eightbytes of class MEMORY. */
+ for (uint32 i = 0; i < paramCount; i++, s++) {
+ if (!s->IsPtrData()
+ && (s->type == nsXPTType::T_FLOAT || s->type == nsXPTType::T_DOUBLE)) {
+ if (nr_fpr < FPR_COUNT)
+ nr_fpr++;
+ else
+ nr_stack++;
+ }
+ else {
+ if (nr_gpr < GPR_COUNT)
+ nr_gpr++;
+ else
+ nr_stack++;
+ }
+ }
+}
+
+static void
+invoke_copy_to_stack(PRUint64 * d, PRUint32 paramCount, nsXPTCVariant * s,
+ PRUint64 * gpregs, double * fpregs)
+{
+ PRUint32 nr_gpr = 1; // skip one GP register for 'that'
+ PRUint32 nr_fpr = 0;
+ PRUint64 value;
+
+ for (uint32 i = 0; i < paramCount; i++, s++) {
+ if (s->IsPtrData())
+ value = (PRUint64) s->ptr;
+ else {
+ switch (s->type) {
+ case nsXPTType::T_FLOAT: break;
+ case nsXPTType::T_DOUBLE: break;
+ case nsXPTType::T_I8: value = s->val.i8; break;
+ case nsXPTType::T_I16: value = s->val.i16; break;
+ case nsXPTType::T_I32: value = s->val.i32; break;
+ case nsXPTType::T_I64: value = s->val.i64; break;
+ case nsXPTType::T_U8: value = s->val.u8; break;
+ case nsXPTType::T_U16: value = s->val.u16; break;
+ case nsXPTType::T_U32: value = s->val.u32; break;
+ case nsXPTType::T_U64: value = s->val.u64; break;
+ case nsXPTType::T_BOOL: value = s->val.b; break;
+ case nsXPTType::T_CHAR: value = s->val.c; break;
+ case nsXPTType::T_WCHAR: value = s->val.wc; break;
+ default: value = (PRUint64) s->val.p; break;
+ }
+ }
+
+ if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) {
+ if (nr_fpr < FPR_COUNT)
+ fpregs[nr_fpr++] = s->val.d;
+ else {
+ *((double *)d) = s->val.d;
+ d++;
+ }
+ }
+ else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
+ if (nr_fpr < FPR_COUNT)
+ // The value in %xmm register is already prepared to
+ // be retrieved as a float. Therefore, we pass the
+ // value verbatim, as a double without conversion.
+ fpregs[nr_fpr++] = s->val.d;
+ else {
+ *((float *)d) = s->val.f;
+ d++;
+ }
+ }
+ else {
+ if (nr_gpr < GPR_COUNT)
+ gpregs[nr_gpr++] = value;
+ else
+ *d++ = value;
+ }
+ }
+}
+
+extern "C"
+XPTC_PUBLIC_API(nsresult)
+XPTC_InvokeByIndex(nsISupports * that, PRUint32 methodIndex,
+ PRUint32 paramCount, nsXPTCVariant * params)
+{
+ PRUint32 nr_gpr, nr_fpr, nr_stack;
+ invoke_count_words(paramCount, params, nr_gpr, nr_fpr, nr_stack);
+
+ // Stack, if used, must be 16-bytes aligned
+ if (nr_stack)
+ nr_stack = (nr_stack + 1) & ~1;
+
+ // Load parameters to stack, if necessary
+ PRUint64 *stack = (PRUint64 *) __builtin_alloca(nr_stack * 8);
+ PRUint64 gpregs[GPR_COUNT];
+ double fpregs[FPR_COUNT];
+ invoke_copy_to_stack(stack, paramCount, params, gpregs, fpregs);
+
+ // Load FPR registers from fpregs[]
+ register double d0 asm("xmm0");
+ register double d1 asm("xmm1");
+ register double d2 asm("xmm2");
+ register double d3 asm("xmm3");
+ register double d4 asm("xmm4");
+ register double d5 asm("xmm5");
+ register double d6 asm("xmm6");
+ register double d7 asm("xmm7");
+
+ switch (nr_fpr) {
+#define ARG_FPR(N) \
+ case N+1: d##N = fpregs[N];
+ ARG_FPR(7);
+ ARG_FPR(6);
+ ARG_FPR(5);
+ ARG_FPR(4);
+ ARG_FPR(3);
+ ARG_FPR(2);
+ ARG_FPR(1);
+ ARG_FPR(0);
+ case 0:;
+#undef ARG_FPR
+ }
+
+ // Load GPR registers from gpregs[]
+ register PRUint64 a0 asm("rdi");
+ register PRUint64 a1 asm("rsi");
+ register PRUint64 a2 asm("rdx");
+ register PRUint64 a3 asm("rcx");
+ register PRUint64 a4 asm("r8");
+ register PRUint64 a5 asm("r9");
+
+ switch (nr_gpr) {
+#define ARG_GPR(N) \
+ case N+1: a##N = gpregs[N];
+ ARG_GPR(5);
+ ARG_GPR(4);
+ ARG_GPR(3);
+ ARG_GPR(2);
+ ARG_GPR(1);
+ case 1: a0 = (PRUint64) that;
+ case 0:;
+#undef ARG_GPR
+ }
+
+ // Ensure that assignments to SSE registers won't be optimized away
+ asm("" ::
+ "x" (d0), "x" (d1), "x" (d2), "x" (d3),
+ "x" (d4), "x" (d5), "x" (d6), "x" (d7));
+
+ // Get pointer to method
+ PRUint64 methodAddress = *((PRUint64 *)that);
+ methodAddress += 8 * methodIndex;
+ methodAddress = *((PRUint64 *)methodAddress);
+
+ typedef PRUint32 (*Method)(PRUint64, PRUint64, PRUint64, PRUint64, PRUint64, PRUint64);
+ PRUint32 result = ((Method)methodAddress)(a0, a1, a2, a3, a4, a5);
+ return result;
+}

View file

@ -1,212 +0,0 @@
$NetBSD: patch-bv,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_amd64.cpp ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_amd64.cpp
--- ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_amd64.cpp 1970-01-01 09:00:00.000000000 +0900
+++ ./xpcom/reflect/xptcall/src/md/unix/xptcstubs_unixish_amd64.cpp 2005-12-04 19:32:22.000000000 +0900
@@ -0,0 +1,206 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+
+// Implement shared vtbl methods.
+
+#include "xptcprivate.h"
+
+// The Linux/x86-64 ABI passes the first 6 integral parameters and the
+// first 8 floating point parameters in registers (rdi, rsi, rdx, rcx,
+// r8, r9 and xmm0-xmm7), no stack space is allocated for these by the
+// caller. The rest of the parameters are passed in the callers stack
+// area.
+
+const PRUint32 PARAM_BUFFER_COUNT = 16;
+const PRUint32 GPR_COUNT = 6;
+const PRUint32 FPR_COUNT = 8;
+
+// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
+//
+// - 'args[]' contains the arguments passed on stack
+// - 'gpregs[]' contains the arguments passed in integer registers
+// - 'fpregs[]' contains the arguments passed in floating point registers
+//
+// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
+// and then the method gets called.
+
+extern "C" nsresult
+PrepareAndDispatch(nsXPTCStubBase * self, PRUint32 methodIndex,
+ PRUint64 * args, PRUint64 * gpregs, double *fpregs)
+{
+ nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
+ nsXPTCMiniVariant* dispatchParams = NULL;
+ nsIInterfaceInfo* iface_info = NULL;
+ const nsXPTMethodInfo* info;
+ PRUint32 paramCount;
+ PRUint32 i;
+ nsresult result = NS_ERROR_FAILURE;
+
+ NS_ASSERTION(self,"no self");
+
+ self->GetInterfaceInfo(&iface_info);
+ NS_ASSERTION(iface_info,"no interface info");
+ if (! iface_info)
+ return NS_ERROR_UNEXPECTED;
+
+ iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
+ NS_ASSERTION(info,"no method info");
+ if (! info)
+ return NS_ERROR_UNEXPECTED;
+
+ 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");
+ if (! dispatchParams)
+ return NS_ERROR_OUT_OF_MEMORY;
+
+ PRUint64* ap = args;
+ PRUint32 nr_gpr = 1; // skip one GPR register for 'that'
+ PRUint32 nr_fpr = 0;
+ PRUint64 value;
+
+ for(i = 0; i < paramCount; i++) {
+ const nsXPTParamInfo& param = info->GetParam(i);
+ const nsXPTType& type = param.GetType();
+ nsXPTCMiniVariant* dp = &dispatchParams[i];
+
+ if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
+ if (nr_fpr < FPR_COUNT)
+ dp->val.d = fpregs[nr_fpr++];
+ else
+ dp->val.d = *(double*) ap++;
+ continue;
+ }
+ else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
+ if (nr_fpr < FPR_COUNT)
+ // The value in %xmm register is already prepared to
+ // be retrieved as a float. Therefore, we pass the
+ // value verbatim, as a double without conversion.
+ dp->val.d = *(double*) ap++;
+ else
+ dp->val.f = *(float*) ap++;
+ continue;
+ }
+ else {
+ if (nr_gpr < GPR_COUNT)
+ value = gpregs[nr_gpr++];
+ else
+ value = *ap++;
+ }
+
+ if (param.IsOut() || !type.IsArithmetic()) {
+ dp->val.p = (void*) value;
+ continue;
+ }
+
+ switch (type) {
+ case nsXPTType::T_I8: dp->val.i8 = (PRInt8) value; break;
+ case nsXPTType::T_I16: dp->val.i16 = (PRInt16) value; break;
+ case nsXPTType::T_I32: dp->val.i32 = (PRInt32) value; break;
+ case nsXPTType::T_I64: dp->val.i64 = (PRInt64) value; break;
+ case nsXPTType::T_U8: dp->val.u8 = (PRUint8) value; break;
+ case nsXPTType::T_U16: dp->val.u16 = (PRUint16) value; break;
+ case nsXPTType::T_U32: dp->val.u32 = (PRUint32) value; break;
+ case nsXPTType::T_U64: dp->val.u64 = (PRUint64) value; break;
+ case nsXPTType::T_BOOL: dp->val.b = (PRBool) value; break;
+ case nsXPTType::T_CHAR: dp->val.c = (char) value; break;
+ case nsXPTType::T_WCHAR: dp->val.wc = (wchar_t) value; 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;
+}
+
+#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
+// Linux/x86-64 uses gcc >= 3.1
+#define STUB_ENTRY(n) \
+asm(".section \".text\"\n\t" \
+ ".align 2\n\t" \
+ ".if " #n " < 10\n\t" \
+ ".globl _ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \
+ ".type _ZN14nsXPTCStubBase5Stub" #n "Ev,@function\n" \
+ "_ZN14nsXPTCStubBase5Stub" #n "Ev:\n\t" \
+ ".elseif " #n " < 100\n\t" \
+ ".globl _ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \
+ ".type _ZN14nsXPTCStubBase6Stub" #n "Ev,@function\n" \
+ "_ZN14nsXPTCStubBase6Stub" #n "Ev:\n\t" \
+ ".elseif " #n " < 1000\n\t" \
+ ".globl _ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \
+ ".type _ZN14nsXPTCStubBase7Stub" #n "Ev,@function\n" \
+ "_ZN14nsXPTCStubBase7Stub" #n "Ev:\n\t" \
+ ".else\n\t" \
+ ".err \"stub number " #n " >= 1000 not yet supported\"\n\t" \
+ ".endif\n\t" \
+ "movl $" #n ", %eax\n\t" \
+ "jmp SharedStub\n\t" \
+ ".if " #n " < 10\n\t" \
+ ".size _ZN14nsXPTCStubBase5Stub" #n "Ev,.-_ZN14nsXPTCStubBase5Stub" #n "Ev\n\t" \
+ ".elseif " #n " < 100\n\t" \
+ ".size _ZN14nsXPTCStubBase6Stub" #n "Ev,.-_ZN14nsXPTCStubBase6Stub" #n "Ev\n\t" \
+ ".else\n\t" \
+ ".size _ZN14nsXPTCStubBase7Stub" #n "Ev,.-_ZN14nsXPTCStubBase7Stub" #n "Ev\n\t" \
+ ".endif");
+
+// static nsresult SharedStub(PRUint32 methodIndex)
+asm(".section \".text\"\n\t"
+ ".align 2\n\t"
+ ".type SharedStub,@function\n\t"
+ "SharedStub:\n\t"
+ // make room for gpregs (48), fpregs (64)
+ "pushq %rbp\n\t"
+ "movq %rsp,%rbp\n\t"
+ "subq $112,%rsp\n\t"
+ // save GP registers
+ "movq %rdi,-112(%rbp)\n\t"
+ "movq %rsi,-104(%rbp)\n\t"
+ "movq %rdx, -96(%rbp)\n\t"
+ "movq %rcx, -88(%rbp)\n\t"
+ "movq %r8 , -80(%rbp)\n\t"
+ "movq %r9 , -72(%rbp)\n\t"
+ "leaq -112(%rbp),%rcx\n\t"
+ // save FP registers
+ "movsd %xmm0,-64(%rbp)\n\t"
+ "movsd %xmm1,-56(%rbp)\n\t"
+ "movsd %xmm2,-48(%rbp)\n\t"
+ "movsd %xmm3,-40(%rbp)\n\t"
+ "movsd %xmm4,-32(%rbp)\n\t"
+ "movsd %xmm5,-24(%rbp)\n\t"
+ "movsd %xmm6,-16(%rbp)\n\t"
+ "movsd %xmm7, -8(%rbp)\n\t"
+ "leaq -64(%rbp),%r8\n\t"
+ // rdi has the 'self' pointer already
+ "movl %eax,%esi\n\t"
+ "leaq 16(%rbp),%rdx\n\t"
+ "call PrepareAndDispatch\n\t"
+ "leave\n\t"
+ "ret\n\t"
+ ".size SharedStub,.-SharedStub");
+
+#define SENTINEL_ENTRY(n) \
+nsresult nsXPTCStubBase::Sentinel##n() \
+{ \
+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
+ return NS_ERROR_NOT_IMPLEMENTED; \
+}
+
+#include "xptcstubsdef.inc"
+
+#else
+#error "can't find a compiler to use"
+#endif /* __GNUC__ */

View file

@ -1,127 +0,0 @@
$NetBSD: patch-bx,v 1.2 2009/04/21 12:58:22 tnn Exp $
--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp.orig 2004-04-18 16:18:18.000000000 +0200
+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc_netbsd.cpp
@@ -41,6 +41,7 @@
// Implement shared vtbl methods.
#include "xptcprivate.h"
+#include "xptiprivate.h"
// The Linux/PPC ABI (aka PPC/SYSV ABI) passes the first 8 integral
// parameters and the first 8 floating point parameters in registers
@@ -71,7 +72,6 @@ PrepareAndDispatch(nsXPTCStubBase* self,
{
nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
nsXPTCMiniVariant* dispatchParams = NULL;
- nsIInterfaceInfo* iface_info = NULL;
const nsXPTMethodInfo* info;
PRUint32 paramCount;
PRUint32 i;
@@ -79,12 +79,7 @@ PrepareAndDispatch(nsXPTCStubBase* self,
NS_ASSERTION(self,"no self");
- self->GetInterfaceInfo(&iface_info);
- NS_ASSERTION(iface_info,"no interface info");
- if (! iface_info)
- return NS_ERROR_UNEXPECTED;
-
- iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
+ self->mEntry->GetMethodInfo(PRUint16(methodIndex), &info);
NS_ASSERTION(info,"no method info");
if (! info)
return NS_ERROR_UNEXPECTED;
@@ -119,8 +114,10 @@ PrepareAndDispatch(nsXPTCStubBase* self,
if ((PRUint32) ap & 4) ap++; // doubles are 8-byte aligned on stack
dp->val.d = *(double*) ap;
ap += 2;
+#if __GXX_ABI_VERSION < 100
if (gpr < GPR_COUNT)
gpr += 2;
+#endif
}
continue;
}
@@ -130,8 +127,10 @@ PrepareAndDispatch(nsXPTCStubBase* self,
else {
dp->val.f = *(float*) ap;
ap += 1;
+#if __GXX_ABI_VERSION < 100
if (gpr < GPR_COUNT)
gpr += 1;
+#endif
}
continue;
}
@@ -179,9 +178,9 @@ PrepareAndDispatch(nsXPTCStubBase* self,
}
}
- result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
-
- NS_RELEASE(iface_info);
+ result = self->mOuter->CallMethod((PRUint16) methodIndex,
+ info,
+ dispatchParams);
if (dispatchParams != paramBuffer)
delete [] dispatchParams;
@@ -195,7 +194,9 @@ PrepareAndDispatch(nsXPTCStubBase* self,
// however, it's quick, dirty, and'll break when the ABI changes on
// us, which is what we want ;-).
-#define STUB_ENTRY(n) \
+#if __GXX_ABI_VERSION < 100
+// gcc-2 version
+# define STUB_ENTRY(n) \
__asm__ ( \
".section \".text\" \n\t" \
".align 2 \n\t" \
@@ -206,6 +207,46 @@ __asm__ (
"li 11,"#n" \n\t" \
"b SharedStub@local \n" \
);
+#else
+// gcc-3 version
+//
+// As G++3 ABI contains the length of the functionname in the mangled
+// name, it is difficult to get a generic assembler mechanism like
+// in the G++ 2.95 case.
+// Create names would be like:
+// _ZN14nsXPTCStubBase5Stub1Ev
+// _ZN14nsXPTCStubBase6Stub12Ev
+// _ZN14nsXPTCStubBase7Stub123Ev
+// _ZN14nsXPTCStubBase8Stub1234Ev
+// etc.
+// Use assembler directives to get the names right...
+
+# define STUB_ENTRY(n) \
+__asm__ ( \
+ ".align 2 \n\t" \
+ ".if "#n" < 10 \n\t" \
+ ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \
+ ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \
+"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
+ \
+ ".elseif "#n" < 100 \n\t" \
+ ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \
+ ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \
+"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
+ \
+ ".elseif "#n" < 1000 \n\t" \
+ ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \
+ ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \
+"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
+ \
+ ".else \n\t" \
+ ".err \"stub number "#n" >= 1000 not yet supported\"\n" \
+ ".endif \n\t" \
+ \
+ "li 11,"#n" \n\t" \
+ "b SharedStub@local \n" \
+);
+#endif
#define SENTINEL_ENTRY(n) \
nsresult nsXPTCStubBase::Sentinel##n() \

View file

@ -1,154 +0,0 @@
$NetBSD: patch-bz,v 1.1 2009/04/21 12:58:22 tnn Exp $
--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_netbsd.s.orig 2006-12-11 10:45:40.000000000 +0100
+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc_netbsd.s
@@ -1,43 +1,43 @@
-# -*- Mode: Asm -*-
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# 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 mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1999
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-# Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
-# beard@netscape.com (Patrick Beard)
-# waterson@netscape.com (Chris Waterson)
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
+// -*- Mode: Asm -*-
+//
+// ***** BEGIN LICENSE BLOCK *****
+// Version: MPL 1.1/GPL 2.0/LGPL 2.1
+//
+// 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 mozilla.org code.
+//
+// The Initial Developer of the Original Code is
+// Netscape Communications Corporation.
+// Portions created by the Initial Developer are Copyright (C) 1999
+// the Initial Developer. All Rights Reserved.
+//
+// Contributor(s):
+// Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
+// beard@netscape.com (Patrick Beard)
+// waterson@netscape.com (Chris Waterson)
+//
+// Alternatively, the contents of this file may be used under the terms of
+// either the GNU General Public License Version 2 or later (the "GPL"), or
+// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+// in which case the provisions of the GPL or the LGPL are applicable instead
+// of those above. If you wish to allow use of your version of this file only
+// under the terms of either the GPL or the LGPL, and not to allow others to
+// use your version of this file under the terms of the MPL, indicate your
+// decision by deleting the provisions above and replace them with the notice
+// and other provisions required by the GPL or the LGPL. If you do not delete
+// the provisions above, a recipient may use your version of this file under
+// the terms of any one of the MPL, the GPL or the LGPL.
+//
+// ***** END LICENSE BLOCK *****
.set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4
.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
@@ -60,23 +60,23 @@
.type SharedStub,@function
SharedStub:
- stwu sp,-112(sp) # room for
- # linkage (8),
- # gprData (32),
- # fprData (64),
- # stack alignment(8)
+ stwu sp,-112(sp) // room for
+ // linkage (8),
+ // gprData (32),
+ // fprData (64),
+ // stack alignment(8)
mflr r0
- stw r0,116(sp) # save LR backchain
+ stw r0,116(sp) // save LR backchain
- stw r4,12(sp) # save GP registers
- stw r5,16(sp) # (n.b. that we don't save r3
- stw r6,20(sp) # because PrepareAndDispatch() is savvy)
+ stw r4,12(sp) // save GP registers
+ stw r5,16(sp) // (n.b. that we don't save r3
+ stw r6,20(sp) // because PrepareAndDispatch() is savvy)
stw r7,24(sp)
stw r8,28(sp)
stw r9,32(sp)
stw r10,36(sp)
- stfd f1,40(sp) # save FP registers
+ stfd f1,40(sp) // save FP registers
stfd f2,48(sp)
stfd f3,56(sp)
stfd f4,64(sp)
@@ -85,21 +85,21 @@ SharedStub:
stfd f7,88(sp)
stfd f8,96(sp)
- # r3 has the 'self' pointer already
+ // r3 has the 'self' pointer already
- mr r4,r11 # r4 <= methodIndex selector, passed
- # via r11 in the nsXPTCStubBase::StubXX() call
+ mr r4,r11 // r4 <= methodIndex selector, passed
+ // via r11 in the nsXPTCStubBase::StubXX() call
- addi r5,sp,120 # r5 <= pointer to callers args area,
- # beyond r3-r10/f1-f8 mapped range
+ addi r5,sp,120 // r5 <= pointer to callers args area,
+ // beyond r3-r10/f1-f8 mapped range
- addi r6,sp,8 # r6 <= gprData
- addi r7,sp,40 # r7 <= fprData
+ addi r6,sp,8 // r6 <= gprData
+ addi r7,sp,40 // r7 <= fprData
- bl PrepareAndDispatch@local # Go!
+ bl PrepareAndDispatch@local // Go!
- lwz r0,116(sp) # restore LR
+ lwz r0,116(sp) // restore LR
mtlr r0
- la sp,112(sp) # clean up the stack
+ la sp,112(sp) // clean up the stack
blr

View file

@ -1,198 +0,0 @@
$NetBSD: patch-ca,v 1.1 2009/04/21 12:58:22 tnn Exp $
--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s.orig 2006-12-11 10:45:39.000000000 +0100
+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc_netbsd.s
@@ -1,43 +1,43 @@
-# -*- Mode: Asm -*-
-#
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# 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 mozilla.org code.
-#
-# The Initial Developer of the Original Code is
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1999
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-# Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
-# beard@netscape.com (Patrick Beard)
-# waterson@netscape.com (Chris Waterson)
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
+// -*- Mode: Asm -*-
+//
+// ***** BEGIN LICENSE BLOCK *****
+// Version: MPL 1.1/GPL 2.0/LGPL 2.1
+//
+// 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 mozilla.org code.
+//
+// The Initial Developer of the Original Code is
+// Netscape Communications Corporation.
+// Portions created by the Initial Developer are Copyright (C) 1999
+// the Initial Developer. All Rights Reserved.
+//
+// Contributor(s):
+// Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
+// beard@netscape.com (Patrick Beard)
+// waterson@netscape.com (Chris Waterson)
+//
+// Alternatively, the contents of this file may be used under the terms of
+// either the GNU General Public License Version 2 or later (the "GPL"), or
+// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+// in which case the provisions of the GPL or the LGPL are applicable instead
+// of those above. If you wish to allow use of your version of this file only
+// under the terms of either the GPL or the LGPL, and not to allow others to
+// use your version of this file under the terms of the MPL, indicate your
+// decision by deleting the provisions above and replace them with the notice
+// and other provisions required by the GPL or the LGPL. If you do not delete
+// the provisions above, a recipient may use your version of this file under
+// the terms of any one of the MPL, the GPL or the LGPL.
+//
+// ***** END LICENSE BLOCK *****
.set r0,0; .set sp,1; .set RTOC,2; .set r3,3; .set r4,4
.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
@@ -55,41 +55,41 @@
.section ".text"
.align 2
- .globl XPTC_InvokeByIndex
- .type XPTC_InvokeByIndex,@function
+ .globl NS_InvokeByIndex_P
+ .type NS_InvokeByIndex_P,@function
-#
-# XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
-# PRUint32 paramCount, nsXPTCVariant* params)
-#
-
-XPTC_InvokeByIndex:
- stwu sp,-32(sp) # setup standard stack frame
- mflr r0 # save LR
- stw r3,8(sp) # r3 <= that
- stw r4,12(sp) # r4 <= methodIndex
+//
+// NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
+// PRUint32 paramCount, nsXPTCVariant* params)
+//
+
+NS_InvokeByIndex_P:
+ stwu sp,-32(sp) // setup standard stack frame
+ mflr r0 // save LR
+ stw r3,8(sp) // r3 <= that
+ stw r4,12(sp) // r4 <= methodIndex
stw r30,16(sp)
stw r31,20(sp)
- stw r0,36(sp) # store LR backchain
+ stw r0,36(sp) // store LR backchain
mr r31,sp
- rlwinm r10,r5,3,0,27 # r10 = (ParamCount * 2 * 4) & ~0x0f
- addi r0,r10,96 # reserve stack for GPR and FPR register save area r0 = r10 + 96
- lwz r9,0(sp) # r9 = backchain
+ rlwinm r10,r5,3,0,27 // r10 = (ParamCount * 2 * 4) & ~0x0f
+ addi r0,r10,96 // reserve stack for GPR and FPR register save area r0 = r10 + 96
+ lwz r9,0(sp) // r9 = backchain
neg r0,r0
- stwux r9,sp,r0 # reserve stack sapce and save SP backchain
+ stwux r9,sp,r0 // reserve stack sapce and save SP backchain
- addi r3,sp,8 # r3 <= args
- mr r4,r5 # r4 <= paramCount
- mr r5,r6 # r5 <= params
- add r6,r3,r10 # r6 <= gpregs ( == args + r10 )
- mr r30,r6 # store in r30 for use later...
- addi r7,r6,32 # r7 <= fpregs ( == gpregs + 32 )
+ addi r3,sp,8 // r3 <= args
+ mr r4,r5 // r4 <= paramCount
+ mr r5,r6 // r5 <= params
+ add r6,r3,r10 // r6 <= gpregs ( == args + r10 )
+ mr r30,r6 // store in r30 for use later...
+ addi r7,r6,32 // r7 <= fpregs ( == gpregs + 32 )
- bl invoke_copy_to_stack@local # (args, paramCount, params, gpregs, fpregs)
+ bl invoke_copy_to_stack@local // (args, paramCount, params, gpregs, fpregs)
- lfd f1,32(r30) # load FP registers with method parameters
+ lfd f1,32(r30) // load FP registers with method parameters
lfd f2,40(r30)
lfd f3,48(r30)
lfd f4,56(r30)
@@ -98,18 +98,13 @@ XPTC_InvokeByIndex:
lfd f7,80(r30)
lfd f8,88(r30)
- lwz r3,8(r31) # r3 <= that
- lwz r4,12(r31) # r4 <= methodIndex
- lwz r5,0(r3) # r5 <= vtable ( == *that )
- slwi r4,r4,3 # convert to offset ( *= 8 )
- addi r4,r4,8 # skip first two vtable entries
- add r4,r4,r5
- lhz r0,0(r4) # virtual base offset
- extsh r0,r0
- add r3,r3,r0
- lwz r0,4(r4) # r0 <= methodpointer ( == vtable + offset )
+ lwz r3,8(r31) // r3 <= that
+ lwz r4,12(r31) // r4 <= methodIndex
+ lwz r5,0(r3) // r5 <= vtable ( == *that )
+ slwi r4,r4,2 // convert to offset ( *= 4 )
+ lwzx r0,r4,r5 // r0 <= methodpointer ( == vtable + offset )
- lwz r4,4(r30) # load GP regs with method parameters
+ lwz r4,4(r30) // load GP regs with method parameters
lwz r5,8(r30)
lwz r6,12(r30)
lwz r7,16(r30)
@@ -117,13 +112,13 @@ XPTC_InvokeByIndex:
lwz r9,24(r30)
lwz r10,28(r30)
- mtlr r0 # copy methodpointer to LR
- blrl # call method
+ mtlr r0 // copy methodpointer to LR
+ blrl // call method
- lwz r30,16(r31) # restore r30 & r31
+ lwz r30,16(r31) // restore r30 & r31
lwz r31,20(r31)
- lwz r11,0(sp) # clean up the stack
+ lwz r11,0(sp) // clean up the stack
lwz r0,4(r11)
mtlr r0
mr sp,r11

View file

@ -1,47 +0,0 @@
$NetBSD: patch-cb,v 1.2 2009/04/21 12:58:22 tnn Exp $
--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp.orig 2008-01-06 04:46:24.000000000 +0100
+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc_netbsd.cpp
@@ -40,9 +40,9 @@
// Platform specific code to invoke XPCOM methods on native objects
-// The purpose of XPTC_InvokeByIndex() is to map a platform
+// The purpose of NS_InvokeByIndex_P() is to map a platform
// indepenpent call to the platform ABI. To do that,
-// XPTC_InvokeByIndex() has to determine the method to call via vtable
+// NS_InvokeByIndex_P() has to determine the method to call via vtable
// access. The parameters for the method are read from the
// nsXPTCVariant* and prepared for the native ABI. For the Linux/PPC
// ABI this means that the first 8 integral and floating point
@@ -104,8 +104,10 @@ invoke_copy_to_stack(PRUint32* d,
if ((PRUint32) d & 4) d++; // doubles are 8-byte aligned on stack
*((double*) d) = s->val.d;
d += 2;
+#if __GXX_ABI_VERSION < 100
if (gpr < GPR_COUNT)
gpr += 2;
+#endif
}
}
else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
@@ -114,8 +116,10 @@ invoke_copy_to_stack(PRUint32* d,
else {
*((float*) d) = s->val.f;
d += 1;
+#if __GXX_ABI_VERSION < 100
if (gpr < GPR_COUNT)
gpr += 1;
+#endif
}
}
else if (!s->IsPtrData() && (s->type == nsXPTType::T_I64
@@ -142,6 +146,6 @@ invoke_copy_to_stack(PRUint32* d,
}
extern "C"
-XPTC_PUBLIC_API(nsresult)
-XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
+EXPORT_XPCOM_API(nsresult)
+NS_InvokeByIndex_P(nsISupports* that, PRUint32 methodIndex,
PRUint32 paramCount, nsXPTCVariant* params);

View file

@ -1,13 +0,0 @@
$NetBSD: patch-de,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
--- security/nss/lib/freebl/Makefile.orig 2007-11-14 23:49:44.000000000 +0100
+++ security/nss/lib/freebl/Makefile
@@ -194,7 +194,7 @@ endif
# to bind the blapi function references in FREEBLVector vector
# (ldvector.c) to the blapi functions defined in the freebl
# shared libraries.
-ifeq (,$(filter-out BSD_OS FreeBSD Linux NetBSD OpenBSD, $(OS_TARGET)))
+ifeq (,$(filter-out BSD_OS DragonFly FreeBSD Linux NetBSD OpenBSD, $(OS_TARGET)))
MKSHLIB += -Wl,-Bsymbolic
endif

View file

@ -1,32 +0,0 @@
$NetBSD: patch-df,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../Orig/mozilla/nsprpub/pr/include/md/_freebsd.h ./nsprpub/pr/include/md/_freebsd.h
--- ../Orig/mozilla/nsprpub/pr/include/md/_freebsd.h 2004-11-24 06:22:35.000000000 +0900
+++ ./nsprpub/pr/include/md/_freebsd.h 2005-12-04 19:44:37.000000000 +0900
@@ -79,7 +79,7 @@
#define _PR_NO_LARGE_FILES
#if defined(_PR_PTHREADS)
-#if __FreeBSD_version >= 400008
+#if defined(__DragonFly__) || __FreeBSD_version >= 400008
/*
* libc_r before this version of FreeBSD doesn't have poll().
* Although libc has poll(), it is not thread-safe so we can't
@@ -88,7 +88,7 @@
#define _PR_POLL_AVAILABLE
#endif
#else
-#if __FreeBSD_version >= 300000
+#if defined(__DragonFly__) || __FreeBSD_version >= 300000
#define _PR_POLL_AVAILABLE
#define _PR_USE_POLL
#endif
@@ -97,7 +97,7 @@
#define _PR_HAVE_SYSV_SEMAPHORES
#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
-#if __FreeBSD_version >= 400014
+#if defined(__DragonFly__) || __FreeBSD_version >= 400014
#define _PR_INET6
#define _PR_HAVE_INET_NTOP
#define _PR_HAVE_GETHOSTBYNAME2

View file

@ -1,19 +0,0 @@
$NetBSD: patch-dh,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h ./xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h
--- ../Orig/mozilla/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h 2004-04-18 23:18:18.000000000 +0900
+++ ./xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h 2005-12-04 19:44:41.000000000 +0900
@@ -77,6 +77,13 @@
#define THUNK_BASED_THIS_ADJUST
#endif
+#elif defined(__DragonFly__)
+# if defined(__FreeBSD_cc_version)
+# define CFRONT_STYLE_THIS_ADJUST
+# else
+# define THUNK_BASED_THIS_ADJUST
+# endif
+
#elif defined(__FreeBSD__)
/* System versions of gcc on FreeBSD don't use thunks. On 3.x, the system
* compiler is gcc 2.7.2.3, which doesn't use thunks by default. On 4.x and

View file

@ -1,14 +0,0 @@
$NetBSD: patch-dj,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../Orig/mozilla/dbm/src/mktemp.c ./dbm/src/mktemp.c
--- ../Orig/mozilla/dbm/src/mktemp.c 2003-01-21 08:13:37.000000000 +0900
+++ ./dbm/src/mktemp.c 2005-12-04 19:44:43.000000000 +0900
@@ -98,7 +98,7 @@
static int
_gettemp(char *path, register int *doopen, int extraFlags)
{
-#if !defined(_WINDOWS) || defined(_WIN32)
+#if (!defined(_WINDOWS) || defined(_WIN32)) && !defined(errno)
extern int errno;
#endif
register char *start, *trv;

View file

@ -1,13 +0,0 @@
$NetBSD: patch-dk,v 1.3 2009/08/04 21:28:42 tnn Exp $
--- security/coreconf/config.mk.orig 2009-07-31 04:17:31.000000000 +0200
+++ security/coreconf/config.mk
@@ -63,7 +63,7 @@ endif
#######################################################################
TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \
- OpenVMS AIX RISCOS WINNT WIN95 WINCE
+ OpenVMS AIX RISCOS WINNT WIN95 WINCE DragonFly
ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET)))
include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk

View file

@ -1,89 +0,0 @@
$NetBSD: patch-dl,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../Orig/mozilla/security/coreconf/DragonFly.mk ./security/coreconf/DragonFly.mk
--- ../Orig/mozilla/security/coreconf/DragonFly.mk 1970-01-01 09:00:00.000000000 +0900
+++ ./security/coreconf/DragonFly.mk 2005-12-04 19:44:48.000000000 +0900
@@ -0,0 +1,83 @@
+#
+# 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) 1994-2000 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 DragonFly
+#
+
+include $(CORE_DEPTH)/coreconf/UNIX.mk
+
+DEFAULT_COMPILER = gcc
+CC = gcc
+CCC = g++
+RANLIB = ranlib
+
+ifeq ($(OS_TEST),alpha)
+CPU_ARCH = alpha
+else
+CPU_ARCH = x86
+endif
+
+OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
+
+DSO_CFLAGS = -fPIC
+DSO_LDOPTS = -shared -Wl,-soname -Wl,$(notdir $@)
+
+#
+# The default implementation strategy for FreeBSD is pthreads.
+#
+ifndef CLASSIC_NSPR
+USE_PTHREADS = 1
+DEFINES += -D_THREAD_SAFE -D_REENTRANT
+OS_LIBS += -pthread
+DSO_LDOPTS += -pthread
+endif
+
+ARCH = freebsd
+
+MOZ_OBJFORMAT := $(shell test -x /usr/bin/objformat && /usr/bin/objformat || echo aout)
+
+DLL_SUFFIX = so
+
+ifdef LIBRUNPATH
+DSO_LDOPTS += -Wl,-R$(LIBRUNPATH)
+endif
+
+MKSHLIB = $(CC) $(DSO_LDOPTS)
+ifdef MAPFILE
+# Add LD options to restrict exported symbols to those in the map file
+endif
+# Change PROCESS to put the mapfile in the correct format for this platform
+PROCESS_MAP_FILE = cp $(LIBRARY_NAME).def $@
+
+G++INCLUDES = -I/usr/include/g++
+
+INCLUDES += -I/usr/X11R6/include

View file

@ -1,88 +0,0 @@
$NetBSD: patch-do,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../Orig/mozilla/directory/c-sdk/config/DragonFly.mk ./directory/c-sdk/config/DragonFly.mk
--- ../Orig/mozilla/directory/c-sdk/config/DragonFly.mk 1970-01-01 09:00:00.000000000 +0900
+++ ./directory/c-sdk/config/DragonFly.mk 2005-12-04 19:44:55.000000000 +0900
@@ -0,0 +1,82 @@
+#
+# 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 Portable Runtime (NSPR).
+#
+# The Initial Developer of the Original Code is Netscape
+# Communications Corporation. Portions created by Netscape are
+# Copyright (C) 1998-2000 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 DragonFly
+#
+
+include $(MOD_DEPTH)/config/UNIX.mk
+
+CC = gcc
+CCC = g++
+RANLIB = ranlib
+
+OS_REL_CFLAGS = -Di386
+CPU_ARCH = x86
+CPU_ARCH_TAG = _$(CPU_ARCH)
+
+OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe $(THREAD_FLAG) -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
+
+#
+# The default implementation strategy for FreeBSD is pthreads.
+#
+ifeq ($(CLASSIC_NSPR),1)
+IMPL_STRATEGY = _EMU
+DEFINES += -D_PR_LOCAL_THREADS_ONLY
+else
+USE_PTHREADS = 1
+IMPL_STRATEGY = _PTH
+DEFINES += -D_THREAD_SAFE
+THREAD_FLAG += -pthread
+endif
+
+ARCH = freebsd
+
+MOZ_OBJFORMAT := $(shell test -x /usr/bin/objformat && /usr/bin/objformat || echo aout)
+
+ifeq ($(MOZ_OBJFORMAT),elf)
+DLL_SUFFIX = so
+else
+DLL_SUFFIX = so.1.0
+endif
+
+DSO_CFLAGS = -fPIC
+DSO_LDOPTS = -Bshareable
+
+ifdef LIBRUNPATH
+DSO_LDOPTS += -Wl,-R$(LIBRUNPATH)
+endif
+
+MKSHLIB = $(LD) $(DSO_LDOPTS)
+
+G++INCLUDES = -I/usr/include/g++

View file

@ -1,14 +0,0 @@
$NetBSD: patch-dr,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../Orig/mozilla/config/config.mk ./config/config.mk
--- ../Orig/mozilla/config/config.mk 2005-07-29 04:48:11.000000000 +0900
+++ ./config/config.mk 2005-12-04 19:45:20.000000000 +0900
@@ -121,7 +121,7 @@
# 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 NetBSD OpenBSD OSF1 SunOS,$(OS_ARCH)))
+ifneq (,$(filter DragonFly FreeBSD HP-UX IRIX Linux NetBSD OpenBSD OSF1 SunOS,$(OS_ARCH)))
OS_RELEASE := $(basename $(OS_RELEASE))
# Allow the user to ignore the OS_VERSION, which is usually irrelevant.

View file

@ -1,14 +0,0 @@
$NetBSD: patch-ds,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../Orig/mozilla/security/coreconf/arch.mk ./security/coreconf/arch.mk
--- ../Orig/mozilla/security/coreconf/arch.mk 2005-10-11 08:30:12.000000000 +0900
+++ ./security/coreconf/arch.mk 2005-12-04 19:45:28.000000000 +0900
@@ -145,7 +145,7 @@
# IRIX 6.5-ALPHA-1289139620.
#
-ifeq (,$(filter-out Linux FreeBSD IRIX,$(OS_ARCH)))
+ifeq (,$(filter-out Linux DragonFly FreeBSD IRIX,$(OS_ARCH)))
OS_RELEASE := $(shell echo $(OS_RELEASE) | sed 's/-.*//')
endif

View file

@ -1,18 +0,0 @@
$NetBSD: patch-du,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../Orig/mozilla/config/rules.mk ./config/rules.mk
--- ../Orig/mozilla/config/rules.mk 2005-10-11 08:16:39.000000000 +0900
+++ ./config/rules.mk 2005-12-04 19:45:31.000000000 +0900
@@ -447,6 +447,12 @@
endif
endif
+ifeq ($(OS_ARCH),DragonFly)
+ifdef IS_COMPONENT
+EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
+endif
+endif
+
ifeq ($(OS_ARCH),NetBSD)
ifneq (,$(filter arc cobalt hpcmips mipsco newsmips pmax sgimips,$(OS_TEST)))
ifeq ($(MODULE),layout)

View file

@ -1,15 +0,0 @@
$NetBSD: patch-dv,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
diff -ruN ../Orig/mozilla/js/src/Makefile.in ./js/src/Makefile.in
--- ../Orig/mozilla/js/src/Makefile.in 2005-06-01 23:26:26.000000000 +0900
+++ ./js/src/Makefile.in 2005-12-04 19:45:33.000000000 +0900
@@ -256,6 +256,9 @@
ifeq ($(OS_ARCH),FreeBSD)
LDFLAGS += -pthread
endif
+ifeq ($(OS_ARCH),DragonFly)
+LDFLAGS += -pthread
+endif
ifeq ($(OS_ARCH),IRIX)
ifdef USE_N32
DASH_R += -n32

View file

@ -1,36 +0,0 @@
$NetBSD: patch-ea,v 1.3 2009/04/21 13:00:55 tnn Exp $
--- toolkit/components/history/src/nsGlobalHistory.cpp.orig 2007-11-29 08:04:26.000000000 +0100
+++ toolkit/components/history/src/nsGlobalHistory.cpp
@@ -322,7 +322,9 @@ matchAgeInDaysCallback(nsIMdbRow *row, v
if (err != 0) return PR_FALSE;
PRTime rowDate;
- PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &rowDate);
+ long long ld;
+ PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &ld);
+ rowDate = ld;
PRInt32 days = GetAgeInDays(matchSearchTerm->now, rowDate);
@@ -1067,7 +1069,9 @@ nsGlobalHistory::GetRowValue(nsIMdbRow *
if (!yarn.mYarn_Fill || !yarn.mYarn_Buf)
return NS_OK;
- PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", aResult);
+ long long ld;
+ PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &ld);
+ *aResult = ld;
return NS_OK;
}
@@ -1153,6 +1157,9 @@ nsGlobalHistory::SetPageTitle(nsIURI *aU
rv = aURI->GetSpec(URISpec);
NS_ENSURE_SUCCESS(rv, rv);
+ if (URISpec.Length() > HISTORY_URI_LENGTH_MAX)
+ URISpec.Left(URISpec, HISTORY_URI_LENGTH_MAX);
+
nsCOMPtr<nsIMdbRow> row;
rv = FindRow(kToken_URLColumn, URISpec.get(), getter_AddRefs(row));

View file

@ -1,36 +0,0 @@
$NetBSD: patch-eb,v 1.2 2009/01/05 09:58:36 martin Exp $
--- xpfe/components/history/src/nsGlobalHistory.cpp.orig 2007-12-03 05:25:14.000000000 +0100
+++ xpfe/components/history/src/nsGlobalHistory.cpp
@@ -304,7 +304,9 @@ matchAgeInDaysCallback(nsIMdbRow *row, v
if (err != 0) return PR_FALSE;
PRTime rowDate;
- PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &rowDate);
+ long long ld;
+ PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &ld);
+ rowDate = ld;
PRInt32 days = matchSearchTerm->globalHist->GetAgeInDays(rowDate);
@@ -1000,7 +1002,9 @@ nsGlobalHistory::GetRowValue(nsIMdbRow *
if (!yarn.mYarn_Fill || !yarn.mYarn_Buf)
return NS_OK;
- PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", aResult);
+ long long ld;
+ PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &ld);
+ *aResult = ld;
return NS_OK;
}
@@ -1076,6 +1080,9 @@ nsGlobalHistory::SetPageTitle(nsIURI *aU
rv = aURI->GetSpec(URISpec);
NS_ENSURE_SUCCESS(rv, rv);
+ if (URISpec.Length() > HISTORY_URI_LENGTH_MAX)
+ URISpec.Left(URISpec, HISTORY_URI_LENGTH_MAX);
+
nsCOMPtr<nsIMdbRow> row;
rv = FindRow(kToken_URLColumn, URISpec.get(), getter_AddRefs(row));

View file

@ -1,20 +0,0 @@
$NetBSD: patch-ed,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
--- profile/dirserviceprovider/src/nsProfileLock.cpp.orig 2008-01-16 04:56:04.000000000 +0100
+++ profile/dirserviceprovider/src/nsProfileLock.cpp
@@ -391,6 +391,7 @@ nsresult nsProfileLock::LockWithSymlink(
act.sa_flags = 0;
sigfillset(&act.sa_mask);
+#ifndef DEBUG
#define CATCH_SIGNAL(signame) \
PR_BEGIN_MACRO \
if (sigaction(signame, NULL, &oldact) == 0 && \
@@ -409,6 +410,7 @@ PR_BEGIN_MACRO
CATCH_SIGNAL(SIGTERM);
#undef CATCH_SIGNAL
+#endif
}
}
}

View file

@ -1,30 +0,0 @@
$NetBSD: patch-ee,v 1.1 2008/12/13 00:42:26 martin Exp $
# reported upstream as: https://bugzilla.mozilla.org/show_bug.cgi?id=469276
--- toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp.orig 2008-08-25 22:59:14.000000000 +0200
+++ toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp 2008-12-12 16:31:11.000000000 +0100
@@ -2023,8 +2023,9 @@
return NS_ERROR_FAILURE;
}
const nsCSubstring& str = Substring(chunk, start, 4);
- const PRUint32 *p = reinterpret_cast<const PRUint32*>(str.BeginReading());
- entry->mAddChunkId = PR_ntohl(*p);
+ PRUint32 p;
+ memcpy(&p, str.BeginReading(), 4);
+ entry->mAddChunkId = PR_ntohl(p);
if (entry->mAddChunkId == 0) {
NS_WARNING("Received invalid chunk number.");
return NS_ERROR_FAILURE;
@@ -2052,8 +2053,9 @@
if (chunkType == CHUNK_SUB) {
const nsCSubstring& str = Substring(chunk, start, 4);
- const PRUint32 *p = reinterpret_cast<const PRUint32*>(str.BeginReading());
- entry->mAddChunkId = PR_ntohl(*p);
+ PRUint32 p;
+ memcpy(&p, str.BeginReading(), 4);
+ entry->mAddChunkId = PR_ntohl(p);
if (entry->mAddChunkId == 0) {
NS_WARNING("Received invalid chunk number.");
return NS_ERROR_FAILURE;

View file

@ -1,16 +0,0 @@
$NetBSD: patch-eh,v 1.1 2008/12/11 09:34:12 tnn Exp $
--- toolkit/library/Makefile.in.orig 2008-05-08 11:20:45.000000000 +0200
+++ toolkit/library/Makefile.in
@@ -227,7 +227,10 @@ EXTRA_DSO_LDOPTS += -lbe -ltracker
endif
ifeq ($(OS_ARCH),SunOS)
-EXTRA_DSO_LDOPTS += -lelf -ldemangle -lCstd
+EXTRA_DSO_LDOPTS += -lelf -ldemangle
+ifndef GNU_CC
+EXTRA_DSO_LDOPTS += -lCstd
+endif
endif
ifeq ($(OS_ARCH),WINNT)

View file

@ -1,13 +0,0 @@
$NetBSD: patch-ei,v 1.1 2008/12/17 23:16:50 tnn Exp $
--- security/nss/lib/softoken/config.mk.orig 2008-02-25 19:55:39.000000000 +0100
+++ security/nss/lib/softoken/config.mk
@@ -86,7 +86,7 @@ else
EXTRA_SHARED_LIBS += \
-L$(DIST)/lib \
-lnssutil3 \
- -lsqlite3 \
+ `pkg-config --libs sqlite3` \
-L$(NSPR_LIB_DIR) \
-lplc4 \
-lplds4 \

View file

@ -1,19 +0,0 @@
$NetBSD: patch-ej,v 1.1 2009/01/05 09:58:36 martin Exp $
--- toolkit/components/places/src/nsMorkHistoryImporter.cpp.orig 2008-03-19 20:30:49.000000000 +0100
+++ toolkit/components/places/src/nsMorkHistoryImporter.cpp 2008-12-17 09:38:05.000000000 +0100
@@ -148,9 +148,12 @@ AddToHistoryCB(const nsCSubstring &aRowI
}
PRTime date;
- if (PR_sscanf(values[kLastVisitColumn].get(), "%lld", &date) != 1) {
+ long long ld;
+ if (PR_sscanf(values[kLastVisitColumn].get(), "%lld", &ld) != 1) {
date = -1;
- }
+ } else {
+ date = ld;
+ }
PRBool isTyped = values[kTypedColumn].EqualsLiteral("1");
PRInt32 transition = isTyped ?

View file

@ -1,27 +0,0 @@
$NetBSD: patch-ek,v 1.1 2009/01/05 09:58:36 martin Exp $
# Reported upstream as https://bugzilla.mozilla.org/show_bug.cgi?id=471179
--- nsprpub/pr/src/misc/prsystem.c.orig 2006-01-19 23:11:59.000000000 +0100
+++ nsprpub/pr/src/misc/prsystem.c 2008-12-26 13:01:50.000000000 +0100
@@ -290,6 +290,20 @@ PR_IMPLEMENT(PRUint64) PR_GetPhysicalMem
long pageCount = sysconf(_SC_PHYS_PAGES);
bytes = (PRUint64) pageSize * pageCount;
+#elif defined(NETBSD)
+
+ int mib[2];
+ int rc;
+ uint64_t memSize;
+ size_t len = sizeof(memSize);
+
+ mib[0] = CTL_HW;
+ mib[1] = HW_PHYSMEM64;
+ rc = sysctl( mib, 2, &memSize, &len, NULL, 0 );
+ if ( -1 != rc ) {
+ bytes = memSize;
+ }
+
#elif defined(HPUX)
struct pst_static info;

View file

@ -1,217 +0,0 @@
$NetBSD: patch-el,v 1.2 2009/02/02 09:28:56 martin Exp $
# Ensure correct alignment for nsCSSValue objects inside nsCSSValue::Array.
# (Bug 476345)
--- layout/style/nsCSSValue.h.orig 2008-07-02 00:51:43.000000000 +0200
+++ layout/style/nsCSSValue.h 2009-02-01 21:43:29.000000000 +0100
@@ -286,104 +286,7 @@
// failure.
static nsStringBuffer* BufferFromString(const nsString& aValue);
- struct Array {
-
- // return |Array| with reference count of zero
- static Array* Create(PRUint16 aItemCount) {
- return new (aItemCount) Array(aItemCount);
- }
-
- nsCSSValue& operator[](PRUint16 aIndex) {
- NS_ASSERTION(aIndex < mCount, "out of range");
- return *(First() + aIndex);
- }
-
- const nsCSSValue& operator[](PRUint16 aIndex) const {
- NS_ASSERTION(aIndex < mCount, "out of range");
- return *(First() + aIndex);
- }
-
- nsCSSValue& Item(PRUint16 aIndex) { return (*this)[aIndex]; }
- const nsCSSValue& Item(PRUint16 aIndex) const { return (*this)[aIndex]; }
-
- PRUint16 Count() const { return mCount; }
-
- PRBool operator==(const Array& aOther) const
- {
- if (mCount != aOther.mCount)
- return PR_FALSE;
- for (PRUint16 i = 0; i < mCount; ++i)
- if ((*this)[i] != aOther[i])
- return PR_FALSE;
- return PR_TRUE;
- }
-
- void AddRef() {
- if (mRefCnt == PR_UINT16_MAX) {
- NS_WARNING("refcount overflow, leaking nsCSSValue::Array");
- return;
- }
- ++mRefCnt;
- NS_LOG_ADDREF(this, mRefCnt, "nsCSSValue::Array", sizeof(*this));
- }
- void Release() {
- if (mRefCnt == PR_UINT16_MAX) {
- NS_WARNING("refcount overflow, leaking nsCSSValue::Array");
- return;
- }
- --mRefCnt;
- NS_LOG_RELEASE(this, mRefCnt, "nsCSSValue::Array");
- if (mRefCnt == 0)
- delete this;
- }
-
- private:
-
- PRUint16 mRefCnt;
- PRUint16 mCount;
-
- void* operator new(size_t aSelfSize, PRUint16 aItemCount) CPP_THROW_NEW {
- return ::operator new(aSelfSize + sizeof(nsCSSValue)*aItemCount);
- }
-
- void operator delete(void* aPtr) { ::operator delete(aPtr); }
-
- nsCSSValue* First() {
- return (nsCSSValue*) (((char*)this) + sizeof(*this));
- }
-
- const nsCSSValue* First() const {
- return (const nsCSSValue*) (((const char*)this) + sizeof(*this));
- }
-
-#define CSSVALUE_LIST_FOR_VALUES(var) \
- for (nsCSSValue *var = First(), *var##_end = var + mCount; \
- var != var##_end; ++var)
-
- Array(PRUint16 aItemCount)
- : mRefCnt(0)
- , mCount(aItemCount)
- {
- MOZ_COUNT_CTOR(nsCSSValue::Array);
- CSSVALUE_LIST_FOR_VALUES(val) {
- new (val) nsCSSValue();
- }
- }
-
- ~Array()
- {
- MOZ_COUNT_DTOR(nsCSSValue::Array);
- CSSVALUE_LIST_FOR_VALUES(val) {
- val->~nsCSSValue();
- }
- }
-
-#undef CSSVALUE_LIST_FOR_VALUES
-
- private:
- Array(const Array& aOther); // not to be implemented
- };
-
+ struct Array;
struct URL {
// Methods are not inline because using an nsIPrincipal means requiring
// caps, which leads to REQUIRES hell, since this header is included all
@@ -454,5 +357,102 @@
} mValue;
};
-#endif /* nsCSSValue_h___ */
+struct nsCSSValue::Array {
+
+ // return |Array| with reference count of zero
+ static Array* Create(PRUint16 aItemCount) {
+ return new (aItemCount) Array(aItemCount);
+ }
+
+ nsCSSValue& operator[](PRUint16 aIndex) {
+ NS_ASSERTION(aIndex < mCount, "out of range");
+ return mArray[aIndex];
+ }
+
+ const nsCSSValue& operator[](PRUint16 aIndex) const {
+ NS_ASSERTION(aIndex < mCount, "out of range");
+ return mArray[aIndex];
+ }
+
+ nsCSSValue& Item(PRUint16 aIndex) { return (*this)[aIndex]; }
+ const nsCSSValue& Item(PRUint16 aIndex) const { return (*this)[aIndex]; }
+
+ PRUint16 Count() const { return mCount; }
+
+ PRBool operator==(const Array& aOther) const
+ {
+ if (mCount != aOther.mCount)
+ return PR_FALSE;
+ for (PRUint16 i = 0; i < mCount; ++i)
+ if ((*this)[i] != aOther[i])
+ return PR_FALSE;
+ return PR_TRUE;
+ }
+
+ void AddRef() {
+ if (mRefCnt == PR_UINT16_MAX) {
+ NS_WARNING("refcount overflow, leaking nsCSSValue::Array");
+ return;
+ }
+ ++mRefCnt;
+ NS_LOG_ADDREF(this, mRefCnt, "nsCSSValue::Array", sizeof(*this));
+ }
+ void Release() {
+ if (mRefCnt == PR_UINT16_MAX) {
+ NS_WARNING("refcount overflow, leaking nsCSSValue::Array");
+ return;
+ }
+ --mRefCnt;
+ NS_LOG_RELEASE(this, mRefCnt, "nsCSSValue::Array");
+ if (mRefCnt == 0)
+ delete this;
+ }
+
+private:
+
+ PRUint16 mRefCnt;
+ const PRUint16 mCount;
+ // This must be the last sub-object, since we extend this array to
+ // be of size mCount; it needs to be a sub-object so it gets proper
+ // alignment.
+ nsCSSValue mArray[1];
+ void* operator new(size_t aSelfSize, PRUint16 aItemCount) CPP_THROW_NEW {
+ return ::operator new(aSelfSize + sizeof(nsCSSValue) * (aItemCount - 1));
+ }
+
+ void operator delete(void* aPtr) { ::operator delete(aPtr); }
+
+ nsCSSValue* First() { return mArray; }
+
+ const nsCSSValue* First() const { return mArray; }
+
+#define CSSVALUE_LIST_FOR_EXTRA_VALUES(var) \
+for (nsCSSValue *var = First() + 1, *var##_end = First() + mCount; \
+ var != var##_end; ++var)
+
+ Array(PRUint16 aItemCount)
+ : mRefCnt(0)
+ , mCount(aItemCount)
+ {
+ MOZ_COUNT_CTOR(nsCSSValue::Array);
+ CSSVALUE_LIST_FOR_EXTRA_VALUES(val) {
+ new (val) nsCSSValue();
+ }
+ }
+
+ ~Array()
+ {
+ MOZ_COUNT_DTOR(nsCSSValue::Array);
+ CSSVALUE_LIST_FOR_EXTRA_VALUES(val) {
+ val->~nsCSSValue();
+ }
+ }
+
+#undef CSSVALUE_LIST_FOR_VALUES
+
+private:
+ Array(const Array& aOther); // not to be implemented
+};
+
+#endif /* nsCSSValue_h___ */

View file

@ -1,17 +0,0 @@
$NetBSD: patch-em,v 1.1 2009/02/11 10:09:47 markd Exp $
SHA1_Update conflicts with openssl which may be dynamically loaded
at runtime via libcups or libgssapi so causing a crash due to using
the wrong binding. So rename here to avoid conflict.
--- security/nss/lib/freebl/blapi.h.orig 2007-11-10 07:49:32.000000000 +1300
+++ security/nss/lib/freebl/blapi.h
@@ -899,6 +899,8 @@ extern void SHA1_DestroyContext(SHA1Cont
*/
extern void SHA1_Begin(SHA1Context *cx);
+#define SHA1_Update NSS_SHA1_Update
+
/*
** Update the SHA-1 hash function with more data.
** "cx" the context

View file

@ -1,48 +0,0 @@
$NetBSD: patch-en,v 1.1 2009/02/11 10:09:47 markd Exp $
SHA1_Update conflicts with openssl which may be dynamically loaded
at runtime via libcups or libgssapi so causing a crash due to using
the wrong binding. So rename here to avoid conflict.
--- security/nss/lib/freebl/sha-fast-amd64-sun.s.orig 2007-10-12 14:44:43.000000000 +1300
+++ security/nss/lib/freebl/sha-fast-amd64-sun.s
@@ -1712,9 +1712,9 @@ shaCompress:
.LFE7:
.size shaCompress, .-shaCompress
.align 16
-.globl SHA1_Update
- .type SHA1_Update, @function
-SHA1_Update:
+.globl NSS_SHA1_Update
+ .type NSS_SHA1_Update, @function
+NSS_SHA1_Update:
.LFB5:
pushq %rbp
.LCFI5:
@@ -1800,7 +1800,7 @@ SHA1_Update:
call shaCompress
jmp .L245
.LFE5:
- .size SHA1_Update, .-SHA1_Update
+ .size NSS_SHA1_Update, .-NSS_SHA1_Update
.section .rodata
.align 32
.type bulk_pad.0, @object
@@ -1902,7 +1902,7 @@ SHA1_End:
subl %r8d, %edx
andl $63, %edx
incl %edx
- call SHA1_Update@PLT
+ call NSS_SHA1_Update@PLT
movq %rbx, %rdi
movq %r12, %rsi
shrq $32, %rdi
@@ -2018,7 +2018,7 @@ SHA1_HashBuf:
movl %r12d, %edx
movq %r13, %rsi
movq %rbx, %rdi
- call SHA1_Update@PLT
+ call NSS_SHA1_Update@PLT
leaq -292(%rbp), %rdx
movq %r14, %rsi
movq %rbx, %rdi

View file

@ -1,18 +0,0 @@
$NetBSD: patch-eo,v 1.1 2009/04/21 12:58:22 tnn Exp $
This is a hack for:
cc1plus: warnings being treated as errors
../../../dist/include/xpcom/nsVoidArray.h: In member function 'void nsAutoVoidArray::ResetToAutoBuffer()':
../../../dist/include/xpcom/nsVoidArray.h:193: warning: cast from 'char*' to 'nsVoidArray::Impl*' increases required alignment of target type
... which happens on PowerPC and possibly other architectures.
--- netwerk/cookie/src/Makefile.in.orig 2007-08-28 18:02:43.000000000 +0200
+++ netwerk/cookie/src/Makefile.in
@@ -60,5 +60,5 @@ CPPSRCS = \
include $(topsrcdir)/config/rules.mk
-CXXFLAGS += $(WARNINGS_AS_ERRORS)
+#CXXFLAGS += $(WARNINGS_AS_ERRORS)
DEFINES += -DIMPL_NS_NET

View file

@ -1,12 +0,0 @@
$NetBSD: patch-wc,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
--- js/src/xpconnect/shell/Makefile.in.orig 2008-01-16 21:42:51.000000000 +0100
+++ js/src/xpconnect/shell/Makefile.in
@@ -59,6 +59,7 @@ LIBS = \
$(MOZ_JS_LIBS) \
$(XPCOM_LIBS) \
$(NSPR_LIBS) \
+ -lsmime3 -lssl3 -lnss3 -lnssutil3 -lsoftokn3 \
$(NULL)
include $(topsrcdir)/config/rules.mk

View file

@ -1,12 +0,0 @@
$NetBSD: patch-wd,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
--- browser/app/Makefile.in.orig 2008-03-01 00:24:54.000000000 +0100
+++ browser/app/Makefile.in
@@ -131,6 +131,7 @@ LIBS += \
$(APP_XPCOM_LIBS) \
$(NSPR_LIBS) \
$(TK_LIBS) \
+ -lsmime3 -lssl3 -lnss3 -lnssutil3 -lsoftokn3 \
$(NULL)
# Add explicit X11 dependency when building against X11 toolkits

View file

@ -1,13 +0,0 @@
$NetBSD: patch-we,v 1.1.1.1 2008/06/28 10:01:07 tnn Exp $
--- toolkit/mozapps/installer/packager.mk.orig 2008-05-18 23:12:08.000000000 +0200
+++ toolkit/mozapps/installer/packager.mk
@@ -426,7 +426,7 @@ ifdef INSTALL_SDK # Here comes the hard
(cd $(DIST)/sdk/include && tar $(TAR_CREATE_FLAGS) - .) | \
(cd $(DESTDIR)$(includedir)/stable && tar -xf -)
# The dist/include has module subdirectories that we need to flatten
- find $(DIST)/include -xtype f -exec $(SYSINSTALL) $(IFLAGS1) {} $(DESTDIR)$(includedir)/unstable \;
+ find $(DIST)/include -type f -exec $(SYSINSTALL) $(IFLAGS1) {} $(DESTDIR)$(includedir)/unstable \;
# IDL directory is stable (dist/sdk/idl) and unstable (dist/idl)
$(NSINSTALL) -D $(DESTDIR)$(idldir)/stable
$(NSINSTALL) -D $(DESTDIR)$(idldir)/unstable