diff --git a/www-client/mozilla_firefox/TinnyTim.sh b/www-client/mozilla_firefox/TinnyTim.sh deleted file mode 100755 index 744afa0d3..000000000 --- a/www-client/mozilla_firefox/TinnyTim.sh +++ /dev/null @@ -1,199 +0,0 @@ -#!/bin/sh -# -# -CWD=`pwd` -DOWNLOADS="$CWD/downloads" -DEPS="$CWD/dependencies" -DIRECTORIES=( "$DOWNLOADS" "$DEPS") -WGET_CMD='wget --quiet' -DEP_URLS=( \ -'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/config.guess' \ -'http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=build-aux/config.sub' \ -'http://ports.haiku-files.org/svn/haikuports/trunk/dev-libs/glib/pkgconfig_glib-1.2.10-installable.diff' \ -'http://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz' \ -'http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz' \ -'http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/source/libIDL-0.6.8.tar.gz' ) -# #### -# NOTE: currently andrewtv.org is down -#'http://andrewtv.org/static/libIDL/libIDL-0.6.8.tar.gz' \ - -AUTOCONF_CMD="/boot/common/bin/autoconf-2.13" -# --macro-dir=/boot/apps/autoconf-2.13/share/autoconf" - -PREFIX=--prefix=/boot/common - -# ################################# -# create_dirs () -# -function create_dirs () -{ -echo "Creating directory structure ... " -for dir in ${DIRECTORIES[@]} -do - if ! [ -d "$dir" ] ; then - mkdir -p "$dir" - fi -done -} # function create_dirs () - - -# ################################# -# download_deps () -# -function download_deps () -{ -echo "Downloading necessary dependency source archives ... " - -for url in ${DEP_URLS[@]} -do - filename=${url##*/} - if ! [ -e "$DOWNLOADS/$filename" ]; then - echo " $filename ..." - $WGET_CMD --output-document="$DOWNLOADS/$filename" "$url" - fi -done -} # function download_deps () - - -# ################################# -# unpack_deps () -# -function unpack_deps () -{ - -echo "Expanding dependency source archives ... " - -for archive in "$DOWNLOADS"/* -do -ext=${archive##*.} -file=${archive##*/} - -if [ "$ext" = "gz" ]; then - cd "$DEPS" - if ! [ -f "$file"-expanded ]; then - tar xvf "$archive" - touch "$file"-expanded - fi - cd "$CWD" - -fi -done -} # function unpack_deps () - - -# ################################# -# copy_config_sub () -# -function copy_config_guess () -{ -cd "$DEPS" -echo "Updating dependencies' config.guess ..." -for result in `find -name config.guess` -do - echo "$result" - cp -f "$DOWNLOADS/config.guess" "$result" -done -cd "$CWD" -} # function copy_config_guess () - - -# ################################# -# copy_config_sub () -# -function copy_config_sub () -{ - -cd "$DEPS" -echo "Updating dependencies' config.sub ..." -for result in `find -name config.sub` -do - echo "$result" - cp -f "$DOWNLOADS/config.sub" "$result" -done -cd "$CWD" -} # function copy_config_sub () - - -# ################################# -# build_autoconf213 () -# -function build_autoconf213 () -{ -cd "$CWD"'/dependencies/autoconf-2.13' -echo "`pwd`" -./configure --prefix=/boot/common/autoconf-2.13 --program-suffix=-2.13 --bindir=/boot/common/bin/ -make -make install -cd "$CWD" -} # function build_autoconf213 () - - - -# ################################# -# build_glib () -# -# NOTE : TODO : re-do patch, as it does not include configure.in changes -function build_glib () -{ -cd "$CWD"/dependencies/pkg-config-0.23/ -echo "`pwd`" -patch -p0 -N -i "$DOWNLOADS"/pkgconfig_glib-1.2.10-installable.diff -cd glib-1.2.10 -libtoolize --force --copy -aclocal -automake -autoconf -./configure "$PREFIX" -make -make check -make install -cd "$CWD" -} # function build_glib () - - -# ################################# -# build_libidl () -# -function build_libidl () -{ -cd "$CWD"/dependencies -cd libIDL-0.6.8 -$AUTOCONF_CMD -./configure "$PREFIX" -make -make install -cd "$CWD" -} # function build_libidl () - - -# ################################# -# print_mozconfig_message () -# -function print_mozconfig_message () -{ -cat <>$(EXE_DEF_FILE) - @echo WinRemoveProperty = PMMERGE.5451 >>$(EXE_DEF_FILE) - @echo WinSetProperty = PMMERGE.5452 >>$(EXE_DEF_FILE) - - LDFLAGS += -Zlinker /NOE - endif - endif - --ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH))) -+ifneq (,$(filter-out OS2 WINNT BeOS Haiku,$(OS_ARCH))) - - firefox:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk - cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \ - -e "s|%MOZ_USER_DIR%|.mozilla/firefox|" \ - -e "s|%MREDIR%|$(mredir)|" > $@ - chmod +x $@ - - libs:: firefox -Index: mozilla/browser/app/firefox-branding.js -=================================================================== -RCS file: /cvsroot/mozilla/browser/app/firefox-branding.js,v -retrieving revision 1.1.2.2 -diff -u -8 -p -w -r1.1.2.2 firefox-branding.js ---- mozilla/browser/app/firefox-branding.js 12 Sep 2006 15:50:19 -0000 1.1.2.2 -+++ mozilla/browser/app/firefox-branding.js 8 Jul 2009 21:49:35 -0000 -@@ -1,16 +1,15 @@ - pref("startup.homepage_override_url","http://www.mozilla.org/projects/%APP%/%VERSION%/whatsnew/"); --pref("startup.homepage_welcome_url","http://www.mozilla.org/projects/%APP%/%VERSION%/firstrun/"); - // URL user can browse to manually if for some reason all update installation - // attempts fail. - pref("app.update.url.manual", "http://www.mozilla.org/products/%APP%/"); - // A default value for the "More information about this update" link - // supplied in the "An update is available" page of the update wizard. - pref("app.update.url.details", "http://www.mozilla.org/projects/%APP%/"); - - // Release notes URL --pref("app.releaseNotesURL", "http://www.mozilla.org/projects/%APP%/%VERSION%/releasenotes/"); -+pref("app.releaseNotesURL", "about:buildconfig"); - - // Search codes belong only in builds with official branding - pref("browser.search.param.yahoo-fr", ""); - pref("browser.search.param.yahoo-fr-cjkt", ""); - pref("browser.search.param.yahoo-f-CN", ""); -Index: mozilla/browser/base/jar.mn -=================================================================== -RCS file: /cvsroot/mozilla/browser/base/jar.mn,v -retrieving revision 1.95.2.13 -diff -u -8 -p -w -r1.95.2.13 jar.mn ---- mozilla/browser/base/jar.mn 13 Sep 2006 23:10:10 -0000 1.95.2.13 -+++ mozilla/browser/base/jar.mn 8 Jul 2009 21:49:35 -0000 -@@ -11,16 +11,22 @@ browser.jar: - % overlay chrome://global/content/viewPartialSource.xul chrome://browser/content/viewSourceOverlay.xul - * content/browser/aboutDialog.xul (content/aboutDialog.xul) - * content/browser/aboutDialog.js (content/aboutDialog.js) - content/browser/aboutDialog.css (content/aboutDialog.css) - * content/browser/browser.css (content/browser.css) - * content/browser/browser.js (content/browser.js) - * content/browser/browser.xul (content/browser.xul) - * content/browser/credits.xhtml (content/credits.xhtml) -+* content/browser/dynamic-welcome-v1.html (content/dynamic-welcome-v1.html) -+* content/browser/dynamic-welcome-v2.html (content/dynamic-welcome-v2.html) -+* content/browser/dynamic-bebook-v1.html (content/dynamic-bebook-v1.html) -+* content/browser/dynamic-bebook-v2.html (content/dynamic-bebook-v2.html) -+* content/browser/dynamic-userguide-v1.html (content/dynamic-userguide-v1.html) -+* content/browser/dynamic-userguide-v2.html (content/dynamic-userguide-v2.html) - * content/browser/EULA.js (content/EULA.js) - * content/browser/EULA.xhtml (content/EULA.xhtml) - * content/browser/EULA.xul (content/EULA.xul) - * content/browser/metaData.js (content/metaData.js) - * content/browser/metaData.xul (content/metaData.xul) - content/browser/monitor.png (content/monitor.png) - * content/browser/openLocation.js (content/openLocation.js) - * content/browser/openLocation.xul (content/openLocation.xul) -Index: mozilla/browser/base/content/browserconfig.properties -=================================================================== -RCS file: /cvsroot/mozilla/browser/base/content/browserconfig.properties,v -retrieving revision 1.4.4.1 -diff -u -8 -p -w -r1.4.4.1 browserconfig.properties ---- mozilla/browser/base/content/browserconfig.properties 17 Mar 2006 04:17:56 -0000 1.4.4.1 -+++ mozilla/browser/base/content/browserconfig.properties 8 Jul 2009 21:49:35 -0000 -@@ -1,2 +1,2 @@ - # Do NOT localize or otherwise change these values --browser.startup.homepage=http://www.mozilla.org/projects/bonecho/ -+browser.startup.homepage=chrome://browser/content/dynamic-welcome-v1.html -Index: mozilla/browser/components/migration/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/browser/components/migration/src/Makefile.in,v -retrieving revision 1.20.2.2 -diff -u -8 -p -w -r1.20.2.2 Makefile.in ---- mozilla/browser/components/migration/src/Makefile.in 27 Jan 2006 02:19:00 -0000 1.20.2.2 -+++ mozilla/browser/components/migration/src/Makefile.in 8 Jul 2009 21:49:37 -0000 -@@ -73,20 +73,23 @@ endif - - CPPSRCS = nsProfileMigrator.cpp \ - nsBrowserProfileMigratorUtils.cpp \ - nsNetscapeProfileMigratorBase.cpp \ - nsSeamonkeyProfileMigrator.cpp \ - nsPhoenixProfileMigrator.cpp \ - $(NULL) - --ifneq ($(OS_ARCH),BeOS) -+ifneq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CPPSRCS += nsDogbertProfileMigrator.cpp - endif - -+ -+ -+ - ifneq ($(OS_ARCH),OS2) - CPPSRCS += nsOperaProfileMigrator.cpp - endif - - ifeq ($(OS_ARCH)_$(GNU_CXX),WINNT_) - DEFINES += -DPSTOREC_DLL=\"$(subst \,\\,$(WINDIR))\\system32\\pstorec.dll\" - - CPPSRCS += nsIEProfileMigrator.cpp \ -Index: mozilla/browser/installer/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/browser/installer/Makefile.in,v -retrieving revision 1.19.4.4 -diff -u -8 -p -w -r1.19.4.4 Makefile.in ---- mozilla/browser/installer/Makefile.in 6 Jun 2006 15:35:00 -0000 1.19.4.4 -+++ mozilla/browser/installer/Makefile.in 8 Jul 2009 21:49:39 -0000 -@@ -57,19 +57,23 @@ include $(topsrcdir)/config/rules.mk - - MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in - - ifdef BUILD_STATIC_LIBS - ifeq (WINNT,$(OS_ARCH)) - MOZ_PKG_MANIFEST_P = $(srcdir)/windows/packages-static - else - ifneq (,$(filter-out OS2 Darwin,$(OS_ARCH))) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+MOZ_PKG_MANIFEST_P = $(srcdir)/beos/packages-static -+else - MOZ_PKG_MANIFEST_P = $(srcdir)/unix/packages-static - endif - endif -+endif - else - $(error you need a "--enable-static --disable-shared" build to create an installer) - endif - - MOZ_NONLOCALIZED_PKG_LIST = \ - xpcom \ - browser \ - $(NULL) -Index: mozilla/browser/locales/en-US/profile/bookmarks.html -=================================================================== -RCS file: /cvsroot/mozilla/browser/locales/en-US/profile/bookmarks.html,v -retrieving revision 1.4.8.13 -diff -u -8 -p -w -r1.4.8.13 bookmarks.html ---- mozilla/browser/locales/en-US/profile/bookmarks.html 19 Aug 2006 06:04:11 -0000 1.4.8.13 -+++ mozilla/browser/locales/en-US/profile/bookmarks.html 8 Jul 2009 21:49:40 -0000 -@@ -7,20 +7,37 @@ -

Bookmarks

- -

-

Get Bookmark Add-ons -
-

Bookmarks Toolbar Folder

-
Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar -

--

Getting Started --
Latest Headlines -+
Haiku WebSite -+
Nightly Builds -

-


--

Mozilla Firefox

-+

BeZilla Browser

-

--

Help and Tutorials --
Customize Firefox --
Get Involved --
About Us -+
BeZilla Blog -+
Report an Issue -+
View Known Issues -

-+

Haiku Bookmarks

-+

-+

Nightly Builds -+
Optional Packages -+
Bug Tracker -+
Haiku User Guide -+
BeBook -+
Welcome -+

-+

Software for Haiku

-+

-+

OSDrawer.net -+
HaikuWare -+
Zeta-Games -+
BeBits -+

-+

Haiku WebSite -+ -

-Index: mozilla/build/autoconf/config.guess -=================================================================== -RCS file: /cvsroot/mozilla/build/autoconf/config.guess,v -retrieving revision 1.19 -diff -u -8 -p -w -r1.19 config.guess ---- mozilla/build/autoconf/config.guess 18 Apr 2003 10:20:15 -0000 1.19 -+++ mozilla/build/autoconf/config.guess 8 Jul 2009 21:49:46 -0000 -@@ -1,34 +1,37 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2008-01-08' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2 of the License, or - # (at your option) any later version. - # - # This program is distributed in the hope that it will be useful, but - # WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - # General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Originally written by Per Bothner . - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. - # - # This script attempts to guess a canonical system name similar to - # config.sub. If it succeeds, it prints the system name on stdout, and - # exits with 0. Otherwise, it exits with 1. - # -@@ -48,34 +51,34 @@ Operation modes: - -v, --version print version number, then exit - - Report bugs and patches to ." - - version="\ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - - help=" - Try \`$me --help' for more information." - - # Parse command line - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) -@@ -99,35 +102,36 @@ trap 'exit 1' 1 2 15 - # use `HOST_CC' if defined, but it is deprecated. - - # Portable tmp directory creation inspired by the Autoconf team. - - set_cc_for_build=' - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; -- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || -+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; - dummy=$tmp/dummy ; - tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; - case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; --esac ;' -+esac ; set_cc_for_build= ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. - # (ghazi@noc.rutgers.edu 1994-08-24) - if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH - fi - - UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -@@ -152,16 +156,17 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; -+ sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -@@ -190,60 +195,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" -- exit 0 ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- arc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- macppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvmeppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- pmax:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sgi:OpenBSD:*:*) -- echo mipseb-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- wgrisc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -+ exit ;; -+ *:ekkoBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -+ exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; -+ macppc:MirBSD:*:*) -+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; -+ *:MirBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; - alpha:OSF1:*:*) -- if test $UNAME_RELEASE = "V4.0"; then -+ case $UNAME_RELEASE in -+ *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` -- fi -+ ;; -+ *5.*) -+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -+ ;; -+ esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; -@@ -271,147 +258,163 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac -+ # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. -- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit 0 ;; -+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -+ exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix -- exit 0 ;; -+ exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 -- exit 0 ;; -+ exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 -- exit 0;; -+ exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos -- exit 0 ;; -+ exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos -- exit 0 ;; -+ exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition -- exit 0 ;; -+ exit ;; -+ *:z/VM:*:*) -+ echo s390-ibm-zvmoe -+ exit ;; -+ *:OS400:*:*) -+ echo powerpc-ibm-os400 -+ exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} -- exit 0;; -+ exit ;; -+ arm:riscos:*:*|arm:RISCOS:*:*) -+ echo arm-unknown-riscos -+ exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp -- exit 0;; -+ exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi -- exit 0 ;; -+ exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 -- exit 0 ;; -- DRS?6000:UNIX_SV:4.2*:7*) -+ exit ;; -+ DRS?6000:unix:4.0:6*) -+ echo sparc-icl-nx6 -+ exit ;; -+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in -- sparc) echo sparc-icl-nx7 && exit 0 ;; -+ sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -- i86pc:SunOS:5.*:*) -+ exit ;; -+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` -- exit 0 ;; -+ exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac -- exit 0 ;; -+ exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ m68k:machten:*:*) -+ echo m68k-apple-machten${UNAME_RELEASE} -+ exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 -- exit 0 ;; -+ exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __cplusplus - #include /* for printf() prototype */ - int main (int argc, char *argv[]) { - #else - int main (argc, argv) int argc; char *argv[]; { -@@ -425,145 +428,150 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c \ -- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && -+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && -+ SYSTEM_NAME=`$dummy $dummyarg` && -+ { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax -- exit 0 ;; -+ exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix -- exit 0 ;; -+ exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 -- exit 0 ;; -+ exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 -- exit 0 ;; -+ exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 -- exit 0 ;; -+ exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 -- exit 0 ;; -+ exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd -- exit 0 ;; -+ exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` -- exit 0 ;; -+ exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix -- exit 0 ;; -+ exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` -+ then -+ echo "$SYSTEM_NAME" -+ else - echo rs6000-ibm-aix3.2.5 -+ fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi -- exit 0 ;; -- *:AIX:*:[45]) -+ exit ;; -+ *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix -- exit 0 ;; -+ exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 -- exit 0 ;; -+ exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to -- exit 0 ;; # report: romp-ibm BSD 4.3 -+ exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx -- exit 0 ;; -+ exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 -- exit 0 ;; -+ exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd -- exit 0 ;; -+ exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 -- exit 0 ;; -+ exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` -@@ -615,31 +623,41 @@ EOF - } - EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then -- # avoid double evaluation of $set_cc_for_build -- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build -- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null -+ eval $set_cc_for_build -+ -+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating -+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler -+ # generating 64-bit code. GNU and HP use different nomenclature: -+ # -+ # $ CC_FOR_BUILD=cc ./config.guess -+ # => hppa2.0w-hp-hpux11.23 -+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess -+ # => hppa64-hp-hpux11.23 -+ -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); -@@ -657,181 +675,224 @@ EOF - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 -- exit 0 ;; -+ exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd -- exit 0 ;; -+ exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd -- exit 0 ;; -+ exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix -- exit 0 ;; -+ exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf -- exit 0 ;; -+ exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf -- exit 0 ;; -+ exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi -- exit 0 ;; -+ exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites -- exit 0 ;; -+ exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - *:UNICOS/mp:*:*) -- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; -+ 5000:UNIX_System_V:4.*:*) -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:FreeBSD:*:*) -- # Determine whether the default compiler uses glibc. -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #if __GLIBC__ >= 2 -- LIBC=gnu -- #else -- LIBC= -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} -- exit 0 ;; -+ case ${UNAME_MACHINE} in -+ pc98) -+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ esac -+ exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -- exit 0 ;; -- i*:MINGW*:*) -+ exit ;; -+ *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 -- exit 0 ;; --#### MozillaHack --# Netscape's hacked uname -- xx:WINNT:* | xx:WIN95:*) -- echo i586-pc-msvc -- exit 0 ;; --### End MozillaHack -+ exit ;; -+ i*:windows32*:*) -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 -+ exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 -- exit 0 ;; -- x86:Interix*:3*) -- echo i586-pc-interix3 -- exit 0 ;; -+ exit ;; -+ *:Interix*:[3456]*) -+ case ${UNAME_MACHINE} in -+ x86) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ EM64T | authenticamd) -+ echo x86_64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks -- exit 0 ;; -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix -- exit 0 ;; -+ exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin -- exit 0 ;; -+ exit ;; -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) -+ echo x86_64-unknown-cygwin -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin -- exit 0 ;; -+ exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - *:GNU:*:*) -+ # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -- exit 0 ;; -+ exit ;; -+ *:GNU/*:*:*) -+ # other systems with GNU libc and userland -+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -+ exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix -- exit 0 ;; -+ exit ;; - arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ fi -+ exit ;; -+ avr32*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ cris:Linux:*:*) -+ echo cris-axis-linux-gnu -+ exit ;; -+ crisv32:Linux:*:*) -+ echo crisv32-axis-linux-gnu -+ exit ;; -+ frv:Linux:*:*) -+ echo frv-unknown-linux-gnu -+ exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ m32r*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -@@ -839,62 +900,78 @@ EOF - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -+ or32:Linux:*:*) -+ echo or32-unknown-linux-gnu -+ exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -- exit 0 ;; -+ exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac -- exit 0 ;; -+ exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux -- exit 0 ;; -+ exit ;; -+ sh64*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g -@@ -902,99 +979,113 @@ EOF - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit 0 ;; -+ exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit 0 ;; -+ exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit 0 ;; -+ exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else -- #ifdef __INTEL_COMPILER -+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif -+ #ifdef __dietlibc__ -+ LIBC=dietlibc -+ #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^LIBC/{ -+ s: ::g -+ p -+ }'`" -+ test x"${LIBC}" != x && { -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ exit -+ } -+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 -- exit 0 ;; -+ exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx -- exit 0 ;; -+ exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop -- exit 0 ;; -+ exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos -- exit 0 ;; -+ exit ;; -+ i*86:syllable:*:*) -+ echo ${UNAME_MACHINE}-pc-syllable -+ exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi -- exit 0 ;; -- i*86:*:5:[78]*) -+ exit ;; -+ i*86:*:5:[678]*) -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ -@@ -1002,214 +1093,248 @@ EOF - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi -- exit 0 ;; -+ exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 -- exit 0 ;; -+ exit ;; - paragon:*:*:*) - echo i860-intel-osf1 -- exit 0 ;; -+ exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi -- exit 0 ;; -+ exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv -- exit 0 ;; -+ exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv -- exit 0 ;; -+ exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix -- exit 0 ;; -- M68*:*:R3V[567]*:*) -- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) -+ exit ;; -+ M68*:*:R3V[5678]*:*) -+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; -+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4 && exit 0 ;; -+ && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 -- exit 0 ;; -+ exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi -- exit 0 ;; -+ exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 -- exit 0 ;; --#### MozillaHack -- *:*OpenVMS*:*:*) -- case "${UNAME_SYSTEM}" in -- POSIX_for_OpenVMS_AXP) echo alpha-dec-openvmsposix ;; -- POSIX_for_OpenVMS_VAX) echo vax-dec-openvmsposix ;; -- OpenVMS) echo alpha-dec-openvms ;; -- *) echo unknown-dec-openvms ;; -- esac -- exit 0 ;; --#### End MozillaHack -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 -- exit 0 ;; -+ exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 -- exit 0 ;; -+ exit ;; -+ i*86:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo ${UNAME_MACHINE}-stratus-vos -+ exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos -- exit 0 ;; -+ exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 -- exit 0 ;; -+ exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos -- exit 0 ;; -+ exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos -- exit 0 ;; -+ exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos -- exit 0 ;; -+ exit ;; -+ BeMac:Haiku:*:*) -+ echo powerpc-apple-haiku -+ exit ;; -+ BePC:Haiku:*:*) -+ echo i586-pc-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ SX-7:SUPER-UX:*:*) -+ echo sx7-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8:SUPER-UX:*:*) -+ echo sx8-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8R:SUPER-UX:*:*) -+ echo sx8r-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Darwin:*:*) -- case `uname -p` in -- *86) UNAME_PROCESSOR=i686 ;; -- powerpc) UNAME_PROCESSOR=powerpc ;; -+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -+ case $UNAME_PROCESSOR in -+ unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:QNX:*:4*) - echo i386-pc-qnx -- exit 0 ;; -- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) -+ exit ;; -+ NSE-?:NONSTOP_KERNEL:*:*) -+ echo nse-tandem-nsk${UNAME_RELEASE} -+ exit ;; -+ NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux -- exit 0 ;; -+ exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv -- exit 0 ;; -+ exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 -- exit 0 ;; -+ exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 -- exit 0 ;; -+ exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex -- exit 0 ;; -+ exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 -- exit 0 ;; -+ exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 -- exit 0 ;; -+ exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 -- exit 0 ;; -+ exit ;; - *:ITS:*:*) - echo pdp10-unknown-its -- exit 0 ;; -+ exit ;; -+ SEI:*:*:SEIUX) -+ echo mips-sei-seiux${UNAME_RELEASE} -+ exit ;; -+ *:DragonFly:*:*) -+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ exit ;; -+ *:*VMS:*:*) -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ case "${UNAME_MACHINE}" in -+ A*) echo alpha-dec-vms ; exit ;; -+ I*) echo ia64-dec-vms ; exit ;; -+ V*) echo vax-dec-vms ; exit ;; -+ esac ;; -+ *:XENIX:*:SysV) -+ echo i386-pc-xenix -+ exit ;; -+ i*86:skyos:*:*) -+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' -+ exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 - #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - - eval $set_cc_for_build - cat >$dummy.c </dev/null && $dummy && exit 0 -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - - # Apollos put the system type in the environment. - --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } -+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - - # Convex versions that predate uname can use getsysinfo(1) - - if [ -x /usr/convex/getsysinfo ] - then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - c34*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - c38*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - c4*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - esac - fi - - cat >&2 < in order to provide the needed - information to handle your system. - - config.guess timestamp = $timestamp - -Index: mozilla/build/autoconf/config.sub -=================================================================== -RCS file: /cvsroot/mozilla/build/autoconf/config.sub,v -retrieving revision 1.20 -diff -u -8 -p -w -r1.20 config.sub ---- mozilla/build/autoconf/config.sub 18 Apr 2003 10:20:15 -0000 1.20 -+++ mozilla/build/autoconf/config.sub 8 Jul 2009 21:49:49 -0000 -@@ -1,14 +1,15 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2008-01-16' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software - # can handle that machine. It does not imply ALL GNU software can. - # - # This file is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2 of the License, or -@@ -16,24 +17,25 @@ timestamp='2003-02-22' - # - # This program is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, --# Boston, MA 02111-1307, USA. -- -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. -+# - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. - # If it is invalid, we print an error message on stderr and exit with code 1. - # Otherwise, we print the canonical config type on stdout and succeed. - -@@ -65,46 +67,46 @@ Operation modes: - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - - Report bugs and patches to ." - - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - - help=" - Try \`$me --help' for more information." - - # Parse command line - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 -- exit 0;; -+ exit ;; - - * ) - break ;; - esac - done - - case $# in - 0) echo "$me: missing argument$help" >&2 -@@ -113,17 +115,19 @@ case $# in - *) echo "$me: too many arguments$help" >&2 - exit 1;; - esac - - # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi -@@ -139,17 +143,17 @@ case $os in - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis) -+ -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) -@@ -164,32 +168,40 @@ case $os in - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) -@@ -219,171 +231,196 @@ case $os in - os=-mint - ;; - esac - - # Decode aliases for certain CPU-COMPANY combinations. - case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. --#### MozillaHack --# mips*el --#### End MozillaHack - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -- | clipper \ -+ | am33_2.0 \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -+ | bfin \ -+ | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | fr30 | frv \ -+ | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ -- | ip2k \ -- | m32r | m68000 | m68k | m88k | mcore \ -- | mips | mipsbe | mipseb | mips*el | mipsle \ -+ | ip2k | iq2000 \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | mcore | mep \ -+ | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -+ | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ -+ | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -+ | mt \ - | msp430 \ -+ | nios | nios2 \ - | ns16k | ns32k \ -- | openrisc | or32 \ -+ | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | score \ -+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ -- | strongarm \ -- | tahoe | thumb | tic80 | tron \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu | strongarm \ -+ | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ -- | x86 | xscale | xstormy16 | xtensa \ -+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. --#### MozillaHack --# mips*el --#### End MozillaHack - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* \ -- | bs2000-* \ -+ | avr-* | avr32-* \ -+ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ -- | clipper-* | cydra-* \ -+ | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ -+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ -- | ip2k-* \ -- | m32r-* \ -+ | ip2k-* | iq2000-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | mcore-* \ -- | mips-* | mipsbe-* | mipseb-* | mips*el-* | mipsle-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* \ -+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -+ | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ -+ | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ -+ | mmix-* \ -+ | mt-* \ - | msp430-* \ -- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ -+ | nios-* | nios2-* \ -+ | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ -+ | sparclite-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ -- | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-*) - ;; -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown -+ ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; -+ abacus) -+ basic_machine=abacus-unknown -+ ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; -+ amd64) -+ basic_machine=x86_64-pc -+ ;; -+ amd64-*) -+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) -@@ -405,16 +442,24 @@ case $basic_machine in - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; -@@ -433,22 +478,37 @@ case $basic_machine in - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; -+ craynv) -+ basic_machine=craynv-cray -+ os=-unicosmp -+ ;; -+ cr16) -+ basic_machine=cr16-unknown -+ os=-elf -+ ;; - crds | unos) - basic_machine=m68k-crds - ;; -+ crisv32 | crisv32-* | etraxfs*) -+ basic_machine=crisv32-axis -+ ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; -+ crx) -+ basic_machine=crx-unknown -+ os=-elf -+ ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec -@@ -461,16 +521,20 @@ case $basic_machine in - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ djgpp) -+ basic_machine=i586-pc -+ os=-msdosdjgpp -+ ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; -@@ -611,66 +675,71 @@ case $basic_machine in - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; --#### MozillaHack -- i386-msvc | msvc) -- basic_machine=i386-pc -- os=-msvc -+ mingw32ce) -+ basic_machine=arm-unknown -+ os=-mingw32ce - ;; --#### End MozillaHack - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; -- mmix*) -- basic_machine=mmix-knuth -- os=-mmixware -- ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; -@@ -729,30 +798,29 @@ case $basic_machine in - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; -- nv1) -- basic_machine=nv1-cray -- os=-unicosmp -- ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; -- or32 | or32-*) -+ openrisc | openrisc-*) - basic_machine=or32-unknown -- os=-coff -+ ;; -+ os400) -+ basic_machine=powerpc-ibm -+ os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k -@@ -760,43 +828,63 @@ case $basic_machine in - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; -- pentiumii | pentium2) -+ pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; -+ pentium4) -+ basic_machine=i786-pc -+ ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -- pentiumii-* | pentium2-*) -+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -+ pentium4-*) -+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` -@@ -819,16 +907,20 @@ case $basic_machine in - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) -@@ -845,23 +937,37 @@ case $basic_machine in - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; -+ sde) -+ basic_machine=mipsisa32-sde -+ os=-elf -+ ;; -+ sei) -+ basic_machine=mips-sei -+ os=-seiux -+ ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; -+ sh5el) -+ basic_machine=sh5le-unknown -+ ;; -+ sh64) -+ basic_machine=sh64-unknown -+ ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; -@@ -926,45 +1032,49 @@ case $basic_machine in - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; -- tic4x | c4x*) -- basic_machine=tic4x-unknown -- os=-coff -- ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; -+ tile*) -+ basic_machine=tile-unknown -+ os=-linux-gnu -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; -+ tpf) -+ basic_machine=s390x-ibm -+ os=-tpf -+ ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; -@@ -998,16 +1108,20 @@ case $basic_machine in - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; -+ xbox) -+ basic_machine=i686-pc -+ os=-mingw32 -+ ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) -@@ -1028,39 +1142,39 @@ case $basic_machine in - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; -+ mmix) -+ basic_machine=mmix-knuth -+ ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparc | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; -@@ -1116,40 +1230,40 @@ case $os in - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. --#### MozillaHack --# msvc --#### End MozillaHack - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ -- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -openbsd* | -solidbsd* \ -+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ -+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ -- | -msvc* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -- | -powermax* | -dnix*) -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os -@@ -1157,34 +1271,40 @@ case $os in - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; -+ -linux-dietlibc) -+ os=-linux-dietlibc -+ ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; -+ -os400*) -+ os=-os400 -+ ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf -@@ -1196,16 +1316,19 @@ case $os in - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; -+ -syllable*) -+ os=-syllable -+ ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova -@@ -1218,16 +1341,19 @@ case $os in - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; -+ -tpf*) -+ os=-tpf -+ ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 -@@ -1254,16 +1380,19 @@ case $os in - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; -+ -zvmoe) -+ os=-zvmoe -+ ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -@@ -1276,25 +1405,34 @@ else - - # Note that if you're going to try to match "-MANUFACTURER" here (say, - # "-sun"), then you have to tell the case statement up towards the top - # that MANUFACTURER isn't an operating system. Otherwise, code above - # will signal an error saying that MANUFACTURER isn't an operating - # system, and we'll never get to this point. - - case $basic_machine in -+ score-*) -+ os=-elf -+ ;; -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) -@@ -1310,16 +1448,19 @@ case $basic_machine in - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; -+ mep-*) -+ os=-elf -+ ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff -@@ -1328,19 +1469,25 @@ case $basic_machine in - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; -+ *-haiku) -+ os=-haiku -+ ;; - *-ibm) - os=-aix - ;; -+ *-knuth) -+ os=-mmixware -+ ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf -@@ -1463,19 +1610,25 @@ case $basic_machine in - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; -+ -os400*) -+ vendor=ibm -+ ;; - -ptx*) - vendor=sequent - ;; -+ -tpf*) -+ vendor=ibm -+ ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi -@@ -1490,16 +1643,16 @@ case $basic_machine in - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; - esac - - echo $basic_machine$os --exit 0 -+exit - - # Local variables: - # eval: (add-hook 'write-file-hooks 'time-stamp) - # time-stamp-start: "timestamp='" - # time-stamp-format: "%:y-%02m-%02d" - # time-stamp-end: "'" - # End: -Index: mozilla/calendar/base/content/preferences/preferences.xul -=================================================================== -RCS file: /cvsroot/mozilla/calendar/base/content/preferences/preferences.xul,v -retrieving revision 1.1.2.6 -diff -u -8 -p -w -r1.1.2.6 preferences.xul ---- mozilla/calendar/base/content/preferences/preferences.xul 14 Mar 2007 09:08:19 -0000 1.1.2.6 -+++ mozilla/calendar/base/content/preferences/preferences.xul 8 Jul 2009 21:49:51 -0000 -@@ -66,17 +66,22 @@ - #ifdef XP_UNIX - #ifdef XP_MACOSX - style="&prefWindow.styleMac;"> - #else - title="&prefWindow.titleGNOME;" - style="&prefWindow.styleGNOME;"> - #endif - #endif -+#ifdef XP_BEOS -+ title="&prefWindow.titleGNOME;" -+ style="&prefWindow.styleGNOME;"> - #endif -+#endif -+ - - - - - -Index: mozilla/calendar/libical/src/libical/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/calendar/libical/src/libical/Makefile.in,v -retrieving revision 1.3.6.1 -diff -u -8 -p -w -r1.3.6.1 Makefile.in ---- mozilla/calendar/libical/src/libical/Makefile.in 27 Dec 2007 10:03:57 -0000 1.3.6.1 -+++ mozilla/calendar/libical/src/libical/Makefile.in 8 Jul 2009 21:49:54 -0000 -@@ -84,17 +84,17 @@ CSRCS = \ - $(NULL) - - ifeq (,$(filter -DHAVE_SNPRINTF=1,$(ACDEFINES))) - CSRCS += vsnprintf.c - endif - - DEFINES += -DHAVE_CONFIG_H - --ifneq (,$(filter BeOS Darwin OpenVMS NetBSD FreeBSD,$(OS_ARCH))) -+ifneq (,$(filter BeOS Haiku Darwin OpenVMS NetBSD FreeBSD,$(OS_ARCH))) - DEFINES += -D__USE_BSD=1 - endif - - LOCAL_INCLUDES = -I$(srcdir)/../.. -I$(srcdir) -I. - - SRCS_IN_OBJDIR = 1 - - include $(topsrcdir)/config/rules.mk -Index: mozilla/calendar/sunbird/app/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/calendar/sunbird/app/Makefile.in,v -retrieving revision 1.21.2.23 -diff -u -8 -p -w -r1.21.2.23 Makefile.in ---- mozilla/calendar/sunbird/app/Makefile.in 4 May 2008 01:32:07 -0000 1.21.2.23 -+++ mozilla/calendar/sunbird/app/Makefile.in 8 Jul 2009 21:50:01 -0000 -@@ -79,18 +79,22 @@ include $(topsrcdir)/config/rules.mk - else - # Build a binary bootstrapping with XRE_main - - MOZILLA_INTERNAL_API = 1 - - ifeq ($(USE_SHORT_LIBNAME), 1) - PROGRAM = sunbird$(BIN_SUFFIX) - else -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+PROGRAM = BeZillaCalendar$(BIN_SUFFIX) -+else - PROGRAM = sunbird-bin$(BIN_SUFFIX) - endif -+endif - - REQUIRES = \ - appshell \ - string \ - xpcom \ - xulapp \ - $(NULL) - -@@ -189,17 +193,21 @@ endif - ifdef BUILD_STATIC_LIBS - RCFLAGS += -DMOZ_STATIC_BUILD - endif - ifdef DEBUG - RCFLAGS += -DDEBUG - endif - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ifeq ($(OS_ARCH),Haiku) -+BEOS_PROGRAM_RDEF = $(srcdir)/apprunner-beos.rdef -+endif -+BEOS_PROGRAM_RESOURCE = $(srcdir)/apprunner-beos.rsrc - ifdef BUILD_STATIC_LIBS - OS_LIBS += -ltracker -lgame - endif - endif - - ifeq ($(OS_ARCH),OS2) - RESFILE=splashos2.res - RCFLAGS += -DMOZ_SUNBIRD -@@ -261,17 +269,17 @@ $(EXE_DEF_FILE): - @echo WinQueryProperty = PMMERGE.5450 >>$(EXE_DEF_FILE) - @echo WinRemoveProperty = PMMERGE.5451 >>$(EXE_DEF_FILE) - @echo WinSetProperty = PMMERGE.5452 >>$(EXE_DEF_FILE) - - LDFLAGS += -Zlinker /NOE - endif - endif - --ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH))) -+ifneq (,$(filter-out OS2 WINNT BeOS Haiku,$(OS_ARCH))) - - sunbird:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk - cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \ - -e "s|%MOZ_USER_DIR%|.mozilla/sunbird|" \ - -e "s|%MREDIR%|$(mredir)|" > $@ - chmod +x $@ - - libs:: sunbird -Index: mozilla/config/config.mk -=================================================================== -RCS file: /cvsroot/mozilla/config/config.mk,v -retrieving revision 3.337.2.12 -diff -u -8 -p -w -r3.337.2.12 config.mk ---- mozilla/config/config.mk 23 Nov 2007 21:12:26 -0000 3.337.2.12 -+++ mozilla/config/config.mk 8 Jul 2009 21:50:14 -0000 -@@ -105,19 +105,16 @@ AUTOCONF_TOOLS = $(topsrcdir)/build/auto - - ifeq ($(OS_ARCH),QNX) - ifeq ($(OS_TARGET),NTO) - LD := qcc -Vgcc_ntox86 -nostdlib - else - LD := $(CC) - endif - endif --ifeq ($(OS_ARCH),BeOS) --BEOS_ADDON_WORKAROUND = 1 --endif - - # - # Strip off the excessively long version numbers on these platforms, - # 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))) - OS_RELEASE := $(basename $(OS_RELEASE)) -Index: mozilla/config/rules.mk -=================================================================== -RCS file: /cvsroot/mozilla/config/rules.mk,v -retrieving revision 3.487.2.9 -diff -u -8 -p -w -r3.487.2.9 rules.mk ---- mozilla/config/rules.mk 18 Dec 2007 21:33:08 -0000 3.487.2.9 -+++ mozilla/config/rules.mk 8 Jul 2009 21:50:19 -0000 -@@ -512,17 +512,17 @@ ifeq ($(OS_ARCH),Linux) - ifdef IS_COMPONENT - EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic - endif - endif - - # - # BeOS: add -Bsymbolic flag for components - # --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter BeOS Haiku,$(OS_ARCH))) - ifdef IS_COMPONENT - EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic - endif - endif - - # - # MINGW32 - # -@@ -672,19 +672,23 @@ ifdef BEOS_ADDON_WORKAROUND - ( cd $(FINAL_TARGET)/components && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) ) - endif - else # ! IS_COMPONENT - ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH))) - $(INSTALL) $(IFLAGS2) $(IMPORT_LIBRARY) $(DIST)/lib - else - $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(DIST)/lib - endif -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)/lib -+else - $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET) -+endif - ifdef BEOS_ADDON_WORKAROUND -- ( cd $(FINAL_TARGET) && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) ) -+ ( cd $(FINAL_TARGET)/lib && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) ) - endif - endif # IS_COMPONENT - endif # SHARED_LIBRARY - ifdef PROGRAM - $(INSTALL) $(IFLAGS2) $(PROGRAM) $(FINAL_TARGET) - endif - ifdef SIMPLE_PROGRAMS - $(INSTALL) $(IFLAGS2) $(SIMPLE_PROGRAMS) $(FINAL_TARGET) -@@ -822,17 +826,20 @@ endif # OS2 - endif # WINCE - - ifdef ENABLE_STRIP - $(STRIP) $@ - endif - ifdef MOZ_POST_PROGRAM_COMMAND - $(MOZ_POST_PROGRAM_COMMAND) $@ - endif --ifeq ($(OS_ARCH),BeOS) -+ifneq (,$(filter BeOS Haiku,$(OS_ARCH))) -+ifdef BEOS_PROGRAM_RDEF -+ rc -o $(BEOS_PROGRAM_RESOURCE) $(BEOS_PROGRAM_RDEF) -+endif - ifdef BEOS_PROGRAM_RESOURCE - xres -o $@ $(BEOS_PROGRAM_RESOURCE) - mimeset $@ - endif - endif # BeOS - - $(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) Makefile Makefile.in - ifeq ($(MOZ_OS2_TOOLS),VACPP) -Index: mozilla/directory/c-sdk/build.mk -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/build.mk,v -retrieving revision 5.0.2.15.4.1 -diff -u -8 -p -w -r5.0.2.15.4.1 build.mk ---- mozilla/directory/c-sdk/build.mk 3 Feb 2006 14:44:29 -0000 5.0.2.15.4.1 -+++ mozilla/directory/c-sdk/build.mk 8 Jul 2009 21:50:28 -0000 -@@ -437,17 +437,17 @@ endif #!os2 - - ifeq ($(OS_ARCH), OSF1) - # The linker on OSF/1 gets confused if it finds an so_locations file - # that doesn't meet its expectations, so we arrange to remove it before - # linking. - SO_FILES_TO_REMOVE=so_locations - endif - --ifneq (,$(filter BeOS Darwin NetBSD,$(OS_ARCH))) -+ifneq (,$(filter BeOS Haiku Darwin NetBSD,$(OS_ARCH))) - LINK_DLL = $(MKSHLIB) $(OBJS) - endif - - ifeq ($(OS_ARCH), HP-UX) - # On HPUX, we need a couple of changes: - # 1) Use the C++ compiler for linking, which will pass the +eh flag on down to the - # linker so the correct exception-handling-aware libC gets used (libnshttpd.sl - # needs this). -Index: mozilla/directory/c-sdk/configure.in -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/configure.in,v -retrieving revision 5.0.2.34.4.3 -diff -u -8 -p -w -r5.0.2.34.4.3 configure.in ---- mozilla/directory/c-sdk/configure.in 11 Jul 2007 20:43:19 -0000 5.0.2.34.4.3 -+++ mozilla/directory/c-sdk/configure.in 8 Jul 2009 21:50:33 -0000 -@@ -355,17 +355,17 @@ fi - if test -z "$SKIP_PATH_CHECKS"; then - AC_PATH_PROG(WHOAMI, $WHOAMI whoami, echo not_whoami) - fi - - if test -n "$MOZ_DEBUG"; then - AC_DEFINE(DEBUG) - DEFINES="$DEFINES -UNDEBUG" - case "${target_os}" in -- beos*) -+ beos*|haiku*) - DEFINES="$DEFINES -DDEBUG_${USER}" - ;; - msvc*|mks*|cygwin*|mingw*|os2*) - DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`" - ;; - *) - DEFINES="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_`$WHOAMI`" - ;; -@@ -728,17 +728,17 @@ case "$host" in - *-cygwin*|*-msvc*|*-mks*) - CYGWIN_WRAPPER='sh $(topsrcdir)/config/cygwin-wrapper' - NSINSTALL='$(CYGWIN_WRAPPER) nsinstall' - if test "`${PERL} -v | grep -c cygwin 2>/dev/null`" = 0; then - PERL='$(CYGWIN_WRAPPER) perl' - fi - WIN_TOP_SRC=`cygpath -a -w $srcdir | sed -e 's|\\\\|/|g'` - ;; --*-beos*) -+*-beos*|*-haiku*) - HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE" - ;; - *os2*) - ;; - *) - HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" - ;; - esac -@@ -807,34 +807,52 @@ case "$target" in - else - MDCPUCFG_H=_aix32.cfg - fi - fi - PR_MD_CSRCS=aix.c - RESOLVE_LINK_SYMBOLS=1 - ;; - --*-beos*) -+*-beos*|*-haiku*) - AC_DEFINE(XP_BEOS) - AC_DEFINE(BeOS) - AC_DEFINE(BEOS) - AC_DEFINE(_POSIX_SOURCE) -+ DSO_CFLAGS=-fPIC - DSO_LDOPTS=-nostart -+ - MDCPUCFG_H=_beos.cfg - USE_BTHREADS=1 - PR_MD_ARCH_DIR=beos - RESOLVE_LINK_SYMBOLS=1 -+ -+ _HAIKU_BUILD=0 -+ AC_CHECK_LIB(network,main,_HAIKU_BUILD=1) -+ if test "$_HAIKU_BUILD" = 1; then -+ OS_LIBS="$OS_LIBS -lnetwork" -+ AC_DEFINE(XP_HAIKU) -+ AC_DEFINE(BONE_VERSION) -+ else -+ AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"]) -+ fi -+ -+ -+ - case "${target_cpu}" in - i*86) -- _OPTIMIZE_FLAGS=-O2 -- _DEBUG_FLAGS='-gdwarf-2 -O0' -+ AC_DEFINE(i586) -+ CPU_ARCH=i586 -+ _OPTIMIZE_FLAGS=-O3 -+ _DEBUG_FLAGS='-gdwarf-2 -O0 -fno-inline' - MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@' -- AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"]) - ;; - powerpc) -+ AC_DEFINE(ppc) -+ CPU_ARCH=ppc - CC=mwcc - CCC=mwcc - LD=mwld - DSO_LDOPTS='-xms -export pragma -init _init_routine_ -term _term_routine_ -lroot -lnet /boot/develop/lib/ppc/glue-noinit.a /boot/develop/lib/ppc/init_term_dyn.o /boot/develop/lib/ppc/start_dyn.o' - _OPTIMIZE_FLAGS=-O2 - _DEBUG_FLAGS='-g -O0' - ;; - esac -@@ -2090,17 +2108,17 @@ AC_ARG_ENABLE(nspr-threads, - [ --enable-nspr-threads Build using classic nspr threads], - [ if test "$enableval" = "yes"; then - USE_PTHREADS= - USE_USER_PTHREADS= - USE_NSPR_THREADS=1 - fi]) - - case "$target" in --*-beos*) -+*-beos*|*-haiku*) - AC_ARG_WITH(bthreads, - [ --with-bthreads Use system bthreads library as thread subsystem (BeOS only)], - [ if test "$withval" = "yes"; then - USE_BTHREADS=1 - USE_USER_PTHREADS= - USE_PTHREADS= - fi]) - ;; -Index: mozilla/directory/c-sdk/config/autoconf/config.guess -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/config/autoconf/config.guess,v -retrieving revision 5.0.2.2 -diff -u -8 -p -w -r5.0.2.2 config.guess ---- mozilla/directory/c-sdk/config/autoconf/config.guess 18 Apr 2003 10:20:22 -0000 5.0.2.2 -+++ mozilla/directory/c-sdk/config/autoconf/config.guess 8 Jul 2009 21:50:37 -0000 -@@ -1,34 +1,37 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2008-01-08' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2 of the License, or - # (at your option) any later version. - # - # This program is distributed in the hope that it will be useful, but - # WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - # General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Originally written by Per Bothner . - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. - # - # This script attempts to guess a canonical system name similar to - # config.sub. If it succeeds, it prints the system name on stdout, and - # exits with 0. Otherwise, it exits with 1. - # -@@ -48,34 +51,34 @@ Operation modes: - -v, --version print version number, then exit - - Report bugs and patches to ." - - version="\ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - - help=" - Try \`$me --help' for more information." - - # Parse command line - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) -@@ -99,35 +102,36 @@ trap 'exit 1' 1 2 15 - # use `HOST_CC' if defined, but it is deprecated. - - # Portable tmp directory creation inspired by the Autoconf team. - - set_cc_for_build=' - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; -- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || -+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; - dummy=$tmp/dummy ; - tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; - case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; --esac ;' -+esac ; set_cc_for_build= ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. - # (ghazi@noc.rutgers.edu 1994-08-24) - if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH - fi - - UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -@@ -152,16 +156,17 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; -+ sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -@@ -190,60 +195,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" -- exit 0 ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- arc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- macppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvmeppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- pmax:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sgi:OpenBSD:*:*) -- echo mipseb-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- wgrisc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -+ exit ;; -+ *:ekkoBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -+ exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; -+ macppc:MirBSD:*:*) -+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; -+ *:MirBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; - alpha:OSF1:*:*) -- if test $UNAME_RELEASE = "V4.0"; then -+ case $UNAME_RELEASE in -+ *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` -- fi -+ ;; -+ *5.*) -+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -+ ;; -+ esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; -@@ -271,147 +258,163 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac -+ # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. -- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit 0 ;; -+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -+ exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix -- exit 0 ;; -+ exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 -- exit 0 ;; -+ exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 -- exit 0;; -+ exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos -- exit 0 ;; -+ exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos -- exit 0 ;; -+ exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition -- exit 0 ;; -+ exit ;; -+ *:z/VM:*:*) -+ echo s390-ibm-zvmoe -+ exit ;; -+ *:OS400:*:*) -+ echo powerpc-ibm-os400 -+ exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} -- exit 0;; -+ exit ;; -+ arm:riscos:*:*|arm:RISCOS:*:*) -+ echo arm-unknown-riscos -+ exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp -- exit 0;; -+ exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi -- exit 0 ;; -+ exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 -- exit 0 ;; -- DRS?6000:UNIX_SV:4.2*:7*) -+ exit ;; -+ DRS?6000:unix:4.0:6*) -+ echo sparc-icl-nx6 -+ exit ;; -+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in -- sparc) echo sparc-icl-nx7 && exit 0 ;; -+ sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -- i86pc:SunOS:5.*:*) -+ exit ;; -+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` -- exit 0 ;; -+ exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac -- exit 0 ;; -+ exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ m68k:machten:*:*) -+ echo m68k-apple-machten${UNAME_RELEASE} -+ exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 -- exit 0 ;; -+ exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __cplusplus - #include /* for printf() prototype */ - int main (int argc, char *argv[]) { - #else - int main (argc, argv) int argc; char *argv[]; { -@@ -425,145 +428,150 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c \ -- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && -+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && -+ SYSTEM_NAME=`$dummy $dummyarg` && -+ { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax -- exit 0 ;; -+ exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix -- exit 0 ;; -+ exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 -- exit 0 ;; -+ exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 -- exit 0 ;; -+ exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 -- exit 0 ;; -+ exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 -- exit 0 ;; -+ exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd -- exit 0 ;; -+ exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` -- exit 0 ;; -+ exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix -- exit 0 ;; -+ exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` -+ then -+ echo "$SYSTEM_NAME" -+ else - echo rs6000-ibm-aix3.2.5 -+ fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi -- exit 0 ;; -- *:AIX:*:[45]) -+ exit ;; -+ *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix -- exit 0 ;; -+ exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 -- exit 0 ;; -+ exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to -- exit 0 ;; # report: romp-ibm BSD 4.3 -+ exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx -- exit 0 ;; -+ exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 -- exit 0 ;; -+ exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd -- exit 0 ;; -+ exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 -- exit 0 ;; -+ exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` -@@ -615,31 +623,41 @@ EOF - } - EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then -- # avoid double evaluation of $set_cc_for_build -- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build -- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null -+ eval $set_cc_for_build -+ -+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating -+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler -+ # generating 64-bit code. GNU and HP use different nomenclature: -+ # -+ # $ CC_FOR_BUILD=cc ./config.guess -+ # => hppa2.0w-hp-hpux11.23 -+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess -+ # => hppa64-hp-hpux11.23 -+ -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); -@@ -657,181 +675,224 @@ EOF - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 -- exit 0 ;; -+ exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd -- exit 0 ;; -+ exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd -- exit 0 ;; -+ exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix -- exit 0 ;; -+ exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf -- exit 0 ;; -+ exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf -- exit 0 ;; -+ exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi -- exit 0 ;; -+ exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites -- exit 0 ;; -+ exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - *:UNICOS/mp:*:*) -- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; -+ 5000:UNIX_System_V:4.*:*) -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:FreeBSD:*:*) -- # Determine whether the default compiler uses glibc. -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #if __GLIBC__ >= 2 -- LIBC=gnu -- #else -- LIBC= -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} -- exit 0 ;; -+ case ${UNAME_MACHINE} in -+ pc98) -+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ esac -+ exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -- exit 0 ;; -- i*:MINGW*:*) -+ exit ;; -+ *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 -- exit 0 ;; --#### MozillaHack --# Netscape's hacked uname -- xx:WINNT:* | xx:WIN95:*) -- echo i586-pc-msvc -- exit 0 ;; --### End MozillaHack -+ exit ;; -+ i*:windows32*:*) -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 -+ exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 -- exit 0 ;; -- x86:Interix*:3*) -- echo i586-pc-interix3 -- exit 0 ;; -+ exit ;; -+ *:Interix*:[3456]*) -+ case ${UNAME_MACHINE} in -+ x86) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ EM64T | authenticamd) -+ echo x86_64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks -- exit 0 ;; -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix -- exit 0 ;; -+ exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin -- exit 0 ;; -+ exit ;; -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) -+ echo x86_64-unknown-cygwin -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin -- exit 0 ;; -+ exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - *:GNU:*:*) -+ # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -- exit 0 ;; -+ exit ;; -+ *:GNU/*:*:*) -+ # other systems with GNU libc and userland -+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -+ exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix -- exit 0 ;; -+ exit ;; - arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ fi -+ exit ;; -+ avr32*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ cris:Linux:*:*) -+ echo cris-axis-linux-gnu -+ exit ;; -+ crisv32:Linux:*:*) -+ echo crisv32-axis-linux-gnu -+ exit ;; -+ frv:Linux:*:*) -+ echo frv-unknown-linux-gnu -+ exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ m32r*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -@@ -839,62 +900,78 @@ EOF - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -+ or32:Linux:*:*) -+ echo or32-unknown-linux-gnu -+ exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -- exit 0 ;; -+ exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac -- exit 0 ;; -+ exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux -- exit 0 ;; -+ exit ;; -+ sh64*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g -@@ -902,99 +979,113 @@ EOF - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit 0 ;; -+ exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit 0 ;; -+ exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit 0 ;; -+ exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else -- #ifdef __INTEL_COMPILER -+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif -+ #ifdef __dietlibc__ -+ LIBC=dietlibc -+ #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^LIBC/{ -+ s: ::g -+ p -+ }'`" -+ test x"${LIBC}" != x && { -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ exit -+ } -+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 -- exit 0 ;; -+ exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx -- exit 0 ;; -+ exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop -- exit 0 ;; -+ exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos -- exit 0 ;; -+ exit ;; -+ i*86:syllable:*:*) -+ echo ${UNAME_MACHINE}-pc-syllable -+ exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi -- exit 0 ;; -- i*86:*:5:[78]*) -+ exit ;; -+ i*86:*:5:[678]*) -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ -@@ -1002,214 +1093,248 @@ EOF - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi -- exit 0 ;; -+ exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 -- exit 0 ;; -+ exit ;; - paragon:*:*:*) - echo i860-intel-osf1 -- exit 0 ;; -+ exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi -- exit 0 ;; -+ exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv -- exit 0 ;; -+ exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv -- exit 0 ;; -+ exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix -- exit 0 ;; -- M68*:*:R3V[567]*:*) -- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) -+ exit ;; -+ M68*:*:R3V[5678]*:*) -+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; -+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4 && exit 0 ;; -+ && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 -- exit 0 ;; -+ exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi -- exit 0 ;; -+ exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 -- exit 0 ;; --#### MozillaHack -- *:*OpenVMS*:*:*) -- case "${UNAME_SYSTEM}" in -- POSIX_for_OpenVMS_AXP) echo alpha-dec-openvmsposix ;; -- POSIX_for_OpenVMS_VAX) echo vax-dec-openvmsposix ;; -- OpenVMS) echo alpha-dec-openvms ;; -- *) echo unknown-dec-openvms ;; -- esac -- exit 0 ;; --#### End MozillaHack -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 -- exit 0 ;; -+ exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 -- exit 0 ;; -+ exit ;; -+ i*86:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo ${UNAME_MACHINE}-stratus-vos -+ exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos -- exit 0 ;; -+ exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 -- exit 0 ;; -+ exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos -- exit 0 ;; -+ exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos -- exit 0 ;; -+ exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos -- exit 0 ;; -+ exit ;; -+ BeMac:Haiku:*:*) -+ echo powerpc-apple-haiku -+ exit ;; -+ BePC:Haiku:*:*) -+ echo i586-pc-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ SX-7:SUPER-UX:*:*) -+ echo sx7-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8:SUPER-UX:*:*) -+ echo sx8-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8R:SUPER-UX:*:*) -+ echo sx8r-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Darwin:*:*) -- case `uname -p` in -- *86) UNAME_PROCESSOR=i686 ;; -- powerpc) UNAME_PROCESSOR=powerpc ;; -+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -+ case $UNAME_PROCESSOR in -+ unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:QNX:*:4*) - echo i386-pc-qnx -- exit 0 ;; -- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) -+ exit ;; -+ NSE-?:NONSTOP_KERNEL:*:*) -+ echo nse-tandem-nsk${UNAME_RELEASE} -+ exit ;; -+ NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux -- exit 0 ;; -+ exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv -- exit 0 ;; -+ exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 -- exit 0 ;; -+ exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 -- exit 0 ;; -+ exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex -- exit 0 ;; -+ exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 -- exit 0 ;; -+ exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 -- exit 0 ;; -+ exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 -- exit 0 ;; -+ exit ;; - *:ITS:*:*) - echo pdp10-unknown-its -- exit 0 ;; -+ exit ;; -+ SEI:*:*:SEIUX) -+ echo mips-sei-seiux${UNAME_RELEASE} -+ exit ;; -+ *:DragonFly:*:*) -+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ exit ;; -+ *:*VMS:*:*) -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ case "${UNAME_MACHINE}" in -+ A*) echo alpha-dec-vms ; exit ;; -+ I*) echo ia64-dec-vms ; exit ;; -+ V*) echo vax-dec-vms ; exit ;; -+ esac ;; -+ *:XENIX:*:SysV) -+ echo i386-pc-xenix -+ exit ;; -+ i*86:skyos:*:*) -+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' -+ exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 - #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - - eval $set_cc_for_build - cat >$dummy.c </dev/null && $dummy && exit 0 -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - - # Apollos put the system type in the environment. - --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } -+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - - # Convex versions that predate uname can use getsysinfo(1) - - if [ -x /usr/convex/getsysinfo ] - then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - c34*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - c38*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - c4*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - esac - fi - - cat >&2 < in order to provide the needed - information to handle your system. - - config.guess timestamp = $timestamp - -Index: mozilla/directory/c-sdk/config/autoconf/config.sub -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/config/autoconf/config.sub,v -retrieving revision 5.0.2.3 -diff -u -8 -p -w -r5.0.2.3 config.sub ---- mozilla/directory/c-sdk/config/autoconf/config.sub 18 Apr 2003 10:20:22 -0000 5.0.2.3 -+++ mozilla/directory/c-sdk/config/autoconf/config.sub 8 Jul 2009 21:50:40 -0000 -@@ -1,14 +1,15 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2008-01-16' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software - # can handle that machine. It does not imply ALL GNU software can. - # - # This file is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2 of the License, or -@@ -16,24 +17,25 @@ timestamp='2003-02-22' - # - # This program is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, --# Boston, MA 02111-1307, USA. -- -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. -+# - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. - # If it is invalid, we print an error message on stderr and exit with code 1. - # Otherwise, we print the canonical config type on stdout and succeed. - -@@ -65,46 +67,46 @@ Operation modes: - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - - Report bugs and patches to ." - - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - - help=" - Try \`$me --help' for more information." - - # Parse command line - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 -- exit 0;; -+ exit ;; - - * ) - break ;; - esac - done - - case $# in - 0) echo "$me: missing argument$help" >&2 -@@ -113,17 +115,19 @@ case $# in - *) echo "$me: too many arguments$help" >&2 - exit 1;; - esac - - # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi -@@ -139,17 +143,17 @@ case $os in - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis) -+ -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) -@@ -164,32 +168,40 @@ case $os in - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) -@@ -219,171 +231,196 @@ case $os in - os=-mint - ;; - esac - - # Decode aliases for certain CPU-COMPANY combinations. - case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. --#### MozillaHack --# mips*el --#### End MozillaHack - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -- | clipper \ -+ | am33_2.0 \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -+ | bfin \ -+ | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | fr30 | frv \ -+ | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ -- | ip2k \ -- | m32r | m68000 | m68k | m88k | mcore \ -- | mips | mipsbe | mipseb | mips*el | mipsle \ -+ | ip2k | iq2000 \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | mcore | mep \ -+ | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -+ | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ -+ | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -+ | mt \ - | msp430 \ -+ | nios | nios2 \ - | ns16k | ns32k \ -- | openrisc | or32 \ -+ | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | score \ -+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ -- | strongarm \ -- | tahoe | thumb | tic80 | tron \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu | strongarm \ -+ | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ -- | x86 | xscale | xstormy16 | xtensa \ -+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. --#### MozillaHack --# mips*el --#### End MozillaHack - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* \ -- | bs2000-* \ -+ | avr-* | avr32-* \ -+ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ -- | clipper-* | cydra-* \ -+ | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ -+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ -- | ip2k-* \ -- | m32r-* \ -+ | ip2k-* | iq2000-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | mcore-* \ -- | mips-* | mipsbe-* | mipseb-* | mips*el-* | mipsle-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* \ -+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -+ | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ -+ | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ -+ | mmix-* \ -+ | mt-* \ - | msp430-* \ -- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ -+ | nios-* | nios2-* \ -+ | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ -+ | sparclite-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ -- | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-*) - ;; -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown -+ ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; -+ abacus) -+ basic_machine=abacus-unknown -+ ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; -+ amd64) -+ basic_machine=x86_64-pc -+ ;; -+ amd64-*) -+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) -@@ -405,16 +442,24 @@ case $basic_machine in - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; -@@ -433,22 +478,37 @@ case $basic_machine in - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; -+ craynv) -+ basic_machine=craynv-cray -+ os=-unicosmp -+ ;; -+ cr16) -+ basic_machine=cr16-unknown -+ os=-elf -+ ;; - crds | unos) - basic_machine=m68k-crds - ;; -+ crisv32 | crisv32-* | etraxfs*) -+ basic_machine=crisv32-axis -+ ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; -+ crx) -+ basic_machine=crx-unknown -+ os=-elf -+ ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec -@@ -461,16 +521,20 @@ case $basic_machine in - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ djgpp) -+ basic_machine=i586-pc -+ os=-msdosdjgpp -+ ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; -@@ -611,66 +675,71 @@ case $basic_machine in - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; --#### MozillaHack -- i386-msvc | msvc) -- basic_machine=i386-pc -- os=-msvc -+ mingw32ce) -+ basic_machine=arm-unknown -+ os=-mingw32ce - ;; --#### End MozillaHack - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; -- mmix*) -- basic_machine=mmix-knuth -- os=-mmixware -- ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; -@@ -729,30 +798,29 @@ case $basic_machine in - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; -- nv1) -- basic_machine=nv1-cray -- os=-unicosmp -- ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; -- or32 | or32-*) -+ openrisc | openrisc-*) - basic_machine=or32-unknown -- os=-coff -+ ;; -+ os400) -+ basic_machine=powerpc-ibm -+ os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k -@@ -760,43 +828,63 @@ case $basic_machine in - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; -- pentiumii | pentium2) -+ pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; -+ pentium4) -+ basic_machine=i786-pc -+ ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -- pentiumii-* | pentium2-*) -+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -+ pentium4-*) -+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` -@@ -819,16 +907,20 @@ case $basic_machine in - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) -@@ -845,23 +937,37 @@ case $basic_machine in - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; -+ sde) -+ basic_machine=mipsisa32-sde -+ os=-elf -+ ;; -+ sei) -+ basic_machine=mips-sei -+ os=-seiux -+ ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; -+ sh5el) -+ basic_machine=sh5le-unknown -+ ;; -+ sh64) -+ basic_machine=sh64-unknown -+ ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; -@@ -926,45 +1032,49 @@ case $basic_machine in - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; -- tic4x | c4x*) -- basic_machine=tic4x-unknown -- os=-coff -- ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; -+ tile*) -+ basic_machine=tile-unknown -+ os=-linux-gnu -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; -+ tpf) -+ basic_machine=s390x-ibm -+ os=-tpf -+ ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; -@@ -998,16 +1108,20 @@ case $basic_machine in - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; -+ xbox) -+ basic_machine=i686-pc -+ os=-mingw32 -+ ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) -@@ -1028,39 +1142,39 @@ case $basic_machine in - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; -+ mmix) -+ basic_machine=mmix-knuth -+ ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparc | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; -@@ -1116,40 +1230,40 @@ case $os in - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. --#### MozillaHack --# msvc --#### End MozillaHack - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ -- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -openbsd* | -solidbsd* \ -+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ -+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ -- | -msvc* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -- | -powermax* | -dnix*) -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os -@@ -1157,34 +1271,40 @@ case $os in - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; -+ -linux-dietlibc) -+ os=-linux-dietlibc -+ ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; -+ -os400*) -+ os=-os400 -+ ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf -@@ -1196,16 +1316,19 @@ case $os in - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; -+ -syllable*) -+ os=-syllable -+ ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova -@@ -1218,16 +1341,19 @@ case $os in - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; -+ -tpf*) -+ os=-tpf -+ ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 -@@ -1254,16 +1380,19 @@ case $os in - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; -+ -zvmoe) -+ os=-zvmoe -+ ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -@@ -1276,25 +1405,34 @@ else - - # Note that if you're going to try to match "-MANUFACTURER" here (say, - # "-sun"), then you have to tell the case statement up towards the top - # that MANUFACTURER isn't an operating system. Otherwise, code above - # will signal an error saying that MANUFACTURER isn't an operating - # system, and we'll never get to this point. - - case $basic_machine in -+ score-*) -+ os=-elf -+ ;; -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) -@@ -1310,16 +1448,19 @@ case $basic_machine in - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; -+ mep-*) -+ os=-elf -+ ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff -@@ -1328,19 +1469,25 @@ case $basic_machine in - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; -+ *-haiku) -+ os=-haiku -+ ;; - *-ibm) - os=-aix - ;; -+ *-knuth) -+ os=-mmixware -+ ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf -@@ -1463,19 +1610,25 @@ case $basic_machine in - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; -+ -os400*) -+ vendor=ibm -+ ;; - -ptx*) - vendor=sequent - ;; -+ -tpf*) -+ vendor=ibm -+ ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi -@@ -1490,16 +1643,16 @@ case $basic_machine in - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; - esac - - echo $basic_machine$os --exit 0 -+exit - - # Local variables: - # eval: (add-hook 'write-file-hooks 'time-stamp) - # time-stamp-start: "timestamp='" - # time-stamp-format: "%:y-%02m-%02d" - # time-stamp-end: "'" - # End: -Index: mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.in,v -retrieving revision 5.0.2.21.4.1 -diff -u -8 -p -w -r5.0.2.21.4.1 Makefile.in ---- mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.in 3 Feb 2006 14:44:42 -0000 5.0.2.21.4.1 -+++ mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.in 8 Jul 2009 21:50:42 -0000 -@@ -232,17 +232,17 @@ ifeq ($(OS_ARCH), Darwin) - EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME) - endif - - ifeq ($(OS_ARCH), OpenVMS) - EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME) $(OS_LIBS) - SHARED_LIBRARY_LIBS = $(dist_libdir)/lib$(LBER_LIBNAME).a - endif - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME) -lbe - endif - - ifeq ($(OS_ARCH), NetBSD) - EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME) - endif - - ifeq ($(OS_ARCH), OpenBSD) -@@ -297,17 +297,17 @@ ltest:: $(LIBLDAP) test.o - $(LIBDIR): - $(MKDIR) $(LIBDIR) - - $(LIBLDAP): $(OBJS) $(LIBDIR) $(LDAP_EXPORT_DEFS) - @echo ======= making $(LIBLDAP) - ifdef SO_FILES_TO_REMOVE - -$(RM) $(SO_FILES_TO_REMOVE) - endif --ifneq (,$(filter AIX Linux HP-UX Darwin BeOS QNX NetBSD OSF1 OpenBSD, $(OS_ARCH))) -+ifneq (,$(filter AIX Linux HP-UX Darwin BeOS Haiku QNX NetBSD OSF1 OpenBSD, $(OS_ARCH))) - $(LINK_LIB) ../liblber/$(OBJDIR_NAME)/*.a - else - ifeq ($(OS_ARCH),OS2) - # create import library for OS/2 - rm -f $@ - $(IMPLIB) $@ $(LDAP_EXPORT_DEFS) - else - $(LINK_LIB) $(EXTRA_LIBS) -@@ -336,15 +336,19 @@ ifeq ($(LD),link) - EXPDEPS2 = $(DLLLDAP) - endif - endif - - export:: $(EXPDEPS2) - ifdef MKSHLIB - $(INSTALL) -m 444 $(LIBLDAP) $(dist_libdir) - $(INSTALL) -m 444 $(DLLLDAP) $(dist_libdir) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) -m 444 $(DLLLDAP) $(dist_bindir)/lib -+else - $(INSTALL) -m 444 $(DLLLDAP) $(dist_bindir) - endif -+endif - ifeq ($(OS_ARCH), WINNT) - $(INSTALL) -m 444 $(LIBLDAP) $(dist_libdir) - $(INSTALL) -m 444 $(DLLLDAP) $(dist_libdir) - endif - $(INSTALL) -m 444 $(ETCFILES) $(ETCDIR) -Index: mozilla/directory/c-sdk/ldap/libraries/libprldap/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/ldap/libraries/libprldap/Makefile.in,v -retrieving revision 5.0.2.18.4.1 -diff -u -8 -p -w -r5.0.2.18.4.1 Makefile.in ---- mozilla/directory/c-sdk/ldap/libraries/libprldap/Makefile.in 3 Feb 2006 14:44:49 -0000 5.0.2.18.4.1 -+++ mozilla/directory/c-sdk/ldap/libraries/libprldap/Makefile.in 8 Jul 2009 21:50:43 -0000 -@@ -160,17 +160,18 @@ EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_L - EXTRA_LIBS += -L$(dist_libdir) $(DYNAMICNSPR) - endif - - ifeq ($(OS_ARCH), OpenVMS) - EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_LIBNAME) - EXTRA_LIBS += -L$(dist_libdir) $(DYNAMICNSPR) - endif - --ifeq ($(OS_ARCH), BeOS) -+ -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_LIBNAME) - EXTRA_LIBS += -L$(dist_libdir) $(DYNAMICNSPR) - endif - - OBJDEST = $(OBJDIR_NAME) - - ########################################################################### - -@@ -250,10 +251,14 @@ ifeq ($(OS_ARCH), WINNT) - $(INSTALL) -m 555 $(LIBPRLDAP) $(dist_libdir) - $(INSTALL) -m 555 $(DLLPRLDAP) $(dist_libdir) - endif - ifeq ($(OS_ARCH),OS2) - $(INSTALL) -m 444 $(LIBPRLDAP) $(dist_libdir) - endif - ifdef MKSHLIB - $(INSTALL) -m 555 $(DLLPRLDAP) $(dist_libdir) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) -m 444 $(DLLPRLDAP) $(dist_bindir)/lib -+else - $(INSTALL) -m 444 $(DLLPRLDAP) $(dist_bindir) - endif -+endif -Index: mozilla/directory/c-sdk/ldap/libraries/libssldap/Makefile -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/ldap/libraries/libssldap/Attic/Makefile,v -retrieving revision 5.0.2.8 -diff -u -8 -p -w -r5.0.2.8 Makefile ---- mozilla/directory/c-sdk/ldap/libraries/libssldap/Makefile 25 Aug 2004 23:02:30 -0000 5.0.2.8 -+++ mozilla/directory/c-sdk/ldap/libraries/libssldap/Makefile 8 Jul 2009 21:50:43 -0000 -@@ -162,17 +162,17 @@ EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_L - ifeq ($(NSS_DYNAMIC_SOFTOKN),1) - EXTRA_LIBS += -l$(SOFTOKN_LIBNAME) - endif - EXTRA_LIBS += -l$(SSL_LIBNAME) -l$(NSS_LIBNAME) - EXTRA_LIBS += $(DYNAMICNSPR) - EXTRA_LIBS += $(OS_LIBS) - endif - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_LIBNAME) -l$(PRLDAP_LIBNAME) - ifeq ($(NSS_DYNAMIC_SOFTOKN),1) - EXTRA_LIBS += -l$(SOFTOKN_LIBNAME) - endif - EXTRA_LIBS += -l$(SSL_LIBNAME) -l$(NSS_LIBNAME) - EXTRA_LIBS += $(DYNAMICNSPR) - EXTRA_LIBS += $(OS_LIBS) - endif -Index: mozilla/directory/c-sdk/ldap/libraries/libssldap/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/ldap/libraries/libssldap/Makefile.in,v -retrieving revision 5.0.2.9.4.1 -diff -u -8 -p -w -r5.0.2.9.4.1 Makefile.in ---- mozilla/directory/c-sdk/ldap/libraries/libssldap/Makefile.in 3 Feb 2006 14:44:49 -0000 5.0.2.9.4.1 -+++ mozilla/directory/c-sdk/ldap/libraries/libssldap/Makefile.in 8 Jul 2009 21:50:44 -0000 -@@ -177,17 +177,17 @@ EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_L - ifeq ($(NSS_DYNAMIC_SOFTOKN),1) - EXTRA_LIBS += -l$(SOFTOKN_LIBNAME) - endif - EXTRA_LIBS += -l$(SSL_LIBNAME) -l$(NSS_LIBNAME) - EXTRA_LIBS += $(DYNAMICNSPR) - EXTRA_LIBS += $(OS_LIBS) - endif - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_LIBNAME) -l$(PRLDAP_LIBNAME) - ifeq ($(NSS_DYNAMIC_SOFTOKN),1) - EXTRA_LIBS += -l$(SOFTOKN_LIBNAME) - endif - EXTRA_LIBS += -l$(SSL_LIBNAME) -l$(NSS_LIBNAME) - EXTRA_LIBS += $(DYNAMICNSPR) - EXTRA_LIBS += $(OS_LIBS) - endif -Index: mozilla/embedding/componentlib/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/embedding/componentlib/Makefile.in,v -retrieving revision 1.3 -diff -u -8 -p -w -r1.3 Makefile.in ---- mozilla/embedding/componentlib/Makefile.in 18 Apr 2004 22:00:41 -0000 1.3 -+++ mozilla/embedding/componentlib/Makefile.in 8 Jul 2009 21:50:58 -0000 -@@ -147,17 +147,17 @@ OS_LIBS := -lstdc++ $(OS_LIBS) - SHLIB_LDENDFILE = -lgcc - - endif # darwin - - ifeq ($(OS_ARCH),WINNT) - OS_LIBS += ole32.lib shell32.lib - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - OS_LIBS += -ltracker - endif - - GARBAGE += $(CPPSRCS) - - ifdef _NO_AUTO_VARS - _TARGET = $(srcdir)/$(@F) - GARBAGE += $(addprefix $(srcdir)/,$(CPPSRCS)) -Index: mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp -=================================================================== -RCS file: /cvsroot/mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp,v -retrieving revision 1.40.12.5 -diff -u -8 -p -w -r1.40.12.5 nsFontMetricsBeOS.cpp ---- mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp 27 Sep 2007 21:36:00 -0000 1.40.12.5 -+++ mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp 8 Jul 2009 21:51:31 -0000 -@@ -123,22 +123,22 @@ NS_IMETHODIMP nsFontMetricsBeOS::Init(co - nsString *fam = param.family.StringAt(i); - PRBool isgeneric = ( param.isgeneric[i] ) ? PR_TRUE: PR_FALSE; - NS_ConvertUTF16toUTF8 family(*fam); - // Fallback - isfixed = family.Equals("monospace") || family.Equals("fixed"); - if (!isgeneric) - { - // non-generic font -- if (count_font_styles((font_family)family.get()) <= 0) -+ if (count_font_styles((char *) family.get()) <= 0) - { - // the specified font does not exist on this computer. - continue; - } -- mFontHandle.SetFamilyAndStyle( (font_family)family.get(), NULL ); -+ mFontHandle.SetFamilyAndStyle( (char *)family.get(), NULL ); - fontfound = PR_TRUE; - break; - } - else - { - // family is generic string like - // "serif" "sans-serif" "cursive" "fantasy" "monospace" "-moz-fixed" - // so look up preferences and get real family name -@@ -153,19 +153,19 @@ NS_IMETHODIMP nsFontMetricsBeOS::Init(co - //NS_WITH_SERVICE( nsIPref, prefs, kPrefCID, &res ); - nsCOMPtr prefs = do_GetService( NS_PREFSERVICE_CONTRACTID, &res ); - if (NS_SUCCEEDED(res)) - { - nsCOMPtr branch; - prefs->GetBranch("font.name.", getter_AddRefs(branch)); - branch->GetCharPref(prop, getter_Copies(real_family)); - -- if (!real_family.IsEmpty() && real_family.Length() <= B_FONT_FAMILY_LENGTH && count_font_styles((font_family)real_family.get()) > 0) -+ if (!real_family.IsEmpty() && real_family.Length() <= B_FONT_FAMILY_LENGTH && count_font_styles((char *)real_family.get()) > 0) - { -- mFontHandle.SetFamilyAndStyle( (font_family)real_family.get(), NULL ); -+ mFontHandle.SetFamilyAndStyle( (char *)real_family.get(), NULL ); - fontfound = PR_TRUE; - break; - } - } - // not successful. use system font. - if (isfixed) - mFontHandle = BFont(be_fixed_font); - else -@@ -409,18 +409,18 @@ NS_IMETHODIMP nsFontMetricsBeOS::GetFon - aHandle = (nsFontHandle)&mFontHandle; - return NS_OK; - } - - nsresult - nsFontMetricsBeOS::FamilyExists(const nsString& aName) - { - NS_ConvertUTF16toUTF8 family(aName); -- printf("exists? %s", (font_family)family.get()); -- return (count_font_styles((font_family)family.get()) > 0) ? NS_OK : NS_ERROR_FAILURE; -+ printf("exists? %s", (char *)family.get()); -+ return (count_font_styles((char *)family.get()) > 0) ? NS_OK : NS_ERROR_FAILURE; - } - - // useful UTF-8 utility - inline uint32 utf8_char_len(uchar byte) - { - return (((0xE5000000 >> ((byte >> 3) & 0x1E)) & 3) + 1); - } - -Index: mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp -=================================================================== -RCS file: /cvsroot/mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp,v -retrieving revision 1.51.12.8 -diff -u -8 -p -w -r1.51.12.8 nsRenderingContextBeOS.cpp ---- mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp 18 Dec 2007 07:17:21 -0000 1.51.12.8 -+++ mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp 8 Jul 2009 21:51:35 -0000 -@@ -346,18 +346,21 @@ bool nsRenderingContextBeOS::LockAndUpda - - // Intelligent lock - if (mSurface->LockDrawable()) - { - // if BFont wasn't set already - if (mCurrentBFont == nsnull) - { - if (mFontMetrics) -- mFontMetrics->GetFontHandle((nsFontHandle)mCurrentBFont); -- -+ { -+ nsFontHandle fontHandle; -+ mFontMetrics->GetFontHandle(fontHandle); -+ mCurrentBFont = (BFont *) fontHandle; -+ } - if (mCurrentBFont) - mView->SetFont(mCurrentBFont); - else - mView->SetFont(be_plain_font); // fallback - only for single call - } - - if (mClipRegion) - { -@@ -1122,17 +1125,17 @@ NS_IMETHODIMP nsRenderingContextBeOS::Ge - // and call (UTF-8) char* version of the method. - // It works well with current nsFontMetricsBeOS which is, again, simpler in comparison with - // other platforms, partly due to UTF-8 nature of BeOS, partly due unimplemented font fallbacks - // and other tricks. - - NS_IMETHODIMP nsRenderingContextBeOS::GetTextDimensions(const PRUnichar* aString, - PRInt32 aLength, PRInt32 aAvailWidth, PRInt32* aBreaks, PRInt32 aNumBreaks, - nsTextDimensions& aDimensions, PRInt32& aNumCharsFit, nsTextDimensions& aLastWordDimensions, -- PRInt32* aFontID = nsnull) -+ PRInt32* aFontID) - { - nsresult ret_code = NS_ERROR_FAILURE; - uint8 utf8buf[1024]; - uint8* utf8str = nsnull; - // max UTF-8 string length - PRUint32 slength = aLength * 4 + 1; - // Allocating char* array rather from stack than from heap for speed. - // 1024 char array forms e.g. 256 == 32*8 frame for CJK glyphs, which may be -@@ -1155,17 +1158,17 @@ NS_IMETHODIMP nsRenderingContextBeOS::Ge - // deallocating if got from heap - if (utf8str != utf8buf) - delete [] utf8str; - return ret_code; - } - - NS_IMETHODIMP nsRenderingContextBeOS::GetTextDimensions(const char* aString, PRInt32 aLength, - PRInt32 aAvailWidth,PRInt32* aBreaks, PRInt32 aNumBreaks, nsTextDimensions& aDimensions, -- PRInt32& aNumCharsFit, nsTextDimensions& aLastWordDimensions, PRInt32* aFontID = nsnull) -+ PRInt32& aNumCharsFit, nsTextDimensions& aLastWordDimensions, PRInt32* aFontID) - { - // Code is borrowed from win32 implementation including comments. - // Minor changes are introduced due multibyte/utf-8 nature of char* strings handling in BeOS. - char * utf8ptr = (char *)aString; - PRInt32 *utf8pos =0; - PRInt32 num_of_glyphs = 0; // Number of glyphs isn't equal to number of bytes in case of UTF-8 - PRInt32 utf8posbuf[1025]; - if (aLength < 1025) -Index: mozilla/intl/uconv/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/intl/uconv/src/Makefile.in,v -retrieving revision 1.82.4.2 -diff -u -8 -p -w -r1.82.4.2 Makefile.in ---- mozilla/intl/uconv/src/Makefile.in 29 Jan 2006 16:51:01 -0000 1.82.4.2 -+++ mozilla/intl/uconv/src/Makefile.in 8 Jul 2009 21:51:42 -0000 -@@ -114,17 +114,17 @@ else - ifeq ($(MOZ_WIDGET_TOOLKIT),windows) - CPPSRCS += nsWinCharset.cpp - EXPORT_RESOURCE += wincharset.properties - else - ifneq (,$(filter cocoa mac, $(MOZ_WIDGET_TOOLKIT))) - CPPSRCS += nsMacCharset.cpp - EXPORT_RESOURCE += maccharset.properties - else --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CPPSRCS += nsBeOSCharset.cpp - else - CPPSRCS += nsUNIXCharset.cpp - EXPORT_RESOURCE += unixcharset.properties - # add platform charset remapping properties files here if necessary - # (see unixcharset.sample.properties for an example file) - # eg: if we needed a charset remap for OSARCH=Linux then add the following line: - #EXPORT_RESOURCE += unixcharset.Linux.properties -Index: mozilla/ipc/ipcd/client/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/ipc/ipcd/client/src/Makefile.in,v -retrieving revision 1.7 -diff -u -8 -p -w -r1.7 Makefile.in ---- mozilla/ipc/ipcd/client/src/Makefile.in 9 Dec 2004 19:28:19 -0000 1.7 -+++ mozilla/ipc/ipcd/client/src/Makefile.in 8 Jul 2009 21:51:48 -0000 -@@ -59,17 +59,18 @@ CPPSRCS = \ - ipcdclient.cpp \ - ipcService.cpp \ - ipcModuleFactory.cpp \ - $(NULL) - - ifeq ($(OS_ARCH),WINNT) - CPPSRCS += ipcConnectionWin.cpp - else --ifeq ($(OS_ARCH),BeOS) -+ -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CPPSRCS += ipcConnectionStub.cpp - else - CPPSRCS += ipcConnectionUnix.cpp - endif - endif - - LOCAL_INCLUDES = \ - -I$(srcdir)/../../shared/src \ -Index: mozilla/ipc/ipcd/daemon/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/ipc/ipcd/daemon/src/Makefile.in,v -retrieving revision 1.3 -diff -u -8 -p -w -r1.3 Makefile.in ---- mozilla/ipc/ipcd/daemon/src/Makefile.in 28 Jan 2004 21:31:46 -0000 1.3 -+++ mozilla/ipc/ipcd/daemon/src/Makefile.in 8 Jul 2009 21:51:49 -0000 -@@ -54,17 +54,18 @@ CPPSRCS = \ - ipcd.cpp \ - ipcClient.cpp \ - ipcModuleReg.cpp \ - ipcCommandModule.cpp - - ifeq ($(OS_ARCH),WINNT) - CPPSRCS += ipcdWin.cpp - else --ifeq ($(OS_ARCH),BeOS) -+ -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CPPSRCS += ipcdStub.cpp - else - CPPSRCS += ipcdUnix.cpp - endif - endif - - PROGRAM = mozilla-ipcd$(BIN_SUFFIX) - -Index: mozilla/js/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/js/src/Makefile.in,v -retrieving revision 3.95.4.5 -diff -u -8 -p -w -r3.95.4.5 Makefile.in ---- mozilla/js/src/Makefile.in 27 Jul 2006 22:56:20 -0000 3.95.4.5 -+++ mozilla/js/src/Makefile.in 8 Jul 2009 21:51:51 -0000 -@@ -241,17 +241,17 @@ ifneq ($(findstring -L,$(NSPR_LIBS)),) - NSPR_STATIC_PATH = $(subst -L,,$(findstring -L,$(NSPR_LIBS))) - else - NSPR_STATIC_PATH = $(DIST)/lib - endif - - LDFLAGS += $(pathsubst -l%,$(NSPR_STATIC_PATH)/%.a,$(NSPR_LIBS)) - - # BeOS and HP-UX do not require the extra linking of "-lm" --ifeq (,$(filter BeOS HP-UX WINNT WINCE OpenVMS,$(OS_ARCH))) -+ifeq (,$(filter BeOS Haiku HP-UX WINNT WINCE OpenVMS,$(OS_ARCH))) - LDFLAGS += -lm - endif - - # Prevent floating point errors caused by VC++ optimizations - ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_) - ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER))) - CFLAGS += -Op - else -Index: mozilla/mail/app/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/mail/app/Makefile.in,v -retrieving revision 1.46.2.10 -diff -u -8 -p -w -r1.46.2.10 Makefile.in ---- mozilla/mail/app/Makefile.in 22 Oct 2008 21:04:53 -0000 1.46.2.10 -+++ mozilla/mail/app/Makefile.in 8 Jul 2009 21:52:18 -0000 -@@ -57,18 +57,22 @@ PREF_JS_EXPORTS = \ - - ifndef MOZ_BRANDING_DIRECTORY - PREF_JS_EXPORTS += $(srcdir)/thunderbird-branding.js - endif - - ifeq ($(USE_SHORT_LIBNAME), 1) - PROGRAM = thunderbird$(BIN_SUFFIX) - else -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+PROGRAM = BeZillaMailNews$(BIN_SUFFIX) -+else - PROGRAM = thunderbird-bin$(BIN_SUFFIX) - endif -+endif - - REQUIRES = \ - xpcom \ - $(NULL) - - LOCAL_INCLUDES = -I$(topsrcdir)/toolkit/xre - - CPPSRCS = nsMailApp.cpp -@@ -142,17 +146,20 @@ RCFLAGS += -DMOZ_THUNDERBIRD -I$(srcdir) - else - RCFLAGS += -DMOZ_THUNDERBIRD --include-dir $(srcdir) - endif - ifdef BUILD_STATIC_LIBS - RCFLAGS += -DMOZ_STATIC_BUILD - endif - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ifeq ($(OS_ARCH),Haiku) -+BEOS_PROGRAM_RDEF = $(srcdir)/apprunner-beos.rdef -+endif - BEOS_PROGRAM_RESOURCE = $(srcdir)/apprunner-beos.rsrc - ifdef BUILD_STATIC_LIBS - OS_LIBS += -ltracker -lgame - endif - endif - - ifeq ($(OS_ARCH),OS2) - RESFILE=splashos2.res -@@ -257,17 +264,17 @@ ifneq (,$(filter gtk gtk2,$(MOZ_WIDGET_T - cp $(srcdir)/mozicon16.xpm $(DIST)/branding/mozicon16.xpm - cp $(srcdir)/mozicon50.xpm $(DIST)/branding/mozicon50.xpm - endif - ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) - cp $(srcdir)/default.xpm $(DIST)/branding/default.xpm - endif - endif - --ifneq (,$(filter-out OS2 WINNT Darwin,$(OS_ARCH))) -+ifneq (,$(filter-out OS2 WINNT Darwin BeOS Haiku,$(OS_ARCH))) - thunderbird:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk - cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \ - -e "s|%MOZ_USER_DIR%|.thunderbird|" \ - -e "s|%MREDIR%|$(mredir)|" \ - -e "s|%MOZ_APP_DISPLAYNAME%|$(MOZ_APP_DISPLAYNAME)|" > $@ - chmod +x $@ - - libs:: thunderbird -Index: mozilla/modules/libpr0n/decoders/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/modules/libpr0n/decoders/Makefile.in,v -retrieving revision 1.13.18.2 -diff -u -8 -p -w -r1.13.18.2 Makefile.in ---- mozilla/modules/libpr0n/decoders/Makefile.in 17 Feb 2006 19:03:47 -0000 1.13.18.2 -+++ mozilla/modules/libpr0n/decoders/Makefile.in 8 Jul 2009 21:52:37 -0000 -@@ -47,17 +47,17 @@ ifdef MOZ_ENABLE_GNOMEUI - TOOL_DIRS = icon/gtk icon - endif - ifneq (,$(filter WINCE WINNT,$(OS_ARCH))) - DIRS = icon/win icon - endif - ifeq ($(OS_ARCH),OS2) - DIRS = icon/os2 icon - endif --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - DIRS = icon/beos icon - endif - ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) - DIRS = icon/mac icon - endif - endif # icon - - DIRS += $(filter-out icon,$(MOZ_IMG_DECODERS)) -Index: mozilla/modules/libpr0n/decoders/icon/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/modules/libpr0n/decoders/icon/Makefile.in,v -retrieving revision 1.17.8.6 -diff -u -8 -p -w -r1.17.8.6 Makefile.in ---- mozilla/modules/libpr0n/decoders/icon/Makefile.in 30 May 2006 15:46:21 -0000 1.17.8.6 -+++ mozilla/modules/libpr0n/decoders/icon/Makefile.in 8 Jul 2009 21:52:37 -0000 -@@ -77,17 +77,17 @@ endif - ifeq ($(OS_ARCH),OS2) - PLATFORM = os2 - endif - - ifeq ($(OS_ARCH),Darwin) - PLATFORM = mac - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - PLATFORM = beos - endif - - REQUIRES = xpcom \ - string \ - gfx \ - imglib2 \ - necko \ -@@ -97,17 +97,17 @@ CPPSRCS = \ - nsIconURI.cpp \ - nsIconModule.cpp \ - nsIconProtocolHandler.cpp \ - $(NULL) - - ifdef MOZ_ENABLE_GNOMEUI - USE_ICON_DECODER = 1 - endif --ifeq (,$(filter-out Darwin OS2 BeOS,$(OS_ARCH))) -+ifeq (,$(filter-out Darwin OS2 BeOS Haiku,$(OS_ARCH))) - USE_ICON_DECODER = 1 - endif - - ifdef USE_ICON_DECODER - CPPSRCS += nsIconDecoder.cpp - DEFINES += -DUSE_ICON_DECODER - endif - -Index: mozilla/modules/libreg/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/modules/libreg/src/Makefile.in,v -retrieving revision 1.39 -diff -u -8 -p -w -r1.39 Makefile.in ---- mozilla/modules/libreg/src/Makefile.in 18 Apr 2004 22:00:45 -0000 1.39 -+++ mozilla/modules/libreg/src/Makefile.in 8 Jul 2009 21:52:38 -0000 -@@ -61,17 +61,17 @@ FORCE_STATIC_LIB = 1 - - # Force use of PIC - FORCE_USE_PIC = 1 - - include $(topsrcdir)/config/config.mk - - DEFINES += -DUSE_BUFFERED_REGISTRY_IO - # Memory mapped files are not supported under QNX, Neutrino, HP-UX and BeOS --#ifeq (,$(filter BeOS HP-UX QNX,$(OS_ARCH))) -+#ifeq (,$(filter BeOS Haiku HP-UX QNX,$(OS_ARCH))) - #CSRCS += mmapio.c - #DEFINES += -DUSE_MMAP_REGISTRY_IO - #endif - - include $(topsrcdir)/config/rules.mk - - R_%.o: %.c - $(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) -DSTANDALONE_REGISTRY $< -Index: mozilla/modules/plugin/base/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/modules/plugin/base/src/Makefile.in,v -retrieving revision 1.104 -diff -u -8 -p -w -r1.104 Makefile.in ---- mozilla/modules/plugin/base/src/Makefile.in 8 Jun 2005 16:48:43 -0000 1.104 -+++ mozilla/modules/plugin/base/src/Makefile.in 8 Jul 2009 21:52:43 -0000 -@@ -91,17 +91,17 @@ CPPSRCS = \ - ns4xPluginInstance.cpp \ - nsPluginHostImpl.cpp \ - nsPluginModule.cpp \ - nsPluginInstancePeer.cpp \ - nsPluginDirServiceProvider.cpp \ - nsJSNPRuntime.cpp \ - $(NULL) - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CPPSRCS += nsPluginsDirBeOS.cpp - CPPSRCS += nsPluginNativeWindow.cpp - else - ifneq (,$(filter WINNT WINCE,$(OS_ARCH))) - CPPSRCS += nsPluginsDirWin.cpp - CPPSRCS += nsPluginNativeWindowWin.cpp - else - ifeq ($(MOZ_WIDGET_TOOLKIT),os2) -Index: mozilla/nsprpub/configure.in -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/configure.in,v -retrieving revision 1.199.2.17 -diff -u -8 -p -w -r1.199.2.17 configure.in ---- mozilla/nsprpub/configure.in 31 Oct 2007 18:07:38 -0000 1.199.2.17 -+++ mozilla/nsprpub/configure.in 8 Jul 2009 21:52:54 -0000 -@@ -358,17 +358,17 @@ if test -z "$SKIP_PATH_CHECKS"; then - AC_PATH_PROG(WHOAMI, $WHOAMI whoami, echo not_whoami) - fi - - if test -n "$MOZ_DEBUG"; then - AC_DEFINE(DEBUG) - DEFINES="$DEFINES -UNDEBUG" - - case "${target_os}" in -- beos*) -+ beos*|haiku*) - DEFINES="$DEFINES -DDEBUG_${USER}" - ;; - msvc*|mks*|cygwin*|mingw*|os2*) - DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`" - ;; - *) - DEFINES="$DEFINES -DDEBUG_`$WHOAMI`" - ;; -@@ -787,17 +787,17 @@ case "$host" in - NSINSTALL=nsinstall - ;; - *-cygwin*|*-msvc*|*-mks*) - NSINSTALL='$(CYGWIN_WRAPPER) nsinstall' - if test `echo "${PATH}" | grep -c \;` = 0; then - CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper' - fi - ;; --*-beos*) -+*-beos*|*-haiku*) - HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE" - ;; - *os2*) - ;; - *) - HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" - ;; - esac -@@ -862,34 +862,50 @@ case "$target" in - OBJECT_MODE=64 - else - MDCPUCFG_H=_aix32.cfg - fi - PR_MD_CSRCS=aix.c - RESOLVE_LINK_SYMBOLS=1 - ;; - --*-beos*) -+*-beos*|*-haiku*) - AC_DEFINE(XP_BEOS) - AC_DEFINE(BeOS) - AC_DEFINE(BEOS) - AC_DEFINE(_POSIX_SOURCE) -- DSO_LDOPTS=-nostart -+ DSO_CFLAGS=-fPIC -+ DSO_LDOPTS='-nostart' -+ - MDCPUCFG_H=_beos.cfg - USE_BTHREADS=1 - PR_MD_ARCH_DIR=beos - RESOLVE_LINK_SYMBOLS=1 -+ -+ _HAIKU_BUILD=0 -+ AC_CHECK_LIB(network,main,_HAIKU_BUILD=1) -+ if test "$_HAIKU_BUILD" = 1; then -+ OS_LIBS="$OS_LIBS -lnetwork" -+ AC_DEFINE(XP_HAIKU) -+ AC_DEFINE(BONE_VERSION) -+ else -+ AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"]) -+ fi -+ - case "${target_cpu}" in - i*86) -- _OPTIMIZE_FLAGS=-O2 -- _DEBUG_FLAGS='-gdwarf-2 -O0' -+ AC_DEFINE(i586) -+ CPU_ARCH=i586 -+ _OPTIMIZE_FLAGS=-O3 -+ _DEBUG_FLAGS='-gdwarf-2 -O0 -fno-inline' - MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@' -- AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"]) - ;; - powerpc) -+ AC_DEFINE(ppc) -+ CPU_ARCH=ppc - CC=mwcc - CCC=mwcc - LD=mwld - DSO_LDOPTS='-xms -export pragma -init _init_routine_ -term _term_routine_ -lroot -lnet /boot/develop/lib/ppc/glue-noinit.a /boot/develop/lib/ppc/init_term_dyn.o /boot/develop/lib/ppc/start_dyn.o' - _OPTIMIZE_FLAGS=-O2 - _DEBUG_FLAGS='-g -O0' - ;; - esac -@@ -2164,16 +2180,18 @@ dnl AC_CHECK_LIB(vms_jackets, main) - - - dnl We don't want anything to link with libdl even if it's present on OS X, - dnl since it's not used and not part of the default installation. - - case $target in - *-darwin*) - ;; -+*-beos*|*-haiku*) -+ ;; - *) - AC_CHECK_LIB(dl, dlopen, - AC_CHECK_HEADER(dlfcn.h, - OS_LIBS="-ldl $OS_LIBS")) - ;; - esac - - -@@ -2352,17 +2370,17 @@ AC_ARG_ENABLE(nspr-threads, - [ --enable-nspr-threads Build using classic nspr threads], - [ if test "$enableval" = "yes"; then - USE_PTHREADS= - USE_USER_PTHREADS= - USE_NSPR_THREADS=1 - fi]) - - case "$target" in --*-beos*) -+*-beos*|*-haiku*) - AC_ARG_WITH(bthreads, - [ --with-bthreads Use system bthreads library as thread subsystem - (BeOS only)], - [ if test "$withval" = "yes"; then - USE_BTHREADS=1 - USE_USER_PTHREADS= - USE_PTHREADS= - fi]) -Index: mozilla/nsprpub/build/autoconf/config.guess -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/build/autoconf/config.guess,v -retrieving revision 1.15 -diff -u -8 -p -w -r1.15 config.guess ---- mozilla/nsprpub/build/autoconf/config.guess 18 Apr 2003 19:20:18 -0000 1.15 -+++ mozilla/nsprpub/build/autoconf/config.guess 8 Jul 2009 21:52:57 -0000 -@@ -1,34 +1,37 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2008-01-08' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2 of the License, or - # (at your option) any later version. - # - # This program is distributed in the hope that it will be useful, but - # WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - # General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Originally written by Per Bothner . - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. - # - # This script attempts to guess a canonical system name similar to - # config.sub. If it succeeds, it prints the system name on stdout, and - # exits with 0. Otherwise, it exits with 1. - # -@@ -48,34 +51,34 @@ Operation modes: - -v, --version print version number, then exit - - Report bugs and patches to ." - - version="\ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - - help=" - Try \`$me --help' for more information." - - # Parse command line - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) -@@ -99,35 +102,36 @@ trap 'exit 1' 1 2 15 - # use `HOST_CC' if defined, but it is deprecated. - - # Portable tmp directory creation inspired by the Autoconf team. - - set_cc_for_build=' - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; -- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || -+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; - dummy=$tmp/dummy ; - tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; - case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; --esac ;' -+esac ; set_cc_for_build= ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. - # (ghazi@noc.rutgers.edu 1994-08-24) - if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH - fi - - UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -@@ -152,16 +156,17 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; -+ sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -@@ -190,60 +195,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" -- exit 0 ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- arc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- macppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvmeppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- pmax:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sgi:OpenBSD:*:*) -- echo mipseb-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- wgrisc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -+ exit ;; -+ *:ekkoBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -+ exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; -+ macppc:MirBSD:*:*) -+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; -+ *:MirBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; - alpha:OSF1:*:*) -- if test $UNAME_RELEASE = "V4.0"; then -+ case $UNAME_RELEASE in -+ *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` -- fi -+ ;; -+ *5.*) -+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -+ ;; -+ esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; -@@ -271,147 +258,163 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac -+ # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. -- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit 0 ;; -+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -+ exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix -- exit 0 ;; -+ exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 -- exit 0 ;; -+ exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 -- exit 0;; -+ exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos -- exit 0 ;; -+ exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos -- exit 0 ;; -+ exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition -- exit 0 ;; -+ exit ;; -+ *:z/VM:*:*) -+ echo s390-ibm-zvmoe -+ exit ;; -+ *:OS400:*:*) -+ echo powerpc-ibm-os400 -+ exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} -- exit 0;; -+ exit ;; -+ arm:riscos:*:*|arm:RISCOS:*:*) -+ echo arm-unknown-riscos -+ exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp -- exit 0;; -+ exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi -- exit 0 ;; -+ exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 -- exit 0 ;; -- DRS?6000:UNIX_SV:4.2*:7*) -+ exit ;; -+ DRS?6000:unix:4.0:6*) -+ echo sparc-icl-nx6 -+ exit ;; -+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in -- sparc) echo sparc-icl-nx7 && exit 0 ;; -+ sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -- i86pc:SunOS:5.*:*) -+ exit ;; -+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` -- exit 0 ;; -+ exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac -- exit 0 ;; -+ exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ m68k:machten:*:*) -+ echo m68k-apple-machten${UNAME_RELEASE} -+ exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 -- exit 0 ;; -+ exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __cplusplus - #include /* for printf() prototype */ - int main (int argc, char *argv[]) { - #else - int main (argc, argv) int argc; char *argv[]; { -@@ -425,145 +428,150 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c \ -- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && -+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && -+ SYSTEM_NAME=`$dummy $dummyarg` && -+ { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax -- exit 0 ;; -+ exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix -- exit 0 ;; -+ exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 -- exit 0 ;; -+ exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 -- exit 0 ;; -+ exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 -- exit 0 ;; -+ exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 -- exit 0 ;; -+ exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd -- exit 0 ;; -+ exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` -- exit 0 ;; -+ exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix -- exit 0 ;; -+ exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` -+ then -+ echo "$SYSTEM_NAME" -+ else - echo rs6000-ibm-aix3.2.5 -+ fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi -- exit 0 ;; -- *:AIX:*:[45]) -+ exit ;; -+ *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix -- exit 0 ;; -+ exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 -- exit 0 ;; -+ exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to -- exit 0 ;; # report: romp-ibm BSD 4.3 -+ exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx -- exit 0 ;; -+ exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 -- exit 0 ;; -+ exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd -- exit 0 ;; -+ exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 -- exit 0 ;; -+ exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` -@@ -615,31 +623,41 @@ EOF - } - EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then -- # avoid double evaluation of $set_cc_for_build -- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build -- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null -+ eval $set_cc_for_build -+ -+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating -+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler -+ # generating 64-bit code. GNU and HP use different nomenclature: -+ # -+ # $ CC_FOR_BUILD=cc ./config.guess -+ # => hppa2.0w-hp-hpux11.23 -+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess -+ # => hppa64-hp-hpux11.23 -+ -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); -@@ -657,181 +675,224 @@ EOF - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 -- exit 0 ;; -+ exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd -- exit 0 ;; -+ exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd -- exit 0 ;; -+ exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix -- exit 0 ;; -+ exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf -- exit 0 ;; -+ exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf -- exit 0 ;; -+ exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi -- exit 0 ;; -+ exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites -- exit 0 ;; -+ exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - *:UNICOS/mp:*:*) -- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; -+ 5000:UNIX_System_V:4.*:*) -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:FreeBSD:*:*) -- # Determine whether the default compiler uses glibc. -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #if __GLIBC__ >= 2 -- LIBC=gnu -- #else -- LIBC= -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} -- exit 0 ;; -+ case ${UNAME_MACHINE} in -+ pc98) -+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ esac -+ exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -- exit 0 ;; -- i*:MINGW*:*) -+ exit ;; -+ *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 -- exit 0 ;; --#### MozillaHack --# Netscape's hacked uname -- xx:WINNT:* | xx:WIN95:*) -- echo i586-pc-msvc -- exit 0 ;; --### End MozillaHack -+ exit ;; -+ i*:windows32*:*) -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 -+ exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 -- exit 0 ;; -- x86:Interix*:3*) -- echo i586-pc-interix3 -- exit 0 ;; -+ exit ;; -+ *:Interix*:[3456]*) -+ case ${UNAME_MACHINE} in -+ x86) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ EM64T | authenticamd) -+ echo x86_64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks -- exit 0 ;; -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix -- exit 0 ;; -+ exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin -- exit 0 ;; -+ exit ;; -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) -+ echo x86_64-unknown-cygwin -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin -- exit 0 ;; -+ exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - *:GNU:*:*) -+ # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -- exit 0 ;; -+ exit ;; -+ *:GNU/*:*:*) -+ # other systems with GNU libc and userland -+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -+ exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix -- exit 0 ;; -+ exit ;; - arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ fi -+ exit ;; -+ avr32*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ cris:Linux:*:*) -+ echo cris-axis-linux-gnu -+ exit ;; -+ crisv32:Linux:*:*) -+ echo crisv32-axis-linux-gnu -+ exit ;; -+ frv:Linux:*:*) -+ echo frv-unknown-linux-gnu -+ exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ m32r*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -@@ -839,62 +900,78 @@ EOF - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -+ or32:Linux:*:*) -+ echo or32-unknown-linux-gnu -+ exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -- exit 0 ;; -+ exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac -- exit 0 ;; -+ exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux -- exit 0 ;; -+ exit ;; -+ sh64*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g -@@ -902,99 +979,113 @@ EOF - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit 0 ;; -+ exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit 0 ;; -+ exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit 0 ;; -+ exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else -- #ifdef __INTEL_COMPILER -+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif -+ #ifdef __dietlibc__ -+ LIBC=dietlibc -+ #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^LIBC/{ -+ s: ::g -+ p -+ }'`" -+ test x"${LIBC}" != x && { -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ exit -+ } -+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 -- exit 0 ;; -+ exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx -- exit 0 ;; -+ exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop -- exit 0 ;; -+ exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos -- exit 0 ;; -+ exit ;; -+ i*86:syllable:*:*) -+ echo ${UNAME_MACHINE}-pc-syllable -+ exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi -- exit 0 ;; -- i*86:*:5:[78]*) -+ exit ;; -+ i*86:*:5:[678]*) -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ -@@ -1002,214 +1093,248 @@ EOF - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi -- exit 0 ;; -+ exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 -- exit 0 ;; -+ exit ;; - paragon:*:*:*) - echo i860-intel-osf1 -- exit 0 ;; -+ exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi -- exit 0 ;; -+ exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv -- exit 0 ;; -+ exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv -- exit 0 ;; -+ exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix -- exit 0 ;; -- M68*:*:R3V[567]*:*) -- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) -+ exit ;; -+ M68*:*:R3V[5678]*:*) -+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; -+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4 && exit 0 ;; -+ && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 -- exit 0 ;; -+ exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi -- exit 0 ;; -+ exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 -- exit 0 ;; --#### MozillaHack -- *:*OpenVMS*:*:*) -- case "${UNAME_SYSTEM}" in -- POSIX_for_OpenVMS_AXP) echo alpha-dec-openvmsposix ;; -- POSIX_for_OpenVMS_VAX) echo vax-dec-openvmsposix ;; -- OpenVMS) echo alpha-dec-openvms ;; -- *) echo unknown-dec-openvms ;; -- esac -- exit 0 ;; --#### End MozillaHack -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 -- exit 0 ;; -+ exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 -- exit 0 ;; -+ exit ;; -+ i*86:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo ${UNAME_MACHINE}-stratus-vos -+ exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos -- exit 0 ;; -+ exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 -- exit 0 ;; -+ exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos -- exit 0 ;; -+ exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos -- exit 0 ;; -+ exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos -- exit 0 ;; -+ exit ;; -+ BeMac:Haiku:*:*) -+ echo powerpc-apple-haiku -+ exit ;; -+ BePC:Haiku:*:*) -+ echo i586-pc-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ SX-7:SUPER-UX:*:*) -+ echo sx7-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8:SUPER-UX:*:*) -+ echo sx8-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8R:SUPER-UX:*:*) -+ echo sx8r-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Darwin:*:*) -- case `uname -p` in -- *86) UNAME_PROCESSOR=i686 ;; -- powerpc) UNAME_PROCESSOR=powerpc ;; -+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -+ case $UNAME_PROCESSOR in -+ unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:QNX:*:4*) - echo i386-pc-qnx -- exit 0 ;; -- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) -+ exit ;; -+ NSE-?:NONSTOP_KERNEL:*:*) -+ echo nse-tandem-nsk${UNAME_RELEASE} -+ exit ;; -+ NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux -- exit 0 ;; -+ exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv -- exit 0 ;; -+ exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 -- exit 0 ;; -+ exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 -- exit 0 ;; -+ exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex -- exit 0 ;; -+ exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 -- exit 0 ;; -+ exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 -- exit 0 ;; -+ exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 -- exit 0 ;; -+ exit ;; - *:ITS:*:*) - echo pdp10-unknown-its -- exit 0 ;; -+ exit ;; -+ SEI:*:*:SEIUX) -+ echo mips-sei-seiux${UNAME_RELEASE} -+ exit ;; -+ *:DragonFly:*:*) -+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ exit ;; -+ *:*VMS:*:*) -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ case "${UNAME_MACHINE}" in -+ A*) echo alpha-dec-vms ; exit ;; -+ I*) echo ia64-dec-vms ; exit ;; -+ V*) echo vax-dec-vms ; exit ;; -+ esac ;; -+ *:XENIX:*:SysV) -+ echo i386-pc-xenix -+ exit ;; -+ i*86:skyos:*:*) -+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' -+ exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 - #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - - eval $set_cc_for_build - cat >$dummy.c </dev/null && $dummy && exit 0 -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - - # Apollos put the system type in the environment. - --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } -+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - - # Convex versions that predate uname can use getsysinfo(1) - - if [ -x /usr/convex/getsysinfo ] - then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - c34*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - c38*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - c4*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - esac - fi - - cat >&2 < in order to provide the needed - information to handle your system. - - config.guess timestamp = $timestamp - -Index: mozilla/nsprpub/build/autoconf/config.sub -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/build/autoconf/config.sub,v -retrieving revision 1.16 -diff -u -8 -p -w -r1.16 config.sub ---- mozilla/nsprpub/build/autoconf/config.sub 18 Apr 2003 19:20:18 -0000 1.16 -+++ mozilla/nsprpub/build/autoconf/config.sub 8 Jul 2009 21:52:59 -0000 -@@ -1,14 +1,15 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2008-01-16' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software - # can handle that machine. It does not imply ALL GNU software can. - # - # This file is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2 of the License, or -@@ -16,24 +17,25 @@ timestamp='2003-02-22' - # - # This program is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, --# Boston, MA 02111-1307, USA. -- -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. -+# - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. - # If it is invalid, we print an error message on stderr and exit with code 1. - # Otherwise, we print the canonical config type on stdout and succeed. - -@@ -65,46 +67,46 @@ Operation modes: - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - - Report bugs and patches to ." - - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - - help=" - Try \`$me --help' for more information." - - # Parse command line - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 -- exit 0;; -+ exit ;; - - * ) - break ;; - esac - done - - case $# in - 0) echo "$me: missing argument$help" >&2 -@@ -113,17 +115,19 @@ case $# in - *) echo "$me: too many arguments$help" >&2 - exit 1;; - esac - - # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi -@@ -139,17 +143,17 @@ case $os in - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis) -+ -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) -@@ -164,32 +168,40 @@ case $os in - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) -@@ -219,171 +231,196 @@ case $os in - os=-mint - ;; - esac - - # Decode aliases for certain CPU-COMPANY combinations. - case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. --#### MozillaHack --# mips*el --#### End MozillaHack - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -- | clipper \ -+ | am33_2.0 \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -+ | bfin \ -+ | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | fr30 | frv \ -+ | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ -- | ip2k \ -- | m32r | m68000 | m68k | m88k | mcore \ -- | mips | mipsbe | mipseb | mips*el | mipsle \ -+ | ip2k | iq2000 \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | mcore | mep \ -+ | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -+ | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ -+ | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -+ | mt \ - | msp430 \ -+ | nios | nios2 \ - | ns16k | ns32k \ -- | openrisc | or32 \ -+ | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | score \ -+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ -- | strongarm \ -- | tahoe | thumb | tic80 | tron \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu | strongarm \ -+ | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ -- | x86 | xscale | xstormy16 | xtensa \ -+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. --#### MozillaHack --# mips*el --#### End MozillaHack - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* \ -- | bs2000-* \ -+ | avr-* | avr32-* \ -+ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ -- | clipper-* | cydra-* \ -+ | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ -+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ -- | ip2k-* \ -- | m32r-* \ -+ | ip2k-* | iq2000-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | mcore-* \ -- | mips-* | mipsbe-* | mipseb-* | mips*el-* | mipsle-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* \ -+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -+ | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ -+ | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ -+ | mmix-* \ -+ | mt-* \ - | msp430-* \ -- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ -+ | nios-* | nios2-* \ -+ | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ -+ | sparclite-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ -- | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-*) - ;; -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown -+ ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; -+ abacus) -+ basic_machine=abacus-unknown -+ ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; -+ amd64) -+ basic_machine=x86_64-pc -+ ;; -+ amd64-*) -+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) -@@ -405,16 +442,24 @@ case $basic_machine in - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; -@@ -433,22 +478,37 @@ case $basic_machine in - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; -+ craynv) -+ basic_machine=craynv-cray -+ os=-unicosmp -+ ;; -+ cr16) -+ basic_machine=cr16-unknown -+ os=-elf -+ ;; - crds | unos) - basic_machine=m68k-crds - ;; -+ crisv32 | crisv32-* | etraxfs*) -+ basic_machine=crisv32-axis -+ ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; -+ crx) -+ basic_machine=crx-unknown -+ os=-elf -+ ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec -@@ -461,16 +521,20 @@ case $basic_machine in - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ djgpp) -+ basic_machine=i586-pc -+ os=-msdosdjgpp -+ ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; -@@ -611,66 +675,71 @@ case $basic_machine in - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; --#### MozillaHack -- i386-msvc | msvc) -- basic_machine=i386-pc -- os=-msvc -+ mingw32ce) -+ basic_machine=arm-unknown -+ os=-mingw32ce - ;; --#### End MozillaHack - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; -- mmix*) -- basic_machine=mmix-knuth -- os=-mmixware -- ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; -@@ -729,30 +798,29 @@ case $basic_machine in - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; -- nv1) -- basic_machine=nv1-cray -- os=-unicosmp -- ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; -- or32 | or32-*) -+ openrisc | openrisc-*) - basic_machine=or32-unknown -- os=-coff -+ ;; -+ os400) -+ basic_machine=powerpc-ibm -+ os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k -@@ -760,43 +828,63 @@ case $basic_machine in - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; -- pentiumii | pentium2) -+ pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; -+ pentium4) -+ basic_machine=i786-pc -+ ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -- pentiumii-* | pentium2-*) -+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -+ pentium4-*) -+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` -@@ -819,16 +907,20 @@ case $basic_machine in - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) -@@ -845,23 +937,37 @@ case $basic_machine in - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; -+ sde) -+ basic_machine=mipsisa32-sde -+ os=-elf -+ ;; -+ sei) -+ basic_machine=mips-sei -+ os=-seiux -+ ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; -+ sh5el) -+ basic_machine=sh5le-unknown -+ ;; -+ sh64) -+ basic_machine=sh64-unknown -+ ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; -@@ -926,45 +1032,49 @@ case $basic_machine in - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; -- tic4x | c4x*) -- basic_machine=tic4x-unknown -- os=-coff -- ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; -+ tile*) -+ basic_machine=tile-unknown -+ os=-linux-gnu -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; -+ tpf) -+ basic_machine=s390x-ibm -+ os=-tpf -+ ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; -@@ -998,16 +1108,20 @@ case $basic_machine in - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; -+ xbox) -+ basic_machine=i686-pc -+ os=-mingw32 -+ ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) -@@ -1028,39 +1142,39 @@ case $basic_machine in - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; -+ mmix) -+ basic_machine=mmix-knuth -+ ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparc | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; -@@ -1116,40 +1230,40 @@ case $os in - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. --#### MozillaHack --# msvc --#### End MozillaHack - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ -- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -openbsd* | -solidbsd* \ -+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ -+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ -- | -msvc* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -- | -powermax* | -dnix*) -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os -@@ -1157,34 +1271,40 @@ case $os in - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; -+ -linux-dietlibc) -+ os=-linux-dietlibc -+ ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; -+ -os400*) -+ os=-os400 -+ ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf -@@ -1196,16 +1316,19 @@ case $os in - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; -+ -syllable*) -+ os=-syllable -+ ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova -@@ -1218,16 +1341,19 @@ case $os in - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; -+ -tpf*) -+ os=-tpf -+ ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 -@@ -1254,16 +1380,19 @@ case $os in - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; -+ -zvmoe) -+ os=-zvmoe -+ ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -@@ -1276,25 +1405,34 @@ else - - # Note that if you're going to try to match "-MANUFACTURER" here (say, - # "-sun"), then you have to tell the case statement up towards the top - # that MANUFACTURER isn't an operating system. Otherwise, code above - # will signal an error saying that MANUFACTURER isn't an operating - # system, and we'll never get to this point. - - case $basic_machine in -+ score-*) -+ os=-elf -+ ;; -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) -@@ -1310,16 +1448,19 @@ case $basic_machine in - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; -+ mep-*) -+ os=-elf -+ ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff -@@ -1328,19 +1469,25 @@ case $basic_machine in - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; -+ *-haiku) -+ os=-haiku -+ ;; - *-ibm) - os=-aix - ;; -+ *-knuth) -+ os=-mmixware -+ ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf -@@ -1463,19 +1610,25 @@ case $basic_machine in - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; -+ -os400*) -+ vendor=ibm -+ ;; - -ptx*) - vendor=sequent - ;; -+ -tpf*) -+ vendor=ibm -+ ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi -@@ -1490,16 +1643,16 @@ case $basic_machine in - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; - esac - - echo $basic_machine$os --exit 0 -+exit - - # Local variables: - # eval: (add-hook 'write-file-hooks 'time-stamp) - # time-stamp-start: "timestamp='" - # time-stamp-format: "%:y-%02m-%02d" - # time-stamp-end: "'" - # End: -Index: mozilla/nsprpub/lib/ds/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/lib/ds/Makefile.in,v -retrieving revision 1.35.2.1 -diff -u -8 -p -w -r1.35.2.1 Makefile.in ---- mozilla/nsprpub/lib/ds/Makefile.in 19 Oct 2006 00:39:28 -0000 1.35.2.1 -+++ mozilla/nsprpub/lib/ds/Makefile.in 8 Jul 2009 21:52:59 -0000 -@@ -180,18 +180,22 @@ endif - export:: $(TARGETS) - $(INSTALL) -m 444 $(HEADERS) $(dist_includedir) - $(INSTALL) -m 444 $(TARGETS) $(dist_libdir) - ifdef SHARED_LIBRARY - ifeq ($(OS_ARCH),HP-UX) - $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_libdir) - $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_bindir) - else -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_bindir)/lib -+else - $(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_bindir) - endif - endif -+endif - ifeq ($(MOZ_BITS),16) - $(INSTALL) -m 444 $(HEADERS) $(MOZ_INCL) - $(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/lib - $(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/bin - endif - - -Index: mozilla/nsprpub/lib/libc/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/lib/libc/src/Makefile.in,v -retrieving revision 1.31.2.1 -diff -u -8 -p -w -r1.31.2.1 Makefile.in ---- mozilla/nsprpub/lib/libc/src/Makefile.in 19 Oct 2006 00:39:28 -0000 1.31.2.1 -+++ mozilla/nsprpub/lib/libc/src/Makefile.in 8 Jul 2009 21:52:59 -0000 -@@ -182,16 +182,20 @@ endif - - export:: $(TARGETS) - $(INSTALL) -m 444 $(TARGETS) $(dist_libdir) - ifdef SHARED_LIBRARY - ifeq ($(OS_ARCH),HP-UX) - $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_libdir) - $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_bindir) - else -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_bindir)/lib -+else - $(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_bindir) - endif - endif -+endif - ifeq ($(MOZ_BITS),16) - $(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/lib - $(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/bin - endif - -Index: mozilla/nsprpub/lib/prstreams/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/lib/prstreams/Makefile.in,v -retrieving revision 1.21.2.1 -diff -u -8 -p -w -r1.21.2.1 Makefile.in ---- mozilla/nsprpub/lib/prstreams/Makefile.in 19 Oct 2006 00:39:28 -0000 1.21.2.1 -+++ mozilla/nsprpub/lib/prstreams/Makefile.in 8 Jul 2009 21:53:00 -0000 -@@ -64,17 +64,17 @@ ifeq ($(OS_ARCH),SunOS) - endif - - ifeq ($(OS_ARCH), IRIX) - ifneq ($(OS_RELEASE),5.3) - CCC_ONLY_FLAGS += -exceptions - endif - endif - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CFLAGS += -frtti -fexceptions - endif - - INCLUDES = -I$(dist_includedir) - - HEADERS = $(wildcard $(srcdir)/*.h) - - CSRCS = \ -@@ -113,17 +113,17 @@ else - MKSHLIB = makeC++SharedLib_r -p 0 - endif - OS_LIBS += -ldl - endif - endif - endif - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - OS_LIBS = -lstdc++.r4 - endif - - ifeq ($(OS_ARCH), UNIXWARE) - OS_LIBS += -lC - endif - - EXTRA_LIBS = $(LIBNSPR) -Index: mozilla/nsprpub/pr/include/prio.h -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/include/prio.h,v -retrieving revision 3.40 -diff -u -8 -p -w -r3.40 prio.h ---- mozilla/nsprpub/pr/include/prio.h 25 Apr 2004 15:00:47 -0000 3.40 -+++ mozilla/nsprpub/pr/include/prio.h 8 Jul 2009 21:53:05 -0000 -@@ -169,38 +169,41 @@ struct PRIPv6Addr { - #define pr_s6_addr32 _S6_un._S6_u32 - #define pr_s6_addr64 _S6_un._S6_u64 - - typedef struct PRIPv6Addr PRIPv6Addr; - - union PRNetAddr { - struct { - PRUint16 family; /* address family (0x00ff maskable) */ --#ifdef XP_BEOS -- char data[10]; /* Be has a smaller structure */ --#else -+#ifndef XP_BEOS - char data[14]; /* raw address data */ -+#else -+ char data[30]; - #endif - } raw; - struct { - PRUint16 family; /* address family (AF_INET) */ - PRUint16 port; /* port number */ - PRUint32 ip; /* The actual 32 bits of address */ --#ifdef XP_BEOS -- char pad[4]; /* Be has a smaller structure */ --#else -+#ifndef XP_BEOS - char pad[8]; -+#else -+ char pad[24]; - #endif - } inet; - struct { - PRUint16 family; /* address family (AF_INET6) */ - PRUint16 port; /* port number */ - PRUint32 flowinfo; /* routing information */ - PRIPv6Addr ip; /* the actual 128 bits of address */ - PRUint32 scope_id; /* set of interfaces for a scope */ -+#ifdef XP_BEOS -+ char pad[4]; -+#endif - } ipv6; - #if defined(XP_UNIX) || defined(XP_OS2_EMX) - struct { /* Unix domain socket address */ - PRUint16 family; /* address family (AF_UNIX) */ - #ifdef XP_OS2 - char path[108]; /* null-terminated pathname */ - /* bind fails if size is not 108. */ - #else -Index: mozilla/nsprpub/pr/include/prtypes.h -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/include/prtypes.h,v -retrieving revision 3.30.2.2 -diff -u -8 -p -w -r3.30.2.2 prtypes.h ---- mozilla/nsprpub/pr/include/prtypes.h 5 Apr 2006 21:51:21 -0000 3.30.2.2 -+++ mozilla/nsprpub/pr/include/prtypes.h 8 Jul 2009 21:53:07 -0000 -@@ -93,29 +93,48 @@ - #define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type - - #define PR_CALLBACK - #define PR_CALLBACK_DECL - #define PR_STATIC_CALLBACK(__x) static __x - - #elif defined(XP_BEOS) - -+/* GCC 3.3 and later support the visibility attribute. */ -+#if (__GNUC__ >= 4) || \ -+ (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) -+#define PR_VISIBILITY_DEFAULT __attribute__((visibility("default"))) -+#define PR_EXPORT(__type) extern PR_VISIBILITY_DEFAULT __type -+#define PR_EXPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type -+#define PR_IMPORT(__type) extern PR_VISIBILITY_DEFAULT __type -+#define PR_IMPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type -+ -+#define PR_EXTERN(__type) extern PR_VISIBILITY_DEFAULT __type -+#define PR_IMPLEMENT(__type) PR_VISIBILITY_DEFAULT __type -+#define PR_EXTERN_DATA(__type) extern PR_VISIBILITY_DEFAULT __type -+#define PR_IMPLEMENT_DATA(__type) PR_VISIBILITY_DEFAULT __type -+#define PR_CALLBACK -+#define PR_CALLBACK_DECL -+#define PR_STATIC_CALLBACK(__x) static __x -+ -+#else - #define PR_EXPORT(__type) extern __declspec(dllexport) __type - #define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type - #define PR_IMPORT(__type) extern __declspec(dllexport) __type - #define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type - - #define PR_EXTERN(__type) extern __declspec(dllexport) __type - #define PR_IMPLEMENT(__type) __declspec(dllexport) __type - #define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type - #define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type - - #define PR_CALLBACK - #define PR_CALLBACK_DECL - #define PR_STATIC_CALLBACK(__x) static __x -+#endif - - #elif defined(WIN16) - - #define PR_CALLBACK_DECL __cdecl - - #if defined(_WINDLL) - #define PR_EXPORT(__type) extern __type _cdecl _export _loadds - #define PR_IMPORT(__type) extern __type _cdecl _export _loadds -Index: mozilla/nsprpub/pr/include/md/_beos.cfg -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/include/md/_beos.cfg,v -retrieving revision 3.5.214.1 -diff -u -8 -p -w -r3.5.214.1 _beos.cfg ---- mozilla/nsprpub/pr/include/md/_beos.cfg 5 Apr 2006 22:00:45 -0000 3.5.214.1 -+++ mozilla/nsprpub/pr/include/md/_beos.cfg 8 Jul 2009 21:53:07 -0000 -@@ -15,16 +15,17 @@ - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): -+ * Fredrik Holmqvist - * - * 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 -@@ -35,33 +36,38 @@ - * - * ***** END LICENSE BLOCK ***** */ - - #ifndef nspr_cpucfg___ - #define nspr_cpucfg___ - - #ifndef XP_BEOS - #define XP_BEOS --#undef XP_UNIX - #endif - - #ifndef BEOS - #define BEOS - #endif - - #define PR_AF_INET6 5 /* same as AF_INET6 */ - - #ifdef __powerpc__ - #undef IS_LITTLE_ENDIAN - #define IS_BIG_ENDIAN 1 - #else - #define IS_LITTLE_ENDIAN 1 - #undef IS_BIG_ENDIAN - #endif - -+/* -+ * Fixme: Should be done according to arch -+ * Currently only x86/ia64. -+ */ -+#define PR_ALIGN_OF_WORD 4 -+ - #define PR_BYTES_PER_BYTE 1 - #define PR_BYTES_PER_SHORT 2 - #define PR_BYTES_PER_INT 4 - #define PR_BYTES_PER_INT64 8 - #define PR_BYTES_PER_LONG 4 - #define PR_BYTES_PER_FLOAT 4 - #define PR_BYTES_PER_DOUBLE 8 - #define PR_BYTES_PER_WORD 4 -Index: mozilla/nsprpub/pr/include/md/_beos.h -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/include/md/_beos.h,v -retrieving revision 3.23 -diff -u -8 -p -w -r3.23 _beos.h ---- mozilla/nsprpub/pr/include/md/_beos.h 17 Jan 2005 22:00:53 -0000 3.23 -+++ mozilla/nsprpub/pr/include/md/_beos.h 8 Jul 2009 21:53:08 -0000 -@@ -15,16 +15,17 @@ - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): -+ * Fredrik Holmqvist - * - * 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 -@@ -33,27 +34,26 @@ - * 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 ***** */ - - #ifndef nspr_beos_defs_h___ - #define nspr_beos_defs_h___ - --#include "prtypes.h" --#include "prio.h" --#include "prthread.h" --#include "prproces.h" --#include "prmem.h" --#include "obsolete/prsem.h" - #include -- --#include --#include - #include -+#include -+ -+/* -+ * Hack for Cross compile -+ */ -+#define FD_SETSIZE 1024 -+ -+#undef bool - - /* - * Internal configuration macros - */ - - #ifdef BONE_VERSION - #define _PR_HAVE_SOCKADDR_LEN - #endif -@@ -62,104 +62,66 @@ - #define _PR_SI_SYSNAME "BEOS" - #ifdef __powerpc__ - #define _PR_SI_ARCHITECTURE "ppc" - #else - #define _PR_SI_ARCHITECTURE "x86" - #endif - #define PR_DLL_SUFFIX ".so" - --#define _PR_VMBASE 0x30000000 --#define _PR_STACK_VMBASE 0x50000000 - #define _MD_DEFAULT_STACK_SIZE 65536L --#define _MD_MMAP_FLAGS MAP_PRIVATE - - #undef HAVE_STACK_GROWING_UP - #define HAVE_DLL --#define _PR_NO_CLOCK_TIMER - - /* - * The Atomic operations - */ - - #define _PR_HAVE_ATOMIC_OPS -+#ifdef __powerpc__ - #define _MD_INIT_ATOMIC _MD_AtomicInit -+#else -+#define _MD_INIT_ATOMIC() -+#endif - #define _MD_ATOMIC_INCREMENT _MD_AtomicIncrement - #define _MD_ATOMIC_ADD _MD_AtomicAdd - #define _MD_ATOMIC_DECREMENT _MD_AtomicDecrement - #define _MD_ATOMIC_SET _MD_AtomicSet - -+/* Makes sure to don't create cvar when creating sem */ - #define HAVE_CVAR_BUILT_ON_SEM -+ -+/* Not sure this is needed, but no harm. */ - #define _PR_GLOBAL_THREADS_ONLY -+ - #define _PR_BTHREADS --#define _PR_NEED_FAKE_POLL --#define _PR_HAVE_PEEK_BUFFER --#define _PR_PEEK_BUFFER_MAX (16 * 1024) --#define _PR_FD_NEED_EMULATE_MSG_PEEK(fd) 1 --#define _PR_CONNECT_DOES_NOT_BIND -+ - #define _PR_HAVE_O_APPEND - --/* Define threading functions and objects as native BeOS */ -+/* Define threading functions and objects as native BeOS -+ Used by bthreads. */ -+ - struct _MDThread { - thread_id tid; /* BeOS thread handle */ - sem_id joinSem; /* sems used to synchronzie joining */ - PRBool is_joining; /* TRUE if someone is currently waiting to - join this thread */ - }; - --struct _MDThreadStack { -- PRInt8 notused; --}; -- --/* -- * Lock and Semaphore related definitions -- */ -- --struct _MDLock { -- sem_id semaphoreID; -- int32 benaphoreCount; --}; -- --struct _MDCVar { -- sem_id sem1; -- sem_id sem2; -- int16 count; --}; -- --struct _MDSemaphore { -- sem_id sid; --}; -- --/* --** CPU-related definitions --*/ --struct _MDCPU { -- int8 unused; --}; -- - /* - ** Process-related definitions - */ - struct _MDProcess { - pid_t pid; - }; - --struct _MDSegment { -- PRInt8 notused; --}; -- - /* - ** File- and directory-related definitions - */ -- --#ifndef BONE_VERSION --#define BE_SOCK_SHUTDOWN_READ 0x01 --#define BE_SOCK_SHUTDOWN_WRITE 0x02 --#endif -- - struct _MDFileDesc { - PRInt32 osfd; - PRInt32 sock_state; - PRBool accepted_socket; - PRNetAddr peer_addr; - #ifndef BONE_VERSION - PRBool connectValueValid; - int connectReturnValue; -@@ -173,441 +135,114 @@ struct _MDDir { - - #define PR_DIRECTORY_SEPARATOR '/' - #define PR_DIRECTORY_SEPARATOR_STR "/" - #define PR_PATH_SEPARATOR ':' - #define PR_PATH_SEPARATOR_STR ":" - - #define GETTIMEOFDAY(tp) gettimeofday((tp), NULL) - --/* --- Memory-mapped files stuff --- not implemented on BeOS */ -- --struct _MDFileMap { -- PRInt8 unused; --}; - - /* - * Network related definitions. - */ - - #ifndef BONE_VERSION -+#define BE_SOCK_SHUTDOWN_READ 0x01 -+#define BE_SOCK_SHUTDOWN_WRITE 0x02 -+ - #define IPPROTO_IP 0 - #define AF_UNIX 2 - #define TCP_NODELAY SO_NONBLOCK - #define SO_LINGER -1 - #define SO_ERROR 4 --#endif -- --#define _PR_INTERRUPT_CHECK_INTERVAL_SECS 5 - --#ifndef BONE_VERSION - /* these aren't actually used. if they are, we're screwed */ - struct protoent { - char *p_name; /* official protocol name */ - char **p_aliases; /* alias list */ - int p_proto; /* protocol # */ - }; - - struct protoent* getprotobyname(const char* name); - struct protoent* getprotobynumber(int number); - #endif - -+/* Used by bnet.c */ -+#define _PR_INTERRUPT_CHECK_INTERVAL_SECS 5 -+ - /* - * malloc() related definitions. -+ * Avoids prmalloc.c's and prmem's code - */ -- - #undef _PR_OVERRIDE_MALLOC - - /* Miscellaneous */ - - #define _MD_ERRNO() (errno) - --#define _MD_CLEANUP_BEFORE_EXIT _MD_cleanup_before_exit --#define _MD_EXIT _MD_exit -+#define _MD_CLEANUP_BEFORE_EXIT() -+#define _MD_EXIT exit - - #define _MD_GET_ENV getenv - #define _MD_PUT_ENV putenv - --#define _MD_EARLY_INIT _MD_early_init --#define _MD_FINAL_INIT _MD_final_init -- --/* CPU Stuff */ -- --#define _MD_INIT_CPUS _MD_init_cpus --#define _MD_WAKEUP_CPUS _MD_wakeup_cpus --#define _MD_START_INTERRUPTS _MD_start_interrupts --#define _MD_STOP_INTERRUPTS _MD_stop_interrupts --#define _MD_DISABLE_CLOCK_INTERRUPTS _MD_disable_clock_interrupts --#define _MD_BLOCK_CLOCK_INTERRUPTS _MD_block_clock_interrupts --#define _MD_UNBLOCK_CLOCK_INTERRUPTS _MD_unblock_clock_interrupts --#define _MD_CLOCK_INTERRUPT _MD_clock_interrupt --#define _MD_INIT_STACK _MD_init_stack --#define _MD_CLEAR_STACK _MD_clear_stack --// #define _MD_GET_INTSOFF _MD_get_intsoff --// #define _MD_SET_INTSOFF _MD_set_intsoff --#define _MD_CURRENT_CPU _MD_current_cpu --#define _MD_SET_CURRENT_CPU _MD_set_current_cpu --#define _MD_INIT_RUNNING_CPU _MD_init_running_cpu --#define _MD_PAUSE_CPU _MD_pause_cpu -+#define _MD_EARLY_INIT() -+#ifdef BONE_VERSION -+#define _MD_FINAL_INIT() -+#else -+#define _MD_FINAL_INIT _MD_final_init_netserver -+#endif - - /* Thread stuff */ - - #define _MD_CURRENT_THREAD() PR_GetCurrentThread() --// #define _MD_GET_ATTACHED_THREAD _MD_get_attached_thread --#define _MD_LAST_THREAD _MD_last_thread --#define _MD_SET_CURRENT_THREAD _MD_set_current_THREAD --#define _MD_SET_LAST_THREAD _MD_set_last_thread --#define _MD_INIT_THREAD _MD_init_thread --#define _MD_EXIT_THREAD _MD_exit_thread --#define _MD_INIT_ATTACHED_THREAD _MD_init_attached_thread -- --#define _MD_SUSPEND_THREAD _MD_suspend_thread --#define _MD_RESUME_THREAD _MD_resume_thread --#define _MD_SUSPEND_CPU _MD_suspend_cpu --#define _MD_RESUME_CPU _MD_resume_cpu --#define _MD_BEGIN_SUSPEND_ALL _MD_begin_suspend_all --#define _MD_END_SUSPEND_ALL _MD_end_suspend_all --#define _MD_BEGIN_RESUME_ALL _MD_begin_resume_all --#define _MD_END_RESUME_ALL _MD_end_resume_all -- --#define _MD_GET_SP _MD_get_sp -- --#define _MD_CLEAN_THREAD _MD_clean_thread --#define _MD_CREATE_PRIMORDIAL_USER_THREAD _MD_create_primordial_user_thread --#define _MD_CREATE_USER_THREAD _MD_create_user_thread --#define _MD_INIT_PRIMORDIAL_THREAD _MD_init_primordial_thread --#define _MD_CREATE_THREAD _MD_create_thread --#define _MD_YIELD _MD_yield --#define _MD_SET_PRIORITY _MD_set_priority -- --#define _MD_SUSPENDALL _MD_suspendall --#define _MD_RESUMEALL _MD_resumeall -- --#define _MD_SWITCH_CONTEXT _MD_switch_context --#define _MD_RESTORE_CONTEXT _MD_restore_context -- --#define _MD_WAIT _MD_wait --#define _MD_WAKEUP_WAITER _MD_wakeup_waiter -- --#define _MD_SETTHREADAFFINITYMASK _MD_setthreadaffinitymask --#define _MD_GETTHREADAFFINITYMASK _MD_getthreadaffinitymask -- --/* Thread Synchronization */ -- --#define _MD_INIT_LOCKS _MD_init_locks --#define _MD_NEW_LOCK _MD_new_lock --#define _MD_FREE_LOCK _MD_free_lock --#define _MD_LOCK _MD_lock --#define _MD_TEST_AND_LOCK _MD_test_and_lock --#define _MD_UNLOCK _MD_unlock --#define _MD_IOQ_LOCK _MD_ioq_lock --#define _MD_IOQ_UNLOCK _MD_ioq_unlock --#define _MD_NEW_SEM _MD_new_sem --#define _MD_DESTROY_SEM _MD_destroy_sem --#define _MD_TIMED_WAIT_SEM _MD_timed_wait_sem --#define _MD_WAIT_SEM _MD_wait_sem --#define _MD_POST_SEM _MD_post_sem --// #define _MD_NEW_CV _MD_new_cv --// #define _MD_FREE_CV _MD_free_cv --// #define _MD_WAIT_CV _MD_wait_cv --// #define _MD_NOTIFY_CV _MD_notify_cv --// #define _MD_NOTIFYALL_CV _MD_notifyall_cv -+ - - /* File I/O */ - --/* don't need any I/O initializations */ --#define _MD_INIT_IO() --#define _MD_INIT_FILEDESC(fd) -- --#define _MD_OPEN_DIR _MD_open_dir --#define _MD_READ_DIR _MD_read_dir --#define _MD_CLOSE_DIR _MD_close_dir --#define _MD_MAKE_NONBLOCK _MD_make_nonblock --#define _MD_SET_FD_INHERITABLE _MD_set_fd_inheritable --#define _MD_INIT_FD_INHERITABLE _MD_init_fd_inheritable --#define _MD_QUERY_FD_INHERITABLE _MD_query_fd_inheritable --#define _MD_OPEN _MD_open --#define _MD_OPEN_FILE _MD_open --#define _MD_CLOSE_FILE _MD_close_file --#define _MD_READ _MD_read --#define _MD_WRITE _MD_write --#define _MD_WRITEV _MD_writev -+#define _PR_MD_WRITE -+ -+/* -+These are defined in primpl.h so that they are avail for all, but we -+have no calls, and pthreads doesn't either. - #define _MD_LSEEK _MD_lseek - #define _MD_LSEEK64 _MD_lseek64 --#define _MD_FSYNC _MD_fsync --#define _MD_DELETE _MD_delete -+ - #define _MD_GETFILEINFO _MD_getfileinfo - #define _MD_GETFILEINFO64 _MD_getfileinfo64 - #define _MD_GETOPENFILEINFO _MD_getopenfileinfo - #define _MD_GETOPENFILEINFO64 _MD_getopenfileinfo64 --#define _MD_RENAME _MD_rename --#define _MD_ACCESS _MD_access --#define _MD_STAT stat --#define _MD_MKDIR _MD_mkdir --#define _MD_MAKE_DIR _MD_mkdir --#define _MD_RMDIR _MD_rmdir --#define _MD_PR_POLL _MD_pr_poll -+*/ - - /* Network I/O */ - --#define _MD_CLOSE_SOCKET _MD_close_socket --#define _MD_CONNECT _MD_connect --#define _MD_ACCEPT _MD_accept --#define _MD_BIND _MD_bind --#define _MD_LISTEN _MD_listen --#define _MD_SHUTDOWN _MD_shutdown --#define _MD_RECV _MD_recv --#define _MD_SEND _MD_send --#define _MD_ACCEPT_READ _MD_accept_read --#define _MD_GETSOCKNAME _MD_getsockname --#define _MD_GETPEERNAME _MD_getpeername --#define _MD_GETSOCKOPT _MD_getsockopt --#define _MD_SETSOCKOPT _MD_setsockopt --#define _MD_RECVFROM _MD_recvfrom --#define _MD_SENDTO _MD_sendto --#define _MD_SOCKETPAIR _MD_socketpair --#define _MD_SOCKET _MD_socket --#define _MD_SOCKETAVAILABLE _MD_socketavailable --#define _MD_PIPEAVAILABLE _MD_socketavailable -- - #define _MD_GET_SOCKET_ERROR() (errno) - #define _MD_GETHOSTNAME _MD_gethostname - --#define _MD_SELECT select -- - /* Process management */ - - #define _MD_CREATE_PROCESS _MD_create_process - #define _MD_DETACH_PROCESS _MD_detach_process - #define _MD_WAIT_PROCESS _MD_wait_process - #define _MD_KILL_PROCESS _MD_kill_process - --/* Atomic data operations */ -- --// #define _MD_INIT_ATOMIC _MD_init_atomic --// #define _MD_ATOMIC_INCREMENT _MD_atomic_increment --// #define _MD_ATOMIC_DECREMENT _MD_atomic_decrement --// #define _MD_ATOMIC_SET _MD_atomic_set -- --/* memory management */ -- --#define _MD_INIT_SEGS _MD_init_segs --#define _MD_ALLOC_SEGMENT _MD_alloc_segment --#define _MD_FREE_SEGMENT _MD_free_segment -- - /* Memory mapped file I/O */ - - #define _MD_CREATE_FILE_MAP _MD_create_file_map - #define _MD_GET_MEM_MAP_ALIGNMENT _MD_get_mem_map_alignment - #define _MD_MEM_MAP _MD_mem_map - #define _MD_MEM_UNMAP _MD_mem_unmap - #define _MD_CLOSE_FILE_MAP _MD_close_file_map - - /* Time related */ - --#define _MD_NOW _MD_now --#define _MD_INTERVAL_INIT _MD_interval_init -+#define _MD_INTERVAL_INIT() - #define _MD_GET_INTERVAL _MD_get_interval - #define _MD_INTERVAL_PER_SEC _MD_interval_per_sec - - /* File locking */ - - #define _MD_LOCKFILE _MD_lockfile - #define _MD_TLOCKFILE _MD_tlockfile - #define _MD_UNLOCKFILE _MD_unlockfile - --/** -- * Prototypes for machine dependent function implementations. (Too bad -- * NSPR's MD system blows so much that we have to reiterate every stinking -- * thing we implement here in our MD header file.) -- */ -- --/* Miscellaneous */ -- --NSPR_API(void) _MD_cleanup_before_exit(void); --NSPR_API(void) _MD_exit(PRIntn status); -- --NSPR_API(char*) _MD_get_env(const char *name); --NSPR_API(PRIntn) _MD_put_env(const char *name); -- --NSPR_API(void) _MD_early_init(void); --NSPR_API(void) _MD_final_init(void); -- --/* CPU Stuff */ -- --NSPR_API(void) _MD_init_cpus(); --NSPR_API(void) _MD_wakeup_cpus(); --NSPR_API(void) _MD_start_interrupts(void); --NSPR_API(void) _MD_stop_interrupts(void); --NSPR_API(void) _MD_disable_clock_interrupts(void); --NSPR_API(void) _MD_block_clock_interrupts(void); --NSPR_API(void) _MD_unblock_clock_interrupts(void); --NSPR_API(void) _MD_clock_interrupt(void); --// NSPR_API(void) _MD_init_stack(PRThreadStack *ts, PRIntn redzone); --// NSPR_API(void) _MD_clear_stack(PRThreadStack* ts); --// NSPR_API(PRInt32) _MD_get_intsoff(void); --// NSPR_API(void) _MD_set_intsoff(PRInt32 _val); --// NSPR_API(_PRCPU*) _MD_current_cpu(void); --// NSPR_API(void) _MD_set_current_cpu(_PRCPU *cpu); --// NSPR_API(void) _MD_init_running_cpu(_PRCPU *cpu); --NSPR_API(PRInt32) _MD_pause_cpu(PRIntervalTime timeout); -- --/* Thread stuff */ -- --// NSPR_API(PRThread*) _MD_current_thread(void); --NSPR_API(PRThread*) _MD_get_attached_thread(void); --NSPR_API(PRThread*) _MD_last_thread(void); --NSPR_API(void) _MD_set_current_thread(PRThread *thread); --NSPR_API(void) _MD_set_last_thread(PRThread *thread); --NSPR_API(PRStatus) _MD_init_thread(PRThread *thread); --NSPR_API(void) _MD_exit_thread(PRThread *thread); --NSPR_API(PRStatus) _MD_init_attached_thread(PRThread *thread); -- --NSPR_API(void) _MD_suspend_thread(PRThread *thread); --NSPR_API(void) _MD_resume_thread(PRThread *thread); --// NSPR_API(void) _MD_suspend_cpu(_PRCPU *cpu); --// NSPR_API(void) _MD_resume_cpu(_PRCPU *cpu); --NSPR_API(void) _MD_begin_suspend_all(void); --NSPR_API(void) _MD_end_suspend_all(void); --NSPR_API(void) _MD_begin_resume_all(void); --NSPR_API(void) _MD_end_resume_all(void); -- --NSPR_API(void *) _MD_get_sp(PRThread *thread); -- --NSPR_API(void) _MD_clean_thread(PRThread *thread); --NSPR_API(void) _MD_create_primordial_user_thread(PRThread *); --NSPR_API(PRThread*) _MD_create_user_thread(PRUint32 stacksize, void (*start)(void *), void *arg); --NSPR_API(void) _MD_init_primordial_thread(PRThread *thread); --NSPR_API(PRStatus) _MD_create_thread(PRThread *thread, void (*start)(void *), PRThreadPriority priority, PRThreadScope scope, PRThreadState state, PRUint32 stackSize); --NSPR_API(void) _MD_yield(void); --NSPR_API(void) _MD_set_priority(struct _MDThread *md, PRThreadPriority newPri); -- --NSPR_API(void) _MD_suspendall(void); --NSPR_API(void) _MD_resumeall(void); -- --NSPR_API(void) _MD_init_context(PRThread *thread, char *top, void (*start) (void), PRBool *status); --NSPR_API(void) _MD_switch_context(PRThread *thread); --NSPR_API(void) _MD_restore_context(PRThread *thread); -- --NSPR_API(PRStatus) _MD_wait(PRThread *, PRIntervalTime timeout); --NSPR_API(PRStatus) _MD_wakeup_waiter(PRThread *); -- --NSPR_API(PRInt32) _MD_setthreadaffinitymask(PRThread *thread, PRUint32 mask ); --NSPR_API(PRInt32) _MD_getthreadaffinitymask(PRThread *thread, PRUint32 *mask); -- --/* Thread Synchronization */ -- --NSPR_API(void) _MD_init_locks(void); --NSPR_API(PRStatus) _MD_new_lock(struct _MDLock *md); --NSPR_API(void) _MD_free_lock(struct _MDLock *md); --NSPR_API(void) _MD_lock(struct _MDLock *md); --NSPR_API(PRIntn) _MD_test_and_lock(struct _MDLock *md); --NSPR_API(void) _MD_unlock(struct _MDLock *md); --NSPR_API(void) _MD_ioq_lock(void); --NSPR_API(void) _MD_ioq_unlock(void); --NSPR_API(void) _MD_new_sem(struct _MDSemaphore *md, PRUintn value); --NSPR_API(void) _MD_destroy_sem(struct _MDSemaphore *md); --NSPR_API(PRStatus) _MD_timed_wait_sem(struct _MDSemaphore *md, PRIntervalTime timeout); --NSPR_API(PRStatus) _MD_wait_sem(struct _MDSemaphore *md); --NSPR_API(void) _MD_post_sem(struct _MDSemaphore *md); --// NSPR_API(PRInt32) _MD_new_cv(struct _MDCVar *md); --// NSPR_API(void) _MD_free_cv(struct _MDCVar *md); --// NSPR_API(void) _MD_wait_cv(struct _MDCVar *mdCVar, struct _MDLock *mdLock, PRIntervalTime timeout); --// NSPR_API(void) _MD_notify_cv(struct _MDCVar *md, struct _MDLock *lock); --// NSPR_API(void) _MD_notifyall_cv(struct _MDCVar *md, struct _MDLock *lock); -- --/* File I/O */ -- --// NSPR_API(void) _MD_init_io(void); --NSPR_API(PRStatus) _MD_open_dir(struct _MDDir *md,const char *name); --NSPR_API(char *) _MD_read_dir(struct _MDDir *md, PRIntn flags); --NSPR_API(PRInt32) _MD_close_dir(struct _MDDir *md); --NSPR_API(void) _MD_make_nonblock(PRFileDesc *fd); --NSPR_API(void) _MD_init_fd_inheritable(PRFileDesc *fd, PRBool imported); --NSPR_API(void) _MD_query_fd_inheritable(PRFileDesc *fd); --NSPR_API(PRInt32) _MD_open(const char *name, PRIntn osflags, PRIntn mode); --NSPR_API(PRInt32) _MD_close_file(PRInt32 osfd); --NSPR_API(PRInt32) _MD_read(PRFileDesc *fd, void *buf, PRInt32 amount); --NSPR_API(PRInt32) _MD_write(PRFileDesc *fd, const void *buf, PRInt32 amount); --NSPR_API(PRInt32) _MD_writev(PRFileDesc *fd, const PRIOVec *iov, PRInt32 iov_size, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_lseek(PRFileDesc *fd, PRInt32 offset, int whence); --NSPR_API(PRInt64) _MD_lseek64(PRFileDesc *fd, PRInt64 offset, int whence); --NSPR_API(PRInt32) _MD_fsync(PRFileDesc *fd); --NSPR_API(PRInt32) _MD_delete(const char *name); --NSPR_API(PRInt32) _MD_getfileinfo(const char *fn, PRFileInfo *info); --NSPR_API(PRInt32) _MD_getfileinfo64(const char *fn, PRFileInfo64 *info); --NSPR_API(PRInt32) _MD_getopenfileinfo(const PRFileDesc *fd, PRFileInfo *info); --NSPR_API(PRInt32) _MD_getopenfileinfo64(const PRFileDesc *fd, PRFileInfo64 *info); --NSPR_API(PRInt32) _MD_rename(const char *from, const char *to); --NSPR_API(PRInt32) _MD_access(const char *name, PRIntn how); --NSPR_API(PRInt32) _MD_stat(const char *name, struct stat *buf); --NSPR_API(PRInt32) _MD_mkdir(const char *name, PRIntn mode); --NSPR_API(PRInt32) _MD_rmdir(const char *name); --NSPR_API(PRInt32) _MD_pr_poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout); -- --/* Network I/O */ --NSPR_API(PRInt32) _MD_close_socket(PRInt32 osfd); --NSPR_API(PRInt32) _MD_connect(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_bind(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen); --NSPR_API(PRInt32) _MD_listen(PRFileDesc *fd, PRIntn backlog); --NSPR_API(PRInt32) _MD_shutdown(PRFileDesc *fd, PRIntn how); --NSPR_API(PRInt32) _MD_recv(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_send(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_accept_read(PRFileDesc *sd, PRInt32 *newSock, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout); --// NSPR_API(PRInt32) _MD_fast_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout, PRBool fast, _PR_AcceptTimeoutCallback callback, void *callbackArg); --// NSPR_API(PRInt32) _MD_fast_accept_read(PRFileDesc *sd, PRInt32 *newSock, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout, PRBool fast, _PR_AcceptTimeoutCallback callback, void *callbackArg); --// NSPR_API(void) _MD_update_accept_context(PRInt32 s, PRInt32 ls); --NSPR_API(PRStatus) _MD_getsockname(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen); --NSPR_API(PRStatus) _MD_getpeername(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen); --NSPR_API(PRStatus) _MD_getsockopt(PRFileDesc *fd, PRInt32 level, PRInt32 optname, char* optval, PRInt32* optlen); --NSPR_API(PRStatus) _MD_setsockopt(PRFileDesc *fd, PRInt32 level, PRInt32 optname, const char* optval, PRInt32 optlen); --NSPR_API(PRInt32) _MD_recvfrom(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_sendto(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags, const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_socketpair(int af, int type, int flags, PRInt32 *osfd); --NSPR_API(PRInt32) _MD_socket(int af, int type, int flags); --NSPR_API(PRInt32) _MD_socketavailable(PRFileDesc *fd); -- --// NSPR_API(PRInt32) _MD_get_socket_error(void); --NSPR_API(PRStatus) _MD_gethostname(char *name, PRUint32 namelen); -- --/* Process management */ -- --NSPR_API(PRProcess *) _MD_create_process(const char *path, char *const *argv, char *const *envp, const PRProcessAttr *attr); --NSPR_API(PRStatus) _MD_detach_process(PRProcess *process); --NSPR_API(PRStatus) _MD_wait_process(PRProcess *process, PRInt32 *exitCode); --NSPR_API(PRStatus) _MD_kill_process(PRProcess *process); -- --/* Atomic data operations */ -- --// NSPR_API(void) _MD_init_atomic(void); --// NSPR_API(PRInt32) _MD_atomic_increment(PRInt32 *); --// NSPR_API(PRInt32) _MD_atomic_decrement(PRInt32 *); --// NSPR_API(PRInt32) _MD_atomic_set(PRInt32 *, PRInt32); -- --/* Memory management */ -- --NSPR_API(void) _MD_init_segs(void); --NSPR_API(PRStatus) _MD_alloc_segment(PRSegment *seg, PRUint32 size, void *vaddr); --NSPR_API(void) _MD_free_segment(PRSegment *seg); -- --/* Memory mapped file I/O */ -- --NSPR_API(PRStatus) _MD_create_file_map(PRFileMap *fmap, PRInt64 size); --NSPR_API(PRInt32) _MD_get_mem_map_alignment(void); --NSPR_API(void *) _MD_mem_map(PRFileMap *fmap, PRInt64 offset, PRUint32 len); --NSPR_API(PRStatus) _MD_mem_unmap(void *addr, PRUint32 size); --NSPR_API(PRStatus) _MD_close_file_map(PRFileMap *fmap); -- --/* Time related */ -- --NSPR_API(PRTime) _MD_now(void); --NSPR_API(void) _MD_interval_init(void); --NSPR_API(PRIntervalTime) _MD_get_interval(void); --NSPR_API(PRIntervalTime) _MD_interval_per_sec(void); -- --/* File locking */ -- --NSPR_API(PRStatus) _MD_lockfile(PRInt32 osfd); --NSPR_API(PRStatus) _MD_tlockfile(PRInt32 osfd); --NSPR_API(PRStatus) _MD_unlockfile(PRInt32 osfd); -- - #endif /* _nspr_beos_defs_h___*/ -Index: mozilla/nsprpub/pr/include/private/primpl.h -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/include/private/primpl.h,v -retrieving revision 3.84.2.2 -diff -u -8 -p -w -r3.84.2.2 primpl.h ---- mozilla/nsprpub/pr/include/private/primpl.h 25 Jul 2007 07:08:28 -0000 3.84.2.2 -+++ mozilla/nsprpub/pr/include/private/primpl.h 8 Jul 2009 21:53:12 -0000 -@@ -45,20 +45,16 @@ - * This macro causes chaos if signal.h gets included before pthread.h. - * To be safe, we include pthread.h first. - */ - - #if defined(_PR_PTHREADS) - #include - #endif - --#if defined(_PR_BTHREADS) --#include --#endif -- - #ifdef WINNT - /* Need to force service-pack 3 extensions to be defined by - ** setting _WIN32_WINNT to NT 4.0 for winsock.h, winbase.h, winnt.h. - */ - #ifndef _WIN32_WINNT - #define _WIN32_WINNT 0x0400 - #elif (_WIN32_WINNT < 0x0400) - #undef _WIN32_WINNT -@@ -223,16 +219,30 @@ typedef struct PTDebug - } PTDebug; - - #endif /* defined(DEBUG) */ - - NSPR_API(void) PT_FPrintStats(PRFileDesc *fd, const char *msg); - - #else /* defined(_PR_PTHREADS) */ - -+#ifdef _PR_BTHREADS -+#define _MD_GET_ATTACHED_THREAD() (_PR_MD_CURRENT_THREAD()) -+ -+#define _PR_IS_NATIVE_THREAD(thread) 1 -+#define _PR_IS_NATIVE_THREAD_SUPPORTED() 1 -+/* -+extern PRInt32 _PR_MD_WRITE(PRFileDesc *fd, const void *buf, PRInt32 amount); -+#define _PR_MD_WRITE _MD_WRITE -+*/ -+NSPR_API(PRThread*) _PR_MD_CURRENT_THREAD(void); -+#define _PR_MD_CURRENT_THREAD _MD_CURRENT_THREAD -+ -+#else /* defined(_PR_BTHREADS) */ -+ - NSPR_API(void) PT_FPrintStats(PRFileDesc *fd, const char *msg); - - /* - ** This section is contains those parts needed to implement NSPR on - ** platforms in general. One would assume that the pthreads implementation - ** included lots of the same types, at least conceptually. - */ - -@@ -1296,16 +1306,17 @@ extern PRStatus _PR_MD_SET_FD_INHERITABL - PR_SetError( PR_PENDING_INTERRUPT_ERROR, 0); \ - } else { \ - PR_SetError(PR_IO_TIMEOUT_ERROR, 0); \ - } - - extern void *_PR_MD_GET_SP(PRThread *thread); - #define _PR_MD_GET_SP _MD_GET_SP - -+#endif /* defined(_PR_BTHREADS) */ - #endif /* defined(_PR_PTHREADS) */ - - /************************************************************************/ - /************************************************************************* - ** The remainder of the definitions are shared by pthreads and the classic - ** NSPR code. These too may be conditionalized. - *************************************************************************/ - /************************************************************************/ -@@ -1550,17 +1561,20 @@ struct PRThreadStack { - char *stackTop; /* top of stack from C's point of view */ - PRUint32 stackSize; /* size of usable portion of the stack */ - - PRSegment *seg; - PRThread* thr; /* back pointer to thread owning this stack */ - - #if defined(_PR_PTHREADS) - #else /* defined(_PR_PTHREADS) */ -+#if defined(_PR_BTHREADS) -+#else /* defined(_PR_BTHREADS) */ - _MDThreadStack md; -+#endif /* defined(_PR_BTHREADS) */ - #endif /* defined(_PR_PTHREADS) */ - }; - - extern void _PR_DestroyThreadPrivate(PRThread*); - - typedef void (PR_CALLBACK *_PRStartFn)(void *); - - struct PRThread { -@@ -1603,19 +1617,16 @@ struct PRThread { - PRUint32 syspoll_count; /* number of elements in syspoll_list */ - #if defined(_PR_POLL_WITH_SELECT) - int *selectfd_list; /* Unix fd's that PR_Poll selects on */ - PRUint32 selectfd_count; /* number of elements in selectfd_list */ - #endif - #elif defined(_PR_BTHREADS) - PRUint32 flags; - _MDThread md; -- PRBool io_pending; -- PRInt32 io_fd; -- PRBool io_suspended; - #else /* not pthreads or Be threads */ - _MDLock threadLock; /* Lock to protect thread state variables. - * Protects the following fields: - * state - * priority - * links - * wait - * cpu -@@ -1689,17 +1700,19 @@ struct PRProcessAttr { - - struct PRProcess { - _MDProcess md; - }; - - struct PRFileMap { - PRFileDesc *fd; - PRFileMapProtect prot; -+#if !defined(XP_BEOS) - _MDFileMap md; -+#endif /* !defined(XP_BEOS) */ - }; - - /************************************************************************/ - - /* - ** File descriptors of the NSPR layer can be in one of the - ** following states (stored in the 'state' field of struct - ** PRFilePrivate): -@@ -1760,18 +1773,20 @@ struct PRDir { - #ifdef MOZ_UNICODE - struct PRDirUTF16 { - PRDirEntry d; - _MDDirUTF16 md; - }; - #endif /* MOZ_UNICODE */ - - extern void _PR_InitSegs(void); -+#if !defined(_PR_BTHREADS) - extern void _PR_InitStacks(void); - extern void _PR_InitTPD(void); -+#endif /* !defined(_PR_BTHREADS) */ - extern void _PR_InitMem(void); - extern void _PR_InitEnv(void); - extern void _PR_InitCMon(void); - extern void _PR_InitIO(void); - extern void _PR_InitLog(void); - extern void _PR_InitNet(void); - extern void _PR_InitClock(void); - extern void _PR_InitLinker(void); -@@ -1812,17 +1827,20 @@ extern PRBool _PR_Obsolete(const char *o - /************************************************************************/ - - struct PRSegment { - void *vaddr; - PRUint32 size; - PRUintn flags; - #if defined(_PR_PTHREADS) - #else /* defined(_PR_PTHREADS) */ -+#if defined(_PR_BTHREADS) -+#else /* defined(_PR_BTHREADS) */ - _MDSegment md; -+#endif /* defined(_PR_BTHREADS) */ - #endif /* defined(_PR_PTHREADS) */ - }; - - /* PRSegment.flags */ - #define _PR_SEG_VM 0x1 - - /************************************************************************/ - -@@ -2109,28 +2127,28 @@ extern void _PR_MD_QUERY_FD_INHERITABLE( - /* --- PR_GetRandomNoise() related things --- */ - - extern PRSize _PR_MD_GetRandomNoise( void *buf, PRSize size ); - #define _PR_MD_GET_RANDOM_NOISE(buf,size) _PR_MD_GetRandomNoise((buf),(size)) - extern PRSize _pr_CopyLowBits( void *dest, PRSize dstlen, void *src, PRSize srclen ); - - /* end PR_GetRandomNoise() related */ - --#ifdef XP_BEOS -+#if defined(XP_BEOS) && !defined(BONE_VERSION) - - extern PRLock *_connectLock; - - typedef struct _ConnectListNode { - PRInt32 osfd; - PRNetAddr addr; - PRUint32 addrlen; - PRIntervalTime timeout; - } ConnectListNode; - - extern ConnectListNode connectList[64]; - - extern PRUint32 connectCount; - --#endif /* XP_BEOS */ -+#endif /* XP_BEOS && !BONE_VERSION */ - - PR_END_EXTERN_C - - #endif /* primpl_h___ */ -Index: mozilla/nsprpub/pr/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/Makefile.in,v -retrieving revision 1.40.2.2 -diff -u -8 -p -w -r1.40.2.2 Makefile.in ---- mozilla/nsprpub/pr/src/Makefile.in 19 Oct 2006 00:39:28 -0000 1.40.2.2 -+++ mozilla/nsprpub/pr/src/Makefile.in 8 Jul 2009 21:53:13 -0000 -@@ -270,36 +270,33 @@ endif - - ifdef USE_PTHREADS - OBJS += \ - pthreads/$(OBJDIR)/ptsynch.$(OBJ_SUFFIX) \ - pthreads/$(OBJDIR)/ptio.$(OBJ_SUFFIX) \ - pthreads/$(OBJDIR)/ptthread.$(OBJ_SUFFIX) \ - pthreads/$(OBJDIR)/ptmisc.$(OBJ_SUFFIX) - else -+ifndef USE_BTHREADS - OBJS += \ - io/$(OBJDIR)/prdir.$(OBJ_SUFFIX) \ - io/$(OBJDIR)/prfile.$(OBJ_SUFFIX) \ - io/$(OBJDIR)/prio.$(OBJ_SUFFIX) \ - io/$(OBJDIR)/prsocket.$(OBJ_SUFFIX) \ -- misc/$(OBJDIR)/pripcsem.$(OBJ_SUFFIX) -- --ifndef USE_BTHREADS --OBJS += \ -+ misc/$(OBJDIR)/pripcsem.$(OBJ_SUFFIX) \ - threads/$(OBJDIR)/prcthr.$(OBJ_SUFFIX) \ - threads/$(OBJDIR)/prdump.$(OBJ_SUFFIX) \ - threads/$(OBJDIR)/prmon.$(OBJ_SUFFIX) \ - threads/$(OBJDIR)/prsem.$(OBJ_SUFFIX) \ - threads/combined/$(OBJDIR)/prucpu.$(OBJ_SUFFIX) \ - threads/combined/$(OBJDIR)/prucv.$(OBJ_SUFFIX) \ - threads/combined/$(OBJDIR)/prulock.$(OBJ_SUFFIX) \ - threads/combined/$(OBJDIR)/prustack.$(OBJ_SUFFIX) \ - threads/combined/$(OBJDIR)/pruthr.$(OBJ_SUFFIX) - endif -- - endif - - ifeq ($(USE_CPLUS), 1) - OBJS += \ - cplus/$(OBJDIR)/rcbase.$(OBJ_SUFFIX) \ - cplus/$(OBJDIR)/rccv.$(OBJ_SUFFIX) \ - cplus/$(OBJDIR)/rcfileio.$(OBJ_SUFFIX) \ - cplus/$(OBJDIR)/rcinrval.$(OBJ_SUFFIX) \ -@@ -397,19 +394,23 @@ endif - - export:: $(TARGETS) - $(INSTALL) -m 444 $(TARGETS) $(dist_libdir) - ifdef SHARED_LIBRARY - ifeq ($(OS_ARCH),HP-UX) - $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_libdir) - $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_bindir) - else -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_bindir)/lib -+else - $(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_bindir) - endif - endif -+endif - ifeq ($(MOZ_BITS),16) - $(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/lib - $(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/bin - endif - - ifeq ($(BUILD_AIX_RTL_LIBC),1) - $(AIX_RTL_LIBC): /usr/ccs/lib/libc.a - rtl_enable -o $@ $< -Index: mozilla/nsprpub/pr/src/bthreads/bsrcs.mk -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/bthreads/bsrcs.mk,v -retrieving revision 3.6 -diff -u -8 -p -w -r3.6 bsrcs.mk ---- mozilla/nsprpub/pr/src/bthreads/bsrcs.mk 25 Apr 2004 15:00:57 -0000 3.6 -+++ mozilla/nsprpub/pr/src/bthreads/bsrcs.mk 8 Jul 2009 21:53:13 -0000 -@@ -15,16 +15,17 @@ - # The Original Code is the Netscape Portable Runtime (NSPR). - # - # The Initial Developer of the Original Code is - # Netscape Communications Corporation. - # Portions created by the Initial Developer are Copyright (C) 1998-2000 - # the Initial Developer. All Rights Reserved. - # - # Contributor(s): -+# Fredrik Holmqvist - # - # 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 -@@ -41,9 +42,11 @@ - - BTCSRCS = \ - btthread.c \ - btlocks.c \ - btcvar.c \ - btmon.c \ - btsem.c \ - btmisc.c \ -+ btfile.c \ -+ btio.c \ - $(NULL) -Index: mozilla/nsprpub/pr/src/bthreads/btcvar.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/bthreads/btcvar.c,v -retrieving revision 3.9 -diff -u -8 -p -w -r3.9 btcvar.c ---- mozilla/nsprpub/pr/src/bthreads/btcvar.c 23 Feb 2005 17:43:13 -0000 3.9 -+++ mozilla/nsprpub/pr/src/bthreads/btcvar.c 8 Jul 2009 21:53:14 -0000 -@@ -15,33 +15,32 @@ - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): -+ * Fredrik Holmqvist - * - * 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 ***** */ - --#include -- - #include "primpl.h" - - /* - ** Create a new condition variable. - ** - ** "lock" is the lock used to protect the condition variable. - ** - ** Condition variables are synchronization objects that threads can use -@@ -125,63 +124,63 @@ PR_IMPLEMENT(PRStatus) - status_t err; - if( timeout == PR_INTERVAL_NO_WAIT ) - { - PR_Unlock( cvar->lock ); - PR_Lock( cvar->lock ); - return PR_SUCCESS; - } - -- if( atomic_add( &cvar->signalBenCount, 1 ) > 0 ) -+ if( _MD_ATOMIC_INCREMENT( &cvar->signalBenCount ) > 1 ) - { - if (acquire_sem(cvar->signalSem) == B_INTERRUPTED) - { -- atomic_add( &cvar->signalBenCount, -1 ); -+ _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ); - return PR_FAILURE; - } - } - cvar->nw += 1; -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } - - PR_Unlock( cvar->lock ); - if( timeout==PR_INTERVAL_NO_TIMEOUT ) - { - err = acquire_sem(cvar->sem); - } - else - { - err = acquire_sem_etc(cvar->sem, 1, B_RELATIVE_TIMEOUT, PR_IntervalToMicroseconds(timeout) ); - } - -- if( atomic_add( &cvar->signalBenCount, 1 ) > 0 ) -+ if( _MD_ATOMIC_INCREMENT( &cvar->signalBenCount ) > 1 ) - { - while (acquire_sem(cvar->signalSem) == B_INTERRUPTED); - } - - if (cvar->ns > 0) - { - release_sem_etc(cvar->handshakeSem, 1, B_DO_NOT_RESCHEDULE); - cvar->ns -= 1; - } - cvar->nw -= 1; -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } - - PR_Lock( cvar->lock ); -- if(err!=B_NO_ERROR) -+ if(err==B_NO_ERROR || (err == B_TIMED_OUT && timeout!=PR_INTERVAL_NO_TIMEOUT)) - { -- return PR_FAILURE; -- } - return PR_SUCCESS; - } -+ return PR_FAILURE; -+} - - /* - ** Notify ONE thread that is currently waiting on 'cvar'. Which thread is - ** dependent on the implementation of the runtime. Common sense would dictate - ** that all threads waiting on a single condition have identical semantics, - ** therefore which one gets notified is not significant. - ** - ** The calling thead must hold the lock that protects the condition, as -@@ -190,41 +189,41 @@ PR_IMPLEMENT(PRStatus) - ** - ** Returns PR_FAILURE if the caller has not locked the lock associated - ** with the condition variable. - */ - PR_IMPLEMENT(PRStatus) - PR_NotifyCondVar (PRCondVar *cvar) - { - status_t err ; -- if( atomic_add( &cvar->signalBenCount, 1 ) > 0 ) -+ if( _MD_ATOMIC_INCREMENT( &cvar->signalBenCount) > 1 ) - { - if (acquire_sem(cvar->signalSem) == B_INTERRUPTED) - { -- atomic_add( &cvar->signalBenCount, -1 ); -+ _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ); - return PR_FAILURE; - } - } - if (cvar->nw > cvar->ns) - { - cvar->ns += 1; - release_sem_etc(cvar->sem, 1, B_DO_NOT_RESCHEDULE); -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } - - while (acquire_sem(cvar->handshakeSem) == B_INTERRUPTED) - { - err = B_INTERRUPTED; - } - } - else - { -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } - } - return PR_SUCCESS; - } - - /* -@@ -236,41 +235,41 @@ PR_IMPLEMENT(PRStatus) - ** with the condition variable. - */ - PR_IMPLEMENT(PRStatus) - PR_NotifyAllCondVar (PRCondVar *cvar) - { - int32 handshakes; - status_t err = B_OK; - -- if( atomic_add( &cvar->signalBenCount, 1 ) > 0 ) -+ if( _MD_ATOMIC_INCREMENT( &cvar->signalBenCount) > 1 ) - { - if (acquire_sem(cvar->signalSem) == B_INTERRUPTED) - { -- atomic_add( &cvar->signalBenCount, -1 ); -+ _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ); - return PR_FAILURE; - } - } - - if (cvar->nw > cvar->ns) - { - handshakes = cvar->nw - cvar->ns; - cvar->ns = cvar->nw; - release_sem_etc(cvar->sem, handshakes, B_DO_NOT_RESCHEDULE); -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } - - while (acquire_sem_etc(cvar->handshakeSem, handshakes, 0, 0) == B_INTERRUPTED) - { - err = B_INTERRUPTED; - } - } - else - { -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } - } - return PR_SUCCESS; - } -Index: mozilla/nsprpub/pr/src/bthreads/btfile.c -=================================================================== -RCS file: mozilla/nsprpub/pr/src/bthreads/btfile.c -diff -N mozilla/nsprpub/pr/src/bthreads/btfile.c ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ mozilla/nsprpub/pr/src/bthreads/btfile.c 5 Nov 2008 20:51:44 -0000 -@@ -0,0 +1,994 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* ***** 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 the Netscape Portable Runtime (NSPR). -+ * -+ * The Initial Developer of the Original Code is -+ * Netscape Communications Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 1998-2000 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Roy Yokoyama -+ * -+ * 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 ***** */ -+ -+#include "primpl.h" -+ -+static PRLock *_pr_flock_lock; /* For PR_LockFile() etc. */ -+static PRCondVar *_pr_flock_cv; /* For PR_LockFile() etc. */ -+ -+PRErrorCode -+map_default_error(int err) -+{ -+ switch (err) { -+ case EACCES: -+ return PR_NO_ACCESS_RIGHTS_ERROR; -+ case EADDRINUSE: -+ return PR_ADDRESS_IN_USE_ERROR; -+ case EADDRNOTAVAIL: -+ return PR_ADDRESS_NOT_AVAILABLE_ERROR; -+ case EAFNOSUPPORT: -+ return PR_ADDRESS_NOT_SUPPORTED_ERROR; -+ /*Same as EWOULDBLOCK*/ -+ case EAGAIN: -+ return PR_WOULD_BLOCK_ERROR; -+#if EALREADY != EBUSY -+ case EALREADY: -+ return PR_ALREADY_INITIATED_ERROR; -+#endif -+ case EBADF: -+ return PR_BAD_DESCRIPTOR_ERROR; -+ case EBUSY: -+ return PR_FILESYSTEM_MOUNTED_ERROR; -+ case ECONNABORTED: -+ return PR_CONNECT_ABORTED_ERROR; -+ case ECONNREFUSED: -+ return PR_CONNECT_REFUSED_ERROR; -+ case EDEADLK: -+ return PR_DEADLOCK_ERROR; -+ case EEXIST: -+ return PR_FILE_EXISTS_ERROR; -+ case EFAULT: -+ return PR_ACCESS_FAULT_ERROR; -+ case EFBIG: -+ return PR_FILE_TOO_BIG_ERROR; -+ case EHOSTUNREACH: -+ return PR_HOST_UNREACHABLE_ERROR; -+ case EINPROGRESS: -+ return PR_IN_PROGRESS_ERROR; -+ case EINTR: -+ return PR_PENDING_INTERRUPT_ERROR; -+ case EINVAL: -+ return PR_INVALID_ARGUMENT_ERROR; -+ case EIO: -+ return PR_IO_ERROR; -+ case EISCONN: -+ return PR_IS_CONNECTED_ERROR; -+ case EISDIR: -+ return PR_IS_DIRECTORY_ERROR; -+ case ELOOP: -+ return PR_LOOP_ERROR; -+ case EMFILE: -+ return PR_PROC_DESC_TABLE_FULL_ERROR; -+ case EMLINK: -+ return PR_MAX_DIRECTORY_ENTRIES_ERROR; -+ case EMSGSIZE: -+ return PR_INVALID_ARGUMENT_ERROR; -+ case ENAMETOOLONG: -+ return PR_NAME_TOO_LONG_ERROR; -+ case ENETUNREACH: -+ return PR_NETWORK_UNREACHABLE_ERROR; -+ case ENFILE: -+ return PR_SYS_DESC_TABLE_FULL_ERROR; -+ case ENOBUFS: -+ return PR_INSUFFICIENT_RESOURCES_ERROR; -+ case ENODEV: -+ case ENOENT: -+ return PR_FILE_NOT_FOUND_ERROR; -+ case ENOLCK: -+ return PR_FILE_IS_LOCKED_ERROR; -+#if 0 -+ case ENOLINK: -+ return PR_REMOTE_FILE_ERROR; -+#endif -+ case ENOMEM: -+ return PR_OUT_OF_MEMORY_ERROR; -+ case ENOPROTOOPT: -+ return PR_INVALID_ARGUMENT_ERROR; -+ case ENOSPC: -+ return PR_NO_DEVICE_SPACE_ERROR; -+ case ENOTCONN: -+ return PR_NOT_CONNECTED_ERROR; -+ case ENOTDIR: -+ return PR_NOT_DIRECTORY_ERROR; -+ case ENOTSOCK: -+ return PR_NOT_SOCKET_ERROR; -+ case ENXIO: -+ return PR_FILE_NOT_FOUND_ERROR; -+ case EOPNOTSUPP: -+ return PR_NOT_TCP_SOCKET_ERROR; -+ case EOVERFLOW: -+ return PR_BUFFER_OVERFLOW_ERROR; -+ case EPERM: -+ return PR_NO_ACCESS_RIGHTS_ERROR; -+ case EPIPE: -+ return PR_CONNECT_RESET_ERROR; -+ case EPROTONOSUPPORT: -+ return PR_PROTOCOL_NOT_SUPPORTED_ERROR; -+ case EPROTOTYPE: -+ return PR_ADDRESS_NOT_SUPPORTED_ERROR; -+ case ERANGE: -+ return PR_INVALID_METHOD_ERROR; -+ case EROFS: -+ return PR_READ_ONLY_FILESYSTEM_ERROR; -+ case ESPIPE: -+ return PR_INVALID_METHOD_ERROR; -+ case ETIMEDOUT: -+ return PR_IO_TIMEOUT_ERROR; -+ case EXDEV: -+ return PR_NOT_SAME_DEVICE_ERROR; -+ default: -+ return PR_UNKNOWN_ERROR; -+ } -+} -+ -+ -+inline void -+set_open_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EAGAIN: -+ case ENOMEM: -+ prError = PR_INSUFFICIENT_RESOURCES_ERROR; -+ break; -+ case EBUSY: -+ prError = PR_IO_ERROR; -+ break; -+ case ENODEV: -+ prError = PR_FILE_NOT_FOUND_ERROR; -+ break; -+ case EOVERFLOW: -+ prError = PR_FILE_TOO_BIG_ERROR; -+ break; -+ case ETIMEDOUT: -+ prError = PR_REMOTE_FILE_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_rename_error(int err) -+{ -+ PR_SetError(err == EEXIST ? PR_DIRECTORY_NOT_EMPTY_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_unlink_error(int err) -+{ -+ PR_SetError(err == EPERM ? PR_IS_DIRECTORY_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_opendir_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_closedir_error(int err) -+{ -+ PR_SetError( err == EINVAL ? PR_BAD_DESCRIPTOR_ERROR : map_default_error(err), err); -+} -+ -+inline void -+set_readdir_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case 0: -+ case ENOENT: -+ prError = PR_NO_MORE_FILES_ERROR; -+ break; -+ case EOVERFLOW: -+ case EINVAL: -+ case ENXIO: -+ prError = PR_IO_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_mkdir_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+ -+inline void -+set_rmdir_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case ENOTEMPTY: -+ case EEXIST: -+ case EINVAL: -+ prError = PR_DIRECTORY_NOT_EMPTY_ERROR; -+ break; -+ case ETIMEDOUT: -+ prError = PR_REMOTE_FILE_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_close_error(int err) -+{ -+ PR_SetError( err == ETIMEDOUT ? PR_REMOTE_FILE_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_read_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_INVALID_METHOD_ERROR; -+ break; -+ case ENXIO: -+ prError = PR_INVALID_ARGUMENT_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_write_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_INVALID_METHOD_ERROR; -+ break; -+ case ENXIO: -+ prError = PR_INVALID_ARGUMENT_ERROR; -+ break; -+ case ETIMEDOUT: -+ prError = PR_REMOTE_FILE_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_lseek_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+ -+inline void -+set_fsync_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_INVALID_METHOD_ERROR; -+ break; -+ case ETIMEDOUT: -+ prError = PR_REMOTE_FILE_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_fstat_error(int err) -+{ -+ PR_SetError(err == ETIMEDOUT ? PR_REMOTE_FILE_ERROR : map_default_error(err), err); -+} -+ -+/* TODO: using uint8 instead of bool due to code that uses bool as var name in hard to change places -+ therefore we had to undef it. Or we need to change Haiku's headers around so we can include -+ everything we need except the bool decl. */ -+PRFileDesc * bt_CreateFileDesc(PRIntn osfd, const PRIOMethods * methods, _PRTriStateBool inheritable, uint8 nonblocking) { -+ const int blocking = 1; -+ PRFileDesc *fd = _PR_Getfd(); -+ if (fd == NULL) -+ { -+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ return NULL; -+ } -+ fd->secret->md.osfd = osfd; -+ fd->secret->state = _PR_FILEDESC_OPEN; -+ fd->secret->inheritable = inheritable; -+ fd->methods = methods; -+ if (nonblocking) -+ setsockopt(osfd, SOL_SOCKET, SO_NONBLOCK, &blocking, sizeof(blocking)); -+ return fd; -+} -+ -+ -+PR_IMPLEMENT(PRFileDesc*) PR_GetSpecialFD(PRSpecialFD osfd) -+{ -+ PR_ASSERT(osfd >= PR_StandardInput && osfd <= PR_StandardError); -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ -+ switch (osfd) -+ { -+ case PR_StandardInput: return _pr_stdin; -+ case PR_StandardOutput: return _pr_stdout; -+ case PR_StandardError: return _pr_stderr; -+ default: -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ } -+ return NULL; -+} /* PR_GetSpecialFD */ -+ -+ -+PR_IMPLEMENT(PRFileDesc*) PR_Open(const char *name, PRIntn flags, PRIntn mode) -+{ -+ return PR_OpenFile(name, flags, mode); -+} /* PR_Open */ -+ -+PR_IMPLEMENT(PRFileDesc*) PR_OpenFile(const char *name, PRIntn flags, PRIntn mode) -+{ -+ PRFileDesc *fd = NULL; -+ PRInt32 osflags; -+ PRInt32 osfd, err; -+ -+ if (flags & PR_RDWR) { -+ osflags = O_RDWR; -+ } else if (flags & PR_WRONLY) { -+ osflags = O_WRONLY; -+ } else { -+ osflags = O_RDONLY; -+ } -+ -+ if (flags & PR_EXCL) -+ osflags |= O_EXCL; -+ if (flags & PR_APPEND) -+ osflags |= O_APPEND; -+ if (flags & PR_TRUNCATE) -+ osflags |= O_TRUNC; -+ if (flags & PR_SYNC) { -+/* Ummmm. BeOS doesn't appear to -+ support sync in any way shape or -+ form. */ -+ return PR_NOT_IMPLEMENTED_ERROR; -+ } -+ -+ if (flags & PR_CREATE_FILE) -+ { -+ osflags |= O_CREAT; -+ } -+ -+ osfd = open(name, osflags, mode); -+ if (osfd < 0) { -+ err = _MD_ERRNO(); -+ set_open_error(err); -+ } -+ -+ if(osfd>=0) { -+ fd = bt_CreateFileDesc(osfd, PR_GetFileMethods(), _PR_TRI_TRUE, false); -+ if (fd == NULL) close(osfd); /* $$$ whoops! this is bad $$$ */ -+ } -+ return fd; -+} /* PR_OpenFile */ -+ -+/* -+** Import an existing OS file to NSPR -+*/ -+PR_IMPLEMENT(PRFileDesc*) PR_ImportFile(PRInt32 osfd) -+{ -+ PRFileDesc *fd = NULL; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ -+ fd = bt_CreateFileDesc(osfd, PR_GetFileMethods(), _PR_TRI_UNKNOWN, false); -+ if (NULL == fd) close(osfd); -+ return fd; -+} -+ -+/* -+** Import an existing OS pipe to NSPR -+*/ -+PR_IMPLEMENT(PRFileDesc*) PR_ImportPipe(PRInt32 osfd) -+{ -+ PRFileDesc *fd = NULL; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ fd = bt_CreateFileDesc(osfd, PR_GetPipeMethods(), _PR_TRI_UNKNOWN, true); -+ -+ if (NULL == fd) close(osfd); -+ return fd; -+} -+ -+ -+PR_IMPLEMENT(PRStatus) PR_Rename(const char *from, const char *to) -+{ -+ PRInt32 rv = -1, err; -+ -+ if (0 == access(to, F_OK)) -+ PR_SetError(PR_FILE_EXISTS_ERROR, 0); -+ else -+ { -+ rv = rename(from, to); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_rename_error(err); -+ } -+ } -+ if (rv < 0) { -+ return PR_FAILURE; -+ } else { -+ return PR_SUCCESS; -+ } -+} -+ -+PR_IMPLEMENT(PRStatus) PR_Delete(const char *name) -+{ -+ PRInt32 rv, err; -+ -+ rv = unlink(name); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_unlink_error(err); -+ return PR_FAILURE; -+ } else -+ return PR_SUCCESS; -+} -+ -+ -+PR_IMPLEMENT(PRDir*) PR_OpenDir(const char *name) -+{ -+ PRDir *dir; -+ PRInt32 err; -+ -+ dir = PR_NEW(PRDir); -+ if (dir) { -+ dir->md.d = opendir(name); -+ if (NULL == dir->md.d) { -+ err = _MD_ERRNO(); -+ set_opendir_error(err); -+ PR_DELETE(dir); -+ return NULL; -+ } -+ } else { -+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ } -+ return dir; -+} -+ -+PR_IMPLEMENT(PRDirEntry*) PR_ReadDir(PRDir *dir, PRDirFlags flags) -+{ -+ PRInt32 err; -+ struct dirent *de; -+ for (;;) { -+ /* -+ * XXX: readdir() is not MT-safe -+ */ -+ _MD_ERRNO() = 0; -+ de = readdir(dir->md.d); -+ -+ if (!de) { -+ err = _MD_ERRNO(); -+ set_readdir_error(err); -+ return 0; -+ } -+ -+ if ((flags & PR_SKIP_DOT) && -+ (de->d_name[0] == '.') && (de->d_name[1] == 0)) -+ continue; -+ -+ if ((flags & PR_SKIP_DOT_DOT) && -+ (de->d_name[0] == '.') && (de->d_name[1] == '.') && -+ (de->d_name[2] == 0)) -+ continue; -+ -+ if ((flags & PR_SKIP_HIDDEN) && (de->d_name[1] == '.')) -+ continue; -+ -+ break; -+ } -+ -+ dir->d.name = de->d_name; -+ return de->d_name ? &dir->d : NULL; -+} -+ -+PR_IMPLEMENT(PRStatus) PR_CloseDir(PRDir *dir) -+{ -+ PRInt32 rv, err; -+ -+ if (dir && dir->md.d) { -+ rv = closedir(dir->md.d); -+ PR_DELETE(dir); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_closedir_error(err); -+ return PR_FAILURE; -+ } -+ } -+ return PR_SUCCESS; -+} -+ -+PR_IMPLEMENT(PRStatus) PR_MkDir(const char *name, PRIntn mode) -+{ -+ status_t rv; -+ int err; -+ -+ rv = mkdir(name, mode); -+ -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_mkdir_error(err); -+ return PR_FAILURE; -+ } -+ return PR_SUCCESS; -+} -+ -+PR_IMPLEMENT(PRStatus) PR_MakeDir(const char *name, PRIntn mode) -+{ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ return PR_MkDir(name, mode); -+} -+ -+PR_IMPLEMENT(PRStatus) PR_RmDir(const char *name) -+{ -+ PRInt32 rv, err; -+ -+ rv = rmdir(name); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_rmdir_error(err); -+ return PR_FAILURE; -+ } else -+ return PR_SUCCESS; -+} -+ -+PR_IMPLEMENT(PRInt32) -+PR_FileDesc2NativeHandle(PRFileDesc *fd) -+{ -+ if (fd) { -+ fd = PR_GetIdentitiesLayer(fd, PR_NSPR_IO_LAYER); -+ } -+ if (!fd) { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return -1; -+ } -+ -+ return fd->secret->md.osfd; -+} -+ -+#ifdef MOZ_UNICODE -+/* -+ * UTF16 Interface -+ */ -+PR_IMPLEMENT(PRDirUTF16*) PR_OpenDirUTF16(const PRUnichar *name) -+{ -+ PRDirUTF16 *dir; -+ PRStatus sts; -+ -+ dir = PR_NEW(PRDirUTF16); -+ if (dir) { -+ sts = _PR_MD_OPEN_DIR_UTF16(&dir->md,name); -+ if (sts != PR_SUCCESS) { -+ PR_DELETE(dir); -+ return NULL; -+ } -+ } else { -+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ } -+ return dir; -+} -+ -+PR_IMPLEMENT(PRDirEntryUTF16*) PR_ReadDirUTF16(PRDirUTF16 *dir, PRDirFlags flags) -+{ -+ /* -+ * _MD_READ_DIR_UTF16 return a PRUnichar* to the name; allocation in -+ * machine-dependent code -+ */ -+ PRUnichar* name = _PR_MD_READ_DIR_UTF16(&dir->md, flags); -+ dir->d.name = name; -+ return name ? &dir->d : NULL; -+} -+ -+PR_IMPLEMENT(PRStatus) PR_CloseDirUTF16(PRDirUTF16 *dir) -+{ -+ PRInt32 rv; -+ -+ if (dir) { -+ rv = _PR_MD_CLOSE_DIR_UTF16(&dir->md); -+ PR_DELETE(dir); -+ if (rv < 0) -+ return PR_FAILURE; -+ else -+ return PR_SUCCESS; -+ } -+ return PR_SUCCESS; -+} -+ -+#endif /* MOZ_UNICODE */ -+ -+ -+static PRStatus PR_CALLBACK FileClose(PRFileDesc *fd) -+{ -+ PRInt32 err; -+ if (!fd || !fd->secret -+ || (fd->secret->state != _PR_FILEDESC_OPEN -+ && fd->secret->state != _PR_FILEDESC_CLOSED)) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ if (fd->secret->state == _PR_FILEDESC_OPEN) { -+ if (close(fd->secret->md.osfd) < 0) { -+ err = _MD_ERRNO(); -+ set_close_error(err); -+ return PR_FAILURE; -+ } -+ fd->secret->state = _PR_FILEDESC_CLOSED; -+ } -+ PR_ASSERT(fd); -+ _PR_Putfd(fd); -+ return PR_SUCCESS; -+} -+ -+static PRInt32 PR_CALLBACK FileRead(PRFileDesc *fd, void *buf, PRInt32 amount) -+{ -+ PRInt32 rv,err = 0; -+ -+ rv = read(fd->secret->md.osfd, buf, amount); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_read_error(err); -+ PR_ASSERT(rv == -1); -+ } -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("read -> %d", rv)); -+ return rv; -+} -+ -+static PRInt32 PR_CALLBACK FileWrite(PRFileDesc *fd, const void *buf, PRInt32 amount) -+{ -+ PRInt32 rv,err = 0; -+ PRInt32 temp, count; -+ -+ count = 0; -+ while (amount > 0) { -+ temp = write(fd->secret->md.osfd, buf, amount); -+ if (temp < 0) { -+ err = _MD_ERRNO(); -+ set_write_error(err); -+ count = -1; -+ break; -+ } -+ count += temp; -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ buf = (const void*) ((const char*)buf + temp); -+ amount -= temp; -+ } -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("write -> %d", count)); -+ return count; -+} -+ -+static PRInt32 PR_CALLBACK FileAvailable(PRFileDesc *fd) -+{ -+ PRInt32 result, cur, end, err; -+ -+ cur = lseek(fd->secret->md.osfd, 0, PR_SEEK_CUR); -+ -+ if (cur >= 0) -+ end = lseek(fd->secret->md.osfd, 0, PR_SEEK_END); -+ -+ if ((cur < 0) || (end < 0)) { -+ err = _MD_ERRNO(); -+ set_lseek_error(err); -+ return -1; -+ } -+ -+ result = end - cur; -+ lseek(fd->secret->md.osfd, cur, PR_SEEK_SET); -+ -+ return result; -+} -+ -+static PRInt64 PR_CALLBACK FileAvailable64(PRFileDesc *fd) -+{ -+ PRInt64 result, cur, end; -+ PRInt64 minus_one; -+ PRInt32 err; -+ -+ cur = lseek(fd->secret->md.osfd, LL_ZERO, PR_SEEK_CUR); -+ -+ if (LL_GE_ZERO(cur)) -+ end = lseek(fd->secret->md.osfd, LL_ZERO, PR_SEEK_END); -+ -+ if (!LL_GE_ZERO(cur) || !LL_GE_ZERO(end)) { -+ LL_I2L(minus_one, -1); -+ err = _MD_ERRNO(); -+ set_lseek_error(err); -+ return minus_one; -+ } -+ LL_SUB(result, end, cur); -+ lseek(fd->secret->md.osfd, cur, PR_SEEK_SET); -+ return result; -+} -+ -+static PRStatus PR_CALLBACK FileSync(PRFileDesc *fd) -+{ -+ PRInt32 result, err; -+ result = fsync(fd->secret->md.osfd); -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_fsync_error(err); -+ return PR_FAILURE; -+ } -+ return PR_SUCCESS; -+} -+ -+static PROffset32 PR_CALLBACK FileSeek(PRFileDesc *fd, PROffset32 offset, PRSeekWhence whence) -+{ -+ PROffset32 result; -+ PRInt32 err; -+ result = lseek(fd->secret->md.osfd, offset, whence); -+ if(result<0) { -+ err = _MD_ERRNO(); -+ set_lseek_error(err); -+ } -+ return result; -+} -+ -+static PROffset64 PR_CALLBACK FileSeek64(PRFileDesc *fd, PROffset64 offset, PRSeekWhence whence) -+{ -+ PROffset64 result; -+ PRInt32 err; -+ -+ result = lseek(fd->secret->md.osfd, offset, whence); -+ if(!LL_GE_ZERO(result)) { -+ err = _MD_ERRNO(); -+ set_lseek_error(err); -+ } -+ return result; -+} -+ -+static PRStatus PR_CALLBACK FileGetInfo(PRFileDesc *fd, PRFileInfo *info) -+{ -+ struct stat sb; -+ PRInt64 s, s2us; -+ PRInt32 rv, err; -+ -+ rv = fstat(fd->secret->md.osfd, &sb); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_fstat_error(err); -+ return PR_FAILURE; -+ } -+ if(info) { -+ if (S_IFREG & sb.st_mode) -+ info->type = PR_FILE_FILE ; -+ else if (S_IFDIR & sb.st_mode) -+ info->type = PR_FILE_DIRECTORY; -+ else -+ info->type = PR_FILE_OTHER; -+ /* Use lower 32 bits of file size */ -+ info->size = ( sb.st_size & 0xffffffff); -+ LL_I2L(s, sb.st_mtime); -+ LL_I2L(s2us, PR_USEC_PER_SEC); -+ LL_MUL(s, s, s2us); -+ info->modifyTime = s; -+ LL_I2L(s, sb.st_ctime); -+ LL_MUL(s, s, s2us); -+ info->creationTime = s; -+ } -+ return PR_SUCCESS; -+} -+ -+static PRStatus PR_CALLBACK FileGetInfo64(PRFileDesc *fd, PRFileInfo64 *info) -+{ -+ struct stat sb; -+ PRInt64 s, s2us; -+ PRInt32 rv, err; -+ -+ rv = fstat(fd->secret->md.osfd, &sb); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_fstat_error(err); -+ return PR_FAILURE; -+ } -+ if(info) { -+ if (S_IFREG & sb.st_mode) -+ info->type = PR_FILE_FILE ; -+ else if (S_IFDIR & sb.st_mode) -+ info->type = PR_FILE_DIRECTORY; -+ else -+ info->type = PR_FILE_OTHER; -+ info->size = sb.st_size; -+ LL_I2L(s, sb.st_mtime); -+ LL_I2L(s2us, PR_USEC_PER_SEC); -+ LL_MUL(s, s, s2us); -+ info->modifyTime = s; -+ LL_I2L(s, sb.st_ctime); -+ LL_MUL(s, s, s2us); -+ info->creationTime = s; -+ } -+ return PR_SUCCESS; -+} -+ -+static PRInt16 PR_CALLBACK FilePoll( -+ PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags) -+{ -+ *out_flags = 0; -+ return in_flags; -+} /* FilePoll */ -+ -+ -+static PRIOMethods _pr_fileMethods = { -+ PR_DESC_FILE, -+ FileClose, -+ FileRead, -+ FileWrite, -+ FileAvailable, -+ FileAvailable64, -+ FileSync, -+ FileSeek, -+ FileSeek64, -+ FileGetInfo, -+ FileGetInfo64, -+ (PRWritevFN)_PR_InvalidInt, -+ (PRConnectFN)_PR_InvalidStatus, -+ (PRAcceptFN)_PR_InvalidDesc, -+ (PRBindFN)_PR_InvalidStatus, -+ (PRListenFN)_PR_InvalidStatus, -+ (PRShutdownFN)_PR_InvalidStatus, -+ (PRRecvFN)_PR_InvalidInt, -+ (PRSendFN)_PR_InvalidInt, -+ (PRRecvfromFN)_PR_InvalidInt, -+ (PRSendtoFN)_PR_InvalidInt, -+ FilePoll, -+ (PRAcceptreadFN)_PR_InvalidInt, -+ (PRTransmitfileFN)_PR_InvalidInt, -+ (PRGetsocknameFN)_PR_InvalidStatus, -+ (PRGetpeernameFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRGetsocketoptionFN)_PR_InvalidStatus, -+ (PRSetsocketoptionFN)_PR_InvalidStatus, -+ (PRSendfileFN)_PR_InvalidInt, -+ (PRConnectcontinueFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+PR_IMPLEMENT(const PRIOMethods*) PR_GetFileMethods(void) -+{ -+ return &_pr_fileMethods; -+} -+ -+ -+static PRInt32 PR_CALLBACK PipeAvailable(PRFileDesc *fd) -+{ -+ PRInt32 rv; -+ rv = _bt_socketavailable(fd); -+ return rv; -+} -+ -+static PRInt64 PR_CALLBACK PipeAvailable64(PRFileDesc *fd) -+{ -+ PRInt64 rv; -+ LL_I2L(rv, _bt_socketavailable(fd)); -+ return rv; -+} -+ -+static PRStatus PR_CALLBACK PipeSync(PRFileDesc *fd) -+{ -+ return PR_SUCCESS; -+} -+ -+ -+static PRIOMethods _pr_pipeMethods = { -+ PR_DESC_PIPE, -+ FileClose, -+ FileRead, -+ FileWrite, -+ PipeAvailable, -+ PipeAvailable64, -+ PipeSync, -+ (PRSeekFN)_PR_InvalidInt, -+ (PRSeek64FN)_PR_InvalidInt64, -+ (PRFileInfoFN)_PR_InvalidStatus, -+ (PRFileInfo64FN)_PR_InvalidStatus, -+ (PRWritevFN)_PR_InvalidInt, -+ (PRConnectFN)_PR_InvalidStatus, -+ (PRAcceptFN)_PR_InvalidDesc, -+ (PRBindFN)_PR_InvalidStatus, -+ (PRListenFN)_PR_InvalidStatus, -+ (PRShutdownFN)_PR_InvalidStatus, -+ (PRRecvFN)_PR_InvalidInt, -+ (PRSendFN)_PR_InvalidInt, -+ (PRRecvfromFN)_PR_InvalidInt, -+ (PRSendtoFN)_PR_InvalidInt, -+ FilePoll, -+ (PRAcceptreadFN)_PR_InvalidInt, -+ (PRTransmitfileFN)_PR_InvalidInt, -+ (PRGetsocknameFN)_PR_InvalidStatus, -+ (PRGetpeernameFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRGetsocketoptionFN)_PR_InvalidStatus, -+ (PRSetsocketoptionFN)_PR_InvalidStatus, -+ (PRSendfileFN)_PR_InvalidInt, -+ (PRConnectcontinueFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+PR_IMPLEMENT(const PRIOMethods*) PR_GetPipeMethods(void) -+{ -+ return &_pr_pipeMethods; -+} -+ -+void _PR_InitIO(void) { -+ const PRIOMethods *methods = PR_GetFileMethods(); -+ _PR_InitFdCache(); -+ _pr_flock_lock = PR_NewLock(); -+ _pr_flock_cv = PR_NewCondVar(_pr_flock_lock); -+ _pr_stdin = bt_CreateFileDesc(0, PR_GetFileMethods(), _PR_TRI_UNKNOWN, false); -+ _pr_stdout = bt_CreateFileDesc(1, PR_GetFileMethods(), _PR_TRI_UNKNOWN, false); -+ _pr_stderr = bt_CreateFileDesc(2, PR_GetFileMethods(), _PR_TRI_UNKNOWN, false); -+} -+ -Index: mozilla/nsprpub/pr/src/bthreads/btio.c -=================================================================== -RCS file: mozilla/nsprpub/pr/src/bthreads/btio.c -diff -N mozilla/nsprpub/pr/src/bthreads/btio.c ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ mozilla/nsprpub/pr/src/bthreads/btio.c 5 Nov 2008 20:51:44 -0000 -@@ -0,0 +1,2424 @@ -+/* -*- Mode: C++; c-basic-offset: 4 -*- */ -+/* ***** 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 the Netscape Portable Runtime (NSPR). -+ * -+ * The Initial Developer of the Original Code is -+ * Netscape Communications Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 1998-2000 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * -+ * 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 ***** */ -+ -+#include "primpl.h" -+#include -+#include -+#include -+ -+#define READ_FD 1 -+#define WRITE_FD 2 -+ -+#ifdef BONE_VERSION -+inline int closesocket(int socket) { -+ return close(socket); -+} -+#endif -+ -+ -+inline void -+set_stat_error(int err) -+{ -+ PR_SetError(err == ETIMEDOUT ? PR_REMOTE_FILE_ERROR : map_default_error(err), err); -+} -+ -+inline void -+set_access_error(int err) -+{ -+ PR_SetError(err == ETIMEDOUT ? PR_REMOTE_FILE_ERROR : map_default_error(err), err); -+} -+ -+inline void -+set_select_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_writev_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_connect_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EACCES: -+ case ELOOP: -+ case ENOENT: -+ prError = PR_ADDRESS_NOT_SUPPORTED_ERROR; -+ break; -+ case ENXIO: -+ prError = PR_IO_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+ -+} -+ -+inline void -+set_accept_error(int err) -+{ -+ PR_SetError(err == ENODEV ? PR_NOT_TCP_SOCKET_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_bind_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_SOCKET_ADDRESS_IS_BOUND_ERROR; -+ break; -+ case EIO: -+ case EISDIR: -+ case ELOOP: -+ case ENOENT: -+ case ENOTDIR: -+ case EROFS: -+ prError = PR_ADDRESS_NOT_SUPPORTED_ERROR; -+ break; -+ case ENXIO: -+ prError = PR_IO_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+inline void -+set_listen_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_shutdown_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_socketpair_error(int err) -+{ -+ PR_SetError(err == ENOMEM ? PR_INSUFFICIENT_RESOURCES_ERROR : map_default_error(err), err); -+} -+ -+inline void -+set_recv_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_recvfrom_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+ -+inline void -+set_send_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_sendto_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_getsockname_error(int err) -+{ -+ PR_SetError(err == ENOMEM ? PR_INSUFFICIENT_RESOURCES_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_getpeername_error(int err) -+{ -+ PR_SetError(err == ENOMEM ? PR_INSUFFICIENT_RESOURCES_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_getsockopt_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_BUFFER_OVERFLOW_ERROR; -+ break; -+ case ENOMEM: -+ prError = PR_INSUFFICIENT_RESOURCES_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+inline void -+set_setsockopt_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_BUFFER_OVERFLOW_ERROR; -+ break; -+ case ENOMEM: -+ prError = PR_INSUFFICIENT_RESOURCES_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_socket_error(int err) -+{ -+ PR_SetError( err == ENOMEM ? PR_INSUFFICIENT_RESOURCES_ERROR : map_default_error(err), err); -+} -+ -+ -+PR_IMPLEMENT(PRStatus) PR_GetFileInfo(const char *fn, PRFileInfo *info) -+{ -+ struct stat sb; -+ PRInt32 rv, err; -+ PRInt64 s, s2us; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ rv = stat(fn, &sb); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_stat_error(err); -+ return PR_FAILURE; -+ } -+ if (info) { -+ if (S_IFREG & sb.st_mode) -+ info->type = PR_FILE_FILE; -+ else if (S_IFDIR & sb.st_mode) -+ info->type = PR_FILE_DIRECTORY; -+ else -+ info->type = PR_FILE_OTHER; -+ -+ /* Use lower 32 bits of file size */ -+ info->size = sb.st_size & 0xffffffff; -+ LL_I2L(s, sb.st_mtime); -+ LL_I2L(s2us, PR_USEC_PER_SEC); -+ LL_MUL(s, s, s2us); -+ info->modifyTime = s; -+ LL_I2L(s, sb.st_ctime); -+ LL_MUL(s, s, s2us); -+ info->creationTime = s; -+ } -+ -+ return PR_SUCCESS; -+} -+ -+ -+PR_IMPLEMENT(PRStatus) PR_GetFileInfo64(const char *fn, PRFileInfo64 *info) -+{ -+ struct stat sb; -+ PRInt32 rv, err; -+ PRInt64 s, s2us; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ rv = stat(fn, &sb); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_stat_error(err); -+ return PR_FAILURE; -+ } -+ if (info) { -+ if (S_IFREG & sb.st_mode) -+ info->type = PR_FILE_FILE; -+ else if (S_IFDIR & sb.st_mode) -+ info->type = PR_FILE_DIRECTORY; -+ else -+ info->type = PR_FILE_OTHER; -+ -+ /* For the 64 bit version we can use -+ * the native st_size without modification -+ */ -+ info->size = sb.st_size; -+ LL_I2L(s, sb.st_mtime); -+ LL_I2L(s2us, PR_USEC_PER_SEC); -+ LL_MUL(s, s, s2us); -+ info->modifyTime = s; -+ LL_I2L(s, sb.st_ctime); -+ LL_MUL(s, s, s2us); -+ info->creationTime = s; -+ } -+ -+ return PR_SUCCESS; -+} -+ -+PR_IMPLEMENT(PRStatus) PR_Access(const char *name, PRAccessHow how) -+{ -+ PRInt32 rv, err; -+ int checkFlags; -+ struct stat buf; -+ -+ switch (how) { -+ case PR_ACCESS_WRITE_OK: -+ checkFlags = S_IWUSR | S_IWGRP | S_IWOTH; -+ break; -+ -+ case PR_ACCESS_READ_OK: -+ checkFlags = S_IRUSR | S_IRGRP | S_IROTH; -+ break; -+ -+ case PR_ACCESS_EXISTS: -+ /* we don't need to examine st_mode. */ -+ break; -+ -+ default: { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return PR_FAILURE; -+ } -+ } -+ -+ rv = stat(name, &buf); -+ if (rv == 0 && how != PR_ACCESS_EXISTS && (!(buf.st_mode & checkFlags))) { -+ PR_SetError(PR_NO_ACCESS_RIGHTS_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_access_error(err); -+ return PR_FAILURE; -+ } else -+ return PR_SUCCESS; -+} -+ -+ -+PRInt32 -+_bt_socketavailable (PRFileDesc *fd) -+{ -+#ifdef BONE_VERSION -+ PRInt32 result; -+ -+ if (ioctl(fd->secret->md.osfd, FIONREAD, &result) < 0) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, _MD_ERRNO()); -+ return -1; -+ } -+ return result; -+#else -+ return PR_NOT_IMPLEMENTED_ERROR; -+#endif -+} -+ -+ -+#if defined(DEBUG) -+ -+PRBool IsValidNetAddr(const PRNetAddr *addr) -+{ -+ if ((addr != NULL) -+ && (addr->raw.family != PR_AF_INET6) -+ && (addr->raw.family != PR_AF_INET)) { -+ return PR_FALSE; -+ } -+ return PR_TRUE; -+} -+ -+static PRBool IsValidNetAddrLen(const PRNetAddr *addr, PRInt32 addr_len) -+{ -+ /* -+ * The definition of the length of a Unix domain socket address -+ * is not uniform, so we don't check it. -+ */ -+ if ((addr != NULL) -+ && (PR_NETADDR_SIZE(addr) != addr_len)) { -+ return PR_FALSE; -+ } -+ return PR_TRUE; -+} -+ -+#endif /* DEBUG */ -+ -+static PRInt32 socket_io_wait(PRInt32 osfd, PRInt32 fd_type, -+ PRIntervalTime timeout) -+{ -+ PRInt32 rv = -1; -+ struct timeval tv; -+ PRIntervalTime epoch, now, elapsed, remaining; -+ PRBool wait_for_remaining; -+ PRInt32 syserror; -+ fd_set rd_wr; -+ -+ switch (timeout) { -+ case PR_INTERVAL_NO_WAIT: -+ PR_SetError(PR_IO_TIMEOUT_ERROR, 0); -+ break; -+ case PR_INTERVAL_NO_TIMEOUT: -+ /* -+ * This is a special case of the 'default' case below. -+ * Please see the comments there. -+ */ -+ tv.tv_sec = _PR_INTERRUPT_CHECK_INTERVAL_SECS; -+ tv.tv_usec = 0; -+ FD_ZERO(&rd_wr); -+ do { -+ FD_SET(osfd, &rd_wr); -+ if (fd_type == READ_FD) -+ rv = select(osfd + 1, &rd_wr, NULL, NULL, &tv); -+ else -+ rv = select(osfd + 1, NULL, &rd_wr, NULL, &tv); -+ if (rv == -1 && (syserror = _MD_ERRNO()) != EINTR) { -+#ifdef BONE_VERSION -+ set_select_error(syserror); -+#else -+ if (syserror == EBADF) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, EBADF); -+ } else { -+ PR_SetError(PR_UNKNOWN_ERROR, syserror); -+ } -+#endif -+ break; -+ } -+ } while (rv == 0 || (rv == -1 && syserror == EINTR)); -+ break; -+ default: -+ now = epoch = PR_IntervalNow(); -+ remaining = timeout; -+ FD_ZERO(&rd_wr); -+ do { -+ /* -+ * We block in select for at most -+ * _PR_INTERRUPT_CHECK_INTERVAL_SECS seconds, -+ * so that there is an upper limit on the delay -+ * before the interrupt bit is checked. -+ */ -+ wait_for_remaining = PR_TRUE; -+ tv.tv_sec = PR_IntervalToSeconds(remaining); -+ if (tv.tv_sec > _PR_INTERRUPT_CHECK_INTERVAL_SECS) { -+ wait_for_remaining = PR_FALSE; -+ tv.tv_sec = _PR_INTERRUPT_CHECK_INTERVAL_SECS; -+ tv.tv_usec = 0; -+ } else { -+ tv.tv_usec = PR_IntervalToMicroseconds( -+ remaining - -+ PR_SecondsToInterval(tv.tv_sec)); -+ } -+ FD_SET(osfd, &rd_wr); -+ if (fd_type == READ_FD) -+ rv = select(osfd + 1, &rd_wr, NULL, NULL, &tv); -+ else -+ rv = select(osfd + 1, NULL, &rd_wr, NULL, &tv); -+ /* -+ * we don't consider EINTR a real error -+ */ -+ if (rv == -1 && (syserror = _MD_ERRNO()) != EINTR) { -+#ifdef BONE_VERSION -+ set_select_error(syserror); -+#else -+ if (syserror == EBADF) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, EBADF); -+ } else { -+ PR_SetError(PR_UNKNOWN_ERROR, syserror); -+ } -+#endif -+ break; -+ } -+ /* -+ * We loop again if select timed out or got interrupted -+ * by a signal, and the timeout deadline has not passed yet. -+ */ -+ if (rv == 0 || (rv == -1 && syserror == EINTR)) { -+ /* -+ * If select timed out, we know how much time -+ * we spent in blocking, so we can avoid a -+ * PR_IntervalNow() call. -+ */ -+ if (rv == 0) { -+ if (wait_for_remaining) { -+ now += remaining; -+ } else { -+ now += PR_SecondsToInterval(tv.tv_sec) -+ + PR_MicrosecondsToInterval(tv.tv_usec); -+ } -+ } else { -+ now = PR_IntervalNow(); -+ } -+ elapsed = (PRIntervalTime) (now - epoch); -+ if (elapsed >= timeout) { -+ PR_SetError(PR_IO_TIMEOUT_ERROR, 0); -+ rv = -1; -+ break; -+ } else { -+ remaining = timeout - elapsed; -+ } -+ } -+ } while (rv == 0 || (rv == -1 && syserror == EINTR)); -+ break; -+ } -+ return(rv); -+} -+ -+ -+static PRInt32 PR_CALLBACK SocketWritev(PRFileDesc *fd, const PRIOVec *iov, -+PRInt32 iov_size, PRIntervalTime timeout) -+{ -+#ifdef BONE_VERSION -+ int w, err = 0; -+ const PRIOVec *tmp_iov; -+#define LOCAL_MAXIOV 8 -+ PRIOVec local_iov[LOCAL_MAXIOV]; -+ PRIOVec *iov_copy = NULL; -+ int tmp_out; -+ int index, iov_cnt; -+ int count=0, sz = 0; /* 'count' is the return value. */ -+ int i, amount = 0; -+ -+ /* -+ * Assume the first writev will succeed. Copy iov's only on -+ * failure. -+ */ -+ tmp_iov = iov; -+ for (index = 0; index < iov_size; index++) -+ sz += iov[index].iov_len; -+ -+ iov_cnt = iov_size; -+ -+ while (sz > 0) { -+/* -+ /* -+ * Calculate the total number of bytes to be sent; needed for -+ * optimization later. -+ * We could avoid this if this number was passed in; but it is -+ * probably not a big deal because iov_size is usually small (less than -+ * 3) -+ */ -+ if (!fd->secret->nonblocking) { -+ for (i=0; isecret->md.osfd, (const struct iovec*)tmp_iov, iov_size)) == -1) { -+ err = _MD_ERRNO(); -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ if ((w = socket_io_wait(fd->secret->md.osfd, WRITE_FD, timeout))<0) -+ goto done; -+ -+ } else if (err == EINTR) { -+ continue; -+ } else { -+ break; -+ } -+ } -+ /* -+ * optimization; if bytes sent is less than "amount" call -+ * select before returning. This is because it is likely that -+ * the next writev() call will return EWOULDBLOCK. -+ */ -+ if ((!fd->secret->nonblocking) && (w > 0) && (w < amount) -+ && (timeout != PR_INTERVAL_NO_WAIT)) { -+ if (socket_io_wait(fd->secret->md.osfd, WRITE_FD, timeout) < 0) { -+ w = -1; -+ goto done; -+ } -+ } -+ -+ if (w < 0) { -+ set_writev_error(err); -+ } -+done: -+ -+ -+ if (w < 0) { -+ count = -1; -+ break; -+ } -+ count += w; -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ sz -= w; -+ -+ if (sz > 0) { -+ /* find the next unwritten vector */ -+ for ( index = 0, tmp_out = count; -+ tmp_out >= iov[index].iov_len; -+ tmp_out -= iov[index].iov_len, index++){;} /* nothing to execute */ -+ -+ if (tmp_iov == iov) { -+ /* -+ * The first writev failed so we -+ * must copy iov's around. -+ * Avoid calloc/free if there -+ * are few enough iov's. -+ */ -+ if (iov_size - index <= LOCAL_MAXIOV) -+ iov_copy = local_iov; -+ else if ((iov_copy = (PRIOVec *) PR_CALLOC((iov_size - index) * -+ sizeof *iov_copy)) == NULL) { -+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ return -1; -+ } -+ tmp_iov = iov_copy; -+ } -+ -+ PR_ASSERT(tmp_iov == iov_copy); -+ -+ /* fill in the first partial read */ -+ iov_copy[0].iov_base = &(((char *)iov[index].iov_base)[tmp_out]); -+ iov_copy[0].iov_len = iov[index].iov_len - tmp_out; -+ index++; -+ -+ /* copy the remaining vectors */ -+ for (iov_cnt=1; indexsecret->md.osfd; -+ -+#ifndef BONE_VERSION -+ fd->secret->md.connectValueValid = PR_FALSE; -+#endif -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ PRNetAddr addrCopy; -+ -+ addrCopy = *addr; -+ ((struct sockaddr *) &addrCopy)->sa_len = addrlen; -+ ((struct sockaddr *) &addrCopy)->sa_family = addr->raw.family; -+#endif -+ -+ /* (Copied from unix.c) -+ * We initiate the connection setup by making a nonblocking connect() -+ * call. If the connect() call fails, there are two cases we handle -+ * specially: -+ * 1. The connect() call was interrupted by a signal. In this case -+ * we simply retry connect(). -+ * 2. The NSPR socket is nonblocking and connect() fails with -+ * EINPROGRESS. We first wait until the socket becomes writable. -+ * Then we try to find out whether the connection setup succeeded -+ * or failed. -+ */ -+ -+retry: -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ if ((rv = connect(osfd, (struct sockaddr *)&addrCopy, addrlen)) == -1) { -+#else -+ if ((rv = connect(osfd, (struct sockaddr *)addr, addrlen)) == -1) { -+#endif -+ err = _MD_ERRNO(); -+#ifndef BONE_VERSION -+ fd->secret->md.connectReturnValue = rv; -+ fd->secret->md.connectReturnError = err; -+ fd->secret->md.connectValueValid = PR_TRUE; -+#endif -+ if( err == EINTR ) { -+#ifndef BONE_VERSION -+ snooze( 100000L ); -+#endif -+ goto retry; -+ } -+ -+#ifndef BONE_VERSION -+ if(!fd->secret->nonblocking && ((err == EINPROGRESS) || (err==EAGAIN) || (err==EALREADY))) { -+ -+ /* -+ ** There's no timeout on this connect, but that's not -+ ** a big deal, since the connect times out anyways -+ ** after 30 seconds. Just sleep for 1/10th of a second -+ ** and retry until we go through or die. -+ */ -+ goto retry; -+ } -+ -+ if( fd->secret->nonblocking && ((err == EAGAIN) || (err == EINPROGRESS))) { -+ PR_Lock(_connectLock); -+ if (connectCount < sizeof(connectList)/sizeof(connectList[0])) { -+ connectList[connectCount].osfd = osfd; -+ memcpy(&connectList[connectCount].addr, addr, addrlen); -+ connectList[connectCount].addrlen = addrlen; -+ connectList[connectCount].timeout = timeout; -+ connectCount++; -+ PR_Unlock(_connectLock); -+ set_connect_error(err); -+ } else { -+ PR_Unlock(_connectLock); -+ PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, 0); -+ } -+ return rv; -+ } -+#else /* BONE_VERSION */ -+ if(!fd->secret->nonblocking && (err == EINTR)) { -+ -+ rv = socket_io_wait(osfd, WRITE_FD, timeout); -+ if (rv == -1) { -+ return -1; -+ } -+ -+ PR_ASSERT(rv == 1); -+/* _MD_beos_get_nonblocking_connect_error always return PR_NOT_IMPLEMENTED.. -+ err = _MD_beos_get_nonblocking_connect_error(osfd); -+ if (err != 0) { -+ set_connect_error(err); -+ return -1; -+ } -+*/ -+ return 0; -+ } -+#endif -+ -+ set_connect_error(err); -+ } -+ -+ return rv; -+} -+ -+ -+static PRStatus PR_CALLBACK SocketConnect( -+ PRFileDesc *fd, const PRNetAddr *addr, PRIntervalTime timeout) -+{ -+ PRInt32 rv; /* Return value of _PR_MD_CONNECT */ -+ const PRNetAddr *addrp = addr; -+#if defined(_PR_INET6) -+ PRNetAddr addrCopy; -+ if (addr->raw.family == PR_AF_INET6) { -+ addrCopy = *addr; -+ addrCopy.raw.family = AF_INET6; -+ addrp = &addrCopy; -+ } -+#endif -+ -+ rv = _bt_CONNECT(fd, addrp, PR_NETADDR_SIZE(addr), timeout); -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("connect -> %d", rv)); -+ if (rv == 0) -+ return PR_SUCCESS; -+ else -+ return PR_FAILURE; -+} -+ -+static PRStatus PR_CALLBACK SocketConnectContinue( -+ PRFileDesc *fd, PRInt16 out_flags) -+{ -+ PRInt32 osfd; -+ int err; -+ int rv; -+ -+ if (out_flags & PR_POLL_NVAL) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); -+ return PR_FAILURE; -+ } -+ if ((out_flags & (PR_POLL_WRITE | PR_POLL_EXCEPT | PR_POLL_ERR)) == 0) { -+ PR_ASSERT(out_flags == 0); -+ PR_SetError(PR_IN_PROGRESS_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ osfd = fd->secret->md.osfd; -+ -+ -+#ifdef BONE_VERSION /* bug 122364 */ -+ /* temporary workaround until getsockopt(SO_ERROR) works in BONE */ -+ if (out_flags & PR_POLL_EXCEPT) { -+ PR_SetError(PR_CONNECT_REFUSED_ERROR, 0); -+ return PR_FAILURE; -+ } -+ PR_ASSERT(out_flags & PR_POLL_WRITE); -+ return PR_SUCCESS; -+#else -+ rv = recv(fd->secret->md.osfd, NULL, 0, 0); -+ PR_ASSERT(-1 == rv || 0 == rv); -+ -+ if (-1 == rv && 0 != errno && errno != EAGAIN && errno != EWOULDBLOCK ) { -+ set_connect_error(errno); -+ return PR_FAILURE; -+ } -+ else -+ return PR_SUCCESS; -+#endif -+} -+ -+PRInt32 -+_bt_accept (PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, -+ PRIntervalTime timeout) -+{ -+ PRInt32 osfd = fd->secret->md.osfd; -+ PRInt32 rv, err; -+ -+ while ((rv = accept(osfd, (struct sockaddr *) addr, -+ (int *)addrlen)) == -1) { -+ err = _MD_ERRNO(); -+ -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ /* If it's SUPPOSED to be a blocking thread, wait -+ * a while to see if the triggering condition gets -+ * satisfied. -+ */ -+ /* Assume that we're always using a native thread */ -+ if ((rv = socket_io_wait(osfd, READ_FD, timeout)) < 0) -+ goto done; -+ } else if (err == EINTR) { -+ continue; -+ } else { -+ break; -+ } -+ } -+ if (rv < 0) { -+ set_accept_error(err); -+ } else if (addr != NULL) { -+ /* bug 134099 */ -+ err = getpeername(rv, (struct sockaddr *) addr, (int *)addrlen); -+ } -+done: -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ if (rv != -1) { -+ /* Mask off the first byte of struct sockaddr (the length field) */ -+ if (addr) { -+ addr->raw.family = ((struct sockaddr *) addr)->sa_family; -+ } -+ } -+#endif /* _PR_HAVE_SOCKADDR_LEN */ -+ return(rv); -+} -+ -+ -+ -+static PRFileDesc* PR_CALLBACK SocketAccept(PRFileDesc *fd, PRNetAddr *addr, -+PRIntervalTime timeout) -+{ -+ PRInt32 osfd; -+ PRFileDesc *fd2; -+ PRUint32 al; -+ -+ al = sizeof(PRNetAddr); -+ osfd = _bt_accept(fd, addr, &al, timeout); -+ if (osfd == -1) -+ return 0; -+ fd2 = bt_CreateFileDesc(osfd, PR_GetTCPMethods(), _PR_TRI_TRUE, true); -+ if (!fd2) { -+ closesocket(osfd); -+ -+ return NULL; -+ } -+ -+ fd2->secret->nonblocking = fd->secret->nonblocking; -+ fd2->secret->inheritable = fd->secret->inheritable; -+ -+#ifdef _PR_INET6 -+ if (addr && (AF_INET6 == addr->raw.family)) -+ addr->raw.family = PR_AF_INET6; -+#endif -+ PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE); -+ PR_ASSERT(IsValidNetAddrLen(addr, al) == PR_TRUE); -+ -+ return fd2; -+} -+ -+ -+static PRStatus PR_CALLBACK SocketBind(PRFileDesc *fd, const PRNetAddr *addr) -+{ -+ PRInt32 result, err; -+ const PRNetAddr *addrp = addr; -+#if defined(_PR_INET6) || defined(_PR_HAVE_SOCKADDR_LEN) -+ PRNetAddr addrCopy; -+#endif -+ -+ PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE); -+#if defined(_PR_INET6) -+ if (addr->raw.family == PR_AF_INET6) { -+ addrCopy = *addr; -+ addrCopy.raw.family = AF_INET6; -+ addrp = &addrCopy; -+ } -+#endif -+ -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ addrCopy = *addrp; -+ ((struct sockaddr *) &addrCopy)->sa_len = PR_NETADDR_SIZE(addrp); -+ ((struct sockaddr *) &addrCopy)->sa_family = addr->raw.family; -+ result = bind(fd->secret->md.osfd, (struct sockaddr *) &addrCopy, PR_NETADDR_SIZE(addrp)); -+#else -+ result = bind(fd->secret->md.osfd, (struct sockaddr *) addrp, PR_NETADDR_SIZE(addrp)); -+#endif -+ -+ -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_bind_error(err); -+ return PR_FAILURE; -+ } -+ return PR_SUCCESS; -+} -+ -+static PRStatus PR_CALLBACK SocketListen(PRFileDesc *fd, PRIntn backlog) -+{ -+ PRInt32 result,err; -+#ifndef BONE_VERSION -+ /* Bug workaround! Setting listen to 0 on Be accepts no connections. -+ ** On most UN*Xes this sets the default. -+ */ -+ -+ if( backlog == 0 ) backlog = 5; -+#endif -+ result = listen(fd->secret->md.osfd, backlog); -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_listen_error(err); -+ return PR_FAILURE; -+ } -+ return PR_SUCCESS; -+} -+ -+static PRStatus PR_CALLBACK SocketShutdown(PRFileDesc *fd, PRIntn how) -+{ -+ PRInt32 result,err; -+#ifndef BONE_VERSION -+ if (how == PR_SHUTDOWN_SEND) -+ fd->secret->md.sock_state = BE_SOCK_SHUTDOWN_WRITE; -+ else if (how == PR_SHUTDOWN_RCV) -+ fd->secret->md.sock_state = BE_SOCK_SHUTDOWN_READ; -+ else if (how == PR_SHUTDOWN_BOTH) { -+ fd->secret->md.sock_state = (BE_SOCK_SHUTDOWN_WRITE | BE_SOCK_SHUTDOWN_READ); -+ } -+#else /* BONE_VERSION */ -+ result = shutdown(fd->secret->md.osfd, how); -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_shutdown_error(err); -+ return PR_FAILURE; -+ } -+#endif -+ return PR_SUCCESS; -+} -+ -+PRInt32 -+_bt_recv (PRFileDesc *fd, void *buf, PRInt32 amount, PRInt32 flags, -+ PRIntervalTime timeout) -+{ -+ PRInt32 osfd = fd->secret->md.osfd; -+ PRInt32 rv, err; -+ -+#ifndef BONE_VERSION -+ if (fd->secret->md.sock_state & BE_SOCK_SHUTDOWN_READ) { -+ set_recv_error(EPIPE); -+ return -1; -+ } -+#endif -+ -+#ifdef BONE_VERSION -+ /* -+ ** Gah, stupid hack. If reading a zero amount, instantly return success. -+ ** BONE beta 6 returns EINVAL for reads of zero bytes, which parts of -+ ** mozilla use to check for socket availability. -+ */ -+ -+ if( 0 == amount ) return(0); -+#endif -+ -+ while ((rv = recv(osfd, buf, amount, flags)) == -1) { -+ err = _MD_ERRNO(); -+ -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ /* If socket was supposed to be blocking, -+ wait a while for the condition to be -+ satisfied. */ -+ if ((rv = socket_io_wait(osfd, READ_FD, timeout)) < 0) -+ goto done; -+ } else if (err == EINTR) { -+ continue; -+ } else -+ break; -+ } -+ -+ if (rv < 0) { -+ set_recv_error(err); -+ } -+ -+done: -+ return(rv); -+} -+ -+static PRInt32 PR_CALLBACK SocketRecv(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, -+PRIntervalTime timeout) -+{ -+ PRInt32 rv; -+ -+ if ((flags != 0) && (flags != PR_MSG_PEEK)) { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return -1; -+ } -+ -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("recv: fd=%p osfd=%d buf=%p amount=%d flags=%d", -+ fd, fd->secret->md.osfd, buf, amount, flags)); -+ -+ -+ rv = _bt_recv(fd, buf, amount, flags, timeout); -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("recv -> %d, error = %d, os error = %d", -+ rv, PR_GetError(), PR_GetOSError())); -+ -+ return rv; -+} -+ -+static PRInt32 PR_CALLBACK SocketRead(PRFileDesc *fd, void *buf, PRInt32 amount) -+{ -+ return SocketRecv(fd, buf, amount, 0, PR_INTERVAL_NO_TIMEOUT); -+} -+ -+PRInt32 -+_bt_send (PRFileDesc *fd, const void *buf, PRInt32 amount, PRInt32 flags, -+ PRIntervalTime timeout) -+{ -+ PRInt32 osfd = fd->secret->md.osfd; -+ PRInt32 rv, err; -+ -+#ifndef BONE_VERSION -+ if (fd->secret->md.sock_state & BE_SOCK_SHUTDOWN_WRITE) -+ { -+ set_send_error(EPIPE); -+ return -1; -+ } -+#endif -+ -+ while ((rv = send(osfd, buf, amount, flags)) == -1) { -+ err = _MD_ERRNO(); -+ -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ -+#ifndef BONE_VERSION -+ -+ /* in UNIX implementations, you could do a socket_io_wait here. -+ * but since BeOS doesn't yet support WRITE notification in select, -+ * you're spanked. -+ */ -+ snooze( 10000L ); -+ continue; -+#else /* BONE_VERSION */ -+ if ((rv = socket_io_wait(osfd, WRITE_FD, timeout))< 0) -+ goto done; -+#endif -+ -+ } else if (err == EINTR) { -+ continue; -+ } else { -+ break; -+ } -+ } -+ -+#ifdef BONE_VERSION -+ /* -+ * optimization; if bytes sent is less than "amount" call -+ * select before returning. This is because it is likely that -+ * the next writev() call will return EWOULDBLOCK. -+ */ -+ if ((!fd->secret->nonblocking) && (rv > 0) && (rv < amount) -+ && (timeout != PR_INTERVAL_NO_WAIT)) { -+ if (socket_io_wait(osfd, WRITE_FD, timeout) < 0) { -+ rv = -1; -+ goto done; -+ } -+ } -+#endif /* BONE_VERSION */ -+ -+ if (rv < 0) { -+ set_send_error(err); -+ } -+ -+#ifdef BONE_VERSION -+done: -+#endif -+ return(rv); -+} -+ -+ -+static PRInt32 PR_CALLBACK SocketSend(PRFileDesc *fd, const void *buf, PRInt32 amount, -+PRIntn flags, PRIntervalTime timeout) -+{ -+ PRInt32 temp, count; -+ -+ count = 0; -+ while (amount > 0) { -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, -+ ("send: fd=%p osfd=%d buf=%p amount=%d", -+ fd, fd->secret->md.osfd, buf, amount)); -+ temp = _bt_send(fd, buf, amount, flags, timeout); -+ if (temp < 0) { -+ count = -1; -+ break; -+ } -+ -+ count += temp; -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ buf = (const void*) ((const char*)buf + temp); -+ -+ amount -= temp; -+ } -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("send -> %d", count)); -+ return count; -+} -+ -+static PRInt32 PR_CALLBACK SocketWrite(PRFileDesc *fd, const void *buf, PRInt32 amount) -+{ -+ return SocketSend(fd, buf, amount, 0, PR_INTERVAL_NO_TIMEOUT); -+} -+ -+static PRStatus PR_CALLBACK SocketClose(PRFileDesc *fd) -+{ -+ if (!fd || !fd->secret -+ || (fd->secret->state != _PR_FILEDESC_OPEN -+ && fd->secret->state != _PR_FILEDESC_CLOSED)) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ if (fd->secret->state == _PR_FILEDESC_OPEN) { -+ if (closesocket(fd->secret->md.osfd) < 0) { -+ return PR_FAILURE; -+ } -+ -+ fd->secret->state = _PR_FILEDESC_CLOSED; -+ } -+ -+ PR_ASSERT(fd); -+ _PR_Putfd(fd); -+ return PR_SUCCESS; -+} -+ -+static PRInt32 PR_CALLBACK SocketAvailable(PRFileDesc *fd) -+{ -+ PRInt32 rv; -+ rv = _bt_socketavailable(fd); -+ return rv; -+} -+ -+static PRInt64 PR_CALLBACK SocketAvailable64(PRFileDesc *fd) -+{ -+ PRInt64 rv; -+ LL_I2L(rv, _bt_socketavailable(fd)); -+ return rv; -+} -+ -+static PRStatus PR_CALLBACK SocketSync(PRFileDesc *fd) -+{ -+ return PR_SUCCESS; -+} -+ -+PRInt32 -+_bt_sendto (PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags, -+ const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout) -+{ -+ PRInt32 osfd = fd->secret->md.osfd; -+ PRInt32 rv, err; -+ -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ PRNetAddr addrCopy; -+ -+ addrCopy = *addr; -+ ((struct sockaddr *) &addrCopy)->sa_len = addrlen; -+ ((struct sockaddr *) &addrCopy)->sa_family = addr->raw.family; -+ -+ while ((rv = sendto(osfd, buf, amount, flags, -+ (struct sockaddr *) &addrCopy, addrlen)) == -1) { -+#else -+ while ((rv = sendto(osfd, buf, amount, flags, -+ (struct sockaddr *) addr, addrlen)) == -1) { -+#endif -+ err = _MD_ERRNO(); -+ -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ -+#ifdef BONE_VERSION -+ if ((rv = socket_io_wait(osfd, WRITE_FD, timeout))< 0) -+ goto done; -+#endif -+ } else if (err == EINTR) { -+ continue; -+ -+ } else { -+ break; -+ } -+ } -+ -+ if (rv < 0) { -+ set_sendto_error(err); -+ } -+ -+#ifdef BONE_VERSION -+done: -+#endif -+ return(rv); -+} -+ -+ -+static PRInt32 PR_CALLBACK SocketSendTo( -+ PRFileDesc *fd, const void *buf, PRInt32 amount, -+ PRIntn flags, const PRNetAddr *addr, PRIntervalTime timeout) -+{ -+ PRInt32 temp, count; -+ const PRNetAddr *addrp = addr; -+#if defined(_PR_INET6) -+ PRNetAddr addrCopy; -+#endif -+ -+ PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE); -+#if defined(_PR_INET6) -+ if (addr->raw.family == PR_AF_INET6) { -+ addrCopy = *addr; -+ addrCopy.raw.family = AF_INET6; -+ addrp = &addrCopy; -+ } -+#endif -+ -+ count = 0; -+ while (amount > 0) { -+ temp = _bt_sendto(fd, buf, amount, flags, -+ addrp, PR_NETADDR_SIZE(addr), timeout); -+ if (temp < 0) { -+ count = -1; -+ break; -+ } -+ count += temp; -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ buf = (const void*) ((const char*)buf + temp); -+ amount -= temp; -+ } -+ return count; -+} -+ -+PRInt32 -+_bt_recvfrom (PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, -+ PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout) -+{ -+ PRInt32 osfd = fd->secret->md.osfd; -+ PRInt32 rv, err; -+ -+ while ((*addrlen = PR_NETADDR_SIZE(addr)), -+ ((rv = recvfrom(osfd, buf, amount, flags, -+ (struct sockaddr *) addr, -+ (int *)addrlen)) == -1)) { -+ err = _MD_ERRNO(); -+ -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ if ((rv = socket_io_wait(osfd, READ_FD, timeout)) < 0) -+ goto done; -+ -+ } else if (err == EINTR) { -+ continue; -+ } else { -+ break; -+ } -+ } -+ -+ if (rv < 0) { -+ set_recvfrom_error(err); -+ } -+ -+done: -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ if (rv != -1) { -+ /* ignore the sa_len field of struct sockaddr */ -+ if (addr) { -+ addr->raw.family = ((struct sockaddr *) addr)->sa_family; -+ } -+ } -+#endif /* _PR_HAVE_SOCKADDR_LEN */ -+ return(rv); -+} -+ -+ -+ -+static PRInt32 PR_CALLBACK SocketRecvFrom(PRFileDesc *fd, void *buf, PRInt32 amount, -+PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout) -+{ -+ PRInt32 rv; -+ PRUint32 al; -+ -+ al = sizeof(PRNetAddr); -+ rv = _bt_recvfrom(fd, buf, amount, flags, addr, &al, timeout); -+#ifdef _PR_INET6 -+ if (addr && (AF_INET6 == addr->raw.family)) -+ addr->raw.family = PR_AF_INET6; -+#endif -+ return rv; -+} -+ -+static PRInt32 PR_CALLBACK SocketAcceptRead(PRFileDesc *sd, PRFileDesc **nd, -+PRNetAddr **raddr, void *buf, PRInt32 amount, -+PRIntervalTime timeout) -+{ -+ /* The socket must be in blocking mode. */ -+ if (sd->secret->nonblocking) { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return -1; -+ } -+ *nd = NULL; -+ -+ return PR_EmulateAcceptRead(sd, nd, raddr, buf, amount, timeout); -+} -+ -+ -+static PRInt32 PR_CALLBACK SocketSendFile( -+ PRFileDesc *sd, PRSendFileData *sfd, -+ PRTransmitFileFlags flags, PRIntervalTime timeout) -+{ -+ /* The socket must be in blocking mode. */ -+ if (sd->secret->nonblocking) { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return -1; -+ } -+ return PR_EmulateSendFile(sd, sfd, flags, timeout); -+} -+ -+static PRInt32 PR_CALLBACK SocketTransmitFile(PRFileDesc *sd, PRFileDesc *fd, -+const void *headers, PRInt32 hlen, PRTransmitFileFlags flags, -+PRIntervalTime timeout) -+{ -+ PRSendFileData sfd; -+ -+ sfd.fd = fd; -+ sfd.file_offset = 0; -+ sfd.file_nbytes = 0; -+ sfd.header = headers; -+ sfd.hlen = hlen; -+ sfd.trailer = NULL; -+ sfd.tlen = 0; -+ -+ return(SocketSendFile(sd, &sfd, flags, timeout)); -+} -+ -+static PRStatus PR_CALLBACK SocketGetName(PRFileDesc *fd, PRNetAddr *addr) -+{ -+ PRInt32 result, err; -+ PRUint32 addrlen; -+ -+ addrlen = sizeof(PRNetAddr); -+ result = getsockname(fd->secret->md.osfd, (struct sockaddr *) addr, &addrlen); -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_getsockname_error(err); -+ return PR_FAILURE; -+ } -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ if (result == 0) { -+ /* ignore the sa_len field of struct sockaddr */ -+ if (addr) { -+ addr->raw.family = ((struct sockaddr *) addr)->sa_family; -+ } -+ } -+#endif /* _PR_HAVE_SOCKADDR_LEN */ -+ -+#ifdef _PR_INET6 -+ if (AF_INET6 == addr->raw.family) -+ addr->raw.family = PR_AF_INET6; -+#endif -+ PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE); -+ PR_ASSERT(IsValidNetAddrLen(addr, addrlen) == PR_TRUE); -+ return PR_SUCCESS; -+} -+ -+static PRStatus PR_CALLBACK SocketGetPeerName(PRFileDesc *fd, PRNetAddr *addr) -+{ -+ PRInt32 result, err; -+ PRUint32 addrlen; -+ -+ addrlen = sizeof(PRNetAddr); -+ result = getpeername(fd->secret->md.osfd, (struct sockaddr *) addr, &addrlen); -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_getpeername_error(err); -+ return PR_FAILURE; -+ } -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ if (result == 0) { -+ /* ignore the sa_len field of struct sockaddr */ -+ if (addr) { -+ addr->raw.family = ((struct sockaddr *) addr)->sa_family; -+ } -+ } -+#endif /* _PR_HAVE_SOCKADDR_LEN */ -+ -+#ifdef _PR_INET6 -+ if (AF_INET6 == addr->raw.family) -+ addr->raw.family = PR_AF_INET6; -+#endif -+ PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE); -+ PR_ASSERT(IsValidNetAddrLen(addr, addrlen) == PR_TRUE); -+ return PR_SUCCESS; -+} -+ -+static PRInt16 PR_CALLBACK SocketPoll( -+ PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags) -+{ -+ *out_flags = 0; -+ return in_flags; -+} /* SocketPoll */ -+ -+ -+PRStatus PR_CALLBACK SocketGetOption(PRFileDesc *fd, PRSocketOptionData *data) -+{ -+ PRStatus rv; -+ PRInt32 level, name, length, err; -+ -+ /* -+ * PR_SockOpt_Nonblocking is a special case that does not -+ * translate to a getsockopt() call -+ */ -+ if (PR_SockOpt_Nonblocking == data->option) -+ { -+ data->value.non_blocking = fd->secret->nonblocking; -+ return PR_SUCCESS; -+ } -+ -+ rv = _PR_MapOptionName(data->option, &level, &name); -+ if (PR_SUCCESS != rv) return rv; -+ -+ switch (data->option) -+ { -+ case PR_SockOpt_Linger: -+ { -+#ifdef BONE_VERSION -+ struct linger linger; -+ length = sizeof(linger); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char *) &linger, &length)) -+ { -+ PR_ASSERT(sizeof(linger) == length); -+ data->value.linger.polarity = -+ (linger.l_onoff) ? PR_TRUE : PR_FALSE; -+ data->value.linger.linger = -+ PR_SecondsToInterval(linger.l_linger); -+ return PR_SUCCESS; -+ } -+ break; -+#else -+ PR_SetError( PR_NOT_IMPLEMENTED_ERROR, 0 ); -+ return PR_FAILURE; -+#endif -+ } -+ case PR_SockOpt_Reuseaddr: -+ case PR_SockOpt_Keepalive: -+ case PR_SockOpt_NoDelay: -+ case PR_SockOpt_Broadcast: -+ { -+ PRIntn value; -+ length = sizeof(value); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char *) &value, &length)) -+ { -+ data->value.reuse_addr = (0 == value) ? PR_FALSE : PR_TRUE; -+ return PR_SUCCESS; -+ } -+ break; -+ } -+ case PR_SockOpt_McastLoopback: -+ { -+ PRUint8 bool; -+ length = sizeof(bool); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char*)&bool, &length)) -+ { -+ data->value.mcast_loopback = (0 == bool) ? PR_FALSE : PR_TRUE; -+ return PR_SUCCESS; -+ } -+ break; -+ } -+ case PR_SockOpt_RecvBufferSize: -+ case PR_SockOpt_SendBufferSize: -+ case PR_SockOpt_MaxSegment: -+ { -+ PRIntn value; -+ length = sizeof(value); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char*)&value, &length)) -+ { -+ data->value.recv_buffer_size = value; -+ return PR_SUCCESS; -+ } -+ break; -+ } -+ case PR_SockOpt_IpTimeToLive: -+ case PR_SockOpt_IpTypeOfService: -+ { -+ /* These options should really be an int (or PRIntn). */ -+ length = sizeof(PRUintn); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char*)&data->value.ip_ttl, &length)) -+ return PR_SUCCESS; -+ break; -+ } -+ case PR_SockOpt_McastTimeToLive: -+ { -+ PRUint8 ttl; -+ length = sizeof(ttl); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char*)&ttl, &length)) -+ { -+ data->value.mcast_ttl = ttl; -+ return PR_SUCCESS; -+ } -+ break; -+ } -+#ifdef IP_ADD_MEMBERSHIP -+ case PR_SockOpt_AddMember: -+ case PR_SockOpt_DropMember: -+ { -+ struct ip_mreq mreq; -+ length = sizeof(mreq); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char*)&mreq, &length)) -+ { -+ data->value.add_member.mcaddr.inet.ip = -+ mreq.imr_multiaddr.s_addr; -+ data->value.add_member.ifaddr.inet.ip = -+ mreq.imr_interface.s_addr; -+ return PR_SUCCESS; -+ } -+ break; -+ } -+#endif /* IP_ADD_MEMBERSHIP */ -+ case PR_SockOpt_McastInterface: -+ { -+ /* This option is a struct in_addr. */ -+ length = sizeof(data->value.mcast_if.inet.ip); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, -+ (char*)&data->value.mcast_if.inet.ip, &length)) -+ return PR_SUCCESS; -+ break; -+ } -+ default: -+ PR_NOT_REACHED("Unknown socket option"); -+ break; -+ } -+ err = _MD_ERRNO(); -+ set_getsockopt_error(err); -+ return PR_FAILURE; -+} /* SocketGetOption */ -+ -+PRStatus PR_CALLBACK SocketSetOption(PRFileDesc *fd, const PRSocketOptionData *data) -+{ -+ PRStatus rv; -+ PRInt32 level, name, result, err; -+ -+ /* -+ * PR_SockOpt_Nonblocking is a special case that does not -+ * translate to a setsockopt call. -+ */ -+ if (PR_SockOpt_Nonblocking == data->option) -+ { -+ fd->secret->nonblocking = data->value.non_blocking; -+ return PR_SUCCESS; -+ } -+ -+ rv = _PR_MapOptionName(data->option, &level, &name); -+ if (PR_SUCCESS != rv) return rv; -+ -+ switch (data->option) -+ { -+ case PR_SockOpt_Linger: -+ { -+#ifdef BONE_VERSION -+ struct linger linger; -+ linger.l_onoff = data->value.linger.polarity; -+ linger.l_linger = PR_IntervalToSeconds(data->value.linger.linger); -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&linger, sizeof(linger)); -+ break; -+#else -+ PR_SetError( PR_NOT_IMPLEMENTED_ERROR, 0 ); -+ return PR_FAILURE; -+#endif -+ } -+ case PR_SockOpt_Reuseaddr: -+ case PR_SockOpt_Keepalive: -+ case PR_SockOpt_NoDelay: -+ case PR_SockOpt_Broadcast: -+ { -+ PRIntn value; -+ value = (data->value.reuse_addr) ? 1 : 0; -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&value, sizeof(value)); -+ break; -+ } -+ case PR_SockOpt_McastLoopback: -+ { -+ PRUint8 bool; -+ bool = data->value.mcast_loopback ? 1 : 0; -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&bool, sizeof(bool)); -+ break; -+ } -+ case PR_SockOpt_RecvBufferSize: -+ case PR_SockOpt_SendBufferSize: -+ case PR_SockOpt_MaxSegment: -+ { -+ PRIntn value = data->value.recv_buffer_size; -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&value, sizeof(value)); -+ break; -+ } -+ case PR_SockOpt_IpTimeToLive: -+ case PR_SockOpt_IpTypeOfService: -+ { -+ /* These options should really be an int (or PRIntn). */ -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&data->value.ip_ttl, sizeof(PRUintn)); -+ break; -+ } -+ case PR_SockOpt_McastTimeToLive: -+ { -+ PRUint8 ttl; -+ ttl = data->value.mcast_ttl; -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&ttl, sizeof(ttl)); -+ break; -+ } -+#ifdef IP_ADD_MEMBERSHIP -+ case PR_SockOpt_AddMember: -+ case PR_SockOpt_DropMember: -+ { -+ struct ip_mreq mreq; -+ mreq.imr_multiaddr.s_addr = -+ data->value.add_member.mcaddr.inet.ip; -+ mreq.imr_interface.s_addr = -+ data->value.add_member.ifaddr.inet.ip; -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&mreq, sizeof(mreq)); -+ break; -+ } -+#endif /* IP_ADD_MEMBERSHIP */ -+ case PR_SockOpt_McastInterface: -+ { -+ /* This option is a struct in_addr. */ -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&data->value.mcast_if.inet.ip, -+ sizeof(data->value.mcast_if.inet.ip)); -+ break; -+ } -+ default: -+ PR_NOT_REACHED("Unknown socket option"); -+ break; -+ } -+ if (0 == result) -+ return PR_SUCCESS; -+ err = _MD_ERRNO(); -+ set_setsockopt_error(err); -+ return PR_FAILURE; -+} /* SocketSetOption */ -+ -+ -+ -+static PRIOMethods tcpMethods = { -+ PR_DESC_SOCKET_TCP, -+ SocketClose, -+ SocketRead, -+ SocketWrite, -+ SocketAvailable, -+ SocketAvailable64, -+ SocketSync, -+ (PRSeekFN)_PR_InvalidInt, -+ (PRSeek64FN)_PR_InvalidInt64, -+ (PRFileInfoFN)_PR_InvalidStatus, -+ (PRFileInfo64FN)_PR_InvalidStatus, -+ SocketWritev, -+ SocketConnect, -+ SocketAccept, -+ SocketBind, -+ SocketListen, -+ SocketShutdown, -+ SocketRecv, -+ SocketSend, -+ (PRRecvfromFN)_PR_InvalidInt, -+ (PRSendtoFN)_PR_InvalidInt, -+ SocketPoll, -+ SocketAcceptRead, -+ SocketTransmitFile, -+ SocketGetName, -+ SocketGetPeerName, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ SocketGetOption, -+ SocketSetOption, -+ SocketSendFile, -+ SocketConnectContinue, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+static PRIOMethods udpMethods = { -+ PR_DESC_SOCKET_UDP, -+ SocketClose, -+ SocketRead, -+ SocketWrite, -+ SocketAvailable, -+ SocketAvailable64, -+ SocketSync, -+ (PRSeekFN)_PR_InvalidInt, -+ (PRSeek64FN)_PR_InvalidInt64, -+ (PRFileInfoFN)_PR_InvalidStatus, -+ (PRFileInfo64FN)_PR_InvalidStatus, -+ SocketWritev, -+ SocketConnect, -+ (PRAcceptFN)_PR_InvalidDesc, -+ SocketBind, -+ SocketListen, -+ SocketShutdown, -+ SocketRecv, -+ SocketSend, -+ SocketRecvFrom, -+ SocketSendTo, -+ SocketPoll, -+ (PRAcceptreadFN)_PR_InvalidInt, -+ (PRTransmitfileFN)_PR_InvalidInt, -+ SocketGetName, -+ SocketGetPeerName, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ SocketGetOption, -+ SocketSetOption, -+ (PRSendfileFN)_PR_InvalidInt, -+ (PRConnectcontinueFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+ -+static PRIOMethods socketpollfdMethods = { -+ (PRDescType) 0, -+ (PRCloseFN)_PR_InvalidStatus, -+ (PRReadFN)_PR_InvalidInt, -+ (PRWriteFN)_PR_InvalidInt, -+ (PRAvailableFN)_PR_InvalidInt, -+ (PRAvailable64FN)_PR_InvalidInt64, -+ (PRFsyncFN)_PR_InvalidStatus, -+ (PRSeekFN)_PR_InvalidInt, -+ (PRSeek64FN)_PR_InvalidInt64, -+ (PRFileInfoFN)_PR_InvalidStatus, -+ (PRFileInfo64FN)_PR_InvalidStatus, -+ (PRWritevFN)_PR_InvalidInt, -+ (PRConnectFN)_PR_InvalidStatus, -+ (PRAcceptFN)_PR_InvalidDesc, -+ (PRBindFN)_PR_InvalidStatus, -+ (PRListenFN)_PR_InvalidStatus, -+ (PRShutdownFN)_PR_InvalidStatus, -+ (PRRecvFN)_PR_InvalidInt, -+ (PRSendFN)_PR_InvalidInt, -+ (PRRecvfromFN)_PR_InvalidInt, -+ (PRSendtoFN)_PR_InvalidInt, -+ SocketPoll, -+ (PRAcceptreadFN)_PR_InvalidInt, -+ (PRTransmitfileFN)_PR_InvalidInt, -+ (PRGetsocknameFN)_PR_InvalidStatus, -+ (PRGetpeernameFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRGetsocketoptionFN)_PR_InvalidStatus, -+ (PRSetsocketoptionFN)_PR_InvalidStatus, -+ (PRSendfileFN)_PR_InvalidInt, -+ (PRConnectcontinueFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+static PRIOMethods _pr_socketpollfd_methods = { -+ (PRDescType) 0, -+ (PRCloseFN)_PR_InvalidStatus, -+ (PRReadFN)_PR_InvalidInt, -+ (PRWriteFN)_PR_InvalidInt, -+ (PRAvailableFN)_PR_InvalidInt, -+ (PRAvailable64FN)_PR_InvalidInt64, -+ (PRFsyncFN)_PR_InvalidStatus, -+ (PRSeekFN)_PR_InvalidInt, -+ (PRSeek64FN)_PR_InvalidInt64, -+ (PRFileInfoFN)_PR_InvalidStatus, -+ (PRFileInfo64FN)_PR_InvalidStatus, -+ (PRWritevFN)_PR_InvalidInt, -+ (PRConnectFN)_PR_InvalidStatus, -+ (PRAcceptFN)_PR_InvalidDesc, -+ (PRBindFN)_PR_InvalidStatus, -+ (PRListenFN)_PR_InvalidStatus, -+ (PRShutdownFN)_PR_InvalidStatus, -+ (PRRecvFN)_PR_InvalidInt, -+ (PRSendFN)_PR_InvalidInt, -+ (PRRecvfromFN)_PR_InvalidInt, -+ (PRSendtoFN)_PR_InvalidInt, -+ SocketPoll, -+ (PRAcceptreadFN)_PR_InvalidInt, -+ (PRTransmitfileFN)_PR_InvalidInt, -+ (PRGetsocknameFN)_PR_InvalidStatus, -+ (PRGetpeernameFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRGetsocketoptionFN)_PR_InvalidStatus, -+ (PRSetsocketoptionFN)_PR_InvalidStatus, -+ (PRSendfileFN)_PR_InvalidInt, -+ (PRConnectcontinueFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+PR_IMPLEMENT(const PRIOMethods*) PR_GetTCPMethods() -+{ -+ return &tcpMethods; -+} -+ -+PR_IMPLEMENT(const PRIOMethods*) PR_GetUDPMethods() -+{ -+ return &udpMethods; -+} -+ -+static const PRIOMethods* PR_GetSocketPollFdMethods(void) -+{ -+ return &_pr_socketpollfd_methods; -+} /* PR_GetSocketPollFdMethods */ -+ -+PR_IMPLEMENT(PRInt32) PR_Poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout) -+{ -+ PRInt32 rv = 0; -+ /* -+ * This code is almost a duplicate of w32poll.c's _PR_MD_PR_POLL(). -+ */ -+ fd_set rd, wt, ex; -+ PRFileDesc *bottom; -+ PRPollDesc *pd, *epd; -+ PRInt32 maxfd = -1, ready, err; -+ PRIntervalTime remaining, elapsed, start; -+ -+ struct timeval tv, *tvp = NULL; -+ -+ if (0 == npds) { -+ PR_Sleep(timeout); -+ return rv; -+ } -+ -+ FD_ZERO(&rd); -+ FD_ZERO(&wt); -+ FD_ZERO(&ex); -+ -+ ready = 0; -+ for (pd = pds, epd = pd + npds; pd < epd; pd++) -+ { -+ PRInt16 in_flags_read = 0, in_flags_write = 0; -+ PRInt16 out_flags_read = 0, out_flags_write = 0; -+ -+ if ((NULL != pd->fd) && (0 != pd->in_flags)) -+ { -+ if (pd->in_flags & PR_POLL_READ) -+ { -+ in_flags_read = (pd->fd->methods->poll)(pd->fd, pd->in_flags & ~PR_POLL_WRITE, &out_flags_read); -+ } -+ if (pd->in_flags & PR_POLL_WRITE) -+ { -+ in_flags_write = (pd->fd->methods->poll)(pd->fd, pd->in_flags & ~PR_POLL_READ, &out_flags_write); -+ } -+ if ((0 != (in_flags_read & out_flags_read)) -+ || (0 != (in_flags_write & out_flags_write))) -+ { -+ /* this one's ready right now */ -+ if (0 == ready) -+ { -+ /* -+ * We will have to return without calling the -+ * system poll/select function. So zero the -+ * out_flags fields of all the poll descriptors -+ * before this one. -+ */ -+ PRPollDesc *prev; -+ for (prev = pds; prev < pd; prev++) -+ { -+ prev->out_flags = 0; -+ } -+ } -+ ready += 1; -+ pd->out_flags = out_flags_read | out_flags_write; -+ } -+ else -+ { -+ pd->out_flags = 0; /* pre-condition */ -+ -+ /* make sure this is an NSPR supported stack */ -+ bottom = PR_GetIdentitiesLayer(pd->fd, PR_NSPR_IO_LAYER); -+ PR_ASSERT(NULL != bottom); /* what to do about that? */ -+ if ((NULL != bottom) -+ && (_PR_FILEDESC_OPEN == bottom->secret->state)) -+ { -+ if (0 == ready) -+ { -+ PRInt32 osfd = bottom->secret->md.osfd; -+ if (osfd > maxfd) maxfd = osfd; -+ if (in_flags_read & PR_POLL_READ) -+ { -+ pd->out_flags |= _PR_POLL_READ_SYS_READ; -+ FD_SET(osfd, &rd); -+ } -+ if (in_flags_read & PR_POLL_WRITE) -+ { -+ pd->out_flags |= _PR_POLL_READ_SYS_WRITE; -+ FD_SET(osfd, &wt); -+ } -+ if (in_flags_write & PR_POLL_READ) -+ { -+ pd->out_flags |= _PR_POLL_WRITE_SYS_READ; -+ FD_SET(osfd, &rd); -+ } -+ if (in_flags_write & PR_POLL_WRITE) -+ { -+ pd->out_flags |= _PR_POLL_WRITE_SYS_WRITE; -+ FD_SET(osfd, &wt); -+ } -+ if (pd->in_flags & PR_POLL_EXCEPT) FD_SET(osfd, &ex); -+ } -+ } -+ else -+ { -+ if (0 == ready) -+ { -+ PRPollDesc *prev; -+ for (prev = pds; prev < pd; prev++) -+ { -+ prev->out_flags = 0; -+ } -+ } -+ ready += 1; /* this will cause an abrupt return */ -+ pd->out_flags = PR_POLL_NVAL; /* bogii */ -+ } -+ } -+ } -+ else -+ { -+ pd->out_flags = 0; -+ } -+ } -+ -+ if (0 != ready) return ready; /* no need to block */ -+ -+ remaining = timeout; -+ start = PR_IntervalNow(); -+ -+ retry: -+ if (timeout != PR_INTERVAL_NO_TIMEOUT) -+ { -+ PRInt32 ticksPerSecond = PR_TicksPerSecond(); -+ tv.tv_sec = remaining / ticksPerSecond; -+ tv.tv_usec = PR_IntervalToMicroseconds( remaining % ticksPerSecond ); -+ tvp = &tv; -+ } -+ -+ ready = select(maxfd + 1, &rd, &wt, &ex, tvp); -+ -+ if (ready == -1 && errno == EINTR) -+ { -+ if (timeout == PR_INTERVAL_NO_TIMEOUT) goto retry; -+ else -+ { -+ elapsed = (PRIntervalTime) (PR_IntervalNow() - start); -+ if (elapsed > timeout) ready = 0; /* timed out */ -+ else -+ { -+ remaining = timeout - elapsed; -+ goto retry; -+ } -+ } -+ } -+ -+ /* -+ ** Now to unravel the select sets back into the client's poll -+ ** descriptor list. Is this possibly an area for pissing away -+ ** a few cycles or what? -+ */ -+ if (ready > 0) -+ { -+ ready = 0; -+ for (pd = pds, epd = pd + npds; pd < epd; pd++) -+ { -+ PRInt16 out_flags = 0; -+ if ((NULL != pd->fd) && (0 != pd->in_flags)) -+ { -+ PRInt32 osfd; -+ bottom = PR_GetIdentitiesLayer(pd->fd, PR_NSPR_IO_LAYER); -+ PR_ASSERT(NULL != bottom); -+ -+ osfd = bottom->secret->md.osfd; -+ -+ if (FD_ISSET(osfd, &rd)) -+ { -+ if (pd->out_flags & _PR_POLL_READ_SYS_READ) -+ out_flags |= PR_POLL_READ; -+ if (pd->out_flags & _PR_POLL_WRITE_SYS_READ) -+ out_flags |= PR_POLL_WRITE; -+ } -+ if (FD_ISSET(osfd, &wt)) -+ { -+ if (pd->out_flags & _PR_POLL_READ_SYS_WRITE) -+ out_flags |= PR_POLL_READ; -+ if (pd->out_flags & _PR_POLL_WRITE_SYS_WRITE) -+ out_flags |= PR_POLL_WRITE; -+ } -+ if (FD_ISSET(osfd, &ex)) out_flags |= PR_POLL_EXCEPT; -+ -+/* Workaround for nonblocking connects under net_server */ -+#ifndef BONE_VERSION -+ if (out_flags) -+ { -+ /* check if it is a pending connect */ -+ int i = 0, j = 0; -+ PR_Lock( _connectLock ); -+ for( i = 0; i < connectCount; i++ ) -+ { -+ if(connectList[i].osfd == osfd) -+ { -+ int connectError; -+ int connectResult; -+ -+ connectResult = connect(connectList[i].osfd, -+ &connectList[i].addr, -+ connectList[i].addrlen); -+ connectError = errno; -+ -+ if(connectResult < 0 ) -+ { -+ if(connectError == EINTR || connectError == EWOULDBLOCK || -+ connectError == EINPROGRESS || connectError == EALREADY) -+ { -+ break; -+ } -+ } -+ -+ if(i == (connectCount - 1)) -+ { -+ connectList[i].osfd = -1; -+ } else { -+ for(j = i; j < connectCount; j++ ) -+ { -+ memcpy( &connectList[j], &connectList[j+1], -+ sizeof(connectList[j])); -+ } -+ } -+ connectCount--; -+ -+ bottom->secret->md.connectReturnValue = connectResult; -+ bottom->secret->md.connectReturnError = connectError; -+ bottom->secret->md.connectValueValid = PR_TRUE; -+ break; -+ } -+ } -+ PR_Unlock( _connectLock ); -+ } -+#endif -+ } -+ pd->out_flags = out_flags; -+ if (out_flags) ready++; -+ } -+ PR_ASSERT(ready > 0); -+ } -+ else if (ready < 0) -+ { -+ err = _MD_ERRNO(); -+ if (err == EBADF) -+ { -+ /* Find the bad fds */ -+ ready = 0; -+ for (pd = pds, epd = pd + npds; pd < epd; pd++) -+ { -+ pd->out_flags = 0; -+ if ((NULL != pd->fd) && (0 != pd->in_flags)) -+ { -+ bottom = PR_GetIdentitiesLayer(pd->fd, PR_NSPR_IO_LAYER); -+ if (fcntl(bottom->secret->md.osfd, F_GETFL, 0) == -1) -+ { -+ pd->out_flags = PR_POLL_NVAL; -+ ready++; -+ } -+ } -+ } -+ PR_ASSERT(ready > 0); -+ } -+ else set_select_error(err); -+ } -+ -+ return ready; -+} /* PR_POLL */ -+ -+PR_IMPLEMENT(PRFileDesc*) PR_CreateSocketPollFd(PRInt32 osfd) -+{ -+ PRFileDesc *fd; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ -+ fd = _PR_Getfd(); -+ -+ if (fd == NULL) PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ else -+ { -+ fd->secret->md.osfd = osfd; -+ fd->secret->inheritable = _PR_TRI_FALSE; -+ fd->secret->state = _PR_FILEDESC_OPEN; -+ fd->methods = PR_GetSocketPollFdMethods(); -+ } -+ -+ return fd; -+} /* PR_CreateSocketPollFD */ -+ -+PR_IMPLEMENT(PRStatus) PR_DestroySocketPollFd(PRFileDesc *fd) -+{ -+ if (NULL == fd) -+ { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); -+ return PR_FAILURE; -+ } -+ fd->secret->state = _PR_FILEDESC_CLOSED; -+ _PR_Putfd(fd); -+ return PR_SUCCESS; -+} /* PR_DestroySocketPollFd */ -+ -+ -+PR_IMPLEMENT(PRFileDesc *) PR_ImportTCPSocket(PRInt32 osfd) -+{ -+ PRFileDesc *fd; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ fd = bt_CreateFileDesc(osfd, PR_GetTCPMethods(), _PR_TRI_UNKNOWN, true); -+ if (fd == NULL) -+ closesocket(osfd); -+ return(fd); -+} -+ -+PR_IMPLEMENT(PRFileDesc *) PR_ImportUDPSocket(PRInt32 osfd) -+{ -+ PRFileDesc *fd; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ fd = bt_CreateFileDesc(osfd, PR_GetUDPMethods(), _PR_TRI_UNKNOWN, true); -+ if (fd == NULL) -+ closesocket(osfd); -+ return(fd); -+} -+ -+ -+#ifndef XP_HAIKU -+int socketpair (int family, int type, int protocol, int sv[2]) -+{ -+ int insock, outsock, acceptedsock; -+ struct sockaddr_in addrs[2]; -+ int alen; -+ /* that's really only so we can build... */ -+ /*fprintf(stderr, "socketpair(%d, %d, %d)\n", family, type, protocol);*/ -+ if (family != AF_INET) { -+ /*fatal*/fprintf(stderr, "socketpair(%d, %d, %d): family not supported\n", family, type, protocol); -+ errno = EPFNOSUPPORT; -+ return -1; -+ } -+ if (type != SOCK_DGRAM && type != SOCK_STREAM) { -+ errno = EPROTONOSUPPORT; -+ return -1; -+ } -+ addrs[0].sin_family = AF_INET; -+ addrs[0].sin_port = 0; -+ addrs[0].sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+ addrs[1].sin_family = AF_INET; -+ addrs[1].sin_port = 0; -+ addrs[1].sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+ alen = sizeof(struct sockaddr_in); -+ -+ insock = socket(family, type, protocol); -+ if (insock < 0) -+ goto err1; -+ if (bind(insock, (struct sockaddr *)&addrs[0], alen) < 0) -+ goto err2; -+ if (getsockname(insock, (struct sockaddr *)&addrs[0], &alen) < 0) -+ goto err2; -+ if (type == SOCK_STREAM) -+ listen(insock, 2); -+ -+ outsock = socket(family, type, protocol); -+ if (outsock < 0) -+ goto err2; -+ alen = sizeof(struct sockaddr_in); -+ if (bind(outsock, (struct sockaddr *)&addrs[1], alen) < 0) -+ goto err2; -+ if (getsockname(outsock, (struct sockaddr *)&addrs[1], &alen) < 0) -+ goto err3; -+ addrs[0].sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+ addrs[1].sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+ /*fprintf(stderr, "socketpair: %08lx:%d <-> %08lx:%d\n", -+ ((struct sockaddr_in *)&addrs[0])->sin_addr.s_addr, -+ ((struct sockaddr_in *)&addrs[0])->sin_port, -+ ((struct sockaddr_in *)&addrs[1])->sin_addr.s_addr, -+ ((struct sockaddr_in *)&addrs[1])->sin_port);*/ -+ -+ if (connect(outsock, (struct sockaddr *)&addrs[0], alen) < 0) -+ goto err3; -+ if (type == SOCK_DGRAM) { -+ if (connect(insock, (struct sockaddr *)&addrs[1], alen) < 0) -+ goto err3; -+ sv[0] = insock; -+ } else { -+ acceptedsock = accept(insock, (struct sockaddr *)&addrs[1], &alen); -+ if (acceptedsock < 0) -+ goto err3; -+ closesocket(insock); -+ sv[0] = acceptedsock; -+ } -+ sv[1] = outsock; -+ return 0; -+err3: -+ closesocket(outsock); -+err2: -+ closesocket(insock); -+err1: -+ fprintf(stderr,"socketpair: error 0x%08x\n", errno); -+ return -1; -+} -+#endif -+ -+PR_IMPLEMENT(PRStatus) PR_NewTCPSocketPair(PRFileDesc *f[]) -+{ -+ PRInt32 rv, osfd[2]; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+#ifdef XP_HAIKU -+ rv = socketpair(AF_UNIX, SOCK_STREAM, 0, osfd); -+#else -+ rv = socketpair(AF_INET, SOCK_STREAM, 0, osfd); -+#endif -+ if (rv == -1) { -+ return PR_FAILURE; -+ } -+ f[0] = bt_CreateFileDesc(osfd[0], PR_GetTCPMethods(), _PR_TRI_TRUE, true); -+ if (NULL == f[0]) { -+ closesocket(osfd[0]); -+ closesocket(osfd[1]); -+ /* PR_AllocFileDesc() has invoked PR_SetError(). */ -+ return PR_FAILURE; -+ } -+ f[1] = bt_CreateFileDesc(osfd[1], PR_GetTCPMethods(), _PR_TRI_TRUE, true); -+ if (NULL == f[1]) { -+ PR_Close(f[0]); -+ closesocket(osfd[1]); -+ /* PR_AllocFileDesc() has invoked PR_SetError(). */ -+ return PR_FAILURE; -+ } -+ return PR_SUCCESS; -+} -+ -+ -+PR_IMPLEMENT(PRStatus) PR_GetConnectStatus(const PRPollDesc *pd) { -+ PRInt32 osfd; -+#ifndef BONE_VERSION -+ int rv; -+#endif -+ PRFileDesc *bottom; -+ -+ if (pd->out_flags & PR_POLL_NVAL) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ if ((pd->out_flags & (PR_POLL_WRITE | PR_POLL_EXCEPT | PR_POLL_ERR)) == 0) { -+ PR_ASSERT(pd->out_flags == 0); -+ PR_SetError(PR_IN_PROGRESS_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ -+ /* Find the NSPR layer and invoke its connectcontinue method */ -+ bottom = PR_GetIdentitiesLayer(pd->fd, PR_NSPR_IO_LAYER); -+ if (NULL == bottom) -+ { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ osfd = bottom->secret->md.osfd; -+#ifdef BONE_VERSION /* bug 122364 */ -+ /* temporary workaround until getsockopt(SO_ERROR) works in BONE */ -+ if (pd->out_flags & PR_POLL_EXCEPT) { -+ PR_SetError(PR_CONNECT_REFUSED_ERROR, 0); -+ return PR_FAILURE; -+ } -+ PR_ASSERT(pd->out_flags & PR_POLL_WRITE); -+ return PR_SUCCESS; -+#else -+ rv = recv(bottom->secret->md.osfd, NULL, 0, 0); -+ PR_ASSERT(-1 == rv || 0 == rv); -+ -+ if (-1 == rv && 0 != errno && errno != EAGAIN && errno != EWOULDBLOCK ) { -+ set_connect_error(errno); -+ return PR_FAILURE; -+ } -+ else -+ return PR_SUCCESS; -+#endif /* BONE_VERSION */ -+} -+ -+PR_IMPLEMENT(PRFileDesc*) PR_Socket(PRInt32 domain, PRInt32 type, PRInt32 proto) -+{ -+ PRInt32 osfd, err; -+ PRFileDesc *fd; -+ PRInt32 tmp_domain = domain; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ if (PR_AF_INET != domain -+ && PR_AF_INET6 != domain -+ ) { -+ PR_SetError(PR_ADDRESS_NOT_SUPPORTED_ERROR, 0); -+ return NULL; -+ } -+ if( type != SOCK_STREAM && type != SOCK_DGRAM ) -+ { -+ PR_SetError(PR_ADDRESS_NOT_SUPPORTED_ERROR, 0); -+ return NULL; -+ } -+ -+#if defined(_PR_INET6_PROBE) -+ if (PR_AF_INET6 == domain) { -+ if (_pr_ipv6_is_present == PR_FALSE) -+ domain = AF_INET; -+ else -+ domain = AF_INET6; -+ } -+#elif defined(_PR_INET6) -+ if (PR_AF_INET6 == domain) -+ domain = AF_INET6; -+#else -+ if (PR_AF_INET6 == domain) -+ domain = AF_INET; -+#endif /* _PR_INET6 */ -+#ifndef BONE_VERSION -+ osfd = socket(domain, type, 0); -+#else -+ osfd = socket(domain, type, proto); -+#endif -+ if (osfd == -1) { -+ err = _MD_ERRNO(); -+ set_socket_error(err); -+ return 0; -+ } -+ fd = bt_CreateFileDesc(osfd, SOCK_STREAM == type?PR_GetTCPMethods() : PR_GetUDPMethods(), _PR_TRI_TRUE, true); -+ -+ if (fd != NULL) { -+#if defined(_PR_INET6_PROBE) || !defined(_PR_INET6) -+ /* -+ * For platforms with no support for IPv6 -+ * create layered socket for IPv4-mapped IPv6 addresses -+ */ -+ if (PR_AF_INET6 == tmp_domain && PR_AF_INET == domain) { -+ if (PR_FAILURE == _pr_push_ipv6toipv4_layer(fd)) { -+ PR_Close(fd); -+ fd = NULL; -+ } -+ } -+#endif -+ } else -+ closesocket(osfd); -+ -+ return fd; -+} -+ -+ -+PR_IMPLEMENT(PRFileDesc *) PR_NewTCPSocket(void) -+{ -+ return PR_Socket(AF_INET, SOCK_STREAM, 0); -+} -+ -+PR_IMPLEMENT(PRFileDesc*) PR_NewUDPSocket(void) -+{ -+ return PR_Socket(AF_INET, SOCK_DGRAM, 0); -+} -+ -+PR_IMPLEMENT(PRFileDesc *) PR_OpenTCPSocket(PRIntn af) -+{ -+ return PR_Socket(af, SOCK_STREAM, 0); -+} -+ -+PR_IMPLEMENT(PRFileDesc*) PR_OpenUDPSocket(PRIntn af) -+{ -+ return PR_Socket(af, SOCK_DGRAM, 0); -+} -+ -Index: mozilla/nsprpub/pr/src/bthreads/btlocks.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/bthreads/btlocks.c,v -retrieving revision 3.7 -diff -u -8 -p -w -r3.7 btlocks.c ---- mozilla/nsprpub/pr/src/bthreads/btlocks.c 23 Feb 2005 17:43:13 -0000 3.7 -+++ mozilla/nsprpub/pr/src/bthreads/btlocks.c 8 Jul 2009 21:53:14 -0000 -@@ -38,44 +38,38 @@ - /* - ** File: btlocks.c - ** Description: Implemenation for thread locks using bthreads - ** Exports: prlock.h - */ - - #include "primpl.h" - --#include --#include -- - void - _PR_InitLocks (void) - { - } - - PR_IMPLEMENT(PRLock*) - PR_NewLock (void) - { - PRLock *lock; - status_t semresult; - - if (!_pr_initialized) _PR_ImplicitInitialization(); - - lock = PR_NEWZAP(PRLock); - if (lock != NULL) { -- - lock->benaphoreCount = 0; - lock->semaphoreID = create_sem( 0, "nsprLockSem" ); - if( lock->semaphoreID < B_NO_ERROR ) { -- - PR_DELETE( lock ); - lock = NULL; - } - } -- - return lock; - } - - PR_IMPLEMENT(void) - PR_DestroyLock (PRLock* lock) - { - status_t result; - -@@ -83,34 +77,34 @@ PR_IMPLEMENT(void) - result = delete_sem(lock->semaphoreID); - PR_ASSERT(result == B_NO_ERROR); - PR_DELETE(lock); - } - - PR_IMPLEMENT(void) - PR_Lock (PRLock* lock) - { -- PR_ASSERT(lock != NULL); -- -- if( atomic_add( &lock->benaphoreCount, 1 ) > 0 ) { -+ status_t result; - -- if( acquire_sem(lock->semaphoreID ) != B_NO_ERROR ) { -+ PR_ASSERT(lock != NULL); - -- atomic_add( &lock->benaphoreCount, -1 ); -+ if( _MD_ATOMIC_INCREMENT( &lock->benaphoreCount) > 1 ) { -+ result = acquire_sem(lock->semaphoreID ); -+ PR_ASSERT(result == B_NO_ERROR); -+ if( result != B_NO_ERROR ) { -+ _MD_ATOMIC_DECREMENT( &lock->benaphoreCount); - return; - } - } -- - lock->owner = find_thread( NULL ); - } - - PR_IMPLEMENT(PRStatus) - PR_Unlock (PRLock* lock) - { - PR_ASSERT(lock != NULL); - lock->owner = NULL; -- if( atomic_add( &lock->benaphoreCount, -1 ) > 1 ) { -- -+ if( _MD_ATOMIC_DECREMENT( &lock->benaphoreCount ) > 0 ) { - release_sem_etc( lock->semaphoreID, 1, B_DO_NOT_RESCHEDULE ); - } - - return PR_SUCCESS; - } -Index: mozilla/nsprpub/pr/src/bthreads/btmisc.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/bthreads/btmisc.c,v -retrieving revision 3.5 -diff -u -8 -p -w -r3.5 btmisc.c ---- mozilla/nsprpub/pr/src/bthreads/btmisc.c 25 Apr 2004 15:00:57 -0000 3.5 -+++ mozilla/nsprpub/pr/src/bthreads/btmisc.c 8 Jul 2009 21:53:14 -0000 -@@ -15,16 +15,17 @@ - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): -+ * Fredrik Holmqvist - * - * 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 -@@ -33,72 +34,38 @@ - * 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 ***** */ - - #include "primpl.h" - #include - --// void _PR_InitCPUs(void) {PT_LOG("_PR_InitCPUs")} --// void _MD_StartInterrupts(void) {PT_LOG("_MD_StartInterrupts")} -- --/* this is a total hack.. */ -- -+/* this is a total hack.. -+ * It's needed for netserver to compile. -+ * See nsprpub/pr/include/prnetdb.h -+ */ -+#ifndef BONE_VERSION - struct protoent* getprotobyname(const char* name) - { - return 0; - } - - struct protoent* getprotobynumber(int number) - { - return 0; - } -- --/* this is needed by prinit for some reason */ --void --_PR_InitStacks (void) --{ --} -- --/* this is needed by prinit for some reason */ --void --_PR_InitTPD (void) --{ --} -- --/* --** Create extra virtual processor threads. Generally used with MP systems. --*/ --PR_IMPLEMENT(void) -- PR_SetConcurrency (PRUintn numCPUs) --{ --} -- --/* --** Set thread recycle mode to on (1) or off (0) --*/ --PR_IMPLEMENT(void) -- PR_SetThreadRecycleMode (PRUint32 flag) --{ --} -+#endif - - /* - ** Get context registers, return with error for now. - */ -- - PR_IMPLEMENT(PRWord *) - _MD_HomeGCRegisters( PRThread *t, int isCurrent, int *np ) - { - return 0; - } - --PR_IMPLEMENT(void *) --PR_GetSP( PRThread *t ) --{ -- return 0; --} -- - PR_IMPLEMENT(PRStatus) - PR_EnumerateThreads( PREnumerator func, void *arg ) - { - return PR_FAILURE; - } -Index: mozilla/nsprpub/pr/src/bthreads/btsem.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/bthreads/btsem.c,v -retrieving revision 3.7 -diff -u -8 -p -w -r3.7 btsem.c ---- mozilla/nsprpub/pr/src/bthreads/btsem.c 23 Feb 2005 17:43:13 -0000 3.7 -+++ mozilla/nsprpub/pr/src/bthreads/btsem.c 8 Jul 2009 21:53:14 -0000 -@@ -33,16 +33,17 @@ - * 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 ***** */ - - #include - - #include "primpl.h" -+#include "obsolete/prsem.h" - - /* - ** Create a new semaphore object. - */ - PR_IMPLEMENT(PRSemaphore*) - PR_NewSem (PRUintn value) - { - PRSemaphore *semaphore; -Index: mozilla/nsprpub/pr/src/bthreads/btthread.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/bthreads/btthread.c,v -retrieving revision 3.8 -diff -u -8 -p -w -r3.8 btthread.c ---- mozilla/nsprpub/pr/src/bthreads/btthread.c 25 Apr 2004 15:00:57 -0000 3.8 -+++ mozilla/nsprpub/pr/src/bthreads/btthread.c 8 Jul 2009 21:53:16 -0000 -@@ -115,22 +115,19 @@ _PR_InitThreads (PRThreadType type, PRTh - - primordialThread->md.joinSem = B_ERROR; - - /* - ** Set the priority to the desired level. - */ - - beThreadPriority = _bt_MapNSPRToNativePriority( priority ); -- - set_thread_priority( find_thread( NULL ), beThreadPriority ); -- - primordialThread->priority = priority; - -- - /* set the thread's state - note that the thread is not joinable */ - primordialThread->state |= BT_THREAD_PRIMORD; - if (type == PR_SYSTEM_THREAD) - primordialThread->state |= BT_THREAD_SYSTEM; - - /* - ** Allocate a TLS slot for the PRThread structure (just using - ** native TLS, as opposed to NSPR TPD, will make PR_GetCurrentThread() -@@ -214,44 +211,38 @@ void _bt_CleanupThread(void *arg) - PR_Lock(joinSemLock); - - if (me->md.is_joining) - { - /* someone is already waiting to join us (they've - allocated a joinSem for us) - let them know we're - ready */ - delete_sem(me->md.joinSem); -- - PR_Unlock(joinSemLock); -- - } - else - { - /* noone is currently waiting for our demise - it - is our responsibility to allocate the joinSem - and block on it */ - me->md.joinSem = create_sem(0, "join sem"); -- - /* we're done accessing our joinSem */ - PR_Unlock(joinSemLock); -- - /* wait for someone to join us */ - while (acquire_sem(me->md.joinSem) == B_INTERRUPTED); - } - } - - /* if this is a user thread, we must update our books */ - if ((me->state & BT_THREAD_SYSTEM) == 0) - { - /* synchronize access to bt_book */ - PR_Lock( bt_book.ml ); -- - /* decrement the number of currently-alive user threads */ - bt_book.threadCount--; -- - if (bt_book.threadCount == 0 && bt_book.cleanUpSem != B_ERROR) { - /* we are the last user thread, and the primordial thread is - blocked in PR_Cleanup() waiting for us to finish - notify - it */ - delete_sem(bt_book.cleanUpSem); - } - - PR_Unlock( bt_book.ml ); -@@ -272,67 +263,60 @@ _bt_root (void* arg) - PRThread *thred = (PRThread*)arg; - PRIntn rv; - void *privData; - status_t result; - int i; - - /* save our PRThread object into our TLS */ - tls_set(tls_prThreadSlot, thred); -- - thred->startFunc(thred->arg); /* run the dang thing */ -- - /* clean up */ - _bt_CleanupThread(NULL); - - return 0; - } - - PR_IMPLEMENT(PRThread*) - PR_CreateThread (PRThreadType type, void (*start)(void* arg), void* arg, - PRThreadPriority priority, PRThreadScope scope, - PRThreadState state, PRUint32 stackSize) - { - PRUint32 bePriority; -- - PRThread* thred; - - if (!_pr_initialized) _PR_ImplicitInitialization(); - - thred = PR_NEWZAP(PRThread); - if (thred == NULL) - { - PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); - return NULL; - } - - thred->md.joinSem = B_ERROR; -- - thred->arg = arg; - thred->startFunc = start; - thred->priority = priority; - - if( state == PR_JOINABLE_THREAD ) - { - thred->state |= BT_THREAD_JOINABLE; - } - - /* keep some books */ -- - PR_Lock( bt_book.ml ); - - if (type == PR_USER_THREAD) - { - bt_book.threadCount++; - } - - PR_Unlock( bt_book.ml ); -- - bePriority = _bt_MapNSPRToNativePriority( priority ); -- - thred->md.tid = spawn_thread((thread_func)_bt_root, "moz-thread", - bePriority, thred); - if (thred->md.tid < B_OK) { - PR_SetError(PR_UNKNOWN_ERROR, thred->md.tid); - PR_DELETE(thred); - return NULL; - } - -@@ -428,16 +412,23 @@ PR_IMPLEMENT(PRThread*) - a native thread not created by the NSPR) - assimilate it */ - thred = _bt_AttachThread(); - } - PR_ASSERT(NULL != thred); - - return thred; - } - -+PR_IMPLEMENT(void*)PR_GetSP(PRThread *thred) -+{ -+ thread_info tInfo; -+ get_thread_info(thred->md.tid, &tInfo); -+ return tInfo.stack_base; /* or should it be _end? */ -+} -+ - PR_IMPLEMENT(PRThreadScope) - PR_GetThreadScope (const PRThread* thred) - { - PR_ASSERT(thred != NULL); - return PR_GLOBAL_THREAD; - } - - PR_IMPLEMENT(PRThreadType) -Index: mozilla/nsprpub/pr/src/io/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/io/Makefile.in,v -retrieving revision 1.13 -diff -u -8 -p -w -r1.13 Makefile.in ---- mozilla/nsprpub/pr/src/io/Makefile.in 25 Apr 2004 15:00:58 -0000 1.13 -+++ mozilla/nsprpub/pr/src/io/Makefile.in 8 Jul 2009 21:53:16 -0000 -@@ -64,23 +64,25 @@ CSRCS = \ - prmmap.c \ - prpolevt.c \ - prprf.c \ - prscanf.c \ - prstdio.c \ - $(NULL) - - ifndef USE_PTHREADS -+ifndef USE_BTHREADS - CSRCS += \ - prdir.c \ - prfile.c \ - prio.c \ - prsocket.c \ - $(NULL) - endif -+endif - - TARGETS = $(OBJS) - - INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private - - DEFINES += -D_NSPR_BUILD_ - - include $(topsrcdir)/config/rules.mk -Index: mozilla/nsprpub/pr/src/io/prmapopt.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/io/prmapopt.c,v -retrieving revision 3.18 -diff -u -8 -p -w -r3.18 prmapopt.c ---- mozilla/nsprpub/pr/src/io/prmapopt.c 25 Apr 2004 15:00:58 -0000 3.18 -+++ mozilla/nsprpub/pr/src/io/prmapopt.c 8 Jul 2009 21:53:17 -0000 -@@ -69,17 +69,17 @@ - /* NEXTSTEP is special: this must come before netinet/tcp.h. */ - #include /* n_short, n_long, n_time */ - #endif - - #if defined(XP_UNIX) || defined(OS2) || (defined(XP_BEOS) && defined(BONE_VERSION)) - #include /* TCP_NODELAY, TCP_MAXSEG */ - #endif - --#ifndef _PR_PTHREADS -+#if !defined(_PR_PTHREADS) && !defined(_PR_BTHREADS) - - PRStatus PR_CALLBACK _PR_SocketGetSocketOption(PRFileDesc *fd, PRSocketOptionData *data) - { - PRStatus rv; - PRInt32 length; - PRInt32 level, name; - - /* -@@ -94,34 +94,29 @@ PRStatus PR_CALLBACK _PR_SocketGetSocket - - rv = _PR_MapOptionName(data->option, &level, &name); - if (PR_SUCCESS == rv) - { - switch (data->option) - { - case PR_SockOpt_Linger: - { --#if !defined(XP_BEOS) || defined(BONE_VERSION) - struct linger linger; - length = sizeof(linger); - rv = _PR_MD_GETSOCKOPT( - fd, level, name, (char *) &linger, &length); - if (PR_SUCCESS == rv) - { - PR_ASSERT(sizeof(linger) == length); - data->value.linger.polarity = - (linger.l_onoff) ? PR_TRUE : PR_FALSE; - data->value.linger.linger = - PR_SecondsToInterval(linger.l_linger); - } - break; --#else -- PR_SetError( PR_NOT_IMPLEMENTED_ERROR, 0 ); -- return PR_FAILURE; --#endif - } - case PR_SockOpt_Reuseaddr: - case PR_SockOpt_Keepalive: - case PR_SockOpt_NoDelay: - case PR_SockOpt_Broadcast: - { - #ifdef WIN32 /* Winsock */ - BOOL value; -@@ -252,27 +247,22 @@ PRStatus PR_CALLBACK _PR_SocketSetSocket - - rv = _PR_MapOptionName(data->option, &level, &name); - if (PR_SUCCESS == rv) - { - switch (data->option) - { - case PR_SockOpt_Linger: - { --#if !defined(XP_BEOS) || defined(BONE_VERSION) - struct linger linger; - linger.l_onoff = data->value.linger.polarity; - linger.l_linger = PR_IntervalToSeconds(data->value.linger.linger); - rv = _PR_MD_SETSOCKOPT( - fd, level, name, (char*)&linger, sizeof(linger)); - break; --#else -- PR_SetError( PR_NOT_IMPLEMENTED_ERROR, 0 ); -- return PR_FAILURE; --#endif - } - case PR_SockOpt_Reuseaddr: - case PR_SockOpt_Keepalive: - case PR_SockOpt_NoDelay: - case PR_SockOpt_Broadcast: - { - #ifdef WIN32 /* Winsock */ - BOOL value; -@@ -350,17 +340,17 @@ PRStatus PR_CALLBACK _PR_SocketSetSocket - default: - PR_NOT_REACHED("Unknown socket option"); - break; - } - } - return rv; - } /* _PR_SocketSetSocketOption */ - --#endif /* ! _PR_PTHREADS */ -+#endif /* ! _PR_PTHREADS && ! _PR_BTHREADS */ - - /* - ********************************************************************* - ********************************************************************* - ** - ** Make sure that the following is at the end of this file, - ** because we will be playing with macro redefines. - ** -Index: mozilla/nsprpub/pr/src/io/prpolevt.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/io/prpolevt.c,v -retrieving revision 3.15 -diff -u -8 -p -w -r3.15 prpolevt.c ---- mozilla/nsprpub/pr/src/io/prpolevt.c 25 Apr 2004 15:00:58 -0000 3.15 -+++ mozilla/nsprpub/pr/src/io/prpolevt.c 8 Jul 2009 21:53:18 -0000 -@@ -443,20 +443,20 @@ PR_IMPLEMENT(PRFileDesc *) PR_NewPollabl - #else - if (PR_NewTCPSocketPair(fd) == PR_FAILURE) { - fd[0] = fd[1] = NULL; - goto errorExit; - } - /* - * set the TCP_NODELAY option to reduce notification latency - */ -- socket_opt.option = PR_SockOpt_NoDelay; -- socket_opt.value.no_delay = PR_TRUE; -- rv = PR_SetSocketOption(fd[1], &socket_opt); -- PR_ASSERT(PR_SUCCESS == rv); -+// socket_opt.option = PR_SockOpt_NoDelay; -+// socket_opt.value.no_delay = PR_TRUE; -+// rv = PR_SetSocketOption(fd[1], &socket_opt); -+// PR_ASSERT(PR_SUCCESS == rv); - #endif - - event->secret->writeEnd = fd[1]; - if (PR_PushIOLayer(fd[0], PR_TOP_IO_LAYER, event) == PR_FAILURE) { - goto errorExit; - } - - return fd[0]; -Index: mozilla/nsprpub/pr/src/io/prsocket.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/io/prsocket.c,v -retrieving revision 3.57.2.2 -diff -u -8 -p -w -r3.57.2.2 prsocket.c ---- mozilla/nsprpub/pr/src/io/prsocket.c 7 Nov 2007 22:24:04 -0000 3.57.2.2 -+++ mozilla/nsprpub/pr/src/io/prsocket.c 8 Jul 2009 21:53:23 -0000 -@@ -59,17 +59,17 @@ PRBool IsValidNetAddr(const PRNetAddr *a - - static PRBool IsValidNetAddrLen(const PRNetAddr *addr, PRInt32 addr_len) - { - /* - * The definition of the length of a Unix domain socket address - * is not uniform, so we don't check it. - */ - if ((addr != NULL) --#if defined(XP_UNIX) || defined(XP_OS2_EMX) -+#if defined(XP_UNIX) || defined(XP_OS2_EMX) || defined(XP_BEOS) - && (addr->raw.family != AF_UNIX) - #endif - && (PR_NETADDR_SIZE(addr) != addr_len)) { - #if defined(LINUX) && __GLIBC__ == 2 && __GLIBC_MINOR__ == 1 - /* - * In glibc 2.1, struct sockaddr_in6 is 24 bytes. In glibc 2.2 - * and in the 2.4 kernel, struct sockaddr_in6 has the scope_id - * field and is 28 bytes. It is possible for socket functions -Index: mozilla/nsprpub/pr/src/linking/prlink.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/linking/prlink.c,v -retrieving revision 3.81.2.5 -diff -u -8 -p -w -r3.81.2.5 prlink.c ---- mozilla/nsprpub/pr/src/linking/prlink.c 6 Oct 2006 23:36:22 -0000 3.81.2.5 -+++ mozilla/nsprpub/pr/src/linking/prlink.c 8 Jul 2009 21:53:27 -0000 -@@ -194,18 +194,20 @@ struct PRLibrary { - NSModule dlh; - #else - void* dlh; - #endif - #endif - - #ifdef XP_BEOS - void* dlh; -+#ifndef XP_HAIKU - void* stub_dlh; - #endif -+#endif - }; - - static PRLibrary *pr_loadmap; - static PRLibrary *pr_exe_loadmap; - static PRMonitor *pr_linker_lock; - static char* _pr_currentLibPath = NULL; - - static PRLibrary *pr_LoadLibraryByPathname(const char *name, PRIntn flags); -@@ -844,16 +846,29 @@ pr_LoadLibraryByPathname(const char *nam - } - /* the list of loaded library names are always kept in UTF-8 - * on Win32 platforms */ - result = pr_UnlockedFindLibrary(utf8name); - #else - result = pr_UnlockedFindLibrary(name); - #endif - -+#ifdef XP_BEOS -+ /* Havn't seen this happen so far, but it doesn't slow anything -+ down so let's keep it */ -+ for (result = pr_loadmap; result != NULL; result = result->next) { -+ /* hopefully, our caller will always use the same string -+ to refer to the same library */ -+ if (strcmp(name, result->name) == 0) { -+ result->refCount++; -+ break; -+ } -+ } -+#endif -+ - if (result != NULL) goto unlock; - - lm = PR_NEWZAP(PRLibrary); - if (lm == NULL) { - oserr = _MD_ERRNO(); - goto unlock; - } - lm->staticTable = NULL; -@@ -997,39 +1012,24 @@ pr_LoadLibraryByPathname(const char *nam - lm->name = strdup(name); - lm->dlh = h; - lm->next = pr_loadmap; - pr_loadmap = lm; - } - #endif /* HAVE_DLL */ - #endif /* XP_UNIX */ - -- lm->refCount = 1; -- - #ifdef XP_BEOS -- { -- image_info info; -- int32 cookie = 0; -+ { /* Code block to allow variable inits. :/ */ -+ /* it appears the library isn't yet loaded - load it now */ -+#ifdef XP_HAIKU -+ image_id imageid = load_add_on(name); -+#else - image_id imageid = B_ERROR; - image_id stubid = B_ERROR; -- PRLibrary *p; -- -- for (p = pr_loadmap; p != NULL; p = p->next) { -- /* hopefully, our caller will always use the same string -- to refer to the same library */ -- if (strcmp(name, p->name) == 0) { -- /* we've already loaded this library */ -- imageid = info.id; -- lm->refCount++; -- break; -- } -- } -- -- if(imageid == B_ERROR) { -- /* it appears the library isn't yet loaded - load it now */ - char stubName [B_PATH_NAME_LENGTH + 1]; - - /* the following is a work-around to a "bug" in the beos - - the beos system loader allows only 32M (system-wide) - to be used by code loaded as "add-ons" (code loaded - through the 'load_add_on()' system call, which includes - mozilla components), but allows 256M to be used by - shared libraries. -@@ -1046,59 +1046,63 @@ pr_LoadLibraryByPathname(const char *nam - */ - - strcpy(stubName, name); - strcat(stubName, ".stub"); - - /* first, attempt to load the stub (thereby loading the - component as a shared library */ - if ((stubid = load_add_on(stubName)) > B_ERROR) { -+ -+ const char *endOfPassedName = strrchr(name, '/'); -+ image_info info; -+ int32 cookie = 0; -+ - /* the stub was loaded successfully. */ - imageid = B_FILE_NOT_FOUND; -+ if( 0 == endOfPassedName ) -+ endOfPassedName = name; -+ else -+ endOfPassedName++; - -- cookie = 0; - while (get_next_image_info(0, &cookie, &info) == B_OK) { - const char *endOfSystemName = strrchr(info.name, '/'); -- const char *endOfPassedName = strrchr(name, '/'); - if( 0 == endOfSystemName ) - endOfSystemName = info.name; - else - endOfSystemName++; -- if( 0 == endOfPassedName ) -- endOfPassedName = name; -- else -- endOfPassedName++; - if (strcmp(endOfSystemName, endOfPassedName) == 0) { - /* this is the actual component - remember it */ - imageid = info.id; - break; - } - } -- - } else { - /* we failed to load the "stub" - try to load the - component directly as an add-on */ - stubid = B_ERROR; - imageid = load_add_on(name); - } -- } -- -+#endif /* XP_HAIKU */ - if (imageid <= B_ERROR) { - oserr = imageid; - PR_DELETE( lm ); - goto unlock; - } - lm->name = strdup(name); - lm->dlh = (void*)imageid; -+#ifndef XP_HAIKU - lm->stub_dlh = (void*)stubid; -+#endif - lm->next = pr_loadmap; - pr_loadmap = lm; - } --#endif -+#endif /* XP_BEOS */ - -+ lm->refCount = 1; - result = lm; /* success */ - PR_LOG(_pr_linker_lm, PR_LOG_MIN, ("Loaded library %s (load lib)", lm->name)); - - unlock: - if (result == NULL) { - PR_SetError(PR_LOAD_LIBRARY_ERROR, oserr); - DLLErrorInternal(oserr); /* sets error text */ - } -@@ -1249,21 +1253,25 @@ PR_UnloadLibrary(PRLibrary *lib) - if (--lib->refCount > 0) { - PR_LOG(_pr_linker_lm, PR_LOG_MIN, - ("%s decr => %d", - lib->name, lib->refCount)); - goto done; - } - - #ifdef XP_BEOS -+#ifdef XP_HAIKU -+ unload_add_on( (image_id) lib->dlh ); -+#else - if(((image_id)lib->stub_dlh) == B_ERROR) - unload_add_on( (image_id) lib->dlh ); - else - unload_add_on( (image_id) lib->stub_dlh); --#endif -+#endif /* XP_HAIKU */ -+#endif /* XP_BEOS */ - - #ifdef XP_UNIX - #ifdef HAVE_DLL - #ifdef USE_DLFCN - result = dlclose(lib->dlh); - #elif defined(USE_HPSHL) - result = shl_unload(lib->dlh); - #elif defined(USE_MACH_DYLD) -Index: mozilla/nsprpub/pr/src/md/beos/beos.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/md/beos/beos.c,v -retrieving revision 3.5 -diff -u -8 -p -w -r3.5 beos.c ---- mozilla/nsprpub/pr/src/md/beos/beos.c 25 Apr 2004 15:00:59 -0000 3.5 -+++ mozilla/nsprpub/pr/src/md/beos/beos.c 8 Jul 2009 21:53:28 -0000 -@@ -32,233 +32,178 @@ - * 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 ***** */ - - #include "primpl.h" - --#include --#include --#include --#include --#include --#include - #include --#include --#include -- - /* - * Make sure _PRSockLen_t is 32-bit, because we will cast a PRUint32* or - * PRInt32* pointer to a _PRSockLen_t* pointer. - */ - #define _PRSockLen_t int - --/* --** Global lock variable used to bracket calls into rusty libraries that --** aren't thread safe (like libc, libX, etc). --*/ --static PRLock *_pr_rename_lock = NULL; --static PRMonitor *_pr_Xfe_mon = NULL; -+ -+#ifndef BONE_VERSION -+PRLock *_connectLock = NULL; -+ -+/* Workaround for nonblocking connects under net_server */ -+PRUint32 connectCount = 0; -+ConnectListNode connectList[64]; -+ -+void -+_MD_final_init_netserver(void) -+{ -+ _connectLock = PR_NewLock(); -+ PR_ASSERT(NULL != _connectLock); -+ /* Workaround for nonblocking connects under net_server */ -+ connectCount = 0; -+} -+#endif /* !BONE_VERSION */ -+ -+ -+#ifdef __powerpc__ -+static PRLock *monitor = NULL; -+ -+void -+_MD_AtomicInit(void) -+{ -+ if (monitor == NULL) { -+ monitor = PR_NewLock(); -+ } -+} -+#endif /* __powerpc__ */ - - /* -- * Variables used by the GC code, initialized in _MD_InitSegs(). -- * _pr_zero_fd should be a static variable. Unfortunately, there is -- * still some Unix-specific code left in function PR_GrowSegment() -- * in file memory/prseg.c that references it, so it needs -- * to be a global variable for now. -+** This is exceedingly messy. atomic_add returns the last value, NSPR -+** expects the new value. We just add or subtract 1 from the result. -+** The actual memory update is atomic. - */ --PRInt32 _pr_zero_fd = -1; --static PRLock *_pr_md_lock = NULL; - --sigset_t timer_set; -+PRInt32 -+_MD_AtomicAdd( PRInt32 *ptr, PRInt32 val ) -+{ -+ return atomic_add( (long *)ptr, val ) + val; -+} - --void _PR_UnixInit() -+PRInt32 -+_MD_AtomicIncrement( PRInt32 *val ) - { -- struct sigaction sigact; -- int rv; -+ return atomic_add( (long *)val, 1 ) + 1; -+} - -- sigemptyset(&timer_set); -+PRInt32 -+_MD_AtomicDecrement( PRInt32 *val ) -+{ -+ return atomic_add( (long *)val, -1 ) - 1; -+} - -- sigact.sa_handler = SIG_IGN; -- sigemptyset(&sigact.sa_mask); -- sigact.sa_flags = 0; -- rv = sigaction(SIGPIPE, &sigact, 0); -- PR_ASSERT(0 == rv); -+PRInt32 -+_MD_AtomicSet( PRInt32 *val, PRInt32 newval ) -+{ -+ PRInt32 result; -+#ifdef __powerpc__ -+ if (!_pr_initialized) { -+ _PR_ImplicitInitialization(); -+ } -+ PR_Lock(monitor); -+ result = *val; -+ *val = newval; -+ PR_Unlock(monitor); -+#else -+ asm volatile ("xchgl %0, %1" -+ : "=r"(result), "=m"(*val) -+ : "0"(newval), "m"(*val)); - -- _pr_rename_lock = PR_NewLock(); -- PR_ASSERT(NULL != _pr_rename_lock); -- _pr_Xfe_mon = PR_NewMonitor(); -- PR_ASSERT(NULL != _pr_Xfe_mon); -+#endif /* __powerpc__ */ -+ return result; - } - - /* - *----------------------------------------------------------------------- - * - * PR_Now -- - * - * Returns the current time in microseconds since the epoch. - * The epoch is midnight January 1, 1970 GMT. -- * The implementation is machine dependent. This is the Unix -- * implementation. -- * Cf. time_t time(time_t *tp) -+ * The implementation is machine dependent. - * - *----------------------------------------------------------------------- - */ - - PR_IMPLEMENT(PRTime) - PR_Now(void) - { -- struct timeval tv; -- PRInt64 s, us, s2us; -- -- GETTIMEOFDAY(&tv); -- LL_I2L(s2us, PR_USEC_PER_SEC); -- LL_I2L(s, tv.tv_sec); -- LL_I2L(us, tv.tv_usec); -- LL_MUL(s, s, s2us); -- LL_ADD(s, s, us); -- return s; -+ return (PRTime) real_time_clock_usecs(); - } - - PRIntervalTime --_PR_UNIX_GetInterval() -+_MD_get_interval(void) - { -- struct timeval time; -- PRIntervalTime ticks; -- -- (void)GETTIMEOFDAY(&time); /* fallicy of course */ -- ticks = (PRUint32)time.tv_sec * PR_MSEC_PER_SEC; /* that's in milliseconds */ -- ticks += (PRUint32)time.tv_usec / PR_USEC_PER_MSEC; /* so's that */ -- return ticks; --} /* _PR_SUNOS_GetInterval */ -- --PRIntervalTime _PR_UNIX_TicksPerSecond() --{ -- return 1000; /* this needs some work :) */ -+ return (PRIntervalTime) real_time_clock_usecs() / 10; - } - --/************************************************************************/ -- --/* --** Special hacks for xlib. Xlib/Xt/Xm is not re-entrant nor is it thread --** safe. Unfortunately, neither is mozilla. To make these programs work --** in a pre-emptive threaded environment, we need to use a lock. --*/ -- --void PR_XLock() --{ -- PR_EnterMonitor(_pr_Xfe_mon); --} -- --void PR_XUnlock() -+PRIntervalTime -+_MD_interval_per_sec(void) - { -- PR_ExitMonitor(_pr_Xfe_mon); -+ return 100000L; - } - --PRBool PR_XIsLocked() -+PRSize -+_PR_MD_GetRandomNoise( void *buf, PRSize size ) - { -- return (PR_InMonitor(_pr_Xfe_mon)) ? PR_TRUE : PR_FALSE; --} -+ struct timeval tv; -+ int n = 0; -+ int s; - --void PR_XWait(int ms) --{ -- PR_Wait(_pr_Xfe_mon, PR_MillisecondsToInterval(ms)); --} -+ GETTIMEOFDAY(&tv); - --void PR_XNotify(void) --{ -- PR_Notify(_pr_Xfe_mon); -+ if ( size >= 0 ) { -+ s = _pr_CopyLowBits((char*)buf+n, size, &tv.tv_usec, sizeof(tv.tv_usec)); -+ size -= s; -+ n += s; - } -- --void PR_XNotifyAll(void) --{ -- PR_NotifyAll(_pr_Xfe_mon); -+ if ( size >= 0 ) { -+ s = _pr_CopyLowBits((char*)buf+n, size, &tv.tv_sec, sizeof(tv.tv_sec)); -+ size -= s; -+ n += s; - } -+ return n; -+} /* end _PR_MD_GetRandomNoise() */ - --#if !defined(BEOS) --#ifdef HAVE_BSD_FLOCK - --#include -- --PR_IMPLEMENT(PRStatus) --_MD_LOCKFILE (PRInt32 f) -+/* Needed by prinit.c:612 */ -+void -+_PR_MD_QUERY_FD_INHERITABLE(PRFileDesc *fd) - { -- PRInt32 rv; -- rv = flock(f, LOCK_EX); -- if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_FLOCK_ERROR(_MD_ERRNO()); -- return PR_FAILURE; --} -+ int flags; - --PR_IMPLEMENT(PRStatus) --_MD_TLOCKFILE (PRInt32 f) --{ -- PRInt32 rv; -- rv = flock(f, LOCK_EX|LOCK_NB); -- if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_FLOCK_ERROR(_MD_ERRNO()); -- return PR_FAILURE; -+ PR_ASSERT(_PR_TRI_UNKNOWN == fd->secret->inheritable); -+ flags = fcntl(fd->secret->md.osfd, F_GETFD, 0); -+ PR_ASSERT(-1 != flags); -+ fd->secret->inheritable = (flags & FD_CLOEXEC) ? -+ _PR_TRI_FALSE : _PR_TRI_TRUE; - } - --PR_IMPLEMENT(PRStatus) --_MD_UNLOCKFILE (PRInt32 f) -+PRStatus -+_MD_gethostname(char *name, PRUint32 namelen) - { -- PRInt32 rv; -- rv = flock(f, LOCK_UN); -- if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_FLOCK_ERROR(_MD_ERRNO()); -- return PR_FAILURE; --} --#else -+ PRInt32 rv, err; - --PR_IMPLEMENT(PRStatus) --_MD_LOCKFILE (PRInt32 f) --{ -- PRInt32 rv; -- rv = lockf(f, F_LOCK, 0); -+ rv = gethostname(name, namelen); - if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_LOCKF_ERROR(_MD_ERRNO()); -- return PR_FAILURE; --} -- --PR_IMPLEMENT(PRStatus) --_MD_TLOCKFILE (PRInt32 f) - { -- PRInt32 rv; -- rv = lockf(f, F_TLOCK, 0); -- if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_LOCKF_ERROR(_MD_ERRNO()); -- return PR_FAILURE; -+ err = _MD_ERRNO(); -+ switch (err) { -+ case EFAULT: -+ PR_SetError(PR_ACCESS_FAULT_ERROR, err); -+ break; -+ default: -+ PR_SetError(PR_UNKNOWN_ERROR, err); -+ break; - } -- --PR_IMPLEMENT(PRStatus) --_MD_UNLOCKFILE (PRInt32 f) --{ -- PRInt32 rv; -- rv = lockf(f, F_ULOCK, 0); -- if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_LOCKF_ERROR(_MD_ERRNO()); - return PR_FAILURE; - } --#endif -- --PR_IMPLEMENT(PRStatus) -- _MD_GETHOSTNAME (char *name, PRUint32 namelen) --{ -- PRIntn rv; -- -- rv = gethostname(name, namelen); -- if (0 == rv) { - return PR_SUCCESS; - } -- _PR_MD_MAP_GETHOSTNAME_ERROR(_MD_ERRNO()); -- return PR_FAILURE; --} -- --#endif -Index: mozilla/nsprpub/pr/src/md/beos/bproc.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/md/beos/bproc.c,v -retrieving revision 3.6 -diff -u -8 -p -w -r3.6 bproc.c ---- mozilla/nsprpub/pr/src/md/beos/bproc.c 25 Apr 2004 15:00:59 -0000 3.6 -+++ mozilla/nsprpub/pr/src/md/beos/bproc.c 8 Jul 2009 21:53:29 -0000 -@@ -31,18 +31,20 @@ - * 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 ***** */ - - #include "primpl.h" --#include -+#include - #include -+#include -+#include - - #define _PR_SIGNALED_EXITSTATUS 256 - - PRProcess* - _MD_create_process (const char *path, char *const *argv, - char *const *envp, const PRProcessAttr *attr) - { - PRProcess *process; -Index: mozilla/nsprpub/pr/src/md/beos/bsrcs.mk -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/md/beos/bsrcs.mk,v -retrieving revision 3.6 -diff -u -8 -p -w -r3.6 bsrcs.mk ---- mozilla/nsprpub/pr/src/md/beos/bsrcs.mk 25 Apr 2004 15:00:59 -0000 3.6 -+++ mozilla/nsprpub/pr/src/md/beos/bsrcs.mk 8 Jul 2009 21:53:29 -0000 -@@ -15,16 +15,17 @@ - # The Original Code is the Netscape Portable Runtime (NSPR). - # - # The Initial Developer of the Original Code is - # Netscape Communications Corporation. - # Portions created by the Initial Developer are Copyright (C) 1998-2000 - # the Initial Developer. All Rights Reserved. - # - # Contributor(s): -+# Fredrik Holmqvist - # - # 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 -@@ -37,18 +38,11 @@ - - - # this file lists the source files to be compiled (used in Makefile) and - # then enumerated as object files (in objs.mk) for inclusion in the NSPR - # shared library - - MDCSRCS = \ - beos.c \ -- beos_errors.c \ -- bfile.c \ -- bmisc.c \ -- bnet.c \ - bproc.c \ -- brng.c \ -- bseg.c \ -- btime.c \ - bmmap.c \ - $(NULL) -Index: mozilla/nsprpub/pr/src/memory/prseg.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/memory/prseg.c,v -retrieving revision 3.8 -diff -u -8 -p -w -r3.8 prseg.c ---- mozilla/nsprpub/pr/src/memory/prseg.c 25 Apr 2004 15:01:01 -0000 3.8 -+++ mozilla/nsprpub/pr/src/memory/prseg.c 8 Jul 2009 21:53:30 -0000 -@@ -32,26 +32,26 @@ - * 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 ***** */ - - #include "primpl.h" - --#if defined(_PR_PTHREADS) -+#if defined(_PR_PTHREADS) || defined(_PR_BTHREADS) - - /* - ** The pthreads version doesn't use these functions. - */ - void _PR_InitSegs(void) - { - } - --#else /* _PR_PTHREADS */ -+#else /* _PR_PTHREADS || defined(_PR_BTHREADS) */ - - void _PR_InitSegs(void) - { - _PR_MD_INIT_SEGS(); - } - - /* - ** Allocate a memory segment. The size value is rounded up to the native -@@ -85,9 +85,9 @@ PRSegment* _PR_NewSegment(PRUint32 size, - ** Free a memory segment. - */ - void _PR_DestroySegment(PRSegment *seg) - { - _PR_MD_FREE_SEGMENT(seg); - PR_DELETE(seg); - } - --#endif /* _PR_PTHREADS */ -+#endif /* _PR_PTHREADS || defined(_PR_BTHREADS) */ -Index: mozilla/nsprpub/pr/src/misc/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/misc/Makefile.in,v -retrieving revision 1.19 -diff -u -8 -p -w -r1.19 Makefile.in ---- mozilla/nsprpub/pr/src/misc/Makefile.in 8 Nov 2004 02:52:56 -0000 1.19 -+++ mozilla/nsprpub/pr/src/misc/Makefile.in 8 Jul 2009 21:53:30 -0000 -@@ -66,20 +66,22 @@ CSRCS = \ - prsystem.c \ - prtime.c \ - prthinfo.c \ - prtpool.c \ - prtrace.c \ - $(NULL) - - ifndef USE_PTHREADS -+ifndef USE_BTHREADS - CSRCS += \ - pripcsem.c \ - $(NULL) - endif -+endif - - TARGETS = $(OBJS) - - INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private - - DEFINES += -D_NSPR_BUILD_ - - RELEASE_BINS = $(srcdir)/compile-et.pl $(srcdir)/prerr.properties -Index: mozilla/nsprpub/pr/src/misc/prinit.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/misc/prinit.c,v -retrieving revision 3.43.2.1 -diff -u -8 -p -w -r3.43.2.1 prinit.c ---- mozilla/nsprpub/pr/src/misc/prinit.c 1 Dec 2006 00:34:11 -0000 3.43.2.1 -+++ mozilla/nsprpub/pr/src/misc/prinit.c 8 Jul 2009 21:53:33 -0000 -@@ -195,18 +195,20 @@ static void _PR_InitStuff(void) - _pr_shma_lm = PR_NewLogModule("shma"); - - /* NOTE: These init's cannot depend on _PR_MD_CURRENT_THREAD() */ - _PR_MD_EARLY_INIT(); - - _PR_InitLocks(); - _PR_InitAtomic(); - _PR_InitSegs(); -+#if !defined(_PR_BTHREADS) - _PR_InitStacks(); - _PR_InitTPD(); -+#endif /*!defined(_PR_BTHREADS) */ - _PR_InitEnv(); - _PR_InitLayerCache(); - _PR_InitClock(); - - _pr_sleeplock = PR_NewLock(); - PR_ASSERT(NULL != _pr_sleeplock); - - #ifdef GC_LEAK_DETECTOR -Index: mozilla/nsprpub/pr/src/misc/pripcsem.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/misc/pripcsem.c,v -retrieving revision 3.5 -diff -u -8 -p -w -r3.5 pripcsem.c ---- mozilla/nsprpub/pr/src/misc/pripcsem.c 25 Apr 2004 15:01:01 -0000 3.5 -+++ mozilla/nsprpub/pr/src/misc/pripcsem.c 8 Jul 2009 21:53:33 -0000 -@@ -41,19 +41,19 @@ - * Description: implements the named semaphores API in prsemipc.h - * for classic NSPR. If _PR_HAVE_NAMED_SEMAPHORES is not defined, - * the named semaphore functions all fail with the error code - * PR_NOT_IMPLEMENTED_ERROR. - */ - - #include "primpl.h" - --#ifdef _PR_PTHREADS -+#if defined(_PR_PTHREADS) || defined(_PR_BTHREADS) - --#error "This file should not be compiled for the pthreads version" -+#error "This file should not be compiled for the pthreads or bthreads version" - - #else - - #ifndef _PR_HAVE_NAMED_SEMAPHORES - - PRSem * _PR_MD_OPEN_SEMAPHORE( - const char *osname, PRIntn flags, PRIntn mode, PRUintn value) - { -@@ -122,9 +122,9 @@ PR_IMPLEMENT(PRStatus) PR_DeleteSemaphor - if (!_pr_initialized) _PR_ImplicitInitialization(); - if (_PR_MakeNativeIPCName(name, osname, sizeof(osname), _PRIPCSem) - == PR_FAILURE) { - return PR_FAILURE; - } - return _PR_MD_DELETE_SEMAPHORE(osname); - } - --#endif /* _PR_PTHREADS */ -+#endif /* _PR_PTHREADS || _PR_BTHREADS */ -Index: mozilla/profile/defaults/bookmarks.html -=================================================================== -RCS file: /cvsroot/mozilla/profile/defaults/Attic/bookmarks.html,v -retrieving revision 1.18.4.1 -diff -u -8 -p -w -r1.18.4.1 bookmarks.html ---- mozilla/profile/defaults/bookmarks.html 28 Nov 2007 16:42:30 -0000 1.18.4.1 -+++ mozilla/profile/defaults/bookmarks.html 8 Jul 2009 21:53:43 -0000 -@@ -1,41 +1,40 @@ - - -+ DO NOT EDIT! --> - - Bookmarks -

Bookmarks

- -

--

Personal Toolbar Folder

--

--

mozilla.org --
mozillaZine --
mozdev.org --

--

Mozilla Project

--

--

mozilla.org

--

--

The Mozilla Organization --
SeaMonkey Project --
Mozilla Products --
Feedback --

--

Community & Support

-+
Get Bookmark Add-ons -+
-+

Bookmarks Toolbar Folder

-+
Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar -

--

mozillaZine --
SeaMonkey Support (mozillaZine) --
mozdev.org --
Mozilla Plug-in Information (mozdev) --
Mozilla Extensions (mozdev) --

-+

Haiku WebSite -+
Nightly Builds -

--

Search the Web

-+
-+

BeZilla Browser

-

--

Google --
Google Groups --
Google News -+
BeZilla Blog -+
Report an Issue -+
View Known Issues -+

-+

Haiku Bookmarks

-+

-+

Nightly Builds -+
Optional Packages -+
Bug Tracker -+

-+

Software for Haiku

-+

-+

OSDrawer.net -+
HaikuWare -+
Zeta-Games -+
BeBits -

--


-+
Haiku WebSite -+ -

-Index: mozilla/security/coreconf/BeOS.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/coreconf/BeOS.mk,v -retrieving revision 1.2 -diff -u -8 -p -w -r1.2 BeOS.mk ---- mozilla/security/coreconf/BeOS.mk 25 Apr 2004 15:02:17 -0000 1.2 -+++ mozilla/security/coreconf/BeOS.mk 8 Jul 2009 21:53:45 -0000 -@@ -56,17 +56,17 @@ ifeq ($(OS_TEST),ppc) - CPU_ARCH = ppc - else - OS_REL_CFLAGS = -Di386 - CPU_ARCH = x86 - endif - - MKSHLIB = $(CC) -nostart -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) - ifdef BUILD_OPT -- OPTIMIZER = -O2 -+ OPTIMIZER = -O3 - endif - - OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wall -pipe - OS_LIBS = -lbe - - DEFINES += -DBEOS - - ifdef USE_PTHREADS -Index: mozilla/security/coreconf/arch.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/coreconf/arch.mk,v -retrieving revision 1.19.2.1 -diff -u -8 -p -w -r1.19.2.1 arch.mk ---- mozilla/security/coreconf/arch.mk 14 Nov 2007 22:47:33 -0000 1.19.2.1 -+++ mozilla/security/coreconf/arch.mk 8 Jul 2009 21:53:46 -0000 -@@ -57,16 +57,17 @@ - ifeq ($(USE_64), 1) - 64BIT_TAG=_64 - else - 64BIT_TAG= - endif - - OS_ARCH := $(subst /,_,$(shell uname -s)) - -+ - # - # Attempt to differentiate between sparc and x86 Solaris - # - - OS_TEST := $(shell uname -m) - ifeq ($(OS_TEST),i86pc) - OS_RELEASE := $(shell uname -r)_$(OS_TEST) - else -Index: mozilla/security/coreconf/config.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/coreconf/config.mk,v -retrieving revision 1.17.28.3 -diff -u -8 -p -w -r1.17.28.3 config.mk ---- mozilla/security/coreconf/config.mk 4 May 2007 06:54:05 -0000 1.17.28.3 -+++ mozilla/security/coreconf/config.mk 8 Jul 2009 21:53:47 -0000 -@@ -32,16 +32,17 @@ - # 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 ***** - - # Configuration information for building in the "Core Components" source module - -+ - ####################################################################### - # [1.0] Master "Core Components" source and release # - # tags # - ####################################################################### - ifndef MK_ARCH - include $(CORE_DEPTH)/coreconf/arch.mk - endif - -@@ -57,24 +58,30 @@ endif - # [3.0] Master "Core Components" -specific macros # - # (dependent upon tags) # - # # - # We are moving towards just having a $(OS_TARGET).mk file # - # as opposed to multiple $(OS_TARGET)$(OS_RELEASE).mk files, # - # one for each OS release. # - ####################################################################### - -+ -+ - TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \ - OpenVMS AIX - - ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET))) - include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk - else -+ifeq ($(OS_ARCH), Haiku) -+include $(CORE_DEPTH)/coreconf/BeOS.mk -+else - include $(CORE_DEPTH)/coreconf/$(OS_TARGET)$(OS_RELEASE).mk - endif -+endif - - ####################################################################### - # [4.0] Master "Core Components" source and release tags # - # (dependent upon tags) # - ####################################################################### - PLATFORM = $(OBJDIR_NAME) - - ####################################################################### -Index: mozilla/security/manager/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/security/manager/Makefile.in,v -retrieving revision 1.57.4.6 -diff -u -8 -p -w -r1.57.4.6 Makefile.in ---- mozilla/security/manager/Makefile.in 23 May 2008 23:45:26 -0000 1.57.4.6 -+++ mozilla/security/manager/Makefile.in 8 Jul 2009 21:53:48 -0000 -@@ -257,30 +257,45 @@ ifndef MOZ_NATIVE_NSS - $(MAKE) -C $(topsrcdir)/security/nss-fips/lib/util $(DEFAULT_GMAKE_FLAGS) clean - # In NSS 3.11.8-3.11.9, lib/ssl/derive.c includes cmd/lib/secutil.h. - $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS) export - $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) DIRS="util base dev pki pki1 certdb certhigh pk11wrap cryptohi nss ssl pkcs12 pkcs7 smime crmf jar ckfw ckfw/builtins" - ifndef SKIP_CHK - $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS) - $(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign $(DEFAULT_GMAKE_FLAGS) - endif -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) -m 755 $(DIST)/lib/$(LOADABLE_ROOT_MODULE) $(DIST)/bin/add-ons -+else - $(INSTALL) -m 755 $(DIST)/lib/$(LOADABLE_ROOT_MODULE) $(DIST)/bin -+endif - ifndef SKIP_CHK - $(INSTALL) -m 644 $(DIST)/lib/$(SOFTOKEN3_CHK) $(DIST)/bin - endif -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) -m 755 $(DIST)/lib/$(SOFTOKEN3_LIB) $(DIST)/bin/lib -+ $(INSTALL) -m 755 $(DIST)/lib/$(NSS3_LIB) $(DIST)/bin/lib -+ $(INSTALL) -m 755 $(DIST)/lib/$(SSL3_LIB) $(DIST)/bin/lib -+ $(INSTALL) -m 755 $(DIST)/lib/$(SMIME3_LIB) $(DIST)/bin/lib -+else - $(INSTALL) -m 755 $(DIST)/lib/$(SOFTOKEN3_LIB) $(DIST)/bin - $(INSTALL) -m 755 $(DIST)/lib/$(NSS3_LIB) $(DIST)/bin - $(INSTALL) -m 755 $(DIST)/lib/$(SSL3_LIB) $(DIST)/bin - $(INSTALL) -m 755 $(DIST)/lib/$(SMIME3_LIB) $(DIST)/bin -+endif - ifdef HAVE_FREEBL_LIBS - ifndef SKIP_CHK - $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_CHK) $(DIST)/bin - endif -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_LIB) $(DIST)/bin/add-ons -+else - $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_LIB) $(DIST)/bin - endif -+endif - ifdef HAVE_FREEBL_LIBS_32 - ifndef SKIP_CHK - $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_32INT_CHK) $(DIST)/bin - $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_32FPU_CHK) $(DIST)/bin - endif - $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_32INT_LIB) $(DIST)/bin - $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_32FPU_LIB) $(DIST)/bin - endif -Index: mozilla/security/nss/cmd/lib/secutil.h -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/cmd/lib/secutil.h,v -retrieving revision 1.18.24.1 -diff -u -8 -p -w -r1.18.24.1 secutil.h ---- mozilla/security/nss/cmd/lib/secutil.h 19 Jul 2006 00:25:03 -0000 1.18.24.1 -+++ mozilla/security/nss/cmd/lib/secutil.h 8 Jul 2009 21:53:54 -0000 -@@ -407,16 +407,16 @@ SECU_GetOptionArg(secuCommand *cmd, int - /* Return informative error string */ - char *SECU_ErrorString(int16 err); - - /* Return informative error string. Does not call XP_GetString */ - char *SECU_ErrorStringRaw(int16 err); - - void printflags(char *trusts, unsigned int flags); - --#ifndef XP_UNIX -+#if !defined(XP_UNIX) && !defined(XP_BEOS) - extern int ffs(unsigned int i); - #endif - - #include "secerr.h" - #include "sslerr.h" - - #endif /* _SEC_UTIL_H_ */ -Index: mozilla/security/nss/lib/dev/ckhelper.c -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/lib/dev/ckhelper.c,v -retrieving revision 1.34.28.2 -diff -u -8 -p -w -r1.34.28.2 ckhelper.c ---- mozilla/security/nss/lib/dev/ckhelper.c 3 Dec 2008 04:52:53 -0000 1.34.28.2 -+++ mozilla/security/nss/lib/dev/ckhelper.c 8 Jul 2009 21:53:59 -0000 -@@ -225,33 +225,33 @@ NSS_IMPLEMENT PRBool - nssCKObject_IsAttributeTrue ( - CK_OBJECT_HANDLE object, - CK_ATTRIBUTE_TYPE attribute, - nssSession *session, - NSSSlot *slot, - PRStatus *rvStatus - ) - { -- CK_BBOOL bool; -+ CK_BBOOL boolval; - CK_ATTRIBUTE_PTR attr; - CK_ATTRIBUTE atemplate = { 0, NULL, 0 }; - CK_RV ckrv; - void *epv = nssSlot_GetCryptokiEPV(slot); - attr = &atemplate; -- NSS_CK_SET_ATTRIBUTE_VAR(attr, attribute, bool); -+ NSS_CK_SET_ATTRIBUTE_VAR(attr, attribute, boolval); - nssSession_EnterMonitor(session); - ckrv = CKAPI(epv)->C_GetAttributeValue(session->handle, object, - &atemplate, 1); - nssSession_ExitMonitor(session); - if (ckrv != CKR_OK) { - *rvStatus = PR_FAILURE; - return PR_FALSE; - } - *rvStatus = PR_SUCCESS; -- return (PRBool)(bool == CK_TRUE); -+ return (PRBool)(boolval == CK_TRUE); - } - - NSS_IMPLEMENT PRStatus - nssCKObject_SetAttributes ( - CK_OBJECT_HANDLE object, - CK_ATTRIBUTE_PTR obj_template, - CK_ULONG count, - nssSession *session, -Index: mozilla/security/nss/lib/freebl/unix_rand.c -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/lib/freebl/unix_rand.c,v -retrieving revision 1.17.10.7 -diff -u -8 -p -w -r1.17.10.7 unix_rand.c ---- mozilla/security/nss/lib/freebl/unix_rand.c 25 Jul 2007 23:18:55 -0000 1.17.10.7 -+++ mozilla/security/nss/lib/freebl/unix_rand.c 8 Jul 2009 21:54:01 -0000 -@@ -662,17 +662,17 @@ GetHighResClock(void *buf, size_t maxbyt - - t = asm("rpcc %v0"); - return CopyLowBits(buf, maxbytes, &t, sizeof(t)); - } - - #endif /* VMS */ - - #ifdef BEOS --#include -+#include - - static size_t - GetHighResClock(void *buf, size_t maxbytes) - { - bigtime_t bigtime; /* Actually an int64 */ - - bigtime = real_time_clock_usecs(); - return CopyLowBits(buf, maxbytes, &bigtime, sizeof(bigtime)); -Index: mozilla/security/nss/lib/ssl/config.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/lib/ssl/config.mk,v -retrieving revision 1.21.2.1 -diff -u -8 -p -w -r1.21.2.1 config.mk ---- mozilla/security/nss/lib/ssl/config.mk 1 May 2007 06:09:31 -0000 1.21.2.1 -+++ mozilla/security/nss/lib/ssl/config.mk 8 Jul 2009 21:54:03 -0000 -@@ -103,17 +103,17 @@ EXTRA_SHARED_LIBS += \ - -L$(DIST)/lib \ - -lnss3 \ - -L$(NSPR_LIB_DIR) \ - -lplc4 \ - -lplds4 \ - -lnspr4 \ - $(NULL) - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_SHARED_LIBS += -lbe - endif - - ifeq ($(OS_ARCH), Darwin) - EXTRA_SHARED_LIBS += -dylib_file @executable_path/libsoftokn3.dylib:$(DIST)/lib/libsoftokn3.dylib - endif - - ifeq ($(OS_TARGET),SunOS) -Index: mozilla/security/nss-fips/lib/freebl/unix_rand.c -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/lib/freebl/unix_rand.c,v -retrieving revision 1.17.10.5 -diff -u -8 -p -w -r1.17.10.5 unix_rand.c ---- mozilla/security/nss-fips/lib/freebl/unix_rand.c 12 Oct 2006 22:50:48 -0000 1.17.10.5 -+++ mozilla/security/nss-fips/lib/freebl/unix_rand.c 8 Jul 2009 21:54:10 -0000 -@@ -661,17 +661,17 @@ GetHighResClock(void *buf, size_t maxbyt - - t = asm("rpcc %v0"); - return CopyLowBits(buf, maxbytes, &t, sizeof(t)); - } - - #endif /* VMS */ - - #ifdef BEOS --#include -+#include - - static size_t - GetHighResClock(void *buf, size_t maxbytes) - { - bigtime_t bigtime; /* Actually an int64 */ - - bigtime = real_time_clock_usecs(); - return CopyLowBits(buf, maxbytes, &bigtime, sizeof(bigtime)); -Index: mozilla/security/nss-fips/lib/ssl/config.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/lib/ssl/config.mk,v -retrieving revision 1.21 -diff -u -8 -p -w -r1.21 config.mk ---- mozilla/security/nss-fips/lib/ssl/config.mk 19 Oct 2005 01:04:16 -0000 1.21 -+++ mozilla/security/nss-fips/lib/ssl/config.mk 8 Jul 2009 21:54:11 -0000 -@@ -99,17 +99,17 @@ EXTRA_SHARED_LIBS += \ - -L$(DIST)/lib \ - -lnss3 \ - -L$(NSPR_LIB_DIR) \ - -lplc4 \ - -lplds4 \ - -lnspr4 \ - $(NULL) - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_SHARED_LIBS += -lbe - endif - - ifeq ($(OS_ARCH), Darwin) - EXTRA_SHARED_LIBS += -dylib_file @executable_path/libsoftokn3.dylib:$(DIST)/lib/libsoftokn3.dylib - endif - - ifeq ($(OS_TARGET),SunOS) -Index: mozilla/toolkit/library/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/toolkit/library/Makefile.in,v -retrieving revision 1.16.2.10 -diff -u -8 -p -w -r1.16.2.10 Makefile.in ---- mozilla/toolkit/library/Makefile.in 31 Aug 2007 02:40:21 -0000 1.16.2.10 -+++ mozilla/toolkit/library/Makefile.in 8 Jul 2009 21:54:23 -0000 -@@ -359,17 +359,17 @@ endif - ifdef MOZ_ENABLE_XPRINT - EXTRA_DSO_LDOPTS += $(MOZ_XPRINT_LDFLAGS) - endif - - ifdef MOZ_ENABLE_PANGO - EXTRA_DSO_LDOPTS += $(MOZ_PANGO_LIBS) - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_DSO_LDOPTS += -lbe - endif - - ifeq ($(OS_ARCH),WINNT) - EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool comdlg32) - ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC)) - EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp) - endif -Index: mozilla/toolkit/mozapps/installer/package-name.mk -=================================================================== -RCS file: /cvsroot/mozilla/toolkit/mozapps/installer/package-name.mk,v -retrieving revision 1.4.8.3 -diff -u -8 -p -w -r1.4.8.3 package-name.mk ---- mozilla/toolkit/mozapps/installer/package-name.mk 4 Apr 2008 09:21:26 -0000 1.4.8.3 -+++ mozilla/toolkit/mozapps/installer/package-name.mk 8 Jul 2009 21:54:24 -0000 -@@ -54,16 +54,19 @@ ifeq ($(OS_ARCH),Darwin) - MOZ_PKG_PLATFORM := mac - endif - ifeq ($(TARGET_OS),linux-gnu) - MOZ_PKG_PLATFORM := linux-$(TARGET_CPU) - endif - ifeq ($(OS_ARCH),OS2) - MOZ_PKG_PLATFORM := os2 - endif -+ifeq ($(OS_ARCH), Haiku) -+MOZ_PKG_PLATFORM := Haiku -+endif - ifeq ($(OS_ARCH), BeOS) - ifeq (,$(filter-out 6.%, $(OS_RELEASE))) - MOZ_PKG_PLATFORM := Zeta - else - ifeq (,$(filter-out 5.1, $(OS_RELEASE))) - MOZ_PKG_PLATFORM := BeOS-bone - else - ifeq (,$(filter-out 5.0.4, $(OS_RELEASE))) -Index: mozilla/toolkit/mozapps/installer/packager.mk -=================================================================== -RCS file: /cvsroot/mozilla/toolkit/mozapps/installer/packager.mk,v -retrieving revision 1.16.2.18 -diff -u -8 -p -w -r1.16.2.18 packager.mk ---- mozilla/toolkit/mozapps/installer/packager.mk 4 Apr 2008 20:31:10 -0000 1.16.2.18 -+++ mozilla/toolkit/mozapps/installer/packager.mk 8 Jul 2009 21:54:25 -0000 -@@ -43,21 +43,24 @@ include $(topsrcdir)/toolkit/mozapps/ins - # This is how we create the Unix binary packages we release to the public. - # Currently the only format is tar.gz (TGZ), but it should be fairly easy - # to add .rpm (RPM) and .deb (DEB) later. - - ifndef MOZ_PKG_FORMAT - ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) - MOZ_PKG_FORMAT = DMG - else --ifeq (,$(filter-out OS2 WINNT BeOS, $(OS_ARCH))) -+ifeq (,$(filter-out OS2 WINNT BeOS Haiku, $(OS_ARCH))) - MOZ_PKG_FORMAT = ZIP - ifeq ($(OS_ARCH),OS2) - INSTALLER_DIR = os2 - else -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+INSTALLER_DIR = beos -+endif - ifeq ($(OS_ARCH), WINNT) - INSTALLER_DIR = windows - endif - endif - else - ifeq (,$(filter-out SunOS, $(OS_ARCH))) - MOZ_PKG_FORMAT = BZ2 - else -@@ -246,19 +249,19 @@ $(MOZ_PKG_REMOVALS_GEN): $(MOZ_PKG_REMOV - $(PERL) $(topsrcdir)/config/preprocessor.pl -Fsubstitution $(DEFINES) $(ACDEFINES) $(MOZ_PKG_REMOVALS) > $(MOZ_PKG_REMOVALS_GEN) - endif - - GARBAGE += $(DIST)/$(PACKAGE) $(PACKAGE) - - ifeq ($(OS_ARCH),IRIX) - STRIP_FLAGS = -f - endif --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - STRIP_FLAGS = -g --PLATFORM_EXCLUDE_LIST = ! -name "*.stub" ! -name "$(MOZ_PKG_APPNAME)-bin" -+PLATFORM_EXCLUDE_LIST = ! -name "*.stub" ! -name "$(MOZ_PKG_APPNAME)" - endif - ifeq ($(OS_ARCH),OS2) - STRIP = $(srcdir)/os2/strip.cmd - STRIP_FLAGS = - PLATFORM_EXCLUDE_LIST = ! -name "*.ico" - endif - - ifneq (,$(filter WINNT OS2,$(OS_ARCH))) -Index: mozilla/toolkit/xre/nsAppRunner.cpp -=================================================================== -RCS file: /cvsroot/mozilla/toolkit/xre/nsAppRunner.cpp,v -retrieving revision 1.113.2.24 -diff -u -8 -p -w -r1.113.2.24 nsAppRunner.cpp ---- mozilla/toolkit/xre/nsAppRunner.cpp 8 Nov 2007 11:56:25 -0000 1.113.2.24 -+++ mozilla/toolkit/xre/nsAppRunner.cpp 8 Jul 2009 21:54:34 -0000 -@@ -1356,19 +1356,20 @@ XRE_GetBinaryPath(const char* argv0, nsI - rv = NS_NewNativeLocalFile(nsDependentCString(exePath), PR_TRUE, - getter_AddRefs(lf)); - if (NS_FAILED(rv)) - return rv; - - #elif defined(XP_BEOS) - int32 cookie = 0; - image_info info; -- -+ do { - if(get_next_image_info(0, &cookie, &info) != B_OK) - return NS_ERROR_FAILURE; -+ } while(info.type != B_APP_IMAGE); - - rv = NS_NewNativeLocalFile(nsDependentCString(info.name), PR_TRUE, - getter_AddRefs(lf)); - if (NS_FAILED(rv)) - return rv; - - #elif - #error Oops, you need platform-specific code here -Index: mozilla/toolkit/xre/nsXREDirProvider.cpp -=================================================================== -RCS file: /cvsroot/mozilla/toolkit/xre/nsXREDirProvider.cpp,v -retrieving revision 1.37.2.11 -diff -u -8 -p -w -r1.37.2.11 nsXREDirProvider.cpp ---- mozilla/toolkit/xre/nsXREDirProvider.cpp 8 May 2007 19:25:29 -0000 1.37.2.11 -+++ mozilla/toolkit/xre/nsXREDirProvider.cpp 8 Jul 2009 21:54:36 -0000 -@@ -71,17 +71,17 @@ - #ifndef CSIDL_PROGRAM_FILES - #define CSIDL_PROGRAM_FILES 0x0026 - #endif - #endif - #ifdef XP_MACOSX - #include "nsILocalFileMac.h" - #endif - #ifdef XP_BEOS --#include -+#include - #include - #endif - #ifdef XP_UNIX - #include - #endif - #ifdef XP_OS2 - #define INCL_DOS - #include -Index: mozilla/widget/src/beos/nsAppShell.cpp -=================================================================== -RCS file: /cvsroot/mozilla/widget/src/beos/nsAppShell.cpp,v -retrieving revision 1.29.8.2 -diff -u -8 -p -w -r1.29.8.2 nsAppShell.cpp ---- mozilla/widget/src/beos/nsAppShell.cpp 3 Jul 2007 09:33:54 -0000 1.29.8.2 -+++ mozilla/widget/src/beos/nsAppShell.cpp 8 Jul 2009 21:54:39 -0000 -@@ -113,20 +113,38 @@ nsAppShell::nsAppShell() - //------------------------------------------------------------------------- - - NS_IMETHODIMP nsAppShell::Create(int* argc, char ** argv) - { - // system wide unique names - // NOTE: this needs to be run from within the main application thread - char portname[64]; - char semname[64]; -+ int32 cookie = 0; -+ image_info iinfo; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &cookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ PR_snprintf(portname, sizeof(portname), "event%lx", -+ (long unsigned) find_thread(leaf)); -+ PR_snprintf(semname, sizeof(semname), "sync%lx", -+ (long unsigned) find_thread(leaf)); -+ } -+ else -+ { - PR_snprintf(portname, sizeof(portname), "event%lx", -- (long unsigned) PR_GetCurrentThread()); -+ (long unsigned) find_thread(0)); - PR_snprintf(semname, sizeof(semname), "sync%lx", -- (long unsigned) PR_GetCurrentThread()); -+ (long unsigned) find_thread(0)); -+ } -+ } while(iinfo.type != B_APP_IMAGE); - - #ifdef DEBUG - printf("nsAppShell::Create portname: %s, semname: %s\n", portname, semname); - #endif - /* - * Set up the port for communicating. As restarts thru execv may occur - * and ports survive those (with faulty events as result). Combined with the fact - * that plevent.c can setup the port ahead of us we need to take extra -@@ -337,18 +355,32 @@ NS_IMETHODIMP nsAppShell::GetNativeEvent - - return NS_OK; - } - - NS_IMETHODIMP nsAppShell::DispatchNativeEvent(PRBool aRealEvent, void *aEvent) - { - // should we check for eventport initialization ? - char portname[64]; -+ int32 cookie = 0; -+ image_info iinfo; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &cookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ PR_snprintf(portname, sizeof(portname), "event%lx", -+ (long unsigned) find_thread(leaf)); -+ } -+ else - PR_snprintf(portname, sizeof(portname), "event%lx", -- (long unsigned) PR_GetCurrentThread()); -+ (long unsigned) find_thread(0)/*PR_GetCurrentThread()*/); -+ } while(iinfo.type != B_APP_IMAGE); - - if((eventport = find_port(portname)) < 0) - { - // not initialized - #ifdef DEBUG - printf("nsAppShell::DispatchNativeEvent() was called before init\n"); - #endif - fflush(stdout); -Index: mozilla/widget/src/beos/nsDragService.cpp -=================================================================== -RCS file: /cvsroot/mozilla/widget/src/beos/nsDragService.cpp,v -retrieving revision 1.13.28.5 -diff -u -8 -p -w -r1.13.28.5 nsDragService.cpp ---- mozilla/widget/src/beos/nsDragService.cpp 13 Aug 2008 12:41:28 -0000 1.13.28.5 -+++ mozilla/widget/src/beos/nsDragService.cpp 8 Jul 2009 21:54:41 -0000 -@@ -250,17 +250,17 @@ nsDragService::InvokeDragSession (nsIDOM - dragRect = view->Frame(); - // do we need to offset? - } - - PR_LOG(sDragLm, PR_LOG_DEBUG, ("invoking mDragView->DragMessage")); - bool noBitmap = true; - - //This is the code for image-dragging, currently disabled. See comments in beginning of file. --# ifdef 0 -+#if 0 - do - { - PRUint32 dataSize; - PRUint32 noItems; - mSourceDataItems->Count(&noItems); - if (noItems!=1) - { - PR_LOG(sDragLm, PR_LOG_DEBUG, ("Transferables are not ==1, no drag bitmap!")); -Index: mozilla/widget/src/beos/nsLookAndFeel.cpp -=================================================================== -RCS file: /cvsroot/mozilla/widget/src/beos/nsLookAndFeel.cpp,v -retrieving revision 1.27 -diff -u -8 -p -w -r1.27 nsLookAndFeel.cpp ---- mozilla/widget/src/beos/nsLookAndFeel.cpp 26 Oct 2004 01:45:26 -0000 1.27 -+++ mozilla/widget/src/beos/nsLookAndFeel.cpp 8 Jul 2009 21:54:42 -0000 -@@ -157,19 +157,17 @@ nsresult nsLookAndFeel::NativeGetColor(c - aColor = NS_RGB(0x00, 0x00, 0x00); - break; - case eColor_graytext: - aColor = NS_RGB(0x77, 0x77, 0x77); - break; - case eColor_highlight: - case eColor__moz_menuhover: - { -- // B_MENU_SELECTION_BACKGROUND_COLOR is used for text selection -- // this blue colors seems more suitable -- color = ui_color(B_KEYBOARD_NAVIGATION_COLOR); -+ color = ui_color(B_MENU_SELECTION_BACKGROUND_COLOR ); - aColor = NS_RGB(color.red, color.green, color.blue); - } - break; - case eColor_highlighttext: - case eColor__moz_menuhovertext: - { - color = ui_color(B_MENU_SELECTED_ITEM_TEXT_COLOR); - aColor = NS_RGB(color.red, color.green, color.blue); -Index: mozilla/widget/src/beos/nsToolkit.cpp -=================================================================== -RCS file: /cvsroot/mozilla/widget/src/beos/nsToolkit.cpp,v -retrieving revision 1.23.8.1 -diff -u -8 -p -w -r1.23.8.1 nsToolkit.cpp ---- mozilla/widget/src/beos/nsToolkit.cpp 3 Jul 2007 09:33:54 -0000 1.23.8.1 -+++ mozilla/widget/src/beos/nsToolkit.cpp 8 Jul 2009 21:54:42 -0000 -@@ -37,16 +37,17 @@ - - #include "nsToolkit.h" - #include "prmon.h" - #include "prtime.h" - #include "nsGUIEvent.h" - #include "nsSwitchToUIThread.h" - #include "plevent.h" - #include "prprf.h" -+#include - - // - // Static thread local storage index of the Toolkit - // object associated with a given thread... - // - static PRUintn gToolkitTLSIndex = 0; - - //------------------------------------------------------------------------- -@@ -84,20 +85,36 @@ void nsToolkit::RunPump(void* arg) - gThreadState = PR_TRUE; - - PR_Notify(info->monitor); - PR_ExitMonitor(info->monitor); - - delete info; - - // system wide unique names -+ int32 cookie = 0; -+ image_info iinfo; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &cookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ PR_snprintf(portname, sizeof(portname), "event%lx", -+ (long unsigned) find_thread(leaf)); -+ } -+ else -+ { - PR_snprintf(portname, sizeof(portname), "event%lx", -- (long unsigned) PR_GetCurrentThread()); -+ (long unsigned) find_thread(0)); -+ } -+ } while(iinfo.type != B_APP_IMAGE); - -- port_id event = create_port(100, portname); -+ port_id event = create_port(200, portname); - - while(read_port(event, &code, &id, sizeof(id)) >= 0) - { - switch(code) - { - case WM_CALLMETHOD : - { - MethodInfo *mInfo = (MethodInfo *)id.data; -@@ -125,16 +142,17 @@ void nsToolkit::RunPump(void* arg) - // - // constructor - // - //------------------------------------------------------------------------- - nsToolkit::nsToolkit() - { - localthread = false; - mGuiThread = NULL; -+ mGUIThreadID = 0; - } - - - //------------------------------------------------------------------------- - // - // destructor - // - //------------------------------------------------------------------------- -@@ -183,16 +201,32 @@ void nsToolkit::CreateUIThread() - - // wait for the gui thread to start - while(gThreadState == PR_FALSE) - { - PR_Wait(monitor, PR_INTERVAL_NO_TIMEOUT); - } - } - -+ image_info iinfo; -+ int32 cookie = 0; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &cookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ mGUIThreadID = find_thread(leaf); -+ } -+ else -+ { -+ mGUIThreadID = find_thread(0); -+ } -+ } while(iinfo.type != B_APP_IMAGE); - // at this point the thread is running - PR_ExitMonitor(monitor); - PR_DestroyMonitor(monitor); - } - - - //------------------------------------------------------------------------- - // -@@ -213,28 +247,42 @@ NS_METHOD nsToolkit::Init(PRThread *aThr - { - localthread = true; - - // create a thread where the message pump will run - CreateUIThread(); - } - - cached = false; -- -+ image_info iinfo; -+ int32 cookie = 0; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &cookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ mGUIThreadID = find_thread(leaf); -+ } -+ else -+ { -+ mGUIThreadID = find_thread(0); -+ } -+ } while(iinfo.type != B_APP_IMAGE); - return NS_OK; - } - - void nsToolkit::GetInterface() - { - if(! cached) - { - char portname[64]; -- - PR_snprintf(portname, sizeof(portname), "event%lx", -- (long unsigned) mGuiThread); -+ (long unsigned) mGUIThreadID); - - eventport = find_port(portname); - - cached = true; - } - } - - void nsToolkit::CallMethod(MethodInfo *info) -Index: mozilla/widget/src/beos/nsToolkit.h -=================================================================== -RCS file: /cvsroot/mozilla/widget/src/beos/nsToolkit.h,v -retrieving revision 1.5.8.1 -diff -u -8 -p -w -r1.5.8.1 nsToolkit.h ---- mozilla/widget/src/beos/nsToolkit.h 3 Jul 2007 09:33:54 -0000 1.5.8.1 -+++ mozilla/widget/src/beos/nsToolkit.h 8 Jul 2009 21:54:42 -0000 -@@ -66,16 +66,17 @@ public: - void Kill(); - private: - virtual ~nsToolkit(); - void CreateUIThread(void); - - protected: - // Thread Id of the "main" Gui thread. - PRThread *mGuiThread; -+ thread_id mGUIThreadID; - static void RunPump(void* arg); - void GetInterface(); - bool cached; - bool localthread; - port_id eventport; - }; - - #endif // TOOLKIT_H -Index: mozilla/xpcom/build/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/xpcom/build/Makefile.in,v -retrieving revision 1.90.2.3 -diff -u -8 -p -w -r1.90.2.3 Makefile.in ---- mozilla/xpcom/build/Makefile.in 29 Mar 2008 06:56:29 -0000 1.90.2.3 -+++ mozilla/xpcom/build/Makefile.in 8 Jul 2009 21:54:45 -0000 -@@ -168,17 +168,17 @@ ifdef GC_LEAK_DETECTOR - DEFINES += -DGC_LEAK_DETECTOR - endif - - ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) - CXXFLAGS += $(TK_CFLAGS) - EXTRA_DSO_LDOPTS += $(TK_LIBS) - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_DSO_LDOPTS += -lbe - endif - - ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT))) - EXTRA_DSO_LDOPTS += $(MOZ_GTK2_LIBS) - endif - - ifeq ($(OS_ARCH),WINNT) -Index: mozilla/xpcom/obsolete/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/xpcom/obsolete/Makefile.in,v -retrieving revision 1.17 -diff -u -8 -p -w -r1.17 Makefile.in ---- mozilla/xpcom/obsolete/Makefile.in 30 Jan 2005 21:33:45 -0000 1.17 -+++ mozilla/xpcom/obsolete/Makefile.in 8 Jul 2009 21:54:47 -0000 -@@ -115,17 +115,17 @@ DEFINES += -D_IMPL_NS_COM_OBSOLETE - - EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) - - ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) - CXXFLAGS += $(TK_CFLAGS) - EXTRA_DSO_LDOPTS += $(TK_LIBS) - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_DSO_LDOPTS += -lbe - endif - - ifeq ($(OS_ARCH),WINNT) - EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, shell32 ole32) - ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC)) - EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, imagehlp) - endif -Index: mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in,v -retrieving revision 1.80.4.6 -diff -u -8 -p -w -r1.80.4.6 Makefile.in ---- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 19 Feb 2008 21:11:34 -0000 1.80.4.6 -+++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 8 Jul 2009 21:54:49 -0000 -@@ -90,21 +90,23 @@ endif - # IA64 Linux - ifneq (,$(filter Linux,$(OS_ARCH))) - ifneq (,$(findstring ia64,$(OS_TEST))) - CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp - ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s - endif - endif - # --# BeOS/Intel (uses the same unixish_x86 code) -+# BeOS/Intel (uses the same as Linux, works well. Migrate others!) - # --ifeq ($(OS_ARCH)$(OS_TEST),BeOSBePC) -+#ifeq ($(OS_ARCH)$(OS_TEST),BeOSBePC) -+ifeq (,$(filter-out BeOSBePC HaikuBePC, $(OS_ARCH)$(OS_TEST))) - CPPSRCS := xptcinvoke_gcc_x86_unix.cpp xptcstubs_gcc_x86_unix.cpp - endif -+ - # - # Neutrino/Intel (uses the same unixish_x86 code) - # - ifeq ($(OS_TARGET),NTO) - ifeq ($(OS_TEST),x86) - CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp - endif - ifeq ($(OS_TEST),arm) -Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h -=================================================================== -RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h,v -retrieving revision 1.18.28.3 -diff -u -8 -p -w -r1.18.28.3 xptc_platforms_unixish_x86.h ---- mozilla/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h 9 Apr 2007 20:01:13 -0000 1.18.28.3 -+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h 8 Jul 2009 21:54:49 -0000 -@@ -133,17 +133,22 @@ - /* Old gcc 2.7.x.x. What does gcc 2.8.x do?? */ - #define CFRONT_STYLE_THIS_ADJUST - #else - /* egcs and later */ - #define THUNK_BASED_THIS_ADJUST - #endif - - #elif defined(__BEOS__) -+#if (__GNUC__ == 2) - #define CFRONT_STYLE_THIS_ADJUST -+#else -+#define THUNK_BASED_THIS_ADJUST -+#endif -+ - - #elif defined(__sun__) || defined(__sun) - #if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ - #define THUNK_BASED_THIS_ADJUST - #else - #define CFRONT_STYLE_THIS_ADJUST - #endif - -Index: mozilla/xpcom/threads/plevent.c -=================================================================== -RCS file: /cvsroot/mozilla/xpcom/threads/Attic/plevent.c,v -retrieving revision 1.54.2.1 -diff -u -8 -p -w -r1.54.2.1 plevent.c ---- mozilla/xpcom/threads/plevent.c 26 Sep 2005 19:43:34 -0000 1.54.2.1 -+++ mozilla/xpcom/threads/plevent.c 8 Jul 2009 21:54:54 -0000 -@@ -61,16 +61,18 @@ - #if defined(XP_UNIX) - /* for fcntl */ - #include - #include - #endif - - #if defined(XP_BEOS) - #include -+#include -+#include - #endif - - #if defined(XP_MACOSX) - #if defined(MOZ_WIDGET_COCOA) - #include - #define MAC_USE_CFRUNLOOPSOURCE - #elif defined(TARGET_CARBON) - /* #include */ -@@ -903,20 +905,49 @@ failed: - * Otherwise we need to create the sem and the port, deleting any open ports before. - */ - - sem_info info; - int32 cookie = 0; - - char portname[64]; - char semname[64]; -+ -+struct _MDThread -+{ -+ thread_id tid; -+ sem_id joinSem; -+ PRBool is_joining; -+}; -+ struct _MDThread md; -+ -+ -+//#include "private/primpl.h" -+ image_info iinfo; -+ int32 icookie = 0; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &icookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ PR_snprintf(portname, sizeof(portname), "event%lx", -+ (long unsigned) find_thread(leaf)); -+ PR_snprintf(semname, sizeof(semname), "sync%lx", -+ (long unsigned) find_thread(leaf)); -+ } -+ else -+ { - PR_snprintf(portname, sizeof(portname), "event%lx", -- (long unsigned) self->handlerThread); -+ (long unsigned) find_thread(0)); - PR_snprintf(semname, sizeof(semname), "sync%lx", -- (long unsigned) self->handlerThread); -+ (long unsigned) find_thread(0)); -+ } -+ } while(iinfo.type != B_APP_IMAGE); - - self->eventport = find_port(portname); - while(get_next_sem_info(0, &cookie, &info) == B_OK) - { - if(strcmp(semname, info.name) != 0) { - continue; - } - -@@ -926,17 +957,17 @@ failed: - } - return PR_SUCCESS; - } - /* setup the port and semaphore */ - if(self->eventport >= 0) - { - delete_port( self->eventport ); - } -- self->eventport = create_port(200, portname); -+ self->eventport = create_port(512, portname); - /* We don't use the sem, but it has to be there - */ - create_sem(0, semname); - return PR_SUCCESS; - #else - return PR_SUCCESS; - #endif - } -@@ -1259,26 +1290,28 @@ _pl_NativeNotify(PLEventQueue* self) - - #if defined(XP_BEOS) - struct ThreadInterfaceData - { - void *data; - thread_id waitingThread; - }; - -+ - static PRStatus - _pl_NativeNotify(PLEventQueue* self) - { - struct ThreadInterfaceData id; - id.data = self; - id.waitingThread = 0; - write_port(self->eventport, 'natv', &id, sizeof(id)); - - return PR_SUCCESS; /* Is this correct? */ - } -+ - #endif /* XP_BEOS */ - - #if defined(XP_MACOSX) - static PRStatus - _pl_NativeNotify(PLEventQueue* self) - { - #if defined(MAC_USE_CFRUNLOOPSOURCE) - CFRunLoopSourceSignal(self->mRunLoopSource); -Index: mozilla/xpfe/bootstrap/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/xpfe/bootstrap/Attic/Makefile.in,v -retrieving revision 1.283.2.6 -diff -u -8 -p -w -r1.283.2.6 Makefile.in ---- mozilla/xpfe/bootstrap/Makefile.in 29 Sep 2007 20:15:11 -0000 1.283.2.6 -+++ mozilla/xpfe/bootstrap/Makefile.in 8 Jul 2009 21:54:55 -0000 -@@ -113,18 +113,22 @@ ifdef MOZ_ENABLE_XREMOTE - REQUIRES += xremoteservice - endif - - include $(topsrcdir)/config/config.mk - - ifeq ($(USE_SHORT_LIBNAME),1) - PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX) - else -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX) -+else - PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX) - endif -+endif - - # Force applications to be built non-statically - # when building the mozcomps meta component - ifneq (,$(filter mozcomps,$(MOZ_META_COMPONENTS))) - BUILD_STATIC_LIBS= - BUILD_SHARED_LIBS=1 - ifdef MOZ_COMPONENTLIB - DEFINES += -D_MOZCOMPS_SHARED_LIBRARY -D_BUILD_STATIC_BIN -@@ -215,16 +219,19 @@ ifdef GC_LEAK_DETECTOR - LIBS += -lboehm - endif - - ifdef WRAP_SYSTEM_INCLUDES - DEFINES += -DWRAP_SYSTEM_INCLUDES - endif - - ifeq ($(MOZ_WIDGET_TOOLKIT),beos) -+ifeq ($(OS_ARCH),Haiku) -+BEOS_PROGRAM_RDEF = $(srcdir)/apprunner-beos.rdef -+endif - BEOS_PROGRAM_RESOURCE = $(srcdir)/apprunner-beos.rsrc - CPPSRCS += nsNativeAppSupportBeOS.cpp - CPPSRCS += nsNativeAppSupportBase.cpp - ifdef BUILD_STATIC_LIBS - OS_LIBS += -ltracker -lgame - endif - endif - -@@ -406,17 +413,17 @@ ifndef GNU_CC - LDFLAGS += /HEAP:0x40000 - endif - endif - - CXXFLAGS += $(MOZ_TOOLKIT_REGISTRY_CFLAGS) - - LOCAL_INCLUDES += -I$(srcdir) -I. - --ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH))) -+ifneq (,$(filter-out OS2 WINNT BeOS Haiku,$(OS_ARCH))) - $(MOZ_APP_NAME).1: mozilla.man.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk - @sed -e "s|\@bindir\@|$(bindir)|g" -e "s|\@mozappdir\@|$(mozappdir)|g" \ - -e "s|\@MOZ_APP_DISPLAYNAME\@|$(MOZ_APP_DISPLAYNAME)|g" \ - -e "s|\@MOZ_APP_NAME\@|$(MOZ_APP_NAME)|g" \ - -e "s|\@MOZ_APP_VERSION\@|${MOZ_APP_VERSION}|g" < $< > $@ - - libs:: $(MOZ_APP_NAME).1 - $(INSTALL) $< $(DIST)/man/man1 -Index: mozilla/xpfe/bootstrap/nsSigHandlers.cpp -=================================================================== -RCS file: /cvsroot/mozilla/xpfe/bootstrap/nsSigHandlers.cpp,v -retrieving revision 1.41.18.1 -diff -u -8 -p -w -r1.41.18.1 nsSigHandlers.cpp ---- mozilla/xpfe/bootstrap/nsSigHandlers.cpp 22 Jun 2006 22:31:13 -0000 1.41.18.1 -+++ mozilla/xpfe/bootstrap/nsSigHandlers.cpp 8 Jul 2009 21:54:56 -0000 -@@ -55,17 +55,18 @@ - #include // atoi - #endif - - #if defined(SOLARIS) - #include - #endif - - #ifdef XP_BEOS --#include -+#include -+#include - #include - #include "nsCOMPtr.h" - #include "nsIServiceManager.h" - #include "nsIAppStartup.h" - #include "nsXPFEComponentsCID.h" - #endif - - #ifdef MOZ_WIDGET_PHOTON -Index: mozilla/xpinstall/packager/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/xpinstall/packager/Attic/Makefile.in,v -retrieving revision 1.68.4.1 -diff -u -8 -p -w -r1.68.4.1 Makefile.in ---- mozilla/xpinstall/packager/Makefile.in 20 Feb 2006 17:42:11 -0000 1.68.4.1 -+++ mozilla/xpinstall/packager/Makefile.in 8 Jul 2009 21:55:03 -0000 -@@ -43,17 +43,17 @@ srcdir = @srcdir@ - VPATH = @srcdir@ - - include $(DEPTH)/config/autoconf.mk - - OSPACKAGE = unix - ifeq ($(OS_ARCH),IRIX) - STRIP_FLAGS = -f - endif --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - STRIP_FLAGS = -g - PLATFORM_EXCLUDE_LIST = ! -name "*.stub" ! -name "$(MOZ_PKG_APPNAME)-bin" - endif - ifeq ($(OS_ARCH),OS2) - STRIP = $(srcdir)/os2/strip.cmd - STRIP_FLAGS = - OSPACKAGE = os2 - PLATFORM_EXCLUDE_LIST = ! -name "*.ico" -Index: mozilla/xulrunner/app/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/xulrunner/app/Makefile.in,v -retrieving revision 1.23.2.4 -diff -u -8 -p -w -r1.23.2.4 Makefile.in ---- mozilla/xulrunner/app/Makefile.in 9 Apr 2008 06:50:54 -0000 1.23.2.4 -+++ mozilla/xulrunner/app/Makefile.in 8 Jul 2009 21:55:07 -0000 -@@ -54,17 +54,17 @@ DIRS = profile - PREF_JS_EXPORTS = $(srcdir)/xulrunner.js - GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/,xulrunner.js) - - DEFINES += -DAB_CD=$(AB_CD) - - ifeq ($(USE_SHORT_LIBNAME), 1) - PROGRAM = xulrunner$(BIN_SUFFIX) - else --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - PROGRAM = xulrunner$(BIN_SUFFIX) - else - PROGRAM = xulrunner-bin$(BIN_SUFFIX) - endif - endif - - DEFINES += -DXULRUNNER_PROGNAME=\"xulrunner\" - -@@ -80,17 +80,17 @@ REQUIRES = \ - xulrunner \ - $(NULL) - - CPPSRCS = nsXULRunnerApp.cpp - - ifeq ($(OS_ARCH),WINNT) - CPPSRCS += nsRegisterGREWin.cpp - else --ifneq (,$(filter OS2 Darwin,$(OS_ARCH))) -+ifneq (,$(filter OS2 Darwin BeOS Haiku,$(OS_ARCH))) - CPPSRCS += nsRegisterGREVoid.cpp - else - CPPSRCS += nsRegisterGREUnix.cpp - endif - endif - - LOCAL_INCLUDES += \ - -I$(topsrcdir)/toolkit/xre \ -@@ -169,17 +169,17 @@ endif - ifdef BUILD_STATIC_LIBS - RCFLAGS += -DMOZ_STATIC_BUILD - endif - ifdef DEBUG - RCFLAGS += -DDEBUG - endif - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - OS_LIBS += -ltracker - endif - - ifeq ($(OS_ARCH),OS2) - RESFILE=splashos2.res - RCFLAGS += -DMOZ_XULRUNNER - ifdef BUILD_STATIC_LIBS - EXE_DEF_FILE = xulrunner.def -@@ -237,17 +237,17 @@ $(EXE_DEF_FILE): - @echo WinQueryProperty = PMMERGE.5450 >>$(EXE_DEF_FILE) - @echo WinRemoveProperty = PMMERGE.5451 >>$(EXE_DEF_FILE) - @echo WinSetProperty = PMMERGE.5452 >>$(EXE_DEF_FILE) - - LDFLAGS += -Zlinker /NOE - endif - endif - --ifneq (,$(filter-out OS2 WINNT Darwin BeOS,$(OS_ARCH))) -+ifneq (,$(filter-out OS2 WINNT Darwin BeOS Haiku,$(OS_ARCH))) - - xulrunner:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk - cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \ - -e "s|%MOZ_USER_DIR%|.mozilla/xulrunner|" \ - -e "s|%MREDIR%|$(mredir)|" > $@ - chmod +x $@ - - libs:: xulrunner diff --git a/www-client/mozilla_firefox/bookmarks.html b/www-client/mozilla_firefox/bookmarks.html deleted file mode 100644 index ffe3c7264..000000000 --- a/www-client/mozilla_firefox/bookmarks.html +++ /dev/null @@ -1,43 +0,0 @@ - - - -Bookmarks -

Bookmarks

- -

-

Get Bookmark Add-ons -
-

Bookmarks Toolbar Folder

-
Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar -

-

Haiku WebSite -
Nightly Builds -

-


-

BeZilla Browser

-

-

BeZilla Blog -
Report an Issue -
View Known Issues -

-

Haiku Bookmarks

-

-

Nightly Builds -
Optional Packages -
Bug Tracker -
Haiku User Guide -
BeBook -
Welcome -

-

Software for Haiku

-

-

OSDrawer.net -
HaikuWare -
Zeta-Games -
BeBits -

-

Haiku WebSite - -

diff --git a/www-client/mozilla_firefox/classic.jar b/www-client/mozilla_firefox/classic.jar deleted file mode 100644 index ee1180460..000000000 Binary files a/www-client/mozilla_firefox/classic.jar and /dev/null differ diff --git a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/app/apprunner-beos.rdef b/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/app/apprunner-beos.rdef deleted file mode 100644 index e69b16d2c..000000000 --- a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/app/apprunner-beos.rdef +++ /dev/null @@ -1,125 +0,0 @@ -/* - * BeZillaBrowser.rdef - */ - -resource app_signature "application/x-vnd.Mozilla-Firefox"; - -resource app_flags B_SINGLE_LAUNCH; - -resource app_version { - /* - * We are using the source code version number - * for our program version. - * TODO : implement something better. - */ - major = 1, - middle = 8, - minor = 1, - - /* 0 = development 1 = alpha 2 = beta - 3 = gamma 4 = golden master 5 = final */ - variety = 0, - - internal = 21, - - short_info = "BeZillaBrowser", - long_info = "BeZillaBrowser is based on Mozilla's source code" -}; - -resource file_types message { - "types" = "application/x-vnd.Be.URL.file", - "types" = "application/x-vnd.Be.URL.ftp", - "types" = "application/x-vnd.Be.URL.http", - "types" = "application/x-vnd.Be.URL.https", - "types" = "text/html", - "types" = "image/gif", - "types" = "image/png" -}; - -resource vector_icon { - $"6E6369661F0500020016029E8638A20EBA220EBA9E86384880254A18EA00FFFF" - $"8002001602BC9D88BB1F643B1F64BC9D884B716D48772700FFFF80020016023B" - $"F73A0000000000003BF73A49B5114976B000FFFF800200160237A0DDB61AF236" - $"1AF237A0DD497CAA48588100FFFF800200160238D81CB8152D38152D38D81C48" - $"420A499FB600FFFF8002001602397095000000000000397095486EDA49100600" - $"FFFF800200160231E5B2BA0EAF3A0EAF31E5B247DA3349779B00FFFF80020016" - $"0236BBEFB4543A34543A36BBEF495BDE469BC700FFFF6B0200160236E2E70000" - $"0000000036E2E74A2CD64670CD00FFFF800200160237AB1000000000000037AB" - $"104AE1D848449500FFFF5702001602375C10B74516374516375C1048B2B04AE9" - $"7200FFFF8002001602B07700B74912374912B077004898AD4AD99500FFFF8002" - $"00160232CFA5BA0B483A0B4832CFA54A3C584BA00E00FFFF8002001602368CB7" - $"000000000000368CB74B3D5E49752800FFFF4F0200160236A81C000000000000" - $"36A81C4B94C84A808500FFFF4002000602B738F7362603B62603B738F748BB3F" - $"4A241700A91212FFD7121202001602B04887376143B76143B0488748D36C44FB" - $"3100FFFF6B02001602B47620362BAAB62BAAB476204A0C144406C600FFFF8002" - $"001602B4CAE23409B3B409B3B4CAE24AD8D54611F100FFFF8002001602B328E4" - $"324E4AB24E4AB328E44B36A648859C00FFFF8002001602B22376311F03B11F03" - $"B223764B891349FFBC00FFFF80010079009803FF000004006002001602B4E6F3" - $"319259B19259B4E6F34B2F5D4AA2CA00FFFF0003FFFF0004FFD801FFFF669805" - $"000201060238CC87BD083D3DCC623981954609924A996B00FFB11BFFFFF9C727" - $"0633EEEBFFFFAAEAABDBAEBBBEAE2BC0CEB389C02424C074B415BFF0B478BFB4" - $"B450BFB7B455BFB6B455BF8CB436BF14B430BF55B42DBEF5B3FFBE82B33EBBDB" - $"B3F2BBCEB4D7BBD0B4BABBCBB4DABBC7B4DABBC7B4DABBC8B4DABB45B50ABB45" - $"B50ABB44B50ABB37B50DBB37B50DBAD6B534BA1EB58DBA78B560BA1EB58DBA12" - $"B593BA12B593BA0FB596B99BB5D6B99BB5D6B99AB5D6B975B5ECB975B5ECB974" - $"B5EDB918B626B918B626B917B626B8EDB642B893B681B887B689B86CB69CB7F2" - $"2AB7B5B72DB7A9B76EB73CB920B755B8C5B6B5B9A4B380BC3AB4F7BB4BB380BC" - $"3AB317BC7FB33E42B755C332B80EC320B7E7C323B7FBC3522CC3C54FBB03C7E8" - $"BAF4C7DBBAD1C898BA59CA44BC40CC83BAD4CBC3BDF3CD6FC0A0CDA4C760C888" - $"CA38C797C90DC879CB7BC6A2CC38C4DCCB9AC3A6CBB6C3DDCBA2C34CCBC2C1EB" - $"CA78BF62C954BF30C9ADBF3FC934BEE9C900BE83C91DBEC2C927BE17C999BCEA" - $"C857BA6BC720BABCC767BAABC73FBA2EC7C0B7EEC5B1B563C3F4B6DBC472B66F" - $"C405B613C427B41BC12CB2F006032FBAF5C05EBAF5C05EBAF7C05C34C05A34C0" - $"5B34C05A34C05B0610EE7AAAAAC693C7B5C9E8C667C896C755CAB5C5D3CB14C4" - $"7FC521B8CDC521B8CDC0B9B834BD7FBA63BC9BBC64B789BF00B92ABE82B789BF" - $"00C251BCE5C1CCBED1C0BCBE70C324BB51C5B0BB5AC71ABFC8C4E2C044C512C0" - $"5CCC1E0604EEBD7FBA63C521B8CDC0B9B834C521B8CDBF40B50AB87FB7A5BC0C" - $"B4F7B87FB7A50604FEBD7FBA63C521B8CDC0B9B834C521B8CDBF40B50ABF40B5" - $"0ABD2DB521B87FB7A5BA8CB5E9B87FB7A50605BB02B3F7BCF4B5CD36B3F7BCF4" - $"B789BF00BA19BDD6B8DABE8835BD1EBC9BBC64B801B9930A04B87FB7A5BD7FBA" - $"63BC9BBC64B801B9930A04B3F7BCF4B413C012B789C251B789BF000A04BC7AB8" - $"01BF99B6C0BE1BB43BBCAAB49E0A05BFE1B69AC187B3FFC341B4ABC30EB77BC2" - $"04B6CF0A05C3E9B805C594B69AC6D3B825C637BAECC521B8CD0A06B967C223B8" - $"A5C3F1BB51C5B0BE70C323BED1C0BCBCE5C1CC0A04B8A5C548B8A5C3F1BB51C5" - $"B0BB5AC71A0606BA0ABC41C6A5BB73C983BCF9CB79BBC8CAD5BE40CC23C05CCC" - $"1EC044C512BFC8C4E20A04C6A1BBC1C7E5BB6BC8ABBCF7C80EBE920A04C9EA41" - $"C8C5BFF3CABBC3D4CAE3C2140A06BA90C206BA19C33CBADEC3EBBEA7C1C4BED1" - $"C0BCBCE5C1CC0A06BC7AB801BCAAB49EBE1BB43BBE33B460BCDAB4C7BCB1B7EC" - $"0A04BFE1B69AC021B6A1C1ADB40DC187B3FF0A04C3E9B805C594B69AC5B7B6C3" - $"C41AB8250A04C6A1BBC1C7E5BB6BC7F4BB8EC6B9BBEC0A04C8C5BFF3C9EA41CA" - $"07C060C8E5C02B0628AAAAAAAAAAAEEFAAA9BACAB4C3BFCAE3C214C9EA41C8C5" - $"BFF3C80FBE90C8ABBCF7C7F4BB8EC7E5BB6BC6A1BBC1C637BAECC6D3B826C5B7" - $"B6C3C594B69AC3E9B805C3F9B80FC30EB77BC341B4ABC1ADB40DC187B3FFC068" - $"B5C6BF40B50ABE9BB514BF03B507BE9BB514BE1BB43BBCAAB49EBC9EB57CBC9E" - $"B57CBB34B5E3B87FB7A5B9BC29B87FB7A5B801B993B3F7BCF4B5CD36B3F7BCF4" - $"B413C012B789C251B964C223B8A5C3F1C548BB5AC71ABFC8C4E2C044C512C05C" - $"CC1EC693C7B5C9B7C688C894C759CAD2C5BECB14C47F0A06BE4DC302BB334EB8" - $"F2C3E4B99FC21DBCE5C1CCBEAEC0D1020ABFDBBBF7BFE1BBDFBFC9BC38BF63BC" - $"91BF9DBC71BEE7BCD8BE03BC31BE4BBCABBE03BC31BE00BC24BE0137BE10BC1A" - $"BE4BBC03BE30BC0EBE4BBC03BEE9BBBABEE9BBBABEE9BBBABF7BBB58BF7BBB58" - $"BF8FBB45BFBDBB29BFA9BB3440BB2DBFC3BB34BFC3BB34BFD9BB5BBFE7BBB2BF" - $"E7BB85BFE7BBC8020ABFD5BC12BFD9BC00BFC3BC4FBF67BC9CBF9CBC80BEFCBC" - $"DBBE32BC45BE70BCB4BE32BC45BE2BBC39BE30BC41BE3EBC32BE70BC1DBE58BC" - $"27BE70BC1DBEFEBBDDBEFEBBDDBEFEBBDDBF7EBB84BF7EBB84BF90BB77BFB7BB" - $"5CBFA7BB66BFBDBB5F40BB6640BB66BFD4BB87BFDCBBD4BFDCBBADBFDCBBEA06" - $"05BA02BC2BC6AFC155C3BAC269C139C245C1A9C25CC1A9C1A5C3EFBBF5C7310A" - $"04BC7AB801BF99B6C0C125B79BBFB3B7FF0A03BFE1B69AC3A0B7D5C204B6CF0A" - $"05BCAAC670BCB9C66BBE0FC73AC05BC70BBDF4C7890A04BC34C73FBDE5C88AC0" - $"4EC88BBDC9C8D80A04BB81C817BD6CC9CFC072C973BD505A0A04BB60C971BD4F" - $"CB2BC054CACFBD33CB790A03C6D944C9E8C6DAC695540A03BD9FBC21BEE9BBBA" - $"C059BA770204BF4DBBE8BF4DBC1ABF4DBBB7BF95BB8FBF6FBB8FBFBCBB8FBFD9" - $"BBE8BFD9BBB7BFD9BC1ABF95BC42BFBCBC42BF6FBC420A04BAD6C37ABBFAC2FD" - $"BAD1C336BA8CC2FD0606BA0ABC2BC6AF35C98ABCC1CB6BBB88CAC8BE00CC16C0" - $"49CC29C033C51CBFB5C4EA060DEE1FBF032F442B4F2B48294B244A2953235029" - $"532354295423542E58265A2E585C3030583058385A3B543B543554355335533B" - $"503A4A334F354B3348270A000100000A010101000A020102000A030103000A04" - $"0104000A050105000A060106000A070107000A080108000A090109000A0A010A" - $"000A0B010B000A0C010C000A0D010D000A0E010E000A0F010F000A100110000A" - $"110111000A120112000A130113000A140114000A150115000A1603161718000A" - $"170119000A18011A000A18011B000A18011C000A18011D000A18011E000A1801" - $"1F000A180120000A190121000A180122000A1A0123000A1B0124000A1C012500" - $"0A1D012638BFB3B32615FF01178400040A1D012638BFB3B32600150117860004" - $"0A1E012620BFB3B326" -}; - - diff --git a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-bebook-v1.html b/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-bebook-v1.html deleted file mode 100644 index 615899ccd..000000000 --- a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-bebook-v1.html +++ /dev/null @@ -1,32 +0,0 @@ - - - Opening the welcome page... - - - - Opening the welcome page... - - diff --git a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-bebook-v2.html b/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-bebook-v2.html deleted file mode 100644 index 40f023420..000000000 --- a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-bebook-v2.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - -Welcome to Haiku! - - - - - - - diff --git a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-userguide-v1.html b/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-userguide-v1.html deleted file mode 100644 index ac3001be7..000000000 --- a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-userguide-v1.html +++ /dev/null @@ -1,32 +0,0 @@ - - - Opening the welcome page... - - - - Opening the welcome page... - - diff --git a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-userguide-v2.html b/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-userguide-v2.html deleted file mode 100644 index dd5770732..000000000 --- a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-userguide-v2.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - -Welcome to Haiku! - - - - - - - diff --git a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-welcome-v1.html b/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-welcome-v1.html deleted file mode 100644 index d2b44db9c..000000000 --- a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-welcome-v1.html +++ /dev/null @@ -1,32 +0,0 @@ - - - Opening the welcome page... - - - - Opening the welcome page... - - diff --git a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-welcome-v2.html b/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-welcome-v2.html deleted file mode 100644 index 2a6ee035d..000000000 --- a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/base/content/dynamic-welcome-v2.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - -Welcome to Haiku! - - - - - - - diff --git a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/installer/beos/packages-static b/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/installer/beos/packages-static deleted file mode 100644 index 63ab36105..000000000 --- a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/browser/installer/beos/packages-static +++ /dev/null @@ -1,369 +0,0 @@ -; Package file for Linux static Firefox build. -; -; File format: -; -; [] designates a toplevel component. Example: [xpcom] -; - in front of a file specifies it to be removed from the destination -; * wildcard support to recursively copy the entire directory -; ; file comment -; - -#filter substitution - -bin/.autoreg - -[@AB_CD@] -bin/chrome/@AB_CD@.jar -bin/chrome/@AB_CD@.manifest -bin/defaults/pref/firefox-l10n.js -bin/defaults/existing-profile-defaults.js -; If you add a new directory you must explicitly call addDirectory in ab-CD.jst -bin/browserconfig.properties -bin/old-homepage-default.properties -bin/searchplugins/* -bin/defaults/profile/bookmarks.html -bin/defaults/profile/localstore.rdf -bin/defaults/profile/prefs.js -bin/defaults/profile/search.rdf -bin/defaults/profile/mimeTypes.rdf -bin/defaults/profile/chrome/* -bin/updater.ini -bin/dictionaries/* - -[xpcom] -; mmadia --testing adding *.so.stubs to packager -; how the heck were they originally being added to the archive? -bin/add-ons/*.so.stub -bin/lib/*.so.stub -bin/lib/libmozjs.so -bin/lib/libplc4.so -bin/lib/libplds4.so -bin/lib/libxpcom.so -bin/lib/libxpcom_core.so -bin/lib/libxpistub.so -bin/lib/libnspr4.so -bin/components/libxpinstall.so -bin/components/libjar50.so -bin/lib/libxpcom_compat.so - -[browser] -; [Base Browser Files] -; mmadia -bin/BeZillaBrowser -bin/firefox -bin/mozilla-xremote-client -; mmadia removed run-mozilla.sh --bin/run-mozilla.sh -bin/plugins/libnullplugin.so -bin/res/cmessage.txt -bin/xpicleanup - -; [Components] -bin/components/accessibility.xpt -bin/components/accessibility-atk.xpt -bin/components/appshell.xpt -bin/components/appstartup.xpt -bin/components/autocomplete.xpt -bin/components/autoconfig.xpt -bin/components/bookmarks.xpt -bin/components/browsercompsbase.xpt -bin/components/browsersearch.xpt -bin/components/browser-feeds.xpt -bin/components/caps.xpt -bin/components/chardet.xpt -bin/components/chrome.xpt -bin/components/commandhandler.xpt -bin/components/commandlines.xpt -bin/components/composer.xpt -bin/components/content_base.xpt -bin/components/content_htmldoc.xpt -bin/components/content_html.xpt -bin/components/content_xmldoc.xpt -bin/components/content_xslt.xpt -bin/components/content_xtf.xpt -bin/components/cookie.xpt -bin/components/directory.xpt -bin/components/docshell.xpt -bin/components/dom.xpt -bin/components/dom_base.xpt -bin/components/dom_canvas.xpt -bin/components/dom_core.xpt -bin/components/dom_css.xpt -bin/components/dom_events.xpt -bin/components/dom_html.xpt -bin/components/dom_range.xpt -bin/components/dom_sidebar.xpt -bin/components/dom_storage.xpt -bin/components/dom_stylesheets.xpt -bin/components/dom_traversal.xpt -bin/components/dom_views.xpt -bin/components/dom_xbl.xpt -bin/components/dom_xpath.xpt -bin/components/dom_xul.xpt -bin/components/dom_loadsave.xpt -bin/components/downloads.xpt -bin/components/editor.xpt -bin/components/embed_base.xpt -bin/components/exthandler.xpt -bin/components/fastfind.xpt -bin/components/feeds.xpt -bin/components/filepicker.xpt -bin/components/find.xpt -bin/components/gfx.xpt -bin/components/helperAppDlg.xpt -bin/components/history.xpt -bin/components/htmlparser.xpt -bin/components/imglib2.xpt -; bin/components/imgicon.xpt -bin/components/intl.xpt -bin/components/jar.xpt -bin/components/jsconsole.xpt -bin/components/libjsd.so -bin/components/jsdservice.xpt -bin/components/layout_base.xpt -bin/components/layout_printing.xpt -bin/components/layout_xul_tree.xpt -bin/components/layout_xul.xpt -bin/components/inspector.xpt -bin/components/locale.xpt -bin/components/lwbrk.xpt -bin/components/microsummaries.xpt -bin/components/migration.xpt -bin/components/mimetype.xpt -bin/components/mozbrwsr.xpt -bin/components/mozfind.xpt -bin/components/necko_about.xpt -bin/components/necko_cache.xpt -bin/components/necko_cookie.xpt -bin/components/necko_data.xpt -bin/components/necko_dns.xpt -bin/components/necko_file.xpt -bin/components/necko_ftp.xpt -bin/components/necko_http.xpt -bin/components/necko_jar.xpt -bin/components/necko_res.xpt -bin/components/necko_socket.xpt -bin/components/necko_strconv.xpt -bin/components/necko_viewsource.xpt -bin/components/necko.xpt -bin/components/oji.xpt -bin/components/passwordmgr.xpt -bin/components/places.xpt -bin/components/plugin.xpt -bin/components/prefetch.xpt -bin/components/pref.xpt -bin/components/progressDlg.xpt -bin/components/proxyObjInst.xpt -bin/components/toolkitremote.xpt -bin/components/rdf.xpt -bin/components/satchel.xpt -bin/components/saxparser.xpt -bin/components/search.xpt -bin/components/shistory.xpt -bin/components/storage.xpt -bin/components/profile.xpt -bin/components/toolkitprofile.xpt -bin/components/txtsvc.xpt -bin/components/txmgr.xpt -bin/components/uconv.xpt -bin/components/unicharutil.xpt -bin/components/uriloader.xpt -bin/components/webBrowser_core.xpt -bin/components/webbrowserpersist.xpt -bin/components/webshell_idls.xpt -bin/components/websrvcs.xpt -bin/components/widget.xpt -bin/components/windowds.xpt -bin/components/windowwatcher.xpt -bin/components/xml-rpc.xpt -bin/components/xpcom_base.xpt -bin/components/xpcom_components.xpt -bin/components/xpcom_ds.xpt -bin/components/xpcom_io.xpt -bin/components/xpcom_obsolete.xpt -bin/components/xpcom_threads.xpt -bin/components/xpcom_xpti.xpt -bin/components/xpconnect.xpt -bin/components/xpinstall.xpt -bin/components/xremoteservice.xpt -bin/components/xulapp.xpt -bin/components/xuldoc.xpt -bin/components/xultmpl.xpt -bin/components/shellservice.xpt -; JavaScript components -bin/components/FeedProcessor.js -bin/components/FeedConverter.js -bin/components/FeedWriter.js -bin/components/WebContentConverter.js -bin/components/nsBrowserContentHandler.js -bin/components/nsBrowserGlue.js -bin/components/nsSetDefaultBrowser.js -bin/components/nsMicrosummaryService.js -bin/components/nsSearchService.js -bin/components/nsSearchSuggestions.js -bin/components/jsconsole-clhandler.js -bin/components/nsCloseAllWindows.js -bin/components/nsDictionary.js -bin/components/nsFilePicker.js -bin/components/nsHelperAppDlg.js -bin/components/nsInterfaceInfoToIDL.js -; bin/components/nsProgressDialog.js not needed for firefox -bin/components/nsProxyAutoConfig.js -; bin/components/nsResetPref.js not needed for firefox -bin/components/nsSidebar.js -; bin/components/nsUpdateNotifier.js not needed for firefox -bin/components/nsXmlRpcClient.js -bin/components/nsExtensionManager.js -bin/components/nsUpdateService.js -bin/components/extensions.xpt -bin/components/update.xpt -bin/components/nsBookmarkTransactionManager.js -bin/components/nsSessionStartup.js -bin/components/nsSessionStore.js -bin/components/sessionstore.xpt -bin/components/nsURLFormatter.js -bin/components/urlformatter.xpt -bin/components/nsDefaultCLH.js - -; Safe Browsing -bin/components/nsSafebrowsingApplication.js -bin/components/safebrowsing.xpt -bin/components/nsUrlClassifierListManager.js -bin/components/nsUrlClassifierLib.js -bin/components/nsUrlClassifierTable.js -bin/components/url-classifier.xpt - -; Kerberos NegotiateAuth -bin/components/libauth.so - -; GNOME hooks -bin/components/libmozgnome.so -bin/components/mozgnome.xpt - -; [Browser Chrome Files] -bin/chrome/browser.jar -bin/chrome/browser.manifest -bin/chrome/classic.jar -bin/chrome/classic.manifest -bin/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf -bin/chrome/comm.jar -bin/chrome/comm.manifest -bin/chrome/toolkit.jar -bin/chrome/toolkit.manifest -bin/chrome/icons/default/default.xpm -bin/chrome/reporter.manifest -bin/chrome/reporter.jar -bin/defaults/pref/reporter.js - -; shell icons -bin/icons/*.xpm -bin/icons/*.png - -; [Default Preferences] -; All the pref files must be part of base to prevent migration bugs -bin/defaults/pref/firefox.js -bin/defaults/pref/firefox-branding.js -bin/defaults/pref/channel-prefs.js -bin/greprefs/all.js -bin/greprefs/security-prefs.js -bin/greprefs/xpinstall.js -bin/defaults/autoconfig/platform.js -bin/defaults/autoconfig/prefcalls.js - -; [Layout Engine Resources] -; Style Sheets, Graphics and other Resources used by the layout engine. -bin/res/hiddenWindow.html -bin/res/ua.css -bin/res/html.css -bin/res/quirk.css -bin/res/forms.css -bin/res/platform-forms.css -bin/res/EditorOverride.css -bin/res/table-add-column-after-active.gif -bin/res/table-add-column-after-hover.gif -bin/res/table-add-column-after.gif -bin/res/table-add-column-before-active.gif -bin/res/table-add-column-before-hover.gif -bin/res/table-add-column-before.gif -bin/res/table-add-row-after-active.gif -bin/res/table-add-row-after-hover.gif -bin/res/table-add-row-after.gif -bin/res/table-add-row-before-active.gif -bin/res/table-add-row-before-hover.gif -bin/res/table-add-row-before.gif -bin/res/table-remove-column-active.gif -bin/res/table-remove-column-hover.gif -bin/res/table-remove-column.gif -bin/res/table-remove-row-active.gif -bin/res/table-remove-row-hover.gif -bin/res/table-remove-row.gif -bin/res/arrowd.gif -bin/res/grabber.gif -bin/res/viewsource.css -bin/res/mathml.css -bin/res/arrow.gif -bin/res/loading-image.gif -bin/res/broken-image.gif -bin/res/fonts/* -bin/res/dtd/* -bin/res/html/* -bin/res/unixcharset.properties -bin/res/charsetalias.properties -bin/res/charsetData.properties -bin/res/langGroups.properties -bin/res/language.properties -bin/res/entityTables/* - -; svg -bin/res/svg.css -bin/components/dom_svg.xpt - -; spellchecker (may not be present) -bin/components/libmyspell.so -bin/components/spellchecker.xpt -bin/components/libspellchecker.so - -; [Personal Security Manager] -; -bin/add-ons/libnssckbi.so -bin/components/pipboot.xpt -bin/components/pipnss.xpt -bin/components/pippki.xpt -bin/lib/libnss3.so -bin//lib/libsmime3.so -bin/libsoftokn3.chk -bin/lib/libsoftokn3.so -bin/libfreebl3.chk -bin/add-ons/libfreebl3.so -bin/lib/libssl3.so -bin/chrome/pipnss.jar -bin/chrome/pippki.jar -bin/chrome/pippki.manifest - -; [Updater] -; -bin/updater - -; [Extensions] -; -bin/components/libnkgnomevfs.so -bin/components/libauth.so - -; [Additional Developer Tools] -[adt] -bin/extensions/inspector@mozilla.org/install.rdf -bin/extensions/inspector@mozilla.org/components/inspector-cmdline.js -bin/extensions/inspector@mozilla.org/chrome.manifest -bin/extensions/inspector@mozilla.org/chrome/inspector.jar -bin/extensions/inspector@mozilla.org/defaults/preferences/inspector.js - -; [Additional Browsing Enhancements] -[abe] - -[talkback] -bin/README.txt,bin/readme.txt -bin/extensions/talkback@mozilla.org/install.rdf -bin/extensions/talkback@mozilla.org/chrome.manifest -bin/extensions/talkback@mozilla.org/components/libqfaservices.so -bin/extensions/talkback@mozilla.org/components/qfaservices.xpt -bin/extensions/talkback@mozilla.org/components/talkback/* diff --git a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/calendar/sunbird/app/apprunner-beos.rdef b/www-client/mozilla_firefox/copy-to-mozilla-src-dir/calendar/sunbird/app/apprunner-beos.rdef deleted file mode 100644 index 4394fcebb..000000000 --- a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/calendar/sunbird/app/apprunner-beos.rdef +++ /dev/null @@ -1,125 +0,0 @@ -/* - * BeZillaBrowser.rdef - */ - -resource app_signature "application/x-vnd.Mozilla-Sunbird"; - -resource app_flags B_SINGLE_LAUNCH; - -resource app_version { - /* - * We are using the source code version number - * for our program version. - * TODO : implement something better. - */ - major = 1, - middle = 8, - minor = 1, - - /* 0 = development 1 = alpha 2 = beta - 3 = gamma 4 = golden master 5 = final */ - variety = 0, - - internal = 21, - - short_info = "BeZillaCalendar", - long_info = "BeZillaCalendar is based on Mozilla's source code" -}; - -resource file_types message { - "types" = "text/csv", - "types" = "text/calendar" - /* - // TODO: - // .sdb is mimetype application/octet-stream - // is there a more elegant way to handle it? - types" = "application/octet-stream" - */ -}; -resource vector_icon { - $"6E636966200500020016029E8638A20EBA220EBA9E86384880254A18EA00FFFF" - $"8002001602BC9D88BB1F643B1F64BC9D884B716D48772700FFFF80020016023B" - $"F73A0000000000003BF73A49B5114976B000FFFF800200160237A0DDB61AF236" - $"1AF237A0DD497CAA48588100FFFF800200160238D81CB8152D38152D38D81C48" - $"420A499FB600FFFF8002001602397095000000000000397095486EDA49100600" - $"FFFF800200160231E5B2BA0EAF3A0EAF31E5B247DA3349779B00FFFF80020016" - $"0236BBEFB4543A34543A36BBEF495BDE469BC700FFFF6B0200160236E2E70000" - $"0000000036E2E74A2CD64670CD00FFFF800200160237AB1000000000000037AB" - $"104AE1D848449500FFFF5702001602375C10B74516374516375C1048B2B04AE9" - $"7200FFFF8002001602B07700B74912374912B077004898AD4AD99500FFFF8002" - $"00160232CFA5BA0B483A0B4832CFA54A3C584BA00E00FFFF8002001602368CB7" - $"000000000000368CB74B3D5E49752800FFFF4F0200160236A81C000000000000" - $"36A81C4B94C84A808500FFFF4002000602B738F7362603B62603B738F748BB3F" - $"4A241700A91212FFD7121202001602B04887376143B76143B0488748D36C44FB" - $"3100FFFF6B02001602B47620362BAAB62BAAB476204A0C144406C600FFFF8002" - $"001602B4CAE23409B3B409B3B4CAE24AD8D54611F100FFFF8002001602B328E4" - $"324E4AB24E4AB328E44B36A648859C00FFFF8002001602B22376311F03B11F03" - $"B223764B891349FFBC00FFFF80010079009803FF000004006002001602B4E6F3" - $"319259B19259B4E6F34B2F5D4AA2CA00FFFF0003FFFF0004FFD801FFFF669805" - $"000200060239CDA03A935CBC02343AF7494899864A8DDC00FFDB97FFFCAF2902" - $"0106033B471C0000000000003B36DB472800498C0000F2F2F2AB7D7A7AFFBCA1" - $"84280633EEEBFFFFAAEAABDBAEBBBEAE2BC0CEB389C02424C074B415BFF0B478" - $"BFB4B450BFB7B455BFB6B455BF8CB436BF14B430BF55B42DBEF5B3FFBE82B33E" - $"BBDBB3F2BBCEB4D7BBD0B4BABBCBB4DABBC7B4DABBC7B4DABBC8B4DABB45B50A" - $"BB45B50ABB44B50ABB37B50DBB37B50DBAD6B534BA1EB58DBA78B560BA1EB58D" - $"BA12B593BA12B593BA0FB596B99BB5D6B99BB5D6B99AB5D6B975B5ECB975B5EC" - $"B974B5EDB918B626B918B626B917B626B8EDB642B893B681B887B689B86CB69C" - $"B7F22AB7B5B72DB7A9B76EB73CB920B755B8C5B6B5B9A4B380BC3AB4F7BB4BB3" - $"80BC3AB317BC7FB33E42B755C332B80EC320B7E7C323B7FBC3522CC3C54FBB03" - $"C7E8BAF4C7DBBAD1C898BA59CA44BC40CC83BAD4CBC3BDF3CD6FC0A0CDA4C760" - $"C888CA38C797C90DC879CB7BC6A2CC38C4DCCB9AC3A6CBB6C3DDCBA2C34CCBC2" - $"C1EBCA78BF62C954BF30C9ADBF3FC934BEE9C900BE83C91DBEC2C927BE17C999" - $"BCEAC857BA6BC720BABCC767BAABC73FBA2EC7C0B7EEC5B1B563C3F4B6DBC472" - $"B66FC405B613C427B41BC12CB2F006032FBAF5C05EBAF5C05EBAF7C05C34C05A" - $"34C05B34C05A34C05B0610EE7AAAAAC693C7B5C9E8C667C896C755CAB5C5D3CB" - $"14C47FC521B8CDC521B8CDC0B9B834BD7FBA63BC9BBC64B789BF00B92ABE82B7" - $"89BF00C251BCE5C1CCBED1C0BCBE70C324BB51C5B0BB5AC71ABFC8C4E2C044C5" - $"12C05CCC1E0604EEBD7FBA63C521B8CDC0B9B834C521B8CDBF40B50AB87FB7A5" - $"BC0CB4F7B87FB7A50604FEBD7FBA63C521B8CDC0B9B834C521B8CDBF40B50ABF" - $"40B50ABD2DB521B87FB7A5BA8CB5E9B87FB7A50605BB02B3F7BCF4B5CD36B3F7" - $"BCF4B789BF00BA19BDD6B8DABE8835BD1EBC9BBC64B801B9930A04B87FB7A5BD" - $"7FBA63BC9BBC64B801B9930A04B3F7BCF4B413C012B789C251B789BF000A04BC" - $"7AB801BF99B6C0BE1BB43BBCAAB49E0A05BFE1B69AC187B3FFC341B4ABC30EB7" - $"7BC204B6CF0A05C3E9B805C594B69AC6D3B825C637BAECC521B8CD0A06B967C2" - $"23B8A5C3F1BB51C5B0BE70C323BED1C0BCBCE5C1CC0A04B8A5C548B8A5C3F1BB" - $"51C5B0BB5AC71A0606BA0ABC41C6A5BB73C983BCF9CB79BBC8CAD5BE40CC23C0" - $"5CCC1EC044C512BFC8C4E20A04C6A1BBC1C7E5BB6BC8ABBCF7C80EBE920A04C9" - $"EA41C8C5BFF3CABBC3D4CAE3C2140A06BA90C206BA19C33CBADEC3EBBEA7C1C4" - $"BED1C0BCBCE5C1CC0A06BC7AB801BCAAB49EBE1BB43BBE33B460BCDAB4C7BCB1" - $"B7EC0A04BFE1B69AC021B6A1C1ADB40DC187B3FF0A04C3E9B805C594B69AC5B7" - $"B6C3C41AB8250A04C6A1BBC1C7E5BB6BC7F4BB8EC6B9BBEC0A04C8C5BFF3C9EA" - $"41CA07C060C8E5C02B0628AAAAAAAAAAAEEFAAA9BACAB4C3BFCAE3C214C9EA41" - $"C8C5BFF3C80FBE90C8ABBCF7C7F4BB8EC7E5BB6BC6A1BBC1C637BAECC6D3B826" - $"C5B7B6C3C594B69AC3E9B805C3F9B80FC30EB77BC341B4ABC1ADB40DC187B3FF" - $"C068B5C6BF40B50ABE9BB514BF03B507BE9BB514BE1BB43BBCAAB49EBC9EB57C" - $"BC9EB57CBB34B5E3B87FB7A5B9BC29B87FB7A5B801B993B3F7BCF4B5CD36B3F7" - $"BCF4B413C012B789C251B964C223B8A5C3F1C548BB5AC71ABFC8C4E2C044C512" - $"C05CCC1EC693C7B5C9B7C688C894C759CAD2C5BECB14C47F0A06BE4DC302BB33" - $"4EB8F2C3E4B99FC21DBCE5C1CCBEAEC0D1020ABFDBBBF7BFE1BBDFBFC9BC38BF" - $"63BC91BF9DBC71BEE7BCD8BE03BC31BE4BBCABBE03BC31BE00BC24BE0137BE10" - $"BC1ABE4BBC03BE30BC0EBE4BBC03BEE9BBBABEE9BBBABEE9BBBABF7BBB58BF7B" - $"BB58BF8FBB45BFBDBB29BFA9BB3440BB2DBFC3BB34BFC3BB34BFD9BB5BBFE7BB" - $"B2BFE7BB85BFE7BBC8020ABFD5BC12BFD9BC00BFC3BC4FBF67BC9CBF9CBC80BE" - $"FCBCDBBE32BC45BE70BCB4BE32BC45BE2BBC39BE30BC41BE3EBC32BE70BC1DBE" - $"58BC27BE70BC1DBEFEBBDDBEFEBBDDBEFEBBDDBF7EBB84BF7EBB84BF90BB77BF" - $"B7BB5CBFA7BB66BFBDBB5F40BB6640BB66BFD4BB87BFDCBBD4BFDCBBADBFDCBB" - $"EA0605BA02BC2BC6AFC155C3BAC269C139C245C1A9C25CC1A9C1A5C3EFBBF5C7" - $"310A04BC7AB801BF99B6C0C125B79BBFB3B7FF0A03BFE1B69AC3A0B7D5C204B6" - $"CF0A05BCAAC670BCB9C66BBE0FC73AC05BC70BBDF4C7890A04BC34C73FBDE5C8" - $"8AC04EC88BBDC9C8D80A04BB81C817BD6CC9CFC072C973BD505A0A04BB60C971" - $"BD4FCB2BC054CACFBD33CB790A03C6D944C9E8C6DAC695540A03BD9FBC21BEE9" - $"BBBAC059BA770204BF4DBBE8BF4DBC1ABF4DBBB7BF95BB8FBF6FBB8FBFBCBB8F" - $"BFD9BBE8BFD9BBB7BFD9BC1ABF95BC42BFBCBC42BF6FBC420A04BAD6C37ABBFA" - $"C2FDBAD1C336BA8CC2FD0606BA0ABC2BC6AF35C98ABCC1CB6BBB88CAC8BE00CC" - $"16C049CC29C033C51CBFB5C4EA0A092844284E2A502A5A325A3250344E34442E" - $"4202042E3AB9753AB7B23A2A3E2ABE112ABFD52E42B7B242B97542323E32BFD5" - $"32BE11280A000100000A010101000A020102000A030103000A040104000A0501" - $"05000A060106000A070107000A080108000A090109000A0A010A000A0B010B00" - $"0A0C010C000A0D010D000A0E010E000A0F010F000A100110000A110111000A12" - $"0112000A130113000A140114000A150115000A1603161718000A170119000A18" - $"011A000A18011B000A18011C000A18011D000A18011E000A18011F000A180120" - $"000A190121000A180122000A1A0123000A1B0124000A1C0125000A1D012630C3" - $"89B47101178400040A1E012620C389B4710A1D012730C389B47101178400040A" - $"1F012720C389B471" -}; - diff --git a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/calendar/sunbird/app/apprunner-beos.rsrc b/www-client/mozilla_firefox/copy-to-mozilla-src-dir/calendar/sunbird/app/apprunner-beos.rsrc deleted file mode 100644 index 130fb93a5..000000000 Binary files a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/calendar/sunbird/app/apprunner-beos.rsrc and /dev/null differ diff --git a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/mail/app/apprunner-beos.rdef b/www-client/mozilla_firefox/copy-to-mozilla-src-dir/mail/app/apprunner-beos.rdef deleted file mode 100644 index 77e2166df..000000000 --- a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/mail/app/apprunner-beos.rdef +++ /dev/null @@ -1,126 +0,0 @@ -/* - * BeZillaBrowser.rdef - */ - -resource app_signature "application/x-vnd.Mozilla-Thunderbird"; - -resource app_flags B_SINGLE_LAUNCH; - -resource app_version { - /* - * We are using the source code version number - * for our program version. - * TODO : implement something better. - */ - major = 1, - middle = 8, - minor = 1, - - /* 0 = development 1 = alpha 2 = beta - 3 = gamma 4 = golden master 5 = final */ - variety = 0, - - internal = 21, - - short_info = "BeZillaMailNews", - long_info = "BeZillaMailNews is based on Mozilla's source code" -}; - -resource file_types message { - "types" = "application/x-vnd.Be.URL.mailto", - "types" = "application/x-vnd.Be.URL.news", - "types" = "applicataion/x-person", - "types" = "message/rfc822", - "types" = "text/E-mail", - "types" = "text/x-email", - "types" = "text/x-vnd.Be-MailDraft" -}; - -resource vector_icon { - $"6E636966200500020016029E8638A20EBA220EBA9E86384880254A18EA00FFFF" - $"8002001602BC9D88BB1F643B1F64BC9D884B716D48772700FFFF80020016023B" - $"F73A0000000000003BF73A49B5114976B000FFFF800200160237A0DDB61AF236" - $"1AF237A0DD497CAA48588100FFFF800200160238D81CB8152D38152D38D81C48" - $"420A499FB600FFFF8002001602397095000000000000397095486EDA49100600" - $"FFFF800200160231E5B2BA0EAF3A0EAF31E5B247DA3349779B00FFFF80020016" - $"0236BBEFB4543A34543A36BBEF495BDE469BC700FFFF6B0200160236E2E70000" - $"0000000036E2E74A2CD64670CD00FFFF800200160237AB1000000000000037AB" - $"104AE1D848449500FFFF5702001602375C10B74516374516375C1048B2B04AE9" - $"7200FFFF8002001602B07700B74912374912B077004898AD4AD99500FFFF8002" - $"00160232CFA5BA0B483A0B4832CFA54A3C584BA00E00FFFF8002001602368CB7" - $"000000000000368CB74B3D5E49752800FFFF4F0200160236A81C000000000000" - $"36A81C4B94C84A808500FFFF4002000602B738F7362603B62603B738F748BB3F" - $"4A241700A91212FFD7121202001602B04887376143B76143B0488748D36C44FB" - $"3100FFFF6B02001602B47620362BAAB62BAAB476204A0C144406C600FFFF8002" - $"001602B4CAE23409B3B409B3B4CAE24AD8D54611F100FFFF8002001602B328E4" - $"324E4AB24E4AB328E44B36A648859C00FFFF8002001602B22376311F03B11F03" - $"B223764B891349FFBC00FFFF80010079009803FF000004006002001602B4E6F3" - $"319259B19259B4E6F34B2F5D4AA2CA00FFFF0003FFFF0004FFD801FFFF669805" - $"0002000602389ECD3AF097BC491F3A09894954654ABDFA00FFFFFFFFD9D09303" - $"6B5222280633EEEBFFFFAAEAABDBAEBBBEAE2BC0CEB389C02424C074B415BFF0" - $"B478BFB4B450BFB7B455BFB6B455BF8CB436BF14B430BF55B42DBEF5B3FFBE82" - $"B33EBBDBB3F2BBCEB4D7BBD0B4BABBCBB4DABBC7B4DABBC7B4DABBC8B4DABB45" - $"B50ABB45B50ABB44B50ABB37B50DBB37B50DBAD6B534BA1EB58DBA78B560BA1E" - $"B58DBA12B593BA12B593BA0FB596B99BB5D6B99BB5D6B99AB5D6B975B5ECB975" - $"B5ECB974B5EDB918B626B918B626B917B626B8EDB642B893B681B887B689B86C" - $"B69CB7F22AB7B5B72DB7A9B76EB73CB920B755B8C5B6B5B9A4B380BC3AB4F7BB" - $"4BB380BC3AB317BC7FB33E42B755C332B80EC320B7E7C323B7FBC3522CC3C54F" - $"BB03C7E8BAF4C7DBBAD1C898BA59CA44BC40CC83BAD4CBC3BDF3CD6FC0A0CDA4" - $"C760C888CA38C797C90DC879CB7BC6A2CC38C4DCCB9AC3A6CBB6C3DDCBA2C34C" - $"CBC2C1EBCA78BF62C954BF30C9ADBF3FC934BEE9C900BE83C91DBEC2C927BE17" - $"C999BCEAC857BA6BC720BABCC767BAABC73FBA2EC7C0B7EEC5B1B563C3F4B6DB" - $"C472B66FC405B613C427B41BC12CB2F006032FBAF5C05EBAF5C05EBAF7C05C34" - $"C05A34C05B34C05A34C05B0610EE7AAAAAC693C7B5C9E8C667C896C755CAB5C5" - $"D3CB14C47FC521B8CDC521B8CDC0B9B834BD7FBA63BC9BBC64B789BF00B92ABE" - $"82B789BF00C251BCE5C1CCBED1C0BCBE70C324BB51C5B0BB5AC71ABFC8C4E2C0" - $"44C512C05CCC1E0604EEBD7FBA63C521B8CDC0B9B834C521B8CDBF40B50AB87F" - $"B7A5BC0CB4F7B87FB7A50604FEBD7FBA63C521B8CDC0B9B834C521B8CDBF40B5" - $"0ABF40B50ABD2DB521B87FB7A5BA8CB5E9B87FB7A50605BB02B3F7BCF4B5CD36" - $"B3F7BCF4B789BF00BA19BDD6B8DABE8835BD1EBC9BBC64B801B9930A04B87FB7" - $"A5BD7FBA63BC9BBC64B801B9930A04B3F7BCF4B413C012B789C251B789BF000A" - $"04BC7AB801BF99B6C0BE1BB43BBCAAB49E0A05BFE1B69AC187B3FFC341B4ABC3" - $"0EB77BC204B6CF0A05C3E9B805C594B69AC6D3B825C637BAECC521B8CD0A06B9" - $"67C223B8A5C3F1BB51C5B0BE70C323BED1C0BCBCE5C1CC0A04B8A5C548B8A5C3" - $"F1BB51C5B0BB5AC71A0606BA0ABC41C6A5BB73C983BCF9CB79BBC8CAD5BE40CC" - $"23C05CCC1EC044C512BFC8C4E20A04C6A1BBC1C7E5BB6BC8ABBCF7C80EBE920A" - $"04C9EA41C8C5BFF3CABBC3D4CAE3C2140A06BA90C206BA19C33CBADEC3EBBEA7" - $"C1C4BED1C0BCBCE5C1CC0A06BC7AB801BCAAB49EBE1BB43BBE33B460BCDAB4C7" - $"BCB1B7EC0A04BFE1B69AC021B6A1C1ADB40DC187B3FF0A04C3E9B805C594B69A" - $"C5B7B6C3C41AB8250A04C6A1BBC1C7E5BB6BC7F4BB8EC6B9BBEC0A04C8C5BFF3" - $"C9EA41CA07C060C8E5C02B0628AAAAAAAAAAAEEFAAA9BACAB4C3BFCAE3C214C9" - $"EA41C8C5BFF3C80FBE90C8ABBCF7C7F4BB8EC7E5BB6BC6A1BBC1C637BAECC6D3" - $"B826C5B7B6C3C594B69AC3E9B805C3F9B80FC30EB77BC341B4ABC1ADB40DC187" - $"B3FFC068B5C6BF40B50ABE9BB514BF03B507BE9BB514BE1BB43BBCAAB49EBC9E" - $"B57CBC9EB57CBB34B5E3B87FB7A5B9BC29B87FB7A5B801B993B3F7BCF4B5CD36" - $"B3F7BCF4B413C012B789C251B964C223B8A5C3F1C548BB5AC71ABFC8C4E2C044" - $"C512C05CCC1EC693C7B5C9B7C688C894C759CAD2C5BECB14C47F0A06BE4DC302" - $"BB334EB8F2C3E4B99FC21DBCE5C1CCBEAEC0D1020ABFDBBBF7BFE1BBDFBFC9BC" - $"38BF63BC91BF9DBC71BEE7BCD8BE03BC31BE4BBCABBE03BC31BE00BC24BE0137" - $"BE10BC1ABE4BBC03BE30BC0EBE4BBC03BEE9BBBABEE9BBBABEE9BBBABF7BBB58" - $"BF7BBB58BF8FBB45BFBDBB29BFA9BB3440BB2DBFC3BB34BFC3BB34BFD9BB5BBF" - $"E7BBB2BFE7BB85BFE7BBC8020ABFD5BC12BFD9BC00BFC3BC4FBF67BC9CBF9CBC" - $"80BEFCBCDBBE32BC45BE70BCB4BE32BC45BE2BBC39BE30BC41BE3EBC32BE70BC" - $"1DBE58BC27BE70BC1DBEFEBBDDBEFEBBDDBEFEBBDDBF7EBB84BF7EBB84BF90BB" - $"77BFB7BB5CBFA7BB66BFBDBB5F40BB6640BB66BFD4BB87BFDCBBD4BFDCBBADBF" - $"DCBBEA0605BA02BC2BC6AFC155C3BAC269C139C245C1A9C25CC1A9C1A5C3EFBB" - $"F5C7310A04BC7AB801BF99B6C0C125B79BBFB3B7FF0A03BFE1B69AC3A0B7D5C2" - $"04B6CF0A05BCAAC670BCB9C66BBE0FC73AC05BC70BBDF4C7890A04BC34C73FBD" - $"E5C88AC04EC88BBDC9C8D80A04BB81C817BD6CC9CFC072C973BD505A0A04BB60" - $"C971BD4FCB2BC054CACFBD33CB790A03C6D944C9E8C6DAC695540A03BD9FBC21" - $"BEE9BBBAC059BA770204BF4DBBE8BF4DBC1ABF4DBBB7BF95BB8FBF6FBB8FBFBC" - $"BB8FBFD9BBE8BFD9BBB7BFD9BC1ABF95BC42BFBCBC42BF6FBC420A04BAD6C37A" - $"BBFAC2FDBAD1C336BA8CC2FD0606BA0ABC2BC6AF35C98ABCC1CB6BBB88CAC8BE" - $"00CC16C049CC29C033C51CBFB5C4EA0A04244C245C3C5C3C4C060AEEFE0E244C" - $"30542E5432543C4CBB1454BCCAC670BB14543C5CBABCC808BABCC808BA0EC8AC" - $"3056B9A856B91756B801C808B8B1C8ACB801C808245CB7A954B7A954B5F4C670" - $"280A000100000A010101000A020102000A030103000A040104000A050105000A" - $"060106000A070107000A080108000A090109000A0A010A000A0B010B000A0C01" - $"0C000A0D010D000A0E010E000A0F010F000A100110000A110111000A12011200" - $"0A130113000A140114000A150115000A1603161718000A170119000A18011A00" - $"0A18011B000A18011C000A18011D000A18011E000A18011F000A180120000A19" - $"0121000A180122000A1A0123000A1B0124000A1C0125000A1D012638C018B358" - $"15FF01178400040A1D012638C018B358001501178600040A1E012620C018B358" - $"0A1F012720C018B358" -}; - - diff --git a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/xpfe/bootstrap/apprunner-beos.rdef b/www-client/mozilla_firefox/copy-to-mozilla-src-dir/xpfe/bootstrap/apprunner-beos.rdef deleted file mode 100644 index 6ca677791..000000000 --- a/www-client/mozilla_firefox/copy-to-mozilla-src-dir/xpfe/bootstrap/apprunner-beos.rdef +++ /dev/null @@ -1,136 +0,0 @@ -/* - * BeZillaBrowser.rdef - */ - -resource app_signature "application/x-vnd.Mozilla-SeaMonkey"; - -resource app_flags B_SINGLE_LAUNCH; - -resource app_version { - /* - * We are using the source code version number - * for our program version. - * TODO : implement something better. - */ - major = 1, - middle = 8, - minor = 1, - - /* 0 = development 1 = alpha 2 = beta - 3 = gamma 4 = golden master 5 = final */ - variety = 0, - - internal = 21, - - short_info = "BeZillaSuite", - long_info = "BeZillaSuite is based on Mozilla's source code" -}; - -resource file_types message { - "types" = "application/x-vnd.Be.URL.file", - "types" = "application/x-vnd.Be.URL.ftp", - "types" = "application/x-vnd.Be.URL.http", - "types" = "application/x-vnd.Be.URL.https", - "types" = "application/x-vnd.Be.URL.mailto", - "types" = "application/x-vnd.Be.URL.news", - "types" = "text/html" - /* - * Should BeZillaSuite include these additional filetypes? - * note: MailNews has them - "types" = "applicataion/x-person", - "types" = "message/rfc822", - "types" = "text/E-mail", - "types" = "text/x-email" - "types" = "text/x-vnd.Be-MailDraft" - */ -}; - -resource vector_icon { - $"6E636966210500020016029E8638A20EBA220EBA9E86384880254A18EA00FFFF" - $"8002001602BC9D88BB1F643B1F64BC9D884B716D48772700FFFF80020016023B" - $"F73A0000000000003BF73A49B5114976B000FFFF800200160237A0DDB61AF236" - $"1AF237A0DD497CAA48588100FFFF800200160238D81CB8152D38152D38D81C48" - $"420A499FB600FFFF8002001602397095000000000000397095486EDA49100600" - $"FFFF800200160231E5B2BA0EAF3A0EAF31E5B247DA3349779B00FFFF80020016" - $"0236BBEFB4543A34543A36BBEF495BDE469BC700FFFF6B0200160236E2E70000" - $"0000000036E2E74A2CD64670CD00FFFF800200160237AB1000000000000037AB" - $"104AE1D848449500FFFF5702001602375C10B74516374516375C1048B2B04AE9" - $"7200FFFF8002001602B07700B74912374912B077004898AD4AD99500FFFF8002" - $"00160232CFA5BA0B483A0B4832CFA54A3C584BA00E00FFFF8002001602368CB7" - $"000000000000368CB74B3D5E49752800FFFF4F0200160236A81C000000000000" - $"36A81C4B94C84A808500FFFF4002000602B738F7362603B62603B738F748BB3F" - $"4A241700A91212FFD7121202001602B04887376143B76143B0488748D36C44FB" - $"3100FFFF6B02001602B47620362BAAB62BAAB476204A0C144406C600FFFF8002" - $"001602B4CAE23409B3B409B3B4CAE24AD8D54611F100FFFF8002001602B328E4" - $"324E4AB24E4AB328E44B36A648859C00FFFF8002001602B22376311F03B11F03" - $"B223764B891349FFBC00FFFF80010079009803FF000004006002001602B4E6F3" - $"319259B19259B4E6F34B2F5D4AA2CA00FFFF0003FFFF0004FFD801FFFF669805" - $"000200060237889D389554BBFC4A3AB9D0491ADE4A422000FFF9BAFFFFC10402" - $"0006023882A6389353BB177D3B0378484ADD4AF27700C7E3FFFF392FFF020006" - $"0237A0CC393C5ABC1AC23A5C164A19B94AFE5400FF9797FFCE3232290633EEEB" - $"FFFFAAEAABDBAEBBBEAE2BC0CEB389C02424C074B415BFF0B478BFB4B450BFB7" - $"B455BFB6B455BF8CB436BF14B430BF55B42DBEF5B3FFBE82B33EBBDBB3F2BBCE" - $"B4D7BBD0B4BABBCBB4DABBC7B4DABBC7B4DABBC8B4DABB45B50ABB45B50ABB44" - $"B50ABB37B50DBB37B50DBAD6B534BA1EB58DBA78B560BA1EB58DBA12B593BA12" - $"B593BA0FB596B99BB5D6B99BB5D6B99AB5D6B975B5ECB975B5ECB974B5EDB918" - $"B626B918B626B917B626B8EDB642B893B681B887B689B86CB69CB7F22AB7B5B7" - $"2DB7A9B76EB73CB920B755B8C5B6B5B9A4B380BC3AB4F7BB4BB380BC3AB317BC" - $"7FB33E42B755C332B80EC320B7E7C323B7FBC3522CC3C54FBB03C7E8BAF4C7DB" - $"BAD1C898BA59CA44BC40CC83BAD4CBC3BDF3CD6FC0A0CDA4C760C888CA38C797" - $"C90DC879CB7BC6A2CC38C4DCCB9AC3A6CBB6C3DDCBA2C34CCBC2C1EBCA78BF62" - $"C954BF30C9ADBF3FC934BEE9C900BE83C91DBEC2C927BE17C999BCEAC857BA6B" - $"C720BABCC767BAABC73FBA2EC7C0B7EEC5B1B563C3F4B6DBC472B66FC405B613" - $"C427B41BC12CB2F006032FBAF5C05EBAF5C05EBAF7C05C34C05A34C05B34C05A" - $"34C05B0610EE7AAAAAC693C7B5C9E8C667C896C755CAB5C5D3CB14C47FC521B8" - $"CDC521B8CDC0B9B834BD7FBA63BC9BBC64B789BF00B92ABE82B789BF00C251BC" - $"E5C1CCBED1C0BCBE70C324BB51C5B0BB5AC71ABFC8C4E2C044C512C05CCC1E06" - $"04EEBD7FBA63C521B8CDC0B9B834C521B8CDBF40B50AB87FB7A5BC0CB4F7B87F" - $"B7A50604FEBD7FBA63C521B8CDC0B9B834C521B8CDBF40B50ABF40B50ABD2DB5" - $"21B87FB7A5BA8CB5E9B87FB7A50605BB02B3F7BCF4B5CD36B3F7BCF4B789BF00" - $"BA19BDD6B8DABE8835BD1EBC9BBC64B801B9930A04B87FB7A5BD7FBA63BC9BBC" - $"64B801B9930A04B3F7BCF4B413C012B789C251B789BF000A04BC7AB801BF99B6" - $"C0BE1BB43BBCAAB49E0A05BFE1B69AC187B3FFC341B4ABC30EB77BC204B6CF0A" - $"05C3E9B805C594B69AC6D3B825C637BAECC521B8CD0A06B967C223B8A5C3F1BB" - $"51C5B0BE70C323BED1C0BCBCE5C1CC0A04B8A5C548B8A5C3F1BB51C5B0BB5AC7" - $"1A0606BA0ABC41C6A5BB73C983BCF9CB79BBC8CAD5BE40CC23C05CCC1EC044C5" - $"12BFC8C4E20A04C6A1BBC1C7E5BB6BC8ABBCF7C80EBE920A04C9EA41C8C5BFF3" - $"CABBC3D4CAE3C2140A06BA90C206BA19C33CBADEC3EBBEA7C1C4BED1C0BCBCE5" - $"C1CC0A06BC7AB801BCAAB49EBE1BB43BBE33B460BCDAB4C7BCB1B7EC0A04BFE1" - $"B69AC021B6A1C1ADB40DC187B3FF0A04C3E9B805C594B69AC5B7B6C3C41AB825" - $"0A04C6A1BBC1C7E5BB6BC7F4BB8EC6B9BBEC0A04C8C5BFF3C9EA41CA07C060C8" - $"E5C02B0628AAAAAAAAAAAEEFAAA9BACAB4C3BFCAE3C214C9EA41C8C5BFF3C80F" - $"BE90C8ABBCF7C7F4BB8EC7E5BB6BC6A1BBC1C637BAECC6D3B826C5B7B6C3C594" - $"B69AC3E9B805C3F9B80FC30EB77BC341B4ABC1ADB40DC187B3FFC068B5C6BF40" - $"B50ABE9BB514BF03B507BE9BB514BE1BB43BBCAAB49EBC9EB57CBC9EB57CBB34" - $"B5E3B87FB7A5B9BC29B87FB7A5B801B993B3F7BCF4B5CD36B3F7BCF4B413C012" - $"B789C251B964C223B8A5C3F1C548BB5AC71ABFC8C4E2C044C512C05CCC1EC693" - $"C7B5C9B7C688C894C759CAD2C5BECB14C47F0A06BE4DC302BB334EB8F2C3E4B9" - $"9FC21DBCE5C1CCBEAEC0D1020ABFDBBBF7BFE1BBDFBFC9BC38BF63BC91BF9DBC" - $"71BEE7BCD8BE03BC31BE4BBCABBE03BC31BE00BC24BE0137BE10BC1ABE4BBC03" - $"BE30BC0EBE4BBC03BEE9BBBABEE9BBBABEE9BBBABF7BBB58BF7BBB58BF8FBB45" - $"BFBDBB29BFA9BB3440BB2DBFC3BB34BFC3BB34BFD9BB5BBFE7BBB2BFE7BB85BF" - $"E7BBC8020ABFD5BC12BFD9BC00BFC3BC4FBF67BC9CBF9CBC80BEFCBCDBBE32BC" - $"45BE70BCB4BE32BC45BE2BBC39BE30BC41BE3EBC32BE70BC1DBE58BC27BE70BC" - $"1DBEFEBBDDBEFEBBDDBEFEBBDDBF7EBB84BF7EBB84BF90BB77BFB7BB5CBFA7BB" - $"66BFBDBB5F40BB6640BB66BFD4BB87BFDCBBD4BFDCBBADBFDCBBEA0605BA02BC" - $"2BC6AFC155C3BAC269C139C245C1A9C25CC1A9C1A5C3EFBBF5C7310A04BC7AB8" - $"01BF99B6C0C125B79BBFB3B7FF0A03BFE1B69AC3A0B7D5C204B6CF0A05BCAAC6" - $"70BCB9C66BBE0FC73AC05BC70BBDF4C7890A04BC34C73FBDE5C88AC04EC88BBD" - $"C9C8D80A04BB81C817BD6CC9CFC072C973BD505A0A04BB60C971BD4FCB2BC054" - $"CACFBD33CB790A03C6D944C9E8C6DAC695540A03BD9FBC21BEE9BBBAC059BA77" - $"0204BF4DBBE8BF4DBC1ABF4DBBB7BF95BB8FBF6FBB8FBFBCBB8FBFD9BBE8BFD9" - $"BBB7BFD9BC1ABF95BC42BFBCBC42BF6FBC420A04BAD6C37ABBFAC2FDBAD1C336" - $"BA8CC2FD0606BA0ABC2BC6AF35C98ABCC1CB6BBB88CAC8BE00CC16C049CC29C0" - $"33C51CBFB5C4EA0A062C472C4E3251364E364730440A06265226592C5C305930" - $"522A4F0A0632533259385C3C593C5237C5D3290A000100000A010101000A0201" - $"02000A030103000A040104000A050105000A060106000A070107000A08010800" - $"0A090109000A0A010A000A0B010B000A0C010C000A0D010D000A0E010E000A0F" - $"010F000A100110000A110111000A120112000A130113000A140114000A150115" - $"000A1603161718000A170119000A18011A000A18011B000A18011C000A18011D" - $"000A18011E000A18011F000A180120000A190121000A180122000A1A0123000A" - $"1B0124000A1C0125000A1D032627283841B30C15FF01178400040A1D03262728" - $"3841B30C001501178600040A1E01262041B30C0A1F01272041B30C0A20012820" - $"41B30C" -}; - - diff --git a/www-client/mozilla_firefox/hvif-icons/BeZilla-Browser-l b/www-client/mozilla_firefox/hvif-icons/BeZilla-Browser-l deleted file mode 100644 index f6e7614a5..000000000 Binary files a/www-client/mozilla_firefox/hvif-icons/BeZilla-Browser-l and /dev/null differ diff --git a/www-client/mozilla_firefox/hvif-icons/BeZilla-Browser-r b/www-client/mozilla_firefox/hvif-icons/BeZilla-Browser-r deleted file mode 100644 index d5932a9a1..000000000 Binary files a/www-client/mozilla_firefox/hvif-icons/BeZilla-Browser-r and /dev/null differ diff --git a/www-client/mozilla_firefox/hvif-icons/BeZilla-MailNews b/www-client/mozilla_firefox/hvif-icons/BeZilla-MailNews deleted file mode 100644 index aae8f134e..000000000 Binary files a/www-client/mozilla_firefox/hvif-icons/BeZilla-MailNews and /dev/null differ diff --git a/www-client/mozilla_firefox/hvif-icons/BeZilla-MailNews-r b/www-client/mozilla_firefox/hvif-icons/BeZilla-MailNews-r deleted file mode 100644 index 10b514b4c..000000000 Binary files a/www-client/mozilla_firefox/hvif-icons/BeZilla-MailNews-r and /dev/null differ diff --git a/www-client/mozilla_firefox/hvif-icons/BeZilla-Suite-l b/www-client/mozilla_firefox/hvif-icons/BeZilla-Suite-l deleted file mode 100644 index 8df37e9c7..000000000 Binary files a/www-client/mozilla_firefox/hvif-icons/BeZilla-Suite-l and /dev/null differ diff --git a/www-client/mozilla_firefox/hvif-icons/BeZilla-Suite-r b/www-client/mozilla_firefox/hvif-icons/BeZilla-Suite-r deleted file mode 100644 index 9c882797e..000000000 Binary files a/www-client/mozilla_firefox/hvif-icons/BeZilla-Suite-r and /dev/null differ diff --git a/www-client/mozilla_firefox/hvif-icons/BeZilla-calendar-l b/www-client/mozilla_firefox/hvif-icons/BeZilla-calendar-l deleted file mode 100644 index a37cb9361..000000000 Binary files a/www-client/mozilla_firefox/hvif-icons/BeZilla-calendar-l and /dev/null differ diff --git a/www-client/mozilla_firefox/hvif-icons/BeZilla-calendar-r b/www-client/mozilla_firefox/hvif-icons/BeZilla-calendar-r deleted file mode 100644 index a4401ebc2..000000000 Binary files a/www-client/mozilla_firefox/hvif-icons/BeZilla-calendar-r and /dev/null differ diff --git a/www-client/mozilla_firefox/hvif-icons/bezilla-1 copy b/www-client/mozilla_firefox/hvif-icons/bezilla-1 copy deleted file mode 100644 index b82b4e952..000000000 Binary files a/www-client/mozilla_firefox/hvif-icons/bezilla-1 copy and /dev/null differ diff --git a/www-client/mozilla_firefox/hvif-icons/icon_copyright/copyleft.txt b/www-client/mozilla_firefox/hvif-icons/icon_copyright/copyleft.txt deleted file mode 100644 index 0a618151a..000000000 --- a/www-client/mozilla_firefox/hvif-icons/icon_copyright/copyleft.txt +++ /dev/null @@ -1,180 +0,0 @@ -DESIGN SCIENCE LICENSE - -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - -Copyright © 1999-2001 Michael Stutz -Verbatim copying of this document is permitted, in any medium. - -0. PREAMBLE. - -Copyright law gives certain exclusive rights to the author of a work, -including the rights to copy, modify and distribute the work (the -"reproductive," "adaptative," and "distribution" rights). - -The idea of "copyleft" is to willfully revoke the exclusivity of those -rights under certain terms and conditions, so that anyone can copy and -distribute the work or properly attributed derivative works, while all -copies remain under the same terms and conditions as the original. - -The intent of this license is to be a general "copyleft" that can be -applied to any kind of work that has protection under copyright. This -license states those certain conditions under which a work published -under its terms may be copied, distributed, and modified. - -Whereas "design science" is a strategy for the development of -artifacts as a way to reform the environment (not people) and -subsequently improve the universal standard of living, this Design -Science License was written and deployed as a strategy for promoting -the progress of science and art through reform of the environment. - -1. DEFINITIONS. - -"License" shall mean this Design Science License. The License applies -to any work which contains a notice placed by the work's copyright -holder stating that it is published under the terms of this Design -Science License. - -"Work" shall mean such an aforementioned work. The License also -applies to the output of the Work, only if said output constitutes a -"derivative work" of the licensed Work as defined by copyright law. - -"Object Form" shall mean an executable or performable form of the -Work, being an embodiment of the Work in some tangible medium. - -"Source Data" shall mean the origin of the Object Form, being the -entire, machine-readable, preferred form of the Work for copying and -for human modification (usually the language, encoding or format in -which composed or recorded by the Author); plus any accompanying -files, scripts or other data necessary for installation, configuration -or compilation of the Work. - -(Examples of "Source Data" include, but are not limited to, the -following: if the Work is an image file composed and edited in PNG -format, then the original PNG source file is the Source Data; if the -Work is an MPEG 1.0 layer 3 digital audio recording made from a WAV -format audio file recording of an analog source, then the original WAV -file is the Source Data; if the Work was composed as an unformatted -plaintext file, then that file is the Source Data; if the Work was -composed in LaTeX, the LaTeX file(s) and any image files and/or custom -macros necessary for compilation constitute the Source Data.) - -"Author" shall mean the copyright holder(s) of the Work. - -The individual licensees are referred to as "you." - -2. RIGHTS AND COPYRIGHT. - -The Work is copyrighted by the Author. All rights to the Work are -reserved by the Author, except as specifically described below. This -License describes the terms and conditions under which the Author -permits you to copy, distribute and modify copies of the Work. - -In addition, you may refer to the Work, talk about it, and (as -dictated by "fair use") quote from it, just as you would any -copyrighted material under copyright law. - -Your right to operate, perform, read or otherwise interpret and/or -execute the Work is unrestricted; however, you do so at your own risk, -because the Work comes WITHOUT ANY WARRANTY -- see Section 7 ("NO -WARRANTY") below. - -3. COPYING AND DISTRIBUTION. - -Permission is granted to distribute, publish or otherwise present -verbatim copies of the entire Source Data of the Work, in any medium, -provided that full copyright notice and disclaimer of warranty, where -applicable, is conspicuously published on all copies, and a copy of -this License is distributed along with the Work. - -Permission is granted to distribute, publish or otherwise present -copies of the Object Form of the Work, in any medium, under the terms -for distribution of Source Data above and also provided that one of -the following additional conditions are met: - -(a) The Source Data is included in the same distribution, distributed -under the terms of this License; or - -(b) A written offer is included with the distribution, valid for at -least three years or for as long as the distribution is in print -(whichever is longer), with a publicly-accessible address (such as a -URL on the Internet) where, for a charge not greater than -transportation and media costs, anyone may receive a copy of the -Source Data of the Work distributed according to the section above; or - -(c) A third party's written offer for obtaining the Source Data at no -cost, as described in paragraph (b) above, is included with the -distribution. This option is valid only if you are a non-commercial -party, and only if you received the Object Form of the Work along with -such an offer. - -You may copy and distribute the Work either gratis or for a fee, and -if desired, you may offer warranty protection for the Work. - -The aggregation of the Work with other works that are not based on the -Work -- such as but not limited to inclusion in a publication, -broadcast, compilation, or other media -- does not bring the other -works in the scope of the License; nor does such aggregation void the -terms of the License for the Work. - -4. MODIFICATION. - -Permission is granted to modify or sample from a copy of the Work, -producing a derivative work, and to distribute the derivative work -under the terms described in the section for distribution above, -provided that the following terms are met: - -(a) The new, derivative work is published under the terms of this -License. - -(b) The derivative work is given a new name, so that its name or title -cannot be confused with the Work, or with a version of the Work, in -any way. - -(c) Appropriate authorship credit is given: for the differences -between the Work and the new derivative work, authorship is attributed -to you, while the material sampled or used from the Work remains -attributed to the original Author; appropriate notice must be included -with the new work indicating the nature and the dates of any -modifications of the Work made by you. - -5. NO RESTRICTIONS. - -You may not impose any further restrictions on the Work or any of its -derivative works beyond those restrictions described in this License. - -6. ACCEPTANCE. - -Copying, distributing or modifying the Work (including but not limited -to sampling from the Work in a new work) indicates acceptance of these -terms. If you do not follow the terms of this License, any rights -granted to you by the License are null and void. The copying, -distribution or modification of the Work outside of the terms -described in this License is expressly prohibited by law. - -If for any reason, conditions are imposed on you that forbid you to -fulfill the conditions of this License, you may not copy, distribute -or modify the Work at all. - -If any part of this License is found to be in conflict with the law, -that part shall be interpreted in its broadest meaning consistent with -the law, and no other parts of the License shall be affected. - -7. NO WARRANTY. - -THE WORK IS PROVIDED "AS IS," AND COMES WITH ABSOLUTELY NO WARRANTY, -EXPRESS OR IMPLIED, TO THE EXTENT PERMITTED BY APPLICABLE LAW, -INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY -OR FITNESS FOR A PARTICULAR PURPOSE. - -8. DISCLAIMER OF LIABILITY. - -IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING -IN ANY WAY OUT OF THE USE OF THIS WORK, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -END OF TERMS AND CONDITIONS diff --git a/www-client/mozilla_firefox/hvif-icons/icon_copyright/copyright_info.txt b/www-client/mozilla_firefox/hvif-icons/icon_copyright/copyright_info.txt deleted file mode 100644 index 6761aa8c6..000000000 --- a/www-client/mozilla_firefox/hvif-icons/icon_copyright/copyright_info.txt +++ /dev/null @@ -1 +0,0 @@ -Copyright © 2002 Matthew McClintock; this information may be copied, distributed and/or modified under certain conditions, but it comes WITHOUT ANY WARRANTY; see the Design Science License for more details. \ No newline at end of file diff --git a/www-client/mozilla_firefox/old-patches/allO1.patch b/www-client/mozilla_firefox/old-patches/allO1.patch deleted file mode 100644 index f89874124..000000000 --- a/www-client/mozilla_firefox/old-patches/allO1.patch +++ /dev/null @@ -1,204 +0,0 @@ -Index: mozilla/directory/c-sdk/config/BeOS.mk -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/config/BeOS.mk,v -retrieving revision 5.0.138.1 -diff -u -8 -p -r5.0.138.1 BeOS.mk ---- mozilla/directory/c-sdk/config/BeOS.mk 3 Feb 2006 14:41:11 -0000 5.0.138.1 -+++ mozilla/directory/c-sdk/config/BeOS.mk 19 Feb 2009 02:42:41 -0000 -@@ -64,17 +64,18 @@ ifeq (PC,$(findstring PC,$(OS_TEST))) - CPU_ARCH = x86 - CC = gcc - CCC = g++ - LD = gcc - RANLIB = ranlib - DSO_LDOPTS = -nostart - PORT_FLAGS = -DHAVE_STRERROR - ifdef BUILD_OPT --OPTIMIZER = -O2 -+#OPTIMIZER = -O2 -+OPTIMIZER = -O1 -march=pentium -mcpu=pentiumpro - LDFLAGS += -s - else - OPTIMIZER = -gdwarf-2 -O0 - endif - else - CPU_ARCH = ppc - CC = mwcc - CCC = mwcc -@@ -85,17 +86,18 @@ DSO_LDOPTS = -xms -export p - -term _term_routine_ \ - -lroot -lnet \ - /boot/develop/lib/ppc/glue-noinit.a \ - /boot/develop/lib/ppc/init_term_dyn.o \ - /boot/develop/lib/ppc/start_dyn.o - - PORT_FLAGS = -DHAVE_STRERROR -D_POSIX_SOURCE - ifdef BUILD_OPT --OPTIMIZER = -O2 -+#OPTIMIZER = -O2 -+OPTIMIZER = -O1 -march=pentium -mcpu=pentiumpro - else - OPTIMIZER = -g -O0 - endif - endif - CPU_ARCH_TAG = _$(CPU_ARCH) - - OS_INCLUDES = -I- -I. - #G++INCLUDES = -I/usr/include/g++ -Index: mozilla/directory/c-sdk/configure.in -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/configure.in,v -retrieving revision 5.0.2.34.4.3 -diff -u -8 -p -r5.0.2.34.4.3 configure.in ---- mozilla/directory/c-sdk/configure.in 11 Jul 2007 20:43:19 -0000 5.0.2.34.4.3 -+++ mozilla/directory/c-sdk/configure.in 19 Feb 2009 02:43:12 -0000 -@@ -819,17 +819,17 @@ case "$target" in - AC_DEFINE(_POSIX_SOURCE) - DSO_LDOPTS=-nostart - MDCPUCFG_H=_beos.cfg - USE_BTHREADS=1 - PR_MD_ARCH_DIR=beos - RESOLVE_LINK_SYMBOLS=1 - case "${target_cpu}" in - i*86) -- _OPTIMIZE_FLAGS=-O2 -+ _OPTIMIZE_FLAGS=-O1 -march=pentium -mcpu=pentiumpro - _DEBUG_FLAGS='-gdwarf-2 -O0' - MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@' - AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"]) - ;; - powerpc) - CC=mwcc - CCC=mwcc - LD=mwld -Index: mozilla/nsprpub/configure.in -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/configure.in,v -retrieving revision 1.199.2.17 -diff -u -8 -p -r1.199.2.17 configure.in ---- mozilla/nsprpub/configure.in 31 Oct 2007 18:07:38 -0000 1.199.2.17 -+++ mozilla/nsprpub/configure.in 19 Feb 2009 02:59:37 -0000 -@@ -874,17 +874,17 @@ case "$target" in - AC_DEFINE(_POSIX_SOURCE) - DSO_LDOPTS=-nostart - MDCPUCFG_H=_beos.cfg - USE_BTHREADS=1 - PR_MD_ARCH_DIR=beos - RESOLVE_LINK_SYMBOLS=1 - case "${target_cpu}" in - i*86) -- _OPTIMIZE_FLAGS=-O2 -+ _OPTIMIZE_FLAGS=-O1 -march=pentium -mcpu=pentiumpro - _DEBUG_FLAGS='-gdwarf-2 -O0' - MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@' - AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"]) - ;; - powerpc) - CC=mwcc - CCC=mwcc - LD=mwld -Index: mozilla/security/coreconf/BeOS.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/coreconf/BeOS.mk,v -retrieving revision 1.2 -diff -u -8 -p -r1.2 BeOS.mk ---- mozilla/security/coreconf/BeOS.mk 25 Apr 2004 15:02:17 -0000 1.2 -+++ mozilla/security/coreconf/BeOS.mk 19 Feb 2009 03:02:58 -0000 -@@ -56,17 +56,17 @@ ifeq ($(OS_TEST),ppc) - CPU_ARCH = ppc - else - OS_REL_CFLAGS = -Di386 - CPU_ARCH = x86 - endif - - MKSHLIB = $(CC) -nostart -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) - ifdef BUILD_OPT -- OPTIMIZER = -O2 -+ OPTIMIZER = -O1 -march=pentium -mcpu=pentiumpro - endif - - OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wall -pipe - OS_LIBS = -lbe - - DEFINES += -DBEOS - - ifdef USE_PTHREADS -Index: mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in,v -retrieving revision 1.80.4.6 -diff -u -8 -p -r1.80.4.6 Makefile.in ---- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 19 Feb 2008 21:11:34 -0000 1.80.4.6 -+++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 19 Feb 2009 04:24:38 -0000 -@@ -94,16 +94,17 @@ CPPSRCS := xptcinvoke_ipf64.cpp xptcstu - ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s - endif - endif - # - # BeOS/Intel (uses the same unixish_x86 code) - # - ifeq ($(OS_ARCH)$(OS_TEST),BeOSBePC) - CPPSRCS := xptcinvoke_gcc_x86_unix.cpp xptcstubs_gcc_x86_unix.cpp -+CXXFLAGS += -O1 -march=pentium -mcpu=pentiumpro - endif - # - # Neutrino/Intel (uses the same unixish_x86 code) - # - ifeq ($(OS_TARGET),NTO) - ifeq ($(OS_TEST),x86) - CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp - endif -Index: mozilla/security/nss-fips/lib/freebl/mpi/target.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/lib/freebl/mpi/target.mk,v -retrieving revision 1.4.2.1 -diff -u -8 -p -r1.4.2.1 target.mk ---- mozilla/security/nss-fips/lib/freebl/mpi/target.mk 16 Mar 2006 16:37:28 -0000 1.4.2.1 -+++ mozilla/security/nss-fips/lib/freebl/mpi/target.mk 19 Feb 2009 04:29:59 -0000 -@@ -40,17 +40,18 @@ - ## - ## Define CFLAGS to contain any local options your compiler - ## setup requires. - ## - ## Conditional compilation options are no longer here; see - ## the file 'mpi-config.h' instead. - ## - MPICMN = -I. -DMP_API_COMPATIBLE -DMP_IOFUNC --CFLAGS= -O $(MPICMN) -+CFLAGS= -O1 -march=pentium -mcpu=pentiumpro -+#CFLAGS= -O $(MPICMN) - #CFLAGS=-ansi -fullwarn -woff 1521 -O3 $(MPICMN) - #CFLAGS=-ansi -pedantic -Wall -O3 $(MPICMN) - #CFLAGS=-ansi -pedantic -Wall -g -O2 -DMP_DEBUG=1 $(MPICMN) - - ifeq ($(TARGET),mipsIRIX) - #IRIX - #MPICMN += -DMP_MONT_USE_MP_MUL - MPICMN += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE -Index: mozilla/security/nss/lib/freebl/mpi/target.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/lib/freebl/mpi/target.mk,v -retrieving revision 1.4.2.1 -diff -u -8 -p -r1.4.2.1 target.mk ---- mozilla/security/nss/lib/freebl/mpi/target.mk 16 Mar 2006 16:37:28 -0000 1.4.2.1 -+++ mozilla/security/nss/lib/freebl/mpi/target.mk 19 Feb 2009 04:30:56 -0000 -@@ -40,17 +40,18 @@ - ## - ## Define CFLAGS to contain any local options your compiler - ## setup requires. - ## - ## Conditional compilation options are no longer here; see - ## the file 'mpi-config.h' instead. - ## - MPICMN = -I. -DMP_API_COMPATIBLE -DMP_IOFUNC --CFLAGS= -O $(MPICMN) -+CFLAGS= -O1 -march=pentium -mcpu=pentiumpro -+#CFLAGS= -O $(MPICMN) - #CFLAGS=-ansi -fullwarn -woff 1521 -O3 $(MPICMN) - #CFLAGS=-ansi -pedantic -Wall -O3 $(MPICMN) - #CFLAGS=-ansi -pedantic -Wall -g -O2 -DMP_DEBUG=1 $(MPICMN) - - ifeq ($(TARGET),mipsIRIX) - #IRIX - #MPICMN += -DMP_MONT_USE_MP_MUL - MPICMN += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE diff --git a/www-client/mozilla_firefox/old-patches/allO3.patch b/www-client/mozilla_firefox/old-patches/allO3.patch deleted file mode 100644 index 48763c761..000000000 --- a/www-client/mozilla_firefox/old-patches/allO3.patch +++ /dev/null @@ -1,204 +0,0 @@ -Index: mozilla/directory/c-sdk/config/BeOS.mk -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/config/BeOS.mk,v -retrieving revision 5.0.138.1 -diff -u -8 -p -r5.0.138.1 BeOS.mk ---- mozilla/directory/c-sdk/config/BeOS.mk 3 Feb 2006 14:41:11 -0000 5.0.138.1 -+++ mozilla/directory/c-sdk/config/BeOS.mk 19 Feb 2009 02:42:41 -0000 -@@ -64,17 +64,18 @@ ifeq (PC,$(findstring PC,$(OS_TEST))) - CPU_ARCH = x86 - CC = gcc - CCC = g++ - LD = gcc - RANLIB = ranlib - DSO_LDOPTS = -nostart - PORT_FLAGS = -DHAVE_STRERROR - ifdef BUILD_OPT --OPTIMIZER = -O2 -+#OPTIMIZER = -O2 -+OPTIMIZER = -O3 -march=pentium -mcpu=pentiumpro - LDFLAGS += -s - else - OPTIMIZER = -gdwarf-2 -O0 - endif - else - CPU_ARCH = ppc - CC = mwcc - CCC = mwcc -@@ -85,17 +86,18 @@ DSO_LDOPTS = -xms -export p - -term _term_routine_ \ - -lroot -lnet \ - /boot/develop/lib/ppc/glue-noinit.a \ - /boot/develop/lib/ppc/init_term_dyn.o \ - /boot/develop/lib/ppc/start_dyn.o - - PORT_FLAGS = -DHAVE_STRERROR -D_POSIX_SOURCE - ifdef BUILD_OPT --OPTIMIZER = -O2 -+#OPTIMIZER = -O2 -+OPTIMIZER = -O3 -march=pentium -mcpu=pentiumpro - else - OPTIMIZER = -g -O0 - endif - endif - CPU_ARCH_TAG = _$(CPU_ARCH) - - OS_INCLUDES = -I- -I. - #G++INCLUDES = -I/usr/include/g++ -Index: mozilla/directory/c-sdk/configure.in -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/configure.in,v -retrieving revision 5.0.2.34.4.3 -diff -u -8 -p -r5.0.2.34.4.3 configure.in ---- mozilla/directory/c-sdk/configure.in 11 Jul 2007 20:43:19 -0000 5.0.2.34.4.3 -+++ mozilla/directory/c-sdk/configure.in 19 Feb 2009 02:43:12 -0000 -@@ -819,17 +819,17 @@ case "$target" in - AC_DEFINE(_POSIX_SOURCE) - DSO_LDOPTS=-nostart - MDCPUCFG_H=_beos.cfg - USE_BTHREADS=1 - PR_MD_ARCH_DIR=beos - RESOLVE_LINK_SYMBOLS=1 - case "${target_cpu}" in - i*86) -- _OPTIMIZE_FLAGS=-O2 -+ _OPTIMIZE_FLAGS=-O3 -march=pentium -mcpu=pentiumpro - _DEBUG_FLAGS='-gdwarf-2 -O0' - MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@' - AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"]) - ;; - powerpc) - CC=mwcc - CCC=mwcc - LD=mwld -Index: mozilla/nsprpub/configure.in -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/configure.in,v -retrieving revision 1.199.2.17 -diff -u -8 -p -r1.199.2.17 configure.in ---- mozilla/nsprpub/configure.in 31 Oct 2007 18:07:38 -0000 1.199.2.17 -+++ mozilla/nsprpub/configure.in 19 Feb 2009 02:59:37 -0000 -@@ -874,17 +874,17 @@ case "$target" in - AC_DEFINE(_POSIX_SOURCE) - DSO_LDOPTS=-nostart - MDCPUCFG_H=_beos.cfg - USE_BTHREADS=1 - PR_MD_ARCH_DIR=beos - RESOLVE_LINK_SYMBOLS=1 - case "${target_cpu}" in - i*86) -- _OPTIMIZE_FLAGS=-O2 -+ _OPTIMIZE_FLAGS=-O3 -march=pentium -mcpu=pentiumpro - _DEBUG_FLAGS='-gdwarf-2 -O0' - MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@' - AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"]) - ;; - powerpc) - CC=mwcc - CCC=mwcc - LD=mwld -Index: mozilla/security/coreconf/BeOS.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/coreconf/BeOS.mk,v -retrieving revision 1.2 -diff -u -8 -p -r1.2 BeOS.mk ---- mozilla/security/coreconf/BeOS.mk 25 Apr 2004 15:02:17 -0000 1.2 -+++ mozilla/security/coreconf/BeOS.mk 19 Feb 2009 03:02:58 -0000 -@@ -56,17 +56,17 @@ ifeq ($(OS_TEST),ppc) - CPU_ARCH = ppc - else - OS_REL_CFLAGS = -Di386 - CPU_ARCH = x86 - endif - - MKSHLIB = $(CC) -nostart -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) - ifdef BUILD_OPT -- OPTIMIZER = -O2 -+ OPTIMIZER = -O3 -march=pentium -mcpu=pentiumpro - endif - - OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wall -pipe - OS_LIBS = -lbe - - DEFINES += -DBEOS - - ifdef USE_PTHREADS -Index: mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in,v -retrieving revision 1.80.4.6 -diff -u -8 -p -r1.80.4.6 Makefile.in ---- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 19 Feb 2008 21:11:34 -0000 1.80.4.6 -+++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 19 Feb 2009 04:24:38 -0000 -@@ -94,16 +94,17 @@ CPPSRCS := xptcinvoke_ipf64.cpp xptcstu - ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s - endif - endif - # - # BeOS/Intel (uses the same unixish_x86 code) - # - ifeq ($(OS_ARCH)$(OS_TEST),BeOSBePC) - CPPSRCS := xptcinvoke_gcc_x86_unix.cpp xptcstubs_gcc_x86_unix.cpp -+CXXFLAGS += -O3 -march=pentium -mcpu=pentiumpro - endif - # - # Neutrino/Intel (uses the same unixish_x86 code) - # - ifeq ($(OS_TARGET),NTO) - ifeq ($(OS_TEST),x86) - CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp - endif -Index: mozilla/security/nss-fips/lib/freebl/mpi/target.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/lib/freebl/mpi/target.mk,v -retrieving revision 1.4.2.1 -diff -u -8 -p -r1.4.2.1 target.mk ---- mozilla/security/nss-fips/lib/freebl/mpi/target.mk 16 Mar 2006 16:37:28 -0000 1.4.2.1 -+++ mozilla/security/nss-fips/lib/freebl/mpi/target.mk 19 Feb 2009 04:29:59 -0000 -@@ -40,17 +40,18 @@ - ## - ## Define CFLAGS to contain any local options your compiler - ## setup requires. - ## - ## Conditional compilation options are no longer here; see - ## the file 'mpi-config.h' instead. - ## - MPICMN = -I. -DMP_API_COMPATIBLE -DMP_IOFUNC --CFLAGS= -O $(MPICMN) -+CFLAGS= -O3 -march=pentium -mcpu=pentiumpro -+#CFLAGS= -O $(MPICMN) - #CFLAGS=-ansi -fullwarn -woff 1521 -O3 $(MPICMN) - #CFLAGS=-ansi -pedantic -Wall -O3 $(MPICMN) - #CFLAGS=-ansi -pedantic -Wall -g -O2 -DMP_DEBUG=1 $(MPICMN) - - ifeq ($(TARGET),mipsIRIX) - #IRIX - #MPICMN += -DMP_MONT_USE_MP_MUL - MPICMN += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE -Index: mozilla/security/nss/lib/freebl/mpi/target.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/lib/freebl/mpi/target.mk,v -retrieving revision 1.4.2.1 -diff -u -8 -p -r1.4.2.1 target.mk ---- mozilla/security/nss/lib/freebl/mpi/target.mk 16 Mar 2006 16:37:28 -0000 1.4.2.1 -+++ mozilla/security/nss/lib/freebl/mpi/target.mk 19 Feb 2009 04:30:56 -0000 -@@ -40,17 +40,18 @@ - ## - ## Define CFLAGS to contain any local options your compiler - ## setup requires. - ## - ## Conditional compilation options are no longer here; see - ## the file 'mpi-config.h' instead. - ## - MPICMN = -I. -DMP_API_COMPATIBLE -DMP_IOFUNC --CFLAGS= -O $(MPICMN) -+CFLAGS= -O3 -march=pentium -mcpu=pentiumpro -+#CFLAGS= -O $(MPICMN) - #CFLAGS=-ansi -fullwarn -woff 1521 -O3 $(MPICMN) - #CFLAGS=-ansi -pedantic -Wall -O3 $(MPICMN) - #CFLAGS=-ansi -pedantic -Wall -g -O2 -DMP_DEBUG=1 $(MPICMN) - - ifeq ($(TARGET),mipsIRIX) - #IRIX - #MPICMN += -DMP_MONT_USE_MP_MUL - MPICMN += -DMP_ASSEMBLY_MULTIPLY -DMP_ASSEMBLY_SQUARE diff --git a/www-client/mozilla_firefox/old-patches/configure-sunbird-nspr-reorder.diff b/www-client/mozilla_firefox/old-patches/configure-sunbird-nspr-reorder.diff deleted file mode 100644 index de1c4e017..000000000 --- a/www-client/mozilla_firefox/old-patches/configure-sunbird-nspr-reorder.diff +++ /dev/null @@ -1,17848 +0,0 @@ -? mozilla/browser/installer/beos -Index: mozilla/configure.in -=================================================================== -RCS file: /cvsroot/mozilla/configure.in,v -retrieving revision 1.1503.2.112 -diff -u -8 -p -r1.1503.2.112 configure.in ---- mozilla/configure.in 19 Oct 2008 16:14:06 -0000 1.1503.2.112 -+++ mozilla/configure.in 9 Feb 2009 04:00:37 -0000 -@@ -1333,17 +1333,17 @@ if test "$HAVE_64BIT_OS"; then - fi - AC_LANG_RESTORE - fi # COMPILE_ENVIRONMENT - - dnl ======================================================== - dnl System overrides of the defaults for host - dnl ======================================================== - case "$host" in --*-beos*) -+*-beos*|*-haiku*) - HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE -DNO_X11" - HOST_NSPR_MDCPUCFG='\"md/_beos.cfg\"' - HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" - ;; - - *cygwin*|*mingw*|*mks*|*msvc*|*wince) - if test -n "$_WIN32_MSVC"; then - HOST_AR=lib -@@ -1477,27 +1477,45 @@ case "$target" in - ;; - esac - if test "$COMPILE_ENVIRONMENT"; then - AC_CHECK_HEADERS(sys/inttypes.h) - fi - AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) - ;; - --*-beos*) -+*-beos*|*-haiku*) - no_x=yes -- MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@' - _PLATFORM_DEFAULT_TOOLKIT="beos" -+ TARGET_NSPR_MDCPUCFG='\"md/_beos.cfg\"' -+ TARGET_MD_ARCH=beos -+ -+ DSO_PIC_CFLAGS=-fPIC - DSO_LDOPTS='-nostart' -+ MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@' -+ MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@' - TK_LIBS='-lbe -lroot' - LIBS="$LIBS -lbe" -+ -+ _HAIKU_BUILD=0 -+ - if test "$COMPILE_ENVIRONMENT"; then -- AC_CHECK_LIB(bind,main,LIBS="$LIBS -lbind") -- AC_CHECK_LIB(zeta,main,LIBS="$LIBS -lzeta") -+ AC_CHECK_LIB(network,main,_HAIKU_BUILD=1) - fi -+ if test "$_HAIKU_BUILD" = 1; then -+ LIBS="$LIBS -lnetwork" -+ AC_DEFINE(XP_HAIKU) -+ AC_DEFINE(__BEOS__) -+ AC_DEFINE(BONE_VERSION) -+ else -+ AC_CHECK_LIB(bind,main,LIBS="$LIBS -lbind") -+ AC_CHECK_LIB(zeta,main,LIBS="$LIBS -lzeta") -+ AC_DEFINE(BEOS_ADDON_WORKAROUND) -+ fi -+ - _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-multichar" - _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-multichar" - _MOZ_USE_RTTI=1 - USE_DEPENDENT_LIBS= - MOZ_USER_DIR="Mozilla" - ;; - - *-bsdi*) -@@ -5235,17 +5253,17 @@ fi - - dnl Remove dupes - MOZ_EXTENSIONS=`${PERL} ${srcdir}/build/unix/uniq.pl ${MOZ_EXTENSIONS}` - - dnl ======================================================== - dnl Image decoders - dnl ======================================================== - case "$target_os" in --cygwin*|mingw*|msvc*|mks*|os2*|wince*|beos*) -+cygwin*|mingw*|msvc*|mks*|os2*|wince*|beos*|haiku*) - MOZ_IMG_DECODERS_DEFAULT="$MOZ_IMG_DECODERS_DEFAULT icon" - ;; - darwin*) - if test "$MOZ_WIDGET_TOOLKIT" = "mac" -o "$MOZ_WIDGET_TOOLKIT" = "cocoa"; - then - MOZ_IMG_DECODERS_DEFAULT="$MOZ_IMG_DECODERS_DEFAULT icon" - fi - ;; -@@ -5676,17 +5694,17 @@ MOZ_ARG_ENABLE_STRING(debug, - fi - else - MOZ_DEBUG= - fi ], - MOZ_DEBUG=) - - MOZ_DEBUG_ENABLE_DEFS="-DDEBUG -D_DEBUG" - case "${target_os}" in -- beos*) -+ beos*|haiku*) - MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_${USER}" - ;; - msvc*|mks*|cygwin*|mingw*|os2*|wince*) - MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`" - ;; - *) - MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_`$WHOAMI`" - ;; -@@ -6712,17 +6730,17 @@ mk_add_options MOZ_CO_MODULE=mozilla/oth - MOZ_LIBART_CFLAGS='-I${DIST}/include/libart_lgpl' - case "$target_os" in - msvc*|mks*|cygwin*|mingw*|wince*) - MOZ_LIBART_LIBS='$(DIST)/lib/$(LIB_PREFIX)moz_art_lgpl.$(IMPORT_LIB_SUFFIX)' - ;; - os2*) - MOZ_LIBART_LIBS='-lmoz_art -lm' - ;; -- beos*) -+ beos*|haiku*) - MOZ_LIBART_LIBS='-lmoz_art_lgpl -lroot -lbe' - ;; - *) - MOZ_LIBART_LIBS='-lmoz_art_lgpl -lm' - ;; - esac - AC_FUNC_ALLOCA - fi -@@ -7363,16 +7381,19 @@ fi # COMPILE_ENVIRONMENT - dnl Set various defines and substitutions - dnl ======================================================== - - if test "$OS_ARCH" = "OS2" -a "$VACPP" = "yes"; then - LIBS='so32dll.lib tcp32dll.lib' - elif test "$OS_ARCH" = "BeOS"; then - AC_DEFINE(XP_BEOS) - MOZ_MOVEMAIL=1 -+elif test "$OS_ARCH" = "Haiku"; then -+ AC_DEFINE(XP_BEOS) -+ MOZ_MOVEMAIL=1 - elif test "$OS_ARCH" = "Darwin"; then - AC_DEFINE(XP_UNIX) - AC_DEFINE(UNIX_ASYNC_DNS) - MOZ_MOVEMAIL=1 - elif test "$OS_ARCH" = "OpenVMS"; then - AC_DEFINE(XP_UNIX) - elif test "$OS_ARCH" != "WINNT" -a "$OS_ARCH" != "OS2" -a "$OS_ARCH" != "WINCE"; then - AC_DEFINE(XP_UNIX) -Index: mozilla/browser/app/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/browser/app/Makefile.in,v -retrieving revision 1.85.2.12 -diff -u -8 -p -r1.85.2.12 Makefile.in ---- mozilla/browser/app/Makefile.in 12 May 2008 18:25:50 -0000 1.85.2.12 -+++ mozilla/browser/app/Makefile.in 9 Feb 2009 04:00:40 -0000 -@@ -56,20 +56,24 @@ ifndef MOZ_BRANDING_DIRECTORY - PREF_JS_EXPORTS += $(srcdir)/firefox-branding.js - endif - - # hardcode en-US for the moment - AB_CD = en-US - - DEFINES += -DAB_CD=$(AB_CD) - --ifeq ($(USE_SHORT_LIBNAME), 1) -+ ifeq ($(USE_SHORT_LIBNAME), 1) -+ PROGRAM = firefox$(BIN_SUFFIX) -+ else -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - PROGRAM = firefox$(BIN_SUFFIX) - else --PROGRAM = firefox-bin$(BIN_SUFFIX) -+ PROGRAM = firefox-bin$(BIN_SUFFIX) -+ endif - endif - - REQUIRES = \ - xpcom \ - $(NULL) - - CPPSRCS = nsBrowserApp.cpp - -@@ -146,17 +150,17 @@ endif - ifdef BUILD_STATIC_LIBS - RCFLAGS += -DMOZ_STATIC_BUILD - endif - ifdef DEBUG - RCFLAGS += -DDEBUG - endif - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - BEOS_PROGRAM_RESOURCE = $(srcdir)/apprunner-beos.rsrc - ifdef BUILD_STATIC_LIBS - OS_LIBS += -ltracker -lgame - endif - endif - - ifeq ($(OS_ARCH),OS2) - RESFILE=splashos2.res -@@ -224,17 +228,17 @@ $(EXE_DEF_FILE): - @echo WinQueryProperty = PMMERGE.5450 >>$(EXE_DEF_FILE) - @echo WinRemoveProperty = PMMERGE.5451 >>$(EXE_DEF_FILE) - @echo WinSetProperty = PMMERGE.5452 >>$(EXE_DEF_FILE) - - LDFLAGS += -Zlinker /NOE - endif - endif - --ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH))) -+ifneq (,$(filter-out OS2 WINNT BeOS Haiku,$(OS_ARCH))) - - firefox:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk - cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \ - -e "s|%MOZ_USER_DIR%|.mozilla/firefox|" \ - -e "s|%MREDIR%|$(mredir)|" > $@ - chmod +x $@ - - libs:: firefox -Index: mozilla/browser/components/migration/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/browser/components/migration/src/Makefile.in,v -retrieving revision 1.20.2.2 -diff -u -8 -p -r1.20.2.2 Makefile.in ---- mozilla/browser/components/migration/src/Makefile.in 27 Jan 2006 02:19:00 -0000 1.20.2.2 -+++ mozilla/browser/components/migration/src/Makefile.in 9 Feb 2009 04:00:42 -0000 -@@ -73,20 +73,23 @@ endif - - CPPSRCS = nsProfileMigrator.cpp \ - nsBrowserProfileMigratorUtils.cpp \ - nsNetscapeProfileMigratorBase.cpp \ - nsSeamonkeyProfileMigrator.cpp \ - nsPhoenixProfileMigrator.cpp \ - $(NULL) - --ifneq ($(OS_ARCH),BeOS) -+ifneq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CPPSRCS += nsDogbertProfileMigrator.cpp - endif - -+ -+ -+ - ifneq ($(OS_ARCH),OS2) - CPPSRCS += nsOperaProfileMigrator.cpp - endif - - ifeq ($(OS_ARCH)_$(GNU_CXX),WINNT_) - DEFINES += -DPSTOREC_DLL=\"$(subst \,\\,$(WINDIR))\\system32\\pstorec.dll\" - - CPPSRCS += nsIEProfileMigrator.cpp \ -Index: mozilla/browser/installer/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/browser/installer/Makefile.in,v -retrieving revision 1.19.4.4 -diff -u -8 -p -r1.19.4.4 Makefile.in ---- mozilla/browser/installer/Makefile.in 6 Jun 2006 15:35:00 -0000 1.19.4.4 -+++ mozilla/browser/installer/Makefile.in 9 Feb 2009 04:00:44 -0000 -@@ -57,19 +57,23 @@ include $(topsrcdir)/config/rules.mk - - MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in - - ifdef BUILD_STATIC_LIBS - ifeq (WINNT,$(OS_ARCH)) - MOZ_PKG_MANIFEST_P = $(srcdir)/windows/packages-static - else - ifneq (,$(filter-out OS2 Darwin,$(OS_ARCH))) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+MOZ_PKG_MANIFEST_P = $(srcdir)/beos/packages-static -+else - MOZ_PKG_MANIFEST_P = $(srcdir)/unix/packages-static - endif - endif -+endif - else - $(error you need a "--enable-static --disable-shared" build to create an installer) - endif - - MOZ_NONLOCALIZED_PKG_LIST = \ - xpcom \ - browser \ - $(NULL) -Index: mozilla/build/autoconf/config.guess -=================================================================== -RCS file: /cvsroot/mozilla/build/autoconf/config.guess,v -retrieving revision 1.19 -diff -u -8 -p -r1.19 config.guess ---- mozilla/build/autoconf/config.guess 18 Apr 2003 10:20:15 -0000 1.19 -+++ mozilla/build/autoconf/config.guess 9 Feb 2009 04:00:51 -0000 -@@ -1,34 +1,37 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2008-01-08' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2 of the License, or - # (at your option) any later version. - # - # This program is distributed in the hope that it will be useful, but - # WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - # General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Originally written by Per Bothner . - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. - # - # This script attempts to guess a canonical system name similar to - # config.sub. If it succeeds, it prints the system name on stdout, and - # exits with 0. Otherwise, it exits with 1. - # -@@ -48,34 +51,34 @@ Operation modes: - -v, --version print version number, then exit - - Report bugs and patches to ." - - version="\ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - - help=" - Try \`$me --help' for more information." - - # Parse command line - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) -@@ -99,35 +102,36 @@ trap 'exit 1' 1 2 15 - # use `HOST_CC' if defined, but it is deprecated. - - # Portable tmp directory creation inspired by the Autoconf team. - - set_cc_for_build=' - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; -- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || -+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; - dummy=$tmp/dummy ; - tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; - case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; --esac ;' -+esac ; set_cc_for_build= ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. - # (ghazi@noc.rutgers.edu 1994-08-24) - if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH - fi - - UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -@@ -152,16 +156,17 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; -+ sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -@@ -190,60 +195,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" -- exit 0 ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- arc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- macppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvmeppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- pmax:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sgi:OpenBSD:*:*) -- echo mipseb-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- wgrisc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -+ exit ;; -+ *:ekkoBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -+ exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; -+ macppc:MirBSD:*:*) -+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; -+ *:MirBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; - alpha:OSF1:*:*) -- if test $UNAME_RELEASE = "V4.0"; then -+ case $UNAME_RELEASE in -+ *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` -- fi -+ ;; -+ *5.*) -+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -+ ;; -+ esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; -@@ -271,147 +258,163 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac -+ # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. -- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit 0 ;; -+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -+ exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix -- exit 0 ;; -+ exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 -- exit 0 ;; -+ exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 -- exit 0;; -+ exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos -- exit 0 ;; -+ exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos -- exit 0 ;; -+ exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition -- exit 0 ;; -+ exit ;; -+ *:z/VM:*:*) -+ echo s390-ibm-zvmoe -+ exit ;; -+ *:OS400:*:*) -+ echo powerpc-ibm-os400 -+ exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} -- exit 0;; -+ exit ;; -+ arm:riscos:*:*|arm:RISCOS:*:*) -+ echo arm-unknown-riscos -+ exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp -- exit 0;; -+ exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi -- exit 0 ;; -+ exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 -- exit 0 ;; -- DRS?6000:UNIX_SV:4.2*:7*) -+ exit ;; -+ DRS?6000:unix:4.0:6*) -+ echo sparc-icl-nx6 -+ exit ;; -+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in -- sparc) echo sparc-icl-nx7 && exit 0 ;; -+ sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -- i86pc:SunOS:5.*:*) -+ exit ;; -+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` -- exit 0 ;; -+ exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac -- exit 0 ;; -+ exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ m68k:machten:*:*) -+ echo m68k-apple-machten${UNAME_RELEASE} -+ exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 -- exit 0 ;; -+ exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __cplusplus - #include /* for printf() prototype */ - int main (int argc, char *argv[]) { - #else - int main (argc, argv) int argc; char *argv[]; { -@@ -425,145 +428,150 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c \ -- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && -+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && -+ SYSTEM_NAME=`$dummy $dummyarg` && -+ { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax -- exit 0 ;; -+ exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix -- exit 0 ;; -+ exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 -- exit 0 ;; -+ exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 -- exit 0 ;; -+ exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 -- exit 0 ;; -+ exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 -- exit 0 ;; -+ exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd -- exit 0 ;; -+ exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` -- exit 0 ;; -+ exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. -- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix -- exit 0 ;; -+ exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -- echo rs6000-ibm-aix3.2.5 -+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` -+ then -+ echo "$SYSTEM_NAME" -+ else -+ echo rs6000-ibm-aix3.2.5 -+ fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi -- exit 0 ;; -- *:AIX:*:[45]) -+ exit ;; -+ *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix -- exit 0 ;; -+ exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 -- exit 0 ;; -+ exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to -- exit 0 ;; # report: romp-ibm BSD 4.3 -+ exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx -- exit 0 ;; -+ exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 -- exit 0 ;; -+ exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd -- exit 0 ;; -+ exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 -- exit 0 ;; -+ exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` -@@ -615,31 +623,41 @@ EOF - } - EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then -- # avoid double evaluation of $set_cc_for_build -- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build -- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null -+ eval $set_cc_for_build -+ -+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating -+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler -+ # generating 64-bit code. GNU and HP use different nomenclature: -+ # -+ # $ CC_FOR_BUILD=cc ./config.guess -+ # => hppa2.0w-hp-hpux11.23 -+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess -+ # => hppa64-hp-hpux11.23 -+ -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); -@@ -657,181 +675,224 @@ EOF - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 -- exit 0 ;; -+ exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd -- exit 0 ;; -+ exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd -- exit 0 ;; -+ exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix -- exit 0 ;; -+ exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf -- exit 0 ;; -+ exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf -- exit 0 ;; -+ exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi -- exit 0 ;; -+ exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites -- exit 0 ;; -+ exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - *:UNICOS/mp:*:*) -- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; -+ 5000:UNIX_System_V:4.*:*) -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:FreeBSD:*:*) -- # Determine whether the default compiler uses glibc. -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #if __GLIBC__ >= 2 -- LIBC=gnu -- #else -- LIBC= -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} -- exit 0 ;; -+ case ${UNAME_MACHINE} in -+ pc98) -+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ esac -+ exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -- exit 0 ;; -- i*:MINGW*:*) -+ exit ;; -+ *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 -- exit 0 ;; --#### MozillaHack --# Netscape's hacked uname -- xx:WINNT:* | xx:WIN95:*) -- echo i586-pc-msvc -- exit 0 ;; --### End MozillaHack -+ exit ;; -+ i*:windows32*:*) -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 -+ exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 -- exit 0 ;; -- x86:Interix*:3*) -- echo i586-pc-interix3 -- exit 0 ;; -+ exit ;; -+ *:Interix*:[3456]*) -+ case ${UNAME_MACHINE} in -+ x86) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ EM64T | authenticamd) -+ echo x86_64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks -- exit 0 ;; -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix -- exit 0 ;; -+ exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin -- exit 0 ;; -+ exit ;; -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) -+ echo x86_64-unknown-cygwin -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin -- exit 0 ;; -+ exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - *:GNU:*:*) -+ # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -- exit 0 ;; -+ exit ;; -+ *:GNU/*:*:*) -+ # other systems with GNU libc and userland -+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -+ exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix -- exit 0 ;; -+ exit ;; - arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ fi -+ exit ;; -+ avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ cris:Linux:*:*) -+ echo cris-axis-linux-gnu -+ exit ;; -+ crisv32:Linux:*:*) -+ echo crisv32-axis-linux-gnu -+ exit ;; -+ frv:Linux:*:*) -+ echo frv-unknown-linux-gnu -+ exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ m32r*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -@@ -839,62 +900,78 @@ EOF - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -+ or32:Linux:*:*) -+ echo or32-unknown-linux-gnu -+ exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -- exit 0 ;; -+ exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac -- exit 0 ;; -+ exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux -- exit 0 ;; -+ exit ;; -+ sh64*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g -@@ -902,99 +979,113 @@ EOF - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit 0 ;; -+ exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit 0 ;; -+ exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit 0 ;; -+ exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else -- #ifdef __INTEL_COMPILER -+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif -+ #ifdef __dietlibc__ -+ LIBC=dietlibc -+ #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^LIBC/{ -+ s: ::g -+ p -+ }'`" -+ test x"${LIBC}" != x && { -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ exit -+ } -+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 -- exit 0 ;; -+ exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx -- exit 0 ;; -+ exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop -- exit 0 ;; -+ exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos -- exit 0 ;; -+ exit ;; -+ i*86:syllable:*:*) -+ echo ${UNAME_MACHINE}-pc-syllable -+ exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi -- exit 0 ;; -- i*86:*:5:[78]*) -+ exit ;; -+ i*86:*:5:[678]*) -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ -@@ -1002,214 +1093,248 @@ EOF - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi -- exit 0 ;; -+ exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 -- exit 0 ;; -+ exit ;; - paragon:*:*:*) - echo i860-intel-osf1 -- exit 0 ;; -+ exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi -- exit 0 ;; -+ exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv -- exit 0 ;; -+ exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv -- exit 0 ;; -+ exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix -- exit 0 ;; -- M68*:*:R3V[567]*:*) -- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) -+ exit ;; -+ M68*:*:R3V[5678]*:*) -+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; -+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4 && exit 0 ;; -+ && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 -- exit 0 ;; -+ exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi -- exit 0 ;; -+ exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 -- exit 0 ;; --#### MozillaHack -- *:*OpenVMS*:*:*) -- case "${UNAME_SYSTEM}" in -- POSIX_for_OpenVMS_AXP) echo alpha-dec-openvmsposix ;; -- POSIX_for_OpenVMS_VAX) echo vax-dec-openvmsposix ;; -- OpenVMS) echo alpha-dec-openvms ;; -- *) echo unknown-dec-openvms ;; -- esac -- exit 0 ;; --#### End MozillaHack -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 -- exit 0 ;; -+ exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 -- exit 0 ;; -+ exit ;; -+ i*86:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo ${UNAME_MACHINE}-stratus-vos -+ exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos -- exit 0 ;; -+ exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 -- exit 0 ;; -+ exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos -- exit 0 ;; -+ exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos -- exit 0 ;; -+ exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos -- exit 0 ;; -+ exit ;; -+ BeMac:Haiku:*:*) -+ echo powerpc-apple-haiku -+ exit ;; -+ BePC:Haiku:*:*) -+ echo i586-pc-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ SX-7:SUPER-UX:*:*) -+ echo sx7-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8:SUPER-UX:*:*) -+ echo sx8-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8R:SUPER-UX:*:*) -+ echo sx8r-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Darwin:*:*) -- case `uname -p` in -- *86) UNAME_PROCESSOR=i686 ;; -- powerpc) UNAME_PROCESSOR=powerpc ;; -+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -+ case $UNAME_PROCESSOR in -+ unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:QNX:*:4*) - echo i386-pc-qnx -- exit 0 ;; -- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) -+ exit ;; -+ NSE-?:NONSTOP_KERNEL:*:*) -+ echo nse-tandem-nsk${UNAME_RELEASE} -+ exit ;; -+ NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux -- exit 0 ;; -+ exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv -- exit 0 ;; -+ exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 -- exit 0 ;; -+ exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 -- exit 0 ;; -+ exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex -- exit 0 ;; -+ exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 -- exit 0 ;; -+ exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 -- exit 0 ;; -+ exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 -- exit 0 ;; -+ exit ;; - *:ITS:*:*) - echo pdp10-unknown-its -- exit 0 ;; -+ exit ;; -+ SEI:*:*:SEIUX) -+ echo mips-sei-seiux${UNAME_RELEASE} -+ exit ;; -+ *:DragonFly:*:*) -+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ exit ;; -+ *:*VMS:*:*) -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ case "${UNAME_MACHINE}" in -+ A*) echo alpha-dec-vms ; exit ;; -+ I*) echo ia64-dec-vms ; exit ;; -+ V*) echo vax-dec-vms ; exit ;; -+ esac ;; -+ *:XENIX:*:SysV) -+ echo i386-pc-xenix -+ exit ;; -+ i*86:skyos:*:*) -+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' -+ exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 - #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - - eval $set_cc_for_build - cat >$dummy.c </dev/null && $dummy && exit 0 -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - - # Apollos put the system type in the environment. - --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } -+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - - # Convex versions that predate uname can use getsysinfo(1) - - if [ -x /usr/convex/getsysinfo ] - then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - c34*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - c38*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - c4*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - esac - fi - - cat >&2 < in order to provide the needed - information to handle your system. - - config.guess timestamp = $timestamp - -Index: mozilla/build/autoconf/config.sub -=================================================================== -RCS file: /cvsroot/mozilla/build/autoconf/config.sub,v -retrieving revision 1.20 -diff -u -8 -p -r1.20 config.sub ---- mozilla/build/autoconf/config.sub 18 Apr 2003 10:20:15 -0000 1.20 -+++ mozilla/build/autoconf/config.sub 9 Feb 2009 04:00:53 -0000 -@@ -1,14 +1,15 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2008-01-16' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software - # can handle that machine. It does not imply ALL GNU software can. - # - # This file is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2 of the License, or -@@ -16,24 +17,25 @@ timestamp='2003-02-22' - # - # This program is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, --# Boston, MA 02111-1307, USA. -- -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. -+# - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. - # If it is invalid, we print an error message on stderr and exit with code 1. - # Otherwise, we print the canonical config type on stdout and succeed. - -@@ -65,46 +67,46 @@ Operation modes: - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - - Report bugs and patches to ." - - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - - help=" - Try \`$me --help' for more information." - - # Parse command line - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 -- exit 0;; -+ exit ;; - - * ) - break ;; - esac - done - - case $# in - 0) echo "$me: missing argument$help" >&2 -@@ -113,17 +115,19 @@ case $# in - *) echo "$me: too many arguments$help" >&2 - exit 1;; - esac - - # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi -@@ -139,17 +143,17 @@ case $os in - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis) -+ -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) -@@ -164,32 +168,40 @@ case $os in - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) -@@ -219,171 +231,196 @@ case $os in - os=-mint - ;; - esac - - # Decode aliases for certain CPU-COMPANY combinations. - case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. --#### MozillaHack --# mips*el --#### End MozillaHack - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -- | clipper \ -+ | am33_2.0 \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -+ | bfin \ -+ | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | fr30 | frv \ -+ | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ -- | ip2k \ -- | m32r | m68000 | m68k | m88k | mcore \ -- | mips | mipsbe | mipseb | mips*el | mipsle \ -+ | ip2k | iq2000 \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | mcore | mep \ -+ | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -+ | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ -+ | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -+ | mt \ - | msp430 \ -+ | nios | nios2 \ - | ns16k | ns32k \ -- | openrisc | or32 \ -+ | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | score \ -+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ -- | strongarm \ -- | tahoe | thumb | tic80 | tron \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu | strongarm \ -+ | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ -- | x86 | xscale | xstormy16 | xtensa \ -+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. --#### MozillaHack --# mips*el --#### End MozillaHack - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* \ -- | bs2000-* \ -+ | avr-* | avr32-* \ -+ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ -- | clipper-* | cydra-* \ -+ | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ -+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ -- | ip2k-* \ -- | m32r-* \ -+ | ip2k-* | iq2000-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | mcore-* \ -- | mips-* | mipsbe-* | mipseb-* | mips*el-* | mipsle-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* \ -+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -+ | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ -+ | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ -+ | mmix-* \ -+ | mt-* \ - | msp430-* \ -- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ -+ | nios-* | nios2-* \ -+ | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ -+ | sparclite-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ -- | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-*) - ;; -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown -+ ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; -+ abacus) -+ basic_machine=abacus-unknown -+ ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; -+ amd64) -+ basic_machine=x86_64-pc -+ ;; -+ amd64-*) -+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) -@@ -405,16 +442,24 @@ case $basic_machine in - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; -@@ -433,22 +478,37 @@ case $basic_machine in - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; -+ craynv) -+ basic_machine=craynv-cray -+ os=-unicosmp -+ ;; -+ cr16) -+ basic_machine=cr16-unknown -+ os=-elf -+ ;; - crds | unos) - basic_machine=m68k-crds - ;; -+ crisv32 | crisv32-* | etraxfs*) -+ basic_machine=crisv32-axis -+ ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; -+ crx) -+ basic_machine=crx-unknown -+ os=-elf -+ ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec -@@ -461,16 +521,20 @@ case $basic_machine in - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ djgpp) -+ basic_machine=i586-pc -+ os=-msdosdjgpp -+ ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; -@@ -611,66 +675,71 @@ case $basic_machine in - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; --#### MozillaHack -- i386-msvc | msvc) -- basic_machine=i386-pc -- os=-msvc -+ mingw32ce) -+ basic_machine=arm-unknown -+ os=-mingw32ce - ;; --#### End MozillaHack - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; -- mmix*) -- basic_machine=mmix-knuth -- os=-mmixware -- ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; -@@ -729,30 +798,29 @@ case $basic_machine in - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; -- nv1) -- basic_machine=nv1-cray -- os=-unicosmp -- ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; -- or32 | or32-*) -+ openrisc | openrisc-*) - basic_machine=or32-unknown -- os=-coff -+ ;; -+ os400) -+ basic_machine=powerpc-ibm -+ os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k -@@ -760,43 +828,63 @@ case $basic_machine in - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; -- pentiumii | pentium2) -+ pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; -+ pentium4) -+ basic_machine=i786-pc -+ ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -- pentiumii-* | pentium2-*) -+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -+ pentium4-*) -+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` -@@ -819,16 +907,20 @@ case $basic_machine in - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) -@@ -845,23 +937,37 @@ case $basic_machine in - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; -+ sde) -+ basic_machine=mipsisa32-sde -+ os=-elf -+ ;; -+ sei) -+ basic_machine=mips-sei -+ os=-seiux -+ ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; -+ sh5el) -+ basic_machine=sh5le-unknown -+ ;; -+ sh64) -+ basic_machine=sh64-unknown -+ ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; -@@ -926,45 +1032,49 @@ case $basic_machine in - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; -- tic4x | c4x*) -- basic_machine=tic4x-unknown -- os=-coff -- ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; -+ tile*) -+ basic_machine=tile-unknown -+ os=-linux-gnu -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; -+ tpf) -+ basic_machine=s390x-ibm -+ os=-tpf -+ ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; -@@ -998,16 +1108,20 @@ case $basic_machine in - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; -+ xbox) -+ basic_machine=i686-pc -+ os=-mingw32 -+ ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) -@@ -1028,39 +1142,39 @@ case $basic_machine in - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; -+ mmix) -+ basic_machine=mmix-knuth -+ ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparc | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; -@@ -1116,40 +1230,40 @@ case $os in - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. --#### MozillaHack --# msvc --#### End MozillaHack - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ -- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -openbsd* | -solidbsd* \ -+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ -+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ -- | -msvc* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -- | -powermax* | -dnix*) -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os -@@ -1157,34 +1271,40 @@ case $os in - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; -+ -linux-dietlibc) -+ os=-linux-dietlibc -+ ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; -+ -os400*) -+ os=-os400 -+ ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf -@@ -1196,16 +1316,19 @@ case $os in - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; -+ -syllable*) -+ os=-syllable -+ ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova -@@ -1218,16 +1341,19 @@ case $os in - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; -+ -tpf*) -+ os=-tpf -+ ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 -@@ -1254,16 +1380,19 @@ case $os in - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; -+ -zvmoe) -+ os=-zvmoe -+ ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -@@ -1276,25 +1405,34 @@ else - - # Note that if you're going to try to match "-MANUFACTURER" here (say, - # "-sun"), then you have to tell the case statement up towards the top - # that MANUFACTURER isn't an operating system. Otherwise, code above - # will signal an error saying that MANUFACTURER isn't an operating - # system, and we'll never get to this point. - - case $basic_machine in -+ score-*) -+ os=-elf -+ ;; -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) -@@ -1310,16 +1448,19 @@ case $basic_machine in - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; -+ mep-*) -+ os=-elf -+ ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff -@@ -1328,19 +1469,25 @@ case $basic_machine in - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; -+ *-haiku) -+ os=-haiku -+ ;; - *-ibm) - os=-aix - ;; -+ *-knuth) -+ os=-mmixware -+ ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf -@@ -1463,19 +1610,25 @@ case $basic_machine in - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; -+ -os400*) -+ vendor=ibm -+ ;; - -ptx*) - vendor=sequent - ;; -+ -tpf*) -+ vendor=ibm -+ ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi -@@ -1490,16 +1643,16 @@ case $basic_machine in - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; - esac - - echo $basic_machine$os --exit 0 -+exit - - # Local variables: - # eval: (add-hook 'write-file-hooks 'time-stamp) - # time-stamp-start: "timestamp='" - # time-stamp-format: "%:y-%02m-%02d" - # time-stamp-end: "'" - # End: -Index: mozilla/calendar/base/content/preferences/preferences.xul -=================================================================== -RCS file: /cvsroot/mozilla/calendar/base/content/preferences/preferences.xul,v -retrieving revision 1.1.2.6 -diff -u -8 -p -r1.1.2.6 preferences.xul ---- mozilla/calendar/base/content/preferences/preferences.xul 14 Mar 2007 09:08:19 -0000 1.1.2.6 -+++ mozilla/calendar/base/content/preferences/preferences.xul 9 Feb 2009 04:00:56 -0000 -@@ -66,17 +66,22 @@ - #ifdef XP_UNIX - #ifdef XP_MACOSX - style="&prefWindow.styleMac;"> - #else - title="&prefWindow.titleGNOME;" - style="&prefWindow.styleGNOME;"> - #endif - #endif -+#ifdef XP_BEOS -+ title="&prefWindow.titleGNOME;" -+ style="&prefWindow.styleGNOME;"> - #endif -+#endif -+ - - - - - -Index: mozilla/calendar/libical/src/libical/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/calendar/libical/src/libical/Makefile.in,v -retrieving revision 1.3.6.1 -diff -u -8 -p -r1.3.6.1 Makefile.in ---- mozilla/calendar/libical/src/libical/Makefile.in 27 Dec 2007 10:03:57 -0000 1.3.6.1 -+++ mozilla/calendar/libical/src/libical/Makefile.in 9 Feb 2009 04:00:58 -0000 -@@ -84,17 +84,17 @@ CSRCS = \ - $(NULL) - - ifeq (,$(filter -DHAVE_SNPRINTF=1,$(ACDEFINES))) - CSRCS += vsnprintf.c - endif - - DEFINES += -DHAVE_CONFIG_H - --ifneq (,$(filter BeOS Darwin OpenVMS NetBSD FreeBSD,$(OS_ARCH))) -+ifneq (,$(filter BeOS Haiku Darwin OpenVMS NetBSD FreeBSD,$(OS_ARCH))) - DEFINES += -D__USE_BSD=1 - endif - - LOCAL_INCLUDES = -I$(srcdir)/../.. -I$(srcdir) -I. - - SRCS_IN_OBJDIR = 1 - - include $(topsrcdir)/config/rules.mk -Index: mozilla/calendar/sunbird/app/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/calendar/sunbird/app/Makefile.in,v -retrieving revision 1.21.2.23 -diff -u -8 -p -r1.21.2.23 Makefile.in ---- mozilla/calendar/sunbird/app/Makefile.in 4 May 2008 01:32:07 -0000 1.21.2.23 -+++ mozilla/calendar/sunbird/app/Makefile.in 9 Feb 2009 04:01:06 -0000 -@@ -79,18 +79,22 @@ include $(topsrcdir)/config/rules.mk - else - # Build a binary bootstrapping with XRE_main - - MOZILLA_INTERNAL_API = 1 - - ifeq ($(USE_SHORT_LIBNAME), 1) - PROGRAM = sunbird$(BIN_SUFFIX) - else -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+PROGRAM = sunbird$(BIN_SUFFIX) -+else - PROGRAM = sunbird-bin$(BIN_SUFFIX) - endif -+endif - - REQUIRES = \ - appshell \ - string \ - xpcom \ - xulapp \ - $(NULL) - -@@ -189,17 +193,17 @@ endif - ifdef BUILD_STATIC_LIBS - RCFLAGS += -DMOZ_STATIC_BUILD - endif - ifdef DEBUG - RCFLAGS += -DDEBUG - endif - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - ifdef BUILD_STATIC_LIBS - OS_LIBS += -ltracker -lgame - endif - endif - - ifeq ($(OS_ARCH),OS2) - RESFILE=splashos2.res - RCFLAGS += -DMOZ_SUNBIRD -@@ -261,17 +265,17 @@ $(EXE_DEF_FILE): - @echo WinQueryProperty = PMMERGE.5450 >>$(EXE_DEF_FILE) - @echo WinRemoveProperty = PMMERGE.5451 >>$(EXE_DEF_FILE) - @echo WinSetProperty = PMMERGE.5452 >>$(EXE_DEF_FILE) - - LDFLAGS += -Zlinker /NOE - endif - endif - --ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH))) -+ifneq (,$(filter-out OS2 WINNT BeOS Haiku,$(OS_ARCH))) - - sunbird:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk - cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \ - -e "s|%MOZ_USER_DIR%|.mozilla/sunbird|" \ - -e "s|%MREDIR%|$(mredir)|" > $@ - chmod +x $@ - - libs:: sunbird -Index: mozilla/config/config.mk -=================================================================== -RCS file: /cvsroot/mozilla/config/config.mk,v -retrieving revision 3.337.2.12 -diff -u -8 -p -r3.337.2.12 config.mk ---- mozilla/config/config.mk 23 Nov 2007 21:12:26 -0000 3.337.2.12 -+++ mozilla/config/config.mk 9 Feb 2009 04:01:20 -0000 -@@ -105,19 +105,16 @@ AUTOCONF_TOOLS = $(topsrcdir)/build/auto - - ifeq ($(OS_ARCH),QNX) - ifeq ($(OS_TARGET),NTO) - LD := qcc -Vgcc_ntox86 -nostdlib - else - LD := $(CC) - endif - endif --ifeq ($(OS_ARCH),BeOS) --BEOS_ADDON_WORKAROUND = 1 --endif - - # - # Strip off the excessively long version numbers on these platforms, - # 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))) - OS_RELEASE := $(basename $(OS_RELEASE)) -Index: mozilla/config/rules.mk -=================================================================== -RCS file: /cvsroot/mozilla/config/rules.mk,v -retrieving revision 3.487.2.9 -diff -u -8 -p -r3.487.2.9 rules.mk ---- mozilla/config/rules.mk 18 Dec 2007 21:33:08 -0000 3.487.2.9 -+++ mozilla/config/rules.mk 9 Feb 2009 04:01:24 -0000 -@@ -512,17 +512,17 @@ ifeq ($(OS_ARCH),Linux) - ifdef IS_COMPONENT - EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic - endif - endif - - # - # BeOS: add -Bsymbolic flag for components - # --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter BeOS Haiku,$(OS_ARCH))) - ifdef IS_COMPONENT - EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic - endif - endif - - # - # MINGW32 - # -@@ -672,19 +672,23 @@ ifdef BEOS_ADDON_WORKAROUND - ( cd $(FINAL_TARGET)/components && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) ) - endif - else # ! IS_COMPONENT - ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH))) - $(INSTALL) $(IFLAGS2) $(IMPORT_LIBRARY) $(DIST)/lib - else - $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(DIST)/lib - endif -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)/lib -+else - $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET) -+endif - ifdef BEOS_ADDON_WORKAROUND -- ( cd $(FINAL_TARGET) && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) ) -+ ( cd $(FINAL_TARGET)/lib && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) ) - endif - endif # IS_COMPONENT - endif # SHARED_LIBRARY - ifdef PROGRAM - $(INSTALL) $(IFLAGS2) $(PROGRAM) $(FINAL_TARGET) - endif - ifdef SIMPLE_PROGRAMS - $(INSTALL) $(IFLAGS2) $(SIMPLE_PROGRAMS) $(FINAL_TARGET) -@@ -822,17 +826,17 @@ endif # OS2 - endif # WINCE - - ifdef ENABLE_STRIP - $(STRIP) $@ - endif - ifdef MOZ_POST_PROGRAM_COMMAND - $(MOZ_POST_PROGRAM_COMMAND) $@ - endif --ifeq ($(OS_ARCH),BeOS) -+ifneq (,$(filter BeOS Haiku,$(OS_ARCH))) - ifdef BEOS_PROGRAM_RESOURCE - xres -o $@ $(BEOS_PROGRAM_RESOURCE) - mimeset $@ - endif - endif # BeOS - - $(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) Makefile Makefile.in - ifeq ($(MOZ_OS2_TOOLS),VACPP) -Index: mozilla/directory/c-sdk/build.mk -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/build.mk,v -retrieving revision 5.0.2.15.4.1 -diff -u -8 -p -r5.0.2.15.4.1 build.mk ---- mozilla/directory/c-sdk/build.mk 3 Feb 2006 14:44:29 -0000 5.0.2.15.4.1 -+++ mozilla/directory/c-sdk/build.mk 9 Feb 2009 04:01:33 -0000 -@@ -437,17 +437,17 @@ endif #!os2 - - ifeq ($(OS_ARCH), OSF1) - # The linker on OSF/1 gets confused if it finds an so_locations file - # that doesn't meet its expectations, so we arrange to remove it before - # linking. - SO_FILES_TO_REMOVE=so_locations - endif - --ifneq (,$(filter BeOS Darwin NetBSD,$(OS_ARCH))) -+ifneq (,$(filter BeOS Haiku Darwin NetBSD,$(OS_ARCH))) - LINK_DLL = $(MKSHLIB) $(OBJS) - endif - - ifeq ($(OS_ARCH), HP-UX) - # On HPUX, we need a couple of changes: - # 1) Use the C++ compiler for linking, which will pass the +eh flag on down to the - # linker so the correct exception-handling-aware libC gets used (libnshttpd.sl - # needs this). -Index: mozilla/directory/c-sdk/configure.in -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/configure.in,v -retrieving revision 5.0.2.34.4.3 -diff -u -8 -p -r5.0.2.34.4.3 configure.in ---- mozilla/directory/c-sdk/configure.in 11 Jul 2007 20:43:19 -0000 5.0.2.34.4.3 -+++ mozilla/directory/c-sdk/configure.in 9 Feb 2009 04:01:39 -0000 -@@ -355,17 +355,17 @@ fi - if test -z "$SKIP_PATH_CHECKS"; then - AC_PATH_PROG(WHOAMI, $WHOAMI whoami, echo not_whoami) - fi - - if test -n "$MOZ_DEBUG"; then - AC_DEFINE(DEBUG) - DEFINES="$DEFINES -UNDEBUG" - case "${target_os}" in -- beos*) -+ beos*|haiku*) - DEFINES="$DEFINES -DDEBUG_${USER}" - ;; - msvc*|mks*|cygwin*|mingw*|os2*) - DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`" - ;; - *) - DEFINES="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_`$WHOAMI`" - ;; -@@ -728,17 +728,17 @@ case "$host" in - *-cygwin*|*-msvc*|*-mks*) - CYGWIN_WRAPPER='sh $(topsrcdir)/config/cygwin-wrapper' - NSINSTALL='$(CYGWIN_WRAPPER) nsinstall' - if test "`${PERL} -v | grep -c cygwin 2>/dev/null`" = 0; then - PERL='$(CYGWIN_WRAPPER) perl' - fi - WIN_TOP_SRC=`cygpath -a -w $srcdir | sed -e 's|\\\\|/|g'` - ;; --*-beos*) -+*-beos*|*-haiku*) - HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE" - ;; - *os2*) - ;; - *) - HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" - ;; - esac -@@ -807,34 +807,52 @@ case "$target" in - else - MDCPUCFG_H=_aix32.cfg - fi - fi - PR_MD_CSRCS=aix.c - RESOLVE_LINK_SYMBOLS=1 - ;; - --*-beos*) -+*-beos*|*-haiku*) - AC_DEFINE(XP_BEOS) - AC_DEFINE(BeOS) - AC_DEFINE(BEOS) - AC_DEFINE(_POSIX_SOURCE) -+ DSO_CFLAGS=-fPIC - DSO_LDOPTS=-nostart -+ - MDCPUCFG_H=_beos.cfg - USE_BTHREADS=1 - PR_MD_ARCH_DIR=beos - RESOLVE_LINK_SYMBOLS=1 -+ -+ _HAIKU_BUILD=0 -+ AC_CHECK_LIB(network,main,_HAIKU_BUILD=1) -+ if test "$_HAIKU_BUILD" = 1; then -+ OS_LIBS="$OS_LIBS -lnetwork" -+ AC_DEFINE(XP_HAIKU) -+ AC_DEFINE(BONE_VERSION) -+ else -+ AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"]) -+ fi -+ -+ -+ - case "${target_cpu}" in - i*86) -- _OPTIMIZE_FLAGS=-O2 -- _DEBUG_FLAGS='-gdwarf-2 -O0' -+ AC_DEFINE(i586) -+ CPU_ARCH=i586 -+ _OPTIMIZE_FLAGS=-O3 -+ _DEBUG_FLAGS='-gdwarf-2 -O0 -fno-inline' - MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@' -- AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"]) - ;; - powerpc) -+ AC_DEFINE(ppc) -+ CPU_ARCH=ppc - CC=mwcc - CCC=mwcc - LD=mwld - DSO_LDOPTS='-xms -export pragma -init _init_routine_ -term _term_routine_ -lroot -lnet /boot/develop/lib/ppc/glue-noinit.a /boot/develop/lib/ppc/init_term_dyn.o /boot/develop/lib/ppc/start_dyn.o' - _OPTIMIZE_FLAGS=-O2 - _DEBUG_FLAGS='-g -O0' - ;; - esac -@@ -2090,17 +2108,17 @@ AC_ARG_ENABLE(nspr-threads, - [ --enable-nspr-threads Build using classic nspr threads], - [ if test "$enableval" = "yes"; then - USE_PTHREADS= - USE_USER_PTHREADS= - USE_NSPR_THREADS=1 - fi]) - - case "$target" in --*-beos*) -+*-beos*|*-haiku*) - AC_ARG_WITH(bthreads, - [ --with-bthreads Use system bthreads library as thread subsystem (BeOS only)], - [ if test "$withval" = "yes"; then - USE_BTHREADS=1 - USE_USER_PTHREADS= - USE_PTHREADS= - fi]) - ;; -Index: mozilla/directory/c-sdk/config/autoconf/config.guess -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/config/autoconf/config.guess,v -retrieving revision 5.0.2.2 -diff -u -8 -p -r5.0.2.2 config.guess ---- mozilla/directory/c-sdk/config/autoconf/config.guess 18 Apr 2003 10:20:22 -0000 5.0.2.2 -+++ mozilla/directory/c-sdk/config/autoconf/config.guess 9 Feb 2009 04:01:43 -0000 -@@ -1,34 +1,37 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2008-01-08' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2 of the License, or - # (at your option) any later version. - # - # This program is distributed in the hope that it will be useful, but - # WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - # General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Originally written by Per Bothner . - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. - # - # This script attempts to guess a canonical system name similar to - # config.sub. If it succeeds, it prints the system name on stdout, and - # exits with 0. Otherwise, it exits with 1. - # -@@ -48,34 +51,34 @@ Operation modes: - -v, --version print version number, then exit - - Report bugs and patches to ." - - version="\ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - - help=" - Try \`$me --help' for more information." - - # Parse command line - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) -@@ -99,35 +102,36 @@ trap 'exit 1' 1 2 15 - # use `HOST_CC' if defined, but it is deprecated. - - # Portable tmp directory creation inspired by the Autoconf team. - - set_cc_for_build=' - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; -- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || -+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; - dummy=$tmp/dummy ; - tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; - case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; --esac ;' -+esac ; set_cc_for_build= ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. - # (ghazi@noc.rutgers.edu 1994-08-24) - if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH - fi - - UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -@@ -152,16 +156,17 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; -+ sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -@@ -190,60 +195,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" -- exit 0 ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- arc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- macppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvmeppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- pmax:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sgi:OpenBSD:*:*) -- echo mipseb-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- wgrisc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -+ exit ;; -+ *:ekkoBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -+ exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; -+ macppc:MirBSD:*:*) -+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; -+ *:MirBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; - alpha:OSF1:*:*) -- if test $UNAME_RELEASE = "V4.0"; then -+ case $UNAME_RELEASE in -+ *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` -- fi -+ ;; -+ *5.*) -+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -+ ;; -+ esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; -@@ -271,147 +258,163 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac -+ # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. -- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit 0 ;; -+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -+ exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix -- exit 0 ;; -+ exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 -- exit 0 ;; -+ exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 -- exit 0;; -+ exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos -- exit 0 ;; -+ exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos -- exit 0 ;; -+ exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition -- exit 0 ;; -+ exit ;; -+ *:z/VM:*:*) -+ echo s390-ibm-zvmoe -+ exit ;; -+ *:OS400:*:*) -+ echo powerpc-ibm-os400 -+ exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} -- exit 0;; -+ exit ;; -+ arm:riscos:*:*|arm:RISCOS:*:*) -+ echo arm-unknown-riscos -+ exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp -- exit 0;; -+ exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi -- exit 0 ;; -+ exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 -- exit 0 ;; -- DRS?6000:UNIX_SV:4.2*:7*) -+ exit ;; -+ DRS?6000:unix:4.0:6*) -+ echo sparc-icl-nx6 -+ exit ;; -+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in -- sparc) echo sparc-icl-nx7 && exit 0 ;; -+ sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -- i86pc:SunOS:5.*:*) -+ exit ;; -+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` -- exit 0 ;; -+ exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac -- exit 0 ;; -+ exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ m68k:machten:*:*) -+ echo m68k-apple-machten${UNAME_RELEASE} -+ exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 -- exit 0 ;; -+ exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __cplusplus - #include /* for printf() prototype */ - int main (int argc, char *argv[]) { - #else - int main (argc, argv) int argc; char *argv[]; { -@@ -425,145 +428,150 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c \ -- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && -+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && -+ SYSTEM_NAME=`$dummy $dummyarg` && -+ { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax -- exit 0 ;; -+ exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix -- exit 0 ;; -+ exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 -- exit 0 ;; -+ exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 -- exit 0 ;; -+ exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 -- exit 0 ;; -+ exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 -- exit 0 ;; -+ exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd -- exit 0 ;; -+ exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` -- exit 0 ;; -+ exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. -- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix -- exit 0 ;; -+ exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -- echo rs6000-ibm-aix3.2.5 -+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` -+ then -+ echo "$SYSTEM_NAME" -+ else -+ echo rs6000-ibm-aix3.2.5 -+ fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi -- exit 0 ;; -- *:AIX:*:[45]) -+ exit ;; -+ *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix -- exit 0 ;; -+ exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 -- exit 0 ;; -+ exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to -- exit 0 ;; # report: romp-ibm BSD 4.3 -+ exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx -- exit 0 ;; -+ exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 -- exit 0 ;; -+ exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd -- exit 0 ;; -+ exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 -- exit 0 ;; -+ exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` -@@ -615,31 +623,41 @@ EOF - } - EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then -- # avoid double evaluation of $set_cc_for_build -- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build -- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null -+ eval $set_cc_for_build -+ -+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating -+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler -+ # generating 64-bit code. GNU and HP use different nomenclature: -+ # -+ # $ CC_FOR_BUILD=cc ./config.guess -+ # => hppa2.0w-hp-hpux11.23 -+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess -+ # => hppa64-hp-hpux11.23 -+ -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); -@@ -657,181 +675,224 @@ EOF - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 -- exit 0 ;; -+ exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd -- exit 0 ;; -+ exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd -- exit 0 ;; -+ exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix -- exit 0 ;; -+ exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf -- exit 0 ;; -+ exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf -- exit 0 ;; -+ exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi -- exit 0 ;; -+ exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites -- exit 0 ;; -+ exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - *:UNICOS/mp:*:*) -- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; -+ 5000:UNIX_System_V:4.*:*) -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:FreeBSD:*:*) -- # Determine whether the default compiler uses glibc. -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #if __GLIBC__ >= 2 -- LIBC=gnu -- #else -- LIBC= -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} -- exit 0 ;; -+ case ${UNAME_MACHINE} in -+ pc98) -+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ esac -+ exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -- exit 0 ;; -- i*:MINGW*:*) -+ exit ;; -+ *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 -- exit 0 ;; --#### MozillaHack --# Netscape's hacked uname -- xx:WINNT:* | xx:WIN95:*) -- echo i586-pc-msvc -- exit 0 ;; --### End MozillaHack -+ exit ;; -+ i*:windows32*:*) -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 -+ exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 -- exit 0 ;; -- x86:Interix*:3*) -- echo i586-pc-interix3 -- exit 0 ;; -+ exit ;; -+ *:Interix*:[3456]*) -+ case ${UNAME_MACHINE} in -+ x86) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ EM64T | authenticamd) -+ echo x86_64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks -- exit 0 ;; -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix -- exit 0 ;; -+ exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin -- exit 0 ;; -+ exit ;; -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) -+ echo x86_64-unknown-cygwin -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin -- exit 0 ;; -+ exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - *:GNU:*:*) -+ # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -- exit 0 ;; -+ exit ;; -+ *:GNU/*:*:*) -+ # other systems with GNU libc and userland -+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -+ exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix -- exit 0 ;; -+ exit ;; - arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ fi -+ exit ;; -+ avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ cris:Linux:*:*) -+ echo cris-axis-linux-gnu -+ exit ;; -+ crisv32:Linux:*:*) -+ echo crisv32-axis-linux-gnu -+ exit ;; -+ frv:Linux:*:*) -+ echo frv-unknown-linux-gnu -+ exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ m32r*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -@@ -839,62 +900,78 @@ EOF - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -+ or32:Linux:*:*) -+ echo or32-unknown-linux-gnu -+ exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -- exit 0 ;; -+ exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac -- exit 0 ;; -+ exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux -- exit 0 ;; -+ exit ;; -+ sh64*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g -@@ -902,99 +979,113 @@ EOF - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit 0 ;; -+ exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit 0 ;; -+ exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit 0 ;; -+ exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else -- #ifdef __INTEL_COMPILER -+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif -+ #ifdef __dietlibc__ -+ LIBC=dietlibc -+ #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^LIBC/{ -+ s: ::g -+ p -+ }'`" -+ test x"${LIBC}" != x && { -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ exit -+ } -+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 -- exit 0 ;; -+ exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx -- exit 0 ;; -+ exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop -- exit 0 ;; -+ exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos -- exit 0 ;; -+ exit ;; -+ i*86:syllable:*:*) -+ echo ${UNAME_MACHINE}-pc-syllable -+ exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi -- exit 0 ;; -- i*86:*:5:[78]*) -+ exit ;; -+ i*86:*:5:[678]*) -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ -@@ -1002,214 +1093,248 @@ EOF - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi -- exit 0 ;; -+ exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 -- exit 0 ;; -+ exit ;; - paragon:*:*:*) - echo i860-intel-osf1 -- exit 0 ;; -+ exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi -- exit 0 ;; -+ exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv -- exit 0 ;; -+ exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv -- exit 0 ;; -+ exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix -- exit 0 ;; -- M68*:*:R3V[567]*:*) -- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) -+ exit ;; -+ M68*:*:R3V[5678]*:*) -+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; -+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4 && exit 0 ;; -+ && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 -- exit 0 ;; -+ exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi -- exit 0 ;; -+ exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 -- exit 0 ;; --#### MozillaHack -- *:*OpenVMS*:*:*) -- case "${UNAME_SYSTEM}" in -- POSIX_for_OpenVMS_AXP) echo alpha-dec-openvmsposix ;; -- POSIX_for_OpenVMS_VAX) echo vax-dec-openvmsposix ;; -- OpenVMS) echo alpha-dec-openvms ;; -- *) echo unknown-dec-openvms ;; -- esac -- exit 0 ;; --#### End MozillaHack -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 -- exit 0 ;; -+ exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 -- exit 0 ;; -+ exit ;; -+ i*86:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo ${UNAME_MACHINE}-stratus-vos -+ exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos -- exit 0 ;; -+ exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 -- exit 0 ;; -+ exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos -- exit 0 ;; -+ exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos -- exit 0 ;; -+ exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos -- exit 0 ;; -+ exit ;; -+ BeMac:Haiku:*:*) -+ echo powerpc-apple-haiku -+ exit ;; -+ BePC:Haiku:*:*) -+ echo i586-pc-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ SX-7:SUPER-UX:*:*) -+ echo sx7-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8:SUPER-UX:*:*) -+ echo sx8-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8R:SUPER-UX:*:*) -+ echo sx8r-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Darwin:*:*) -- case `uname -p` in -- *86) UNAME_PROCESSOR=i686 ;; -- powerpc) UNAME_PROCESSOR=powerpc ;; -+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -+ case $UNAME_PROCESSOR in -+ unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:QNX:*:4*) - echo i386-pc-qnx -- exit 0 ;; -- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) -+ exit ;; -+ NSE-?:NONSTOP_KERNEL:*:*) -+ echo nse-tandem-nsk${UNAME_RELEASE} -+ exit ;; -+ NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux -- exit 0 ;; -+ exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv -- exit 0 ;; -+ exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 -- exit 0 ;; -+ exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 -- exit 0 ;; -+ exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex -- exit 0 ;; -+ exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 -- exit 0 ;; -+ exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 -- exit 0 ;; -+ exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 -- exit 0 ;; -+ exit ;; - *:ITS:*:*) - echo pdp10-unknown-its -- exit 0 ;; -+ exit ;; -+ SEI:*:*:SEIUX) -+ echo mips-sei-seiux${UNAME_RELEASE} -+ exit ;; -+ *:DragonFly:*:*) -+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ exit ;; -+ *:*VMS:*:*) -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ case "${UNAME_MACHINE}" in -+ A*) echo alpha-dec-vms ; exit ;; -+ I*) echo ia64-dec-vms ; exit ;; -+ V*) echo vax-dec-vms ; exit ;; -+ esac ;; -+ *:XENIX:*:SysV) -+ echo i386-pc-xenix -+ exit ;; -+ i*86:skyos:*:*) -+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' -+ exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 - #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - - eval $set_cc_for_build - cat >$dummy.c </dev/null && $dummy && exit 0 -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - - # Apollos put the system type in the environment. - --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } -+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - - # Convex versions that predate uname can use getsysinfo(1) - - if [ -x /usr/convex/getsysinfo ] - then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - c34*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - c38*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - c4*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - esac - fi - - cat >&2 < in order to provide the needed - information to handle your system. - - config.guess timestamp = $timestamp - -Index: mozilla/directory/c-sdk/config/autoconf/config.sub -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/config/autoconf/config.sub,v -retrieving revision 5.0.2.3 -diff -u -8 -p -r5.0.2.3 config.sub ---- mozilla/directory/c-sdk/config/autoconf/config.sub 18 Apr 2003 10:20:22 -0000 5.0.2.3 -+++ mozilla/directory/c-sdk/config/autoconf/config.sub 9 Feb 2009 04:01:46 -0000 -@@ -1,14 +1,15 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2008-01-16' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software - # can handle that machine. It does not imply ALL GNU software can. - # - # This file is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2 of the License, or -@@ -16,24 +17,25 @@ timestamp='2003-02-22' - # - # This program is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, --# Boston, MA 02111-1307, USA. -- -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. -+# - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. - # If it is invalid, we print an error message on stderr and exit with code 1. - # Otherwise, we print the canonical config type on stdout and succeed. - -@@ -65,46 +67,46 @@ Operation modes: - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - - Report bugs and patches to ." - - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - - help=" - Try \`$me --help' for more information." - - # Parse command line - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 -- exit 0;; -+ exit ;; - - * ) - break ;; - esac - done - - case $# in - 0) echo "$me: missing argument$help" >&2 -@@ -113,17 +115,19 @@ case $# in - *) echo "$me: too many arguments$help" >&2 - exit 1;; - esac - - # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi -@@ -139,17 +143,17 @@ case $os in - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis) -+ -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) -@@ -164,32 +168,40 @@ case $os in - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) -@@ -219,171 +231,196 @@ case $os in - os=-mint - ;; - esac - - # Decode aliases for certain CPU-COMPANY combinations. - case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. --#### MozillaHack --# mips*el --#### End MozillaHack - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -- | clipper \ -+ | am33_2.0 \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -+ | bfin \ -+ | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | fr30 | frv \ -+ | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ -- | ip2k \ -- | m32r | m68000 | m68k | m88k | mcore \ -- | mips | mipsbe | mipseb | mips*el | mipsle \ -+ | ip2k | iq2000 \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | mcore | mep \ -+ | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -+ | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ -+ | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -+ | mt \ - | msp430 \ -+ | nios | nios2 \ - | ns16k | ns32k \ -- | openrisc | or32 \ -+ | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | score \ -+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ -- | strongarm \ -- | tahoe | thumb | tic80 | tron \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu | strongarm \ -+ | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ -- | x86 | xscale | xstormy16 | xtensa \ -+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. --#### MozillaHack --# mips*el --#### End MozillaHack - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* \ -- | bs2000-* \ -+ | avr-* | avr32-* \ -+ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ -- | clipper-* | cydra-* \ -+ | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ -+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ -- | ip2k-* \ -- | m32r-* \ -+ | ip2k-* | iq2000-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | mcore-* \ -- | mips-* | mipsbe-* | mipseb-* | mips*el-* | mipsle-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* \ -+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -+ | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ -+ | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ -+ | mmix-* \ -+ | mt-* \ - | msp430-* \ -- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ -+ | nios-* | nios2-* \ -+ | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ -+ | sparclite-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ -- | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-*) - ;; -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown -+ ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; -+ abacus) -+ basic_machine=abacus-unknown -+ ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; -+ amd64) -+ basic_machine=x86_64-pc -+ ;; -+ amd64-*) -+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) -@@ -405,16 +442,24 @@ case $basic_machine in - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; -@@ -433,22 +478,37 @@ case $basic_machine in - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; -+ craynv) -+ basic_machine=craynv-cray -+ os=-unicosmp -+ ;; -+ cr16) -+ basic_machine=cr16-unknown -+ os=-elf -+ ;; - crds | unos) - basic_machine=m68k-crds - ;; -+ crisv32 | crisv32-* | etraxfs*) -+ basic_machine=crisv32-axis -+ ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; -+ crx) -+ basic_machine=crx-unknown -+ os=-elf -+ ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec -@@ -461,16 +521,20 @@ case $basic_machine in - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ djgpp) -+ basic_machine=i586-pc -+ os=-msdosdjgpp -+ ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; -@@ -611,66 +675,71 @@ case $basic_machine in - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; --#### MozillaHack -- i386-msvc | msvc) -- basic_machine=i386-pc -- os=-msvc -+ mingw32ce) -+ basic_machine=arm-unknown -+ os=-mingw32ce - ;; --#### End MozillaHack - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; -- mmix*) -- basic_machine=mmix-knuth -- os=-mmixware -- ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; -@@ -729,30 +798,29 @@ case $basic_machine in - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; -- nv1) -- basic_machine=nv1-cray -- os=-unicosmp -- ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; -- or32 | or32-*) -+ openrisc | openrisc-*) - basic_machine=or32-unknown -- os=-coff -+ ;; -+ os400) -+ basic_machine=powerpc-ibm -+ os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k -@@ -760,43 +828,63 @@ case $basic_machine in - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; -- pentiumii | pentium2) -+ pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; -+ pentium4) -+ basic_machine=i786-pc -+ ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -- pentiumii-* | pentium2-*) -+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -+ pentium4-*) -+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` -@@ -819,16 +907,20 @@ case $basic_machine in - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) -@@ -845,23 +937,37 @@ case $basic_machine in - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; -+ sde) -+ basic_machine=mipsisa32-sde -+ os=-elf -+ ;; -+ sei) -+ basic_machine=mips-sei -+ os=-seiux -+ ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; -+ sh5el) -+ basic_machine=sh5le-unknown -+ ;; -+ sh64) -+ basic_machine=sh64-unknown -+ ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; -@@ -926,45 +1032,49 @@ case $basic_machine in - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; -- tic4x | c4x*) -- basic_machine=tic4x-unknown -- os=-coff -- ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; -+ tile*) -+ basic_machine=tile-unknown -+ os=-linux-gnu -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; -+ tpf) -+ basic_machine=s390x-ibm -+ os=-tpf -+ ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; -@@ -998,16 +1108,20 @@ case $basic_machine in - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; -+ xbox) -+ basic_machine=i686-pc -+ os=-mingw32 -+ ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) -@@ -1028,39 +1142,39 @@ case $basic_machine in - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; -+ mmix) -+ basic_machine=mmix-knuth -+ ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparc | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; -@@ -1116,40 +1230,40 @@ case $os in - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. --#### MozillaHack --# msvc --#### End MozillaHack - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ -- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -openbsd* | -solidbsd* \ -+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ -+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ -- | -msvc* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -- | -powermax* | -dnix*) -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os -@@ -1157,34 +1271,40 @@ case $os in - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; -+ -linux-dietlibc) -+ os=-linux-dietlibc -+ ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; -+ -os400*) -+ os=-os400 -+ ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf -@@ -1196,16 +1316,19 @@ case $os in - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; -+ -syllable*) -+ os=-syllable -+ ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova -@@ -1218,16 +1341,19 @@ case $os in - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; -+ -tpf*) -+ os=-tpf -+ ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 -@@ -1254,16 +1380,19 @@ case $os in - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; -+ -zvmoe) -+ os=-zvmoe -+ ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -@@ -1276,25 +1405,34 @@ else - - # Note that if you're going to try to match "-MANUFACTURER" here (say, - # "-sun"), then you have to tell the case statement up towards the top - # that MANUFACTURER isn't an operating system. Otherwise, code above - # will signal an error saying that MANUFACTURER isn't an operating - # system, and we'll never get to this point. - - case $basic_machine in -+ score-*) -+ os=-elf -+ ;; -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) -@@ -1310,16 +1448,19 @@ case $basic_machine in - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; -+ mep-*) -+ os=-elf -+ ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff -@@ -1328,19 +1469,25 @@ case $basic_machine in - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; -+ *-haiku) -+ os=-haiku -+ ;; - *-ibm) - os=-aix - ;; -+ *-knuth) -+ os=-mmixware -+ ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf -@@ -1463,19 +1610,25 @@ case $basic_machine in - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; -+ -os400*) -+ vendor=ibm -+ ;; - -ptx*) - vendor=sequent - ;; -+ -tpf*) -+ vendor=ibm -+ ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi -@@ -1490,16 +1643,16 @@ case $basic_machine in - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; - esac - - echo $basic_machine$os --exit 0 -+exit - - # Local variables: - # eval: (add-hook 'write-file-hooks 'time-stamp) - # time-stamp-start: "timestamp='" - # time-stamp-format: "%:y-%02m-%02d" - # time-stamp-end: "'" - # End: -Index: mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.in,v -retrieving revision 5.0.2.21.4.1 -diff -u -8 -p -r5.0.2.21.4.1 Makefile.in ---- mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.in 3 Feb 2006 14:44:42 -0000 5.0.2.21.4.1 -+++ mozilla/directory/c-sdk/ldap/libraries/libldap/Makefile.in 9 Feb 2009 04:01:47 -0000 -@@ -232,17 +232,17 @@ ifeq ($(OS_ARCH), Darwin) - EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME) - endif - - ifeq ($(OS_ARCH), OpenVMS) - EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME) $(OS_LIBS) - SHARED_LIBRARY_LIBS = $(dist_libdir)/lib$(LBER_LIBNAME).a - endif - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME) -lbe - endif - - ifeq ($(OS_ARCH), NetBSD) - EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME) - endif - - ifeq ($(OS_ARCH), OpenBSD) -@@ -297,17 +297,17 @@ ltest:: $(LIBLDAP) test.o - $(LIBDIR): - $(MKDIR) $(LIBDIR) - - $(LIBLDAP): $(OBJS) $(LIBDIR) $(LDAP_EXPORT_DEFS) - @echo ======= making $(LIBLDAP) - ifdef SO_FILES_TO_REMOVE - -$(RM) $(SO_FILES_TO_REMOVE) - endif --ifneq (,$(filter AIX Linux HP-UX Darwin BeOS QNX NetBSD OSF1 OpenBSD, $(OS_ARCH))) -+ifneq (,$(filter AIX Linux HP-UX Darwin BeOS Haiku QNX NetBSD OSF1 OpenBSD, $(OS_ARCH))) - $(LINK_LIB) ../liblber/$(OBJDIR_NAME)/*.a - else - ifeq ($(OS_ARCH),OS2) - # create import library for OS/2 - rm -f $@ - $(IMPLIB) $@ $(LDAP_EXPORT_DEFS) - else - $(LINK_LIB) $(EXTRA_LIBS) -@@ -336,15 +336,19 @@ ifeq ($(LD),link) - EXPDEPS2 = $(DLLLDAP) - endif - endif - - export:: $(EXPDEPS2) - ifdef MKSHLIB - $(INSTALL) -m 444 $(LIBLDAP) $(dist_libdir) - $(INSTALL) -m 444 $(DLLLDAP) $(dist_libdir) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) -m 444 $(DLLLDAP) $(dist_bindir)/lib -+else - $(INSTALL) -m 444 $(DLLLDAP) $(dist_bindir) - endif -+endif - ifeq ($(OS_ARCH), WINNT) - $(INSTALL) -m 444 $(LIBLDAP) $(dist_libdir) - $(INSTALL) -m 444 $(DLLLDAP) $(dist_libdir) - endif - $(INSTALL) -m 444 $(ETCFILES) $(ETCDIR) -Index: mozilla/directory/c-sdk/ldap/libraries/libprldap/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/ldap/libraries/libprldap/Makefile.in,v -retrieving revision 5.0.2.18.4.1 -diff -u -8 -p -r5.0.2.18.4.1 Makefile.in ---- mozilla/directory/c-sdk/ldap/libraries/libprldap/Makefile.in 3 Feb 2006 14:44:49 -0000 5.0.2.18.4.1 -+++ mozilla/directory/c-sdk/ldap/libraries/libprldap/Makefile.in 9 Feb 2009 04:01:49 -0000 -@@ -160,17 +160,18 @@ EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_L - EXTRA_LIBS += -L$(dist_libdir) $(DYNAMICNSPR) - endif - - ifeq ($(OS_ARCH), OpenVMS) - EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_LIBNAME) - EXTRA_LIBS += -L$(dist_libdir) $(DYNAMICNSPR) - endif - --ifeq ($(OS_ARCH), BeOS) -+ -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_LIBNAME) - EXTRA_LIBS += -L$(dist_libdir) $(DYNAMICNSPR) - endif - - OBJDEST = $(OBJDIR_NAME) - - ########################################################################### - -@@ -250,10 +251,14 @@ ifeq ($(OS_ARCH), WINNT) - $(INSTALL) -m 555 $(LIBPRLDAP) $(dist_libdir) - $(INSTALL) -m 555 $(DLLPRLDAP) $(dist_libdir) - endif - ifeq ($(OS_ARCH),OS2) - $(INSTALL) -m 444 $(LIBPRLDAP) $(dist_libdir) - endif - ifdef MKSHLIB - $(INSTALL) -m 555 $(DLLPRLDAP) $(dist_libdir) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) -m 444 $(DLLPRLDAP) $(dist_bindir)/lib -+else - $(INSTALL) -m 444 $(DLLPRLDAP) $(dist_bindir) - endif -+endif -Index: mozilla/directory/c-sdk/ldap/libraries/libssldap/Makefile -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/ldap/libraries/libssldap/Attic/Makefile,v -retrieving revision 5.0.2.8 -diff -u -8 -p -r5.0.2.8 Makefile ---- mozilla/directory/c-sdk/ldap/libraries/libssldap/Makefile 25 Aug 2004 23:02:30 -0000 5.0.2.8 -+++ mozilla/directory/c-sdk/ldap/libraries/libssldap/Makefile 9 Feb 2009 04:01:49 -0000 -@@ -162,17 +162,17 @@ EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_L - ifeq ($(NSS_DYNAMIC_SOFTOKN),1) - EXTRA_LIBS += -l$(SOFTOKN_LIBNAME) - endif - EXTRA_LIBS += -l$(SSL_LIBNAME) -l$(NSS_LIBNAME) - EXTRA_LIBS += $(DYNAMICNSPR) - EXTRA_LIBS += $(OS_LIBS) - endif - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_LIBNAME) -l$(PRLDAP_LIBNAME) - ifeq ($(NSS_DYNAMIC_SOFTOKN),1) - EXTRA_LIBS += -l$(SOFTOKN_LIBNAME) - endif - EXTRA_LIBS += -l$(SSL_LIBNAME) -l$(NSS_LIBNAME) - EXTRA_LIBS += $(DYNAMICNSPR) - EXTRA_LIBS += $(OS_LIBS) - endif -Index: mozilla/directory/c-sdk/ldap/libraries/libssldap/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/directory/c-sdk/ldap/libraries/libssldap/Makefile.in,v -retrieving revision 5.0.2.9.4.1 -diff -u -8 -p -r5.0.2.9.4.1 Makefile.in ---- mozilla/directory/c-sdk/ldap/libraries/libssldap/Makefile.in 3 Feb 2006 14:44:49 -0000 5.0.2.9.4.1 -+++ mozilla/directory/c-sdk/ldap/libraries/libssldap/Makefile.in 9 Feb 2009 04:01:50 -0000 -@@ -177,17 +177,17 @@ EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_L - ifeq ($(NSS_DYNAMIC_SOFTOKN),1) - EXTRA_LIBS += -l$(SOFTOKN_LIBNAME) - endif - EXTRA_LIBS += -l$(SSL_LIBNAME) -l$(NSS_LIBNAME) - EXTRA_LIBS += $(DYNAMICNSPR) - EXTRA_LIBS += $(OS_LIBS) - endif - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_LIBNAME) -l$(PRLDAP_LIBNAME) - ifeq ($(NSS_DYNAMIC_SOFTOKN),1) - EXTRA_LIBS += -l$(SOFTOKN_LIBNAME) - endif - EXTRA_LIBS += -l$(SSL_LIBNAME) -l$(NSS_LIBNAME) - EXTRA_LIBS += $(DYNAMICNSPR) - EXTRA_LIBS += $(OS_LIBS) - endif -Index: mozilla/embedding/componentlib/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/embedding/componentlib/Makefile.in,v -retrieving revision 1.3 -diff -u -8 -p -r1.3 Makefile.in ---- mozilla/embedding/componentlib/Makefile.in 18 Apr 2004 22:00:41 -0000 1.3 -+++ mozilla/embedding/componentlib/Makefile.in 9 Feb 2009 04:02:04 -0000 -@@ -147,17 +147,17 @@ OS_LIBS := -lstdc++ $(OS_LIBS) - SHLIB_LDENDFILE = -lgcc - - endif # darwin - - ifeq ($(OS_ARCH),WINNT) - OS_LIBS += ole32.lib shell32.lib - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - OS_LIBS += -ltracker - endif - - GARBAGE += $(CPPSRCS) - - ifdef _NO_AUTO_VARS - _TARGET = $(srcdir)/$(@F) - GARBAGE += $(addprefix $(srcdir)/,$(CPPSRCS)) -Index: mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp -=================================================================== -RCS file: /cvsroot/mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp,v -retrieving revision 1.40.12.5 -diff -u -8 -p -r1.40.12.5 nsFontMetricsBeOS.cpp ---- mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp 27 Sep 2007 21:36:00 -0000 1.40.12.5 -+++ mozilla/gfx/src/beos/nsFontMetricsBeOS.cpp 9 Feb 2009 04:02:35 -0000 -@@ -123,22 +123,22 @@ NS_IMETHODIMP nsFontMetricsBeOS::Init(co - nsString *fam = param.family.StringAt(i); - PRBool isgeneric = ( param.isgeneric[i] ) ? PR_TRUE: PR_FALSE; - NS_ConvertUTF16toUTF8 family(*fam); - // Fallback - isfixed = family.Equals("monospace") || family.Equals("fixed"); - if (!isgeneric) - { - // non-generic font -- if (count_font_styles((font_family)family.get()) <= 0) -+ if (count_font_styles((char *) family.get()) <= 0) - { - // the specified font does not exist on this computer. - continue; - } -- mFontHandle.SetFamilyAndStyle( (font_family)family.get(), NULL ); -+ mFontHandle.SetFamilyAndStyle( (char *)family.get(), NULL ); - fontfound = PR_TRUE; - break; - } - else - { - // family is generic string like - // "serif" "sans-serif" "cursive" "fantasy" "monospace" "-moz-fixed" - // so look up preferences and get real family name -@@ -153,19 +153,19 @@ NS_IMETHODIMP nsFontMetricsBeOS::Init(co - //NS_WITH_SERVICE( nsIPref, prefs, kPrefCID, &res ); - nsCOMPtr prefs = do_GetService( NS_PREFSERVICE_CONTRACTID, &res ); - if (NS_SUCCEEDED(res)) - { - nsCOMPtr branch; - prefs->GetBranch("font.name.", getter_AddRefs(branch)); - branch->GetCharPref(prop, getter_Copies(real_family)); - -- if (!real_family.IsEmpty() && real_family.Length() <= B_FONT_FAMILY_LENGTH && count_font_styles((font_family)real_family.get()) > 0) -+ if (!real_family.IsEmpty() && real_family.Length() <= B_FONT_FAMILY_LENGTH && count_font_styles((char *)real_family.get()) > 0) - { -- mFontHandle.SetFamilyAndStyle( (font_family)real_family.get(), NULL ); -+ mFontHandle.SetFamilyAndStyle( (char *)real_family.get(), NULL ); - fontfound = PR_TRUE; - break; - } - } - // not successful. use system font. - if (isfixed) - mFontHandle = BFont(be_fixed_font); - else -@@ -409,18 +409,18 @@ NS_IMETHODIMP nsFontMetricsBeOS::GetFon - aHandle = (nsFontHandle)&mFontHandle; - return NS_OK; - } - - nsresult - nsFontMetricsBeOS::FamilyExists(const nsString& aName) - { - NS_ConvertUTF16toUTF8 family(aName); -- printf("exists? %s", (font_family)family.get()); -- return (count_font_styles((font_family)family.get()) > 0) ? NS_OK : NS_ERROR_FAILURE; -+ printf("exists? %s", (char *)family.get()); -+ return (count_font_styles((char *)family.get()) > 0) ? NS_OK : NS_ERROR_FAILURE; - } - - // useful UTF-8 utility - inline uint32 utf8_char_len(uchar byte) - { - return (((0xE5000000 >> ((byte >> 3) & 0x1E)) & 3) + 1); - } - -Index: mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp -=================================================================== -RCS file: /cvsroot/mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp,v -retrieving revision 1.51.12.8 -diff -u -8 -p -r1.51.12.8 nsRenderingContextBeOS.cpp ---- mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp 18 Dec 2007 07:17:21 -0000 1.51.12.8 -+++ mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp 9 Feb 2009 04:02:39 -0000 -@@ -345,19 +345,22 @@ bool nsRenderingContextBeOS::LockAndUpda - return rv; - - // Intelligent lock - if (mSurface->LockDrawable()) - { - // if BFont wasn't set already - if (mCurrentBFont == nsnull) - { -- if (mFontMetrics) -- mFontMetrics->GetFontHandle((nsFontHandle)mCurrentBFont); -- -+ if (mFontMetrics) -+ { -+ nsFontHandle fontHandle; -+ mFontMetrics->GetFontHandle(fontHandle); -+ mCurrentBFont = (BFont *) fontHandle; -+ } - if (mCurrentBFont) - mView->SetFont(mCurrentBFont); - else - mView->SetFont(be_plain_font); // fallback - only for single call - } - - if (mClipRegion) - { -@@ -1122,17 +1125,17 @@ NS_IMETHODIMP nsRenderingContextBeOS::Ge - // and call (UTF-8) char* version of the method. - // It works well with current nsFontMetricsBeOS which is, again, simpler in comparison with - // other platforms, partly due to UTF-8 nature of BeOS, partly due unimplemented font fallbacks - // and other tricks. - - NS_IMETHODIMP nsRenderingContextBeOS::GetTextDimensions(const PRUnichar* aString, - PRInt32 aLength, PRInt32 aAvailWidth, PRInt32* aBreaks, PRInt32 aNumBreaks, - nsTextDimensions& aDimensions, PRInt32& aNumCharsFit, nsTextDimensions& aLastWordDimensions, -- PRInt32* aFontID = nsnull) -+ PRInt32* aFontID) - { - nsresult ret_code = NS_ERROR_FAILURE; - uint8 utf8buf[1024]; - uint8* utf8str = nsnull; - // max UTF-8 string length - PRUint32 slength = aLength * 4 + 1; - // Allocating char* array rather from stack than from heap for speed. - // 1024 char array forms e.g. 256 == 32*8 frame for CJK glyphs, which may be -@@ -1155,17 +1158,17 @@ NS_IMETHODIMP nsRenderingContextBeOS::Ge - // deallocating if got from heap - if (utf8str != utf8buf) - delete [] utf8str; - return ret_code; - } - - NS_IMETHODIMP nsRenderingContextBeOS::GetTextDimensions(const char* aString, PRInt32 aLength, - PRInt32 aAvailWidth,PRInt32* aBreaks, PRInt32 aNumBreaks, nsTextDimensions& aDimensions, -- PRInt32& aNumCharsFit, nsTextDimensions& aLastWordDimensions, PRInt32* aFontID = nsnull) -+ PRInt32& aNumCharsFit, nsTextDimensions& aLastWordDimensions, PRInt32* aFontID) - { - // Code is borrowed from win32 implementation including comments. - // Minor changes are introduced due multibyte/utf-8 nature of char* strings handling in BeOS. - char * utf8ptr = (char *)aString; - PRInt32 *utf8pos =0; - PRInt32 num_of_glyphs = 0; // Number of glyphs isn't equal to number of bytes in case of UTF-8 - PRInt32 utf8posbuf[1025]; - if (aLength < 1025) -Index: mozilla/intl/uconv/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/intl/uconv/src/Makefile.in,v -retrieving revision 1.82.4.2 -diff -u -8 -p -r1.82.4.2 Makefile.in ---- mozilla/intl/uconv/src/Makefile.in 29 Jan 2006 16:51:01 -0000 1.82.4.2 -+++ mozilla/intl/uconv/src/Makefile.in 9 Feb 2009 04:02:45 -0000 -@@ -114,17 +114,17 @@ else - ifeq ($(MOZ_WIDGET_TOOLKIT),windows) - CPPSRCS += nsWinCharset.cpp - EXPORT_RESOURCE += wincharset.properties - else - ifneq (,$(filter cocoa mac, $(MOZ_WIDGET_TOOLKIT))) - CPPSRCS += nsMacCharset.cpp - EXPORT_RESOURCE += maccharset.properties - else --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CPPSRCS += nsBeOSCharset.cpp - else - CPPSRCS += nsUNIXCharset.cpp - EXPORT_RESOURCE += unixcharset.properties - # add platform charset remapping properties files here if necessary - # (see unixcharset.sample.properties for an example file) - # eg: if we needed a charset remap for OSARCH=Linux then add the following line: - #EXPORT_RESOURCE += unixcharset.Linux.properties -Index: mozilla/ipc/ipcd/client/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/ipc/ipcd/client/src/Makefile.in,v -retrieving revision 1.7 -diff -u -8 -p -r1.7 Makefile.in ---- mozilla/ipc/ipcd/client/src/Makefile.in 9 Dec 2004 19:28:19 -0000 1.7 -+++ mozilla/ipc/ipcd/client/src/Makefile.in 9 Feb 2009 04:02:51 -0000 -@@ -59,17 +59,18 @@ CPPSRCS = \ - ipcdclient.cpp \ - ipcService.cpp \ - ipcModuleFactory.cpp \ - $(NULL) - - ifeq ($(OS_ARCH),WINNT) - CPPSRCS += ipcConnectionWin.cpp - else --ifeq ($(OS_ARCH),BeOS) -+ -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CPPSRCS += ipcConnectionStub.cpp - else - CPPSRCS += ipcConnectionUnix.cpp - endif - endif - - LOCAL_INCLUDES = \ - -I$(srcdir)/../../shared/src \ -Index: mozilla/ipc/ipcd/daemon/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/ipc/ipcd/daemon/src/Makefile.in,v -retrieving revision 1.3 -diff -u -8 -p -r1.3 Makefile.in ---- mozilla/ipc/ipcd/daemon/src/Makefile.in 28 Jan 2004 21:31:46 -0000 1.3 -+++ mozilla/ipc/ipcd/daemon/src/Makefile.in 9 Feb 2009 04:02:52 -0000 -@@ -54,17 +54,18 @@ CPPSRCS = \ - ipcd.cpp \ - ipcClient.cpp \ - ipcModuleReg.cpp \ - ipcCommandModule.cpp - - ifeq ($(OS_ARCH),WINNT) - CPPSRCS += ipcdWin.cpp - else --ifeq ($(OS_ARCH),BeOS) -+ -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CPPSRCS += ipcdStub.cpp - else - CPPSRCS += ipcdUnix.cpp - endif - endif - - PROGRAM = mozilla-ipcd$(BIN_SUFFIX) - -Index: mozilla/js/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/js/src/Makefile.in,v -retrieving revision 3.95.4.5 -diff -u -8 -p -r3.95.4.5 Makefile.in ---- mozilla/js/src/Makefile.in 27 Jul 2006 22:56:20 -0000 3.95.4.5 -+++ mozilla/js/src/Makefile.in 9 Feb 2009 04:02:54 -0000 -@@ -241,17 +241,17 @@ ifneq ($(findstring -L,$(NSPR_LIBS)),) - NSPR_STATIC_PATH = $(subst -L,,$(findstring -L,$(NSPR_LIBS))) - else - NSPR_STATIC_PATH = $(DIST)/lib - endif - - LDFLAGS += $(pathsubst -l%,$(NSPR_STATIC_PATH)/%.a,$(NSPR_LIBS)) - - # BeOS and HP-UX do not require the extra linking of "-lm" --ifeq (,$(filter BeOS HP-UX WINNT WINCE OpenVMS,$(OS_ARCH))) -+ifeq (,$(filter BeOS Haiku HP-UX WINNT WINCE OpenVMS,$(OS_ARCH))) - LDFLAGS += -lm - endif - - # Prevent floating point errors caused by VC++ optimizations - ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_) - ifeq (,$(filter-out 1200 1300 1310,$(_MSC_VER))) - CFLAGS += -Op - else -Index: mozilla/mail/app/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/mail/app/Makefile.in,v -retrieving revision 1.46.2.10 -diff -u -8 -p -r1.46.2.10 Makefile.in ---- mozilla/mail/app/Makefile.in 22 Oct 2008 21:04:53 -0000 1.46.2.10 -+++ mozilla/mail/app/Makefile.in 9 Feb 2009 04:03:21 -0000 -@@ -57,18 +57,22 @@ PREF_JS_EXPORTS = \ - - ifndef MOZ_BRANDING_DIRECTORY - PREF_JS_EXPORTS += $(srcdir)/thunderbird-branding.js - endif - - ifeq ($(USE_SHORT_LIBNAME), 1) - PROGRAM = thunderbird$(BIN_SUFFIX) - else -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+PROGRAM = thunderbird$(BIN_SUFFIX) -+else - PROGRAM = thunderbird-bin$(BIN_SUFFIX) - endif -+endif - - REQUIRES = \ - xpcom \ - $(NULL) - - LOCAL_INCLUDES = -I$(topsrcdir)/toolkit/xre - - CPPSRCS = nsMailApp.cpp -@@ -142,17 +146,17 @@ RCFLAGS += -DMOZ_THUNDERBIRD -I$(srcdir) - else - RCFLAGS += -DMOZ_THUNDERBIRD --include-dir $(srcdir) - endif - ifdef BUILD_STATIC_LIBS - RCFLAGS += -DMOZ_STATIC_BUILD - endif - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - BEOS_PROGRAM_RESOURCE = $(srcdir)/apprunner-beos.rsrc - ifdef BUILD_STATIC_LIBS - OS_LIBS += -ltracker -lgame - endif - endif - - ifeq ($(OS_ARCH),OS2) - RESFILE=splashos2.res -@@ -257,17 +261,17 @@ ifneq (,$(filter gtk gtk2,$(MOZ_WIDGET_T - cp $(srcdir)/mozicon16.xpm $(DIST)/branding/mozicon16.xpm - cp $(srcdir)/mozicon50.xpm $(DIST)/branding/mozicon50.xpm - endif - ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2) - cp $(srcdir)/default.xpm $(DIST)/branding/default.xpm - endif - endif - --ifneq (,$(filter-out OS2 WINNT Darwin,$(OS_ARCH))) -+ifneq (,$(filter-out OS2 WINNT Darwin BeOS Haiku,$(OS_ARCH))) - thunderbird:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk - cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \ - -e "s|%MOZ_USER_DIR%|.thunderbird|" \ - -e "s|%MREDIR%|$(mredir)|" \ - -e "s|%MOZ_APP_DISPLAYNAME%|$(MOZ_APP_DISPLAYNAME)|" > $@ - chmod +x $@ - - libs:: thunderbird -Index: mozilla/modules/libpr0n/decoders/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/modules/libpr0n/decoders/Makefile.in,v -retrieving revision 1.13.18.2 -diff -u -8 -p -r1.13.18.2 Makefile.in ---- mozilla/modules/libpr0n/decoders/Makefile.in 17 Feb 2006 19:03:47 -0000 1.13.18.2 -+++ mozilla/modules/libpr0n/decoders/Makefile.in 9 Feb 2009 04:03:46 -0000 -@@ -47,17 +47,17 @@ ifdef MOZ_ENABLE_GNOMEUI - TOOL_DIRS = icon/gtk icon - endif - ifneq (,$(filter WINCE WINNT,$(OS_ARCH))) - DIRS = icon/win icon - endif - ifeq ($(OS_ARCH),OS2) - DIRS = icon/os2 icon - endif --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - DIRS = icon/beos icon - endif - ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) - DIRS = icon/mac icon - endif - endif # icon - - DIRS += $(filter-out icon,$(MOZ_IMG_DECODERS)) -Index: mozilla/modules/libpr0n/decoders/icon/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/modules/libpr0n/decoders/icon/Makefile.in,v -retrieving revision 1.17.8.6 -diff -u -8 -p -r1.17.8.6 Makefile.in ---- mozilla/modules/libpr0n/decoders/icon/Makefile.in 30 May 2006 15:46:21 -0000 1.17.8.6 -+++ mozilla/modules/libpr0n/decoders/icon/Makefile.in 9 Feb 2009 04:03:46 -0000 -@@ -77,17 +77,17 @@ endif - ifeq ($(OS_ARCH),OS2) - PLATFORM = os2 - endif - - ifeq ($(OS_ARCH),Darwin) - PLATFORM = mac - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - PLATFORM = beos - endif - - REQUIRES = xpcom \ - string \ - gfx \ - imglib2 \ - necko \ -@@ -97,17 +97,17 @@ CPPSRCS = \ - nsIconURI.cpp \ - nsIconModule.cpp \ - nsIconProtocolHandler.cpp \ - $(NULL) - - ifdef MOZ_ENABLE_GNOMEUI - USE_ICON_DECODER = 1 - endif --ifeq (,$(filter-out Darwin OS2 BeOS,$(OS_ARCH))) -+ifeq (,$(filter-out Darwin OS2 BeOS Haiku,$(OS_ARCH))) - USE_ICON_DECODER = 1 - endif - - ifdef USE_ICON_DECODER - CPPSRCS += nsIconDecoder.cpp - DEFINES += -DUSE_ICON_DECODER - endif - -Index: mozilla/modules/libreg/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/modules/libreg/src/Makefile.in,v -retrieving revision 1.39 -diff -u -8 -p -r1.39 Makefile.in ---- mozilla/modules/libreg/src/Makefile.in 18 Apr 2004 22:00:45 -0000 1.39 -+++ mozilla/modules/libreg/src/Makefile.in 9 Feb 2009 04:03:47 -0000 -@@ -61,17 +61,17 @@ FORCE_STATIC_LIB = 1 - - # Force use of PIC - FORCE_USE_PIC = 1 - - include $(topsrcdir)/config/config.mk - - DEFINES += -DUSE_BUFFERED_REGISTRY_IO - # Memory mapped files are not supported under QNX, Neutrino, HP-UX and BeOS --#ifeq (,$(filter BeOS HP-UX QNX,$(OS_ARCH))) -+#ifeq (,$(filter BeOS Haiku HP-UX QNX,$(OS_ARCH))) - #CSRCS += mmapio.c - #DEFINES += -DUSE_MMAP_REGISTRY_IO - #endif - - include $(topsrcdir)/config/rules.mk - - R_%.o: %.c - $(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) -DSTANDALONE_REGISTRY $< -Index: mozilla/modules/plugin/base/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/modules/plugin/base/src/Makefile.in,v -retrieving revision 1.104 -diff -u -8 -p -r1.104 Makefile.in ---- mozilla/modules/plugin/base/src/Makefile.in 8 Jun 2005 16:48:43 -0000 1.104 -+++ mozilla/modules/plugin/base/src/Makefile.in 9 Feb 2009 04:03:55 -0000 -@@ -91,17 +91,17 @@ CPPSRCS = \ - ns4xPluginInstance.cpp \ - nsPluginHostImpl.cpp \ - nsPluginModule.cpp \ - nsPluginInstancePeer.cpp \ - nsPluginDirServiceProvider.cpp \ - nsJSNPRuntime.cpp \ - $(NULL) - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CPPSRCS += nsPluginsDirBeOS.cpp - CPPSRCS += nsPluginNativeWindow.cpp - else - ifneq (,$(filter WINNT WINCE,$(OS_ARCH))) - CPPSRCS += nsPluginsDirWin.cpp - CPPSRCS += nsPluginNativeWindowWin.cpp - else - ifeq ($(MOZ_WIDGET_TOOLKIT),os2) -Index: mozilla/nsprpub/configure.in -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/configure.in,v -retrieving revision 1.199.2.17 -diff -u -8 -p -r1.199.2.17 configure.in ---- mozilla/nsprpub/configure.in 31 Oct 2007 18:07:38 -0000 1.199.2.17 -+++ mozilla/nsprpub/configure.in 9 Feb 2009 04:04:09 -0000 -@@ -358,17 +358,17 @@ if test -z "$SKIP_PATH_CHECKS"; then - AC_PATH_PROG(WHOAMI, $WHOAMI whoami, echo not_whoami) - fi - - if test -n "$MOZ_DEBUG"; then - AC_DEFINE(DEBUG) - DEFINES="$DEFINES -UNDEBUG" - - case "${target_os}" in -- beos*) -+ beos*|haiku*) - DEFINES="$DEFINES -DDEBUG_${USER}" - ;; - msvc*|mks*|cygwin*|mingw*|os2*) - DEFINES="$DEFINES -DDEBUG_`echo ${USERNAME} | sed -e 's| |_|g'`" - ;; - *) - DEFINES="$DEFINES -DDEBUG_`$WHOAMI`" - ;; -@@ -787,17 +787,17 @@ case "$host" in - NSINSTALL=nsinstall - ;; - *-cygwin*|*-msvc*|*-mks*) - NSINSTALL='$(CYGWIN_WRAPPER) nsinstall' - if test `echo "${PATH}" | grep -c \;` = 0; then - CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper' - fi - ;; --*-beos*) -+*-beos*|*-haiku*) - HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE" - ;; - *os2*) - ;; - *) - HOST_CFLAGS="$HOST_CFLAGS -DXP_UNIX" - ;; - esac -@@ -862,34 +862,50 @@ case "$target" in - OBJECT_MODE=64 - else - MDCPUCFG_H=_aix32.cfg - fi - PR_MD_CSRCS=aix.c - RESOLVE_LINK_SYMBOLS=1 - ;; - --*-beos*) -+*-beos*|*-haiku*) - AC_DEFINE(XP_BEOS) - AC_DEFINE(BeOS) - AC_DEFINE(BEOS) - AC_DEFINE(_POSIX_SOURCE) -- DSO_LDOPTS=-nostart -+ DSO_CFLAGS=-fPIC -+ DSO_LDOPTS='-nostart' -+ - MDCPUCFG_H=_beos.cfg - USE_BTHREADS=1 - PR_MD_ARCH_DIR=beos - RESOLVE_LINK_SYMBOLS=1 -+ -+ _HAIKU_BUILD=0 -+ AC_CHECK_LIB(network,main,_HAIKU_BUILD=1) -+ if test "$_HAIKU_BUILD" = 1; then -+ OS_LIBS="$OS_LIBS -lnetwork" -+ AC_DEFINE(XP_HAIKU) -+ AC_DEFINE(BONE_VERSION) -+ else -+ AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"]) -+ fi -+ - case "${target_cpu}" in - i*86) -- _OPTIMIZE_FLAGS=-O2 -- _DEBUG_FLAGS='-gdwarf-2 -O0' -+ AC_DEFINE(i586) -+ CPU_ARCH=i586 -+ _OPTIMIZE_FLAGS=-O3 -+ _DEBUG_FLAGS='-gdwarf-2 -O0 -fno-inline' - MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@' -- AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"]) - ;; - powerpc) -+ AC_DEFINE(ppc) -+ CPU_ARCH=ppc - CC=mwcc - CCC=mwcc - LD=mwld - DSO_LDOPTS='-xms -export pragma -init _init_routine_ -term _term_routine_ -lroot -lnet /boot/develop/lib/ppc/glue-noinit.a /boot/develop/lib/ppc/init_term_dyn.o /boot/develop/lib/ppc/start_dyn.o' - _OPTIMIZE_FLAGS=-O2 - _DEBUG_FLAGS='-g -O0' - ;; - esac -@@ -2164,16 +2180,18 @@ dnl AC_CHECK_LIB(vms_jackets, main) - - - dnl We don't want anything to link with libdl even if it's present on OS X, - dnl since it's not used and not part of the default installation. - - case $target in - *-darwin*) - ;; -+*-beos*|*-haiku*) -+ ;; - *) - AC_CHECK_LIB(dl, dlopen, - AC_CHECK_HEADER(dlfcn.h, - OS_LIBS="-ldl $OS_LIBS")) - ;; - esac - - -@@ -2352,17 +2370,17 @@ AC_ARG_ENABLE(nspr-threads, - [ --enable-nspr-threads Build using classic nspr threads], - [ if test "$enableval" = "yes"; then - USE_PTHREADS= - USE_USER_PTHREADS= - USE_NSPR_THREADS=1 - fi]) - - case "$target" in --*-beos*) -+*-beos*|*-haiku*) - AC_ARG_WITH(bthreads, - [ --with-bthreads Use system bthreads library as thread subsystem - (BeOS only)], - [ if test "$withval" = "yes"; then - USE_BTHREADS=1 - USE_USER_PTHREADS= - USE_PTHREADS= - fi]) -Index: mozilla/nsprpub/build/autoconf/config.guess -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/build/autoconf/config.guess,v -retrieving revision 1.15 -diff -u -8 -p -r1.15 config.guess ---- mozilla/nsprpub/build/autoconf/config.guess 18 Apr 2003 19:20:18 -0000 1.15 -+++ mozilla/nsprpub/build/autoconf/config.guess 9 Feb 2009 04:04:13 -0000 -@@ -1,34 +1,37 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2008-01-08' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2 of the License, or - # (at your option) any later version. - # - # This program is distributed in the hope that it will be useful, but - # WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - # General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Originally written by Per Bothner . - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. - # - # This script attempts to guess a canonical system name similar to - # config.sub. If it succeeds, it prints the system name on stdout, and - # exits with 0. Otherwise, it exits with 1. - # -@@ -48,34 +51,34 @@ Operation modes: - -v, --version print version number, then exit - - Report bugs and patches to ." - - version="\ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - - help=" - Try \`$me --help' for more information." - - # Parse command line - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) -@@ -99,35 +102,36 @@ trap 'exit 1' 1 2 15 - # use `HOST_CC' if defined, but it is deprecated. - - # Portable tmp directory creation inspired by the Autoconf team. - - set_cc_for_build=' - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; -- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || -+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; - dummy=$tmp/dummy ; - tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; - case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; --esac ;' -+esac ; set_cc_for_build= ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. - # (ghazi@noc.rutgers.edu 1994-08-24) - if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH - fi - - UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -@@ -152,16 +156,17 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; -+ sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ -@@ -190,60 +195,42 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" -- exit 0 ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- arc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- macppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvmeppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- pmax:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sgi:OpenBSD:*:*) -- echo mipseb-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- wgrisc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -+ exit ;; -+ *:ekkoBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -+ exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; -+ macppc:MirBSD:*:*) -+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; -+ *:MirBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; - alpha:OSF1:*:*) -- if test $UNAME_RELEASE = "V4.0"; then -+ case $UNAME_RELEASE in -+ *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` -- fi -+ ;; -+ *5.*) -+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -+ ;; -+ esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; -@@ -271,147 +258,163 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac -+ # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. -- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit 0 ;; -+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -+ exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix -- exit 0 ;; -+ exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 -- exit 0 ;; -+ exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 -- exit 0;; -+ exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos -- exit 0 ;; -+ exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos -- exit 0 ;; -+ exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition -- exit 0 ;; -+ exit ;; -+ *:z/VM:*:*) -+ echo s390-ibm-zvmoe -+ exit ;; -+ *:OS400:*:*) -+ echo powerpc-ibm-os400 -+ exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} -- exit 0;; -+ exit ;; -+ arm:riscos:*:*|arm:RISCOS:*:*) -+ echo arm-unknown-riscos -+ exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp -- exit 0;; -+ exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi -- exit 0 ;; -+ exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 -- exit 0 ;; -- DRS?6000:UNIX_SV:4.2*:7*) -+ exit ;; -+ DRS?6000:unix:4.0:6*) -+ echo sparc-icl-nx6 -+ exit ;; -+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in -- sparc) echo sparc-icl-nx7 && exit 0 ;; -+ sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -- i86pc:SunOS:5.*:*) -+ exit ;; -+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` -- exit 0 ;; -+ exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac -- exit 0 ;; -+ exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ m68k:machten:*:*) -+ echo m68k-apple-machten${UNAME_RELEASE} -+ exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 -- exit 0 ;; -+ exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __cplusplus - #include /* for printf() prototype */ - int main (int argc, char *argv[]) { - #else - int main (argc, argv) int argc; char *argv[]; { -@@ -425,145 +428,150 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$ - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c \ -- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && -+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && -+ SYSTEM_NAME=`$dummy $dummyarg` && -+ { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax -- exit 0 ;; -+ exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix -- exit 0 ;; -+ exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 -- exit 0 ;; -+ exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 -- exit 0 ;; -+ exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 -- exit 0 ;; -+ exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 -- exit 0 ;; -+ exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd -- exit 0 ;; -+ exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` -- exit 0 ;; -+ exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. -- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix -- exit 0 ;; -+ exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -- echo rs6000-ibm-aix3.2.5 -+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` -+ then -+ echo "$SYSTEM_NAME" -+ else -+ echo rs6000-ibm-aix3.2.5 -+ fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi -- exit 0 ;; -- *:AIX:*:[45]) -+ exit ;; -+ *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix -- exit 0 ;; -+ exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 -- exit 0 ;; -+ exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to -- exit 0 ;; # report: romp-ibm BSD 4.3 -+ exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx -- exit 0 ;; -+ exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 -- exit 0 ;; -+ exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd -- exit 0 ;; -+ exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 -- exit 0 ;; -+ exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` -@@ -615,31 +623,41 @@ EOF - } - EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then -- # avoid double evaluation of $set_cc_for_build -- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build -- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null -+ eval $set_cc_for_build -+ -+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating -+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler -+ # generating 64-bit code. GNU and HP use different nomenclature: -+ # -+ # $ CC_FOR_BUILD=cc ./config.guess -+ # => hppa2.0w-hp-hpux11.23 -+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess -+ # => hppa64-hp-hpux11.23 -+ -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); -@@ -657,181 +675,224 @@ EOF - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 -- exit 0 ;; -+ exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd -- exit 0 ;; -+ exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd -- exit 0 ;; -+ exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix -- exit 0 ;; -+ exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf -- exit 0 ;; -+ exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf -- exit 0 ;; -+ exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi -- exit 0 ;; -+ exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites -- exit 0 ;; -+ exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - *:UNICOS/mp:*:*) -- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; -+ 5000:UNIX_System_V:4.*:*) -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:FreeBSD:*:*) -- # Determine whether the default compiler uses glibc. -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #if __GLIBC__ >= 2 -- LIBC=gnu -- #else -- LIBC= -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} -- exit 0 ;; -+ case ${UNAME_MACHINE} in -+ pc98) -+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ esac -+ exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -- exit 0 ;; -- i*:MINGW*:*) -+ exit ;; -+ *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 -- exit 0 ;; --#### MozillaHack --# Netscape's hacked uname -- xx:WINNT:* | xx:WIN95:*) -- echo i586-pc-msvc -- exit 0 ;; --### End MozillaHack -+ exit ;; -+ i*:windows32*:*) -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 -+ exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 -- exit 0 ;; -- x86:Interix*:3*) -- echo i586-pc-interix3 -- exit 0 ;; -+ exit ;; -+ *:Interix*:[3456]*) -+ case ${UNAME_MACHINE} in -+ x86) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ EM64T | authenticamd) -+ echo x86_64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks -- exit 0 ;; -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix -- exit 0 ;; -+ exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin -- exit 0 ;; -+ exit ;; -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) -+ echo x86_64-unknown-cygwin -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin -- exit 0 ;; -+ exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - *:GNU:*:*) -+ # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -- exit 0 ;; -+ exit ;; -+ *:GNU/*:*:*) -+ # other systems with GNU libc and userland -+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -+ exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix -- exit 0 ;; -+ exit ;; - arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ fi -+ exit ;; -+ avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ cris:Linux:*:*) -+ echo cris-axis-linux-gnu -+ exit ;; -+ crisv32:Linux:*:*) -+ echo crisv32-axis-linux-gnu -+ exit ;; -+ frv:Linux:*:*) -+ echo frv-unknown-linux-gnu -+ exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ m32r*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) -@@ -839,62 +900,78 @@ EOF - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -+ or32:Linux:*:*) -+ echo or32-unknown-linux-gnu -+ exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -- exit 0 ;; -+ exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac -- exit 0 ;; -+ exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux -- exit 0 ;; -+ exit ;; -+ sh64*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g -@@ -902,99 +979,113 @@ EOF - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit 0 ;; -+ exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit 0 ;; -+ exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit 0 ;; -+ exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else -- #ifdef __INTEL_COMPILER -+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif -+ #ifdef __dietlibc__ -+ LIBC=dietlibc -+ #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^LIBC/{ -+ s: ::g -+ p -+ }'`" -+ test x"${LIBC}" != x && { -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ exit -+ } -+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 -- exit 0 ;; -+ exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx -- exit 0 ;; -+ exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop -- exit 0 ;; -+ exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos -- exit 0 ;; -+ exit ;; -+ i*86:syllable:*:*) -+ echo ${UNAME_MACHINE}-pc-syllable -+ exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi -- exit 0 ;; -- i*86:*:5:[78]*) -+ exit ;; -+ i*86:*:5:[678]*) -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ -@@ -1002,214 +1093,248 @@ EOF - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi -- exit 0 ;; -+ exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 -- exit 0 ;; -+ exit ;; - paragon:*:*:*) - echo i860-intel-osf1 -- exit 0 ;; -+ exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi -- exit 0 ;; -+ exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv -- exit 0 ;; -+ exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv -- exit 0 ;; -+ exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix -- exit 0 ;; -- M68*:*:R3V[567]*:*) -- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) -+ exit ;; -+ M68*:*:R3V[5678]*:*) -+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; -+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4 && exit 0 ;; -+ && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 -- exit 0 ;; -+ exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi -- exit 0 ;; -+ exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 -- exit 0 ;; --#### MozillaHack -- *:*OpenVMS*:*:*) -- case "${UNAME_SYSTEM}" in -- POSIX_for_OpenVMS_AXP) echo alpha-dec-openvmsposix ;; -- POSIX_for_OpenVMS_VAX) echo vax-dec-openvmsposix ;; -- OpenVMS) echo alpha-dec-openvms ;; -- *) echo unknown-dec-openvms ;; -- esac -- exit 0 ;; --#### End MozillaHack -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 -- exit 0 ;; -+ exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 -- exit 0 ;; -+ exit ;; -+ i*86:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo ${UNAME_MACHINE}-stratus-vos -+ exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos -- exit 0 ;; -+ exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 -- exit 0 ;; -+ exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos -- exit 0 ;; -+ exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos -- exit 0 ;; -+ exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos -- exit 0 ;; -+ exit ;; -+ BeMac:Haiku:*:*) -+ echo powerpc-apple-haiku -+ exit ;; -+ BePC:Haiku:*:*) -+ echo i586-pc-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ SX-7:SUPER-UX:*:*) -+ echo sx7-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8:SUPER-UX:*:*) -+ echo sx8-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8R:SUPER-UX:*:*) -+ echo sx8r-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Darwin:*:*) -- case `uname -p` in -- *86) UNAME_PROCESSOR=i686 ;; -- powerpc) UNAME_PROCESSOR=powerpc ;; -+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -+ case $UNAME_PROCESSOR in -+ unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:QNX:*:4*) - echo i386-pc-qnx -- exit 0 ;; -- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) -+ exit ;; -+ NSE-?:NONSTOP_KERNEL:*:*) -+ echo nse-tandem-nsk${UNAME_RELEASE} -+ exit ;; -+ NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux -- exit 0 ;; -+ exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv -- exit 0 ;; -+ exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 -- exit 0 ;; -+ exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 -- exit 0 ;; -+ exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex -- exit 0 ;; -+ exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 -- exit 0 ;; -+ exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 -- exit 0 ;; -+ exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 -- exit 0 ;; -+ exit ;; - *:ITS:*:*) - echo pdp10-unknown-its -- exit 0 ;; -+ exit ;; -+ SEI:*:*:SEIUX) -+ echo mips-sei-seiux${UNAME_RELEASE} -+ exit ;; -+ *:DragonFly:*:*) -+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ exit ;; -+ *:*VMS:*:*) -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ case "${UNAME_MACHINE}" in -+ A*) echo alpha-dec-vms ; exit ;; -+ I*) echo ia64-dec-vms ; exit ;; -+ V*) echo vax-dec-vms ; exit ;; -+ esac ;; -+ *:XENIX:*:SysV) -+ echo i386-pc-xenix -+ exit ;; -+ i*86:skyos:*:*) -+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' -+ exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 - #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - - eval $set_cc_for_build - cat >$dummy.c </dev/null && $dummy && exit 0 -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - - # Apollos put the system type in the environment. - --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } -+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - - # Convex versions that predate uname can use getsysinfo(1) - - if [ -x /usr/convex/getsysinfo ] - then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - c34*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - c38*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - c4*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - esac - fi - - cat >&2 < in order to provide the needed - information to handle your system. - - config.guess timestamp = $timestamp - -Index: mozilla/nsprpub/build/autoconf/config.sub -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/build/autoconf/config.sub,v -retrieving revision 1.16 -diff -u -8 -p -r1.16 config.sub ---- mozilla/nsprpub/build/autoconf/config.sub 18 Apr 2003 19:20:18 -0000 1.16 -+++ mozilla/nsprpub/build/autoconf/config.sub 9 Feb 2009 04:04:16 -0000 -@@ -1,14 +1,15 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2008-01-16' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software - # can handle that machine. It does not imply ALL GNU software can. - # - # This file is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License as published by - # the Free Software Foundation; either version 2 of the License, or -@@ -16,24 +17,25 @@ timestamp='2003-02-22' - # - # This program is distributed in the hope that it will be useful, - # but WITHOUT ANY WARRANTY; without even the implied warranty of - # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - # GNU General Public License for more details. - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, --# Boston, MA 02111-1307, USA. -- -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. -+# - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. - # - # Configuration subroutine to validate and canonicalize a configuration type. - # Supply the specified configuration type as an argument. - # If it is invalid, we print an error message on stderr and exit with code 1. - # Otherwise, we print the canonical config type on stdout and succeed. - -@@ -65,46 +67,46 @@ Operation modes: - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - - Report bugs and patches to ." - - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - - help=" - Try \`$me --help' for more information." - - # Parse command line - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 -- exit 0;; -+ exit ;; - - * ) - break ;; - esac - done - - case $# in - 0) echo "$me: missing argument$help" >&2 -@@ -113,17 +115,19 @@ case $# in - *) echo "$me: too many arguments$help" >&2 - exit 1;; - esac - - # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi -@@ -139,17 +143,17 @@ case $os in - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis) -+ -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) -@@ -164,32 +168,40 @@ case $os in - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) -@@ -219,171 +231,196 @@ case $os in - os=-mint - ;; - esac - - # Decode aliases for certain CPU-COMPANY combinations. - case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. --#### MozillaHack --# mips*el --#### End MozillaHack - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -- | clipper \ -+ | am33_2.0 \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -+ | bfin \ -+ | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | fr30 | frv \ -+ | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ -- | ip2k \ -- | m32r | m68000 | m68k | m88k | mcore \ -- | mips | mipsbe | mipseb | mips*el | mipsle \ -+ | ip2k | iq2000 \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | mcore | mep \ -+ | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -+ | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ -+ | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -+ | mt \ - | msp430 \ -+ | nios | nios2 \ - | ns16k | ns32k \ -- | openrisc | or32 \ -+ | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | score \ -+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ -- | strongarm \ -- | tahoe | thumb | tic80 | tron \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu | strongarm \ -+ | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ -- | x86 | xscale | xstormy16 | xtensa \ -+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. --#### MozillaHack --# mips*el --#### End MozillaHack - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* \ -- | bs2000-* \ -+ | avr-* | avr32-* \ -+ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ -- | clipper-* | cydra-* \ -+ | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ -+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ -- | ip2k-* \ -- | m32r-* \ -+ | ip2k-* | iq2000-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | mcore-* \ -- | mips-* | mipsbe-* | mipseb-* | mips*el-* | mipsle-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* \ -+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -+ | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ -+ | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ -+ | mmix-* \ -+ | mt-* \ - | msp430-* \ -- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ -+ | nios-* | nios2-* \ -+ | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ -+ | sparclite-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ -- | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-*) - ;; -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown -+ ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; -+ abacus) -+ basic_machine=abacus-unknown -+ ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; -+ amd64) -+ basic_machine=x86_64-pc -+ ;; -+ amd64-*) -+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) -@@ -405,16 +442,24 @@ case $basic_machine in - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; -@@ -433,22 +478,37 @@ case $basic_machine in - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; -+ craynv) -+ basic_machine=craynv-cray -+ os=-unicosmp -+ ;; -+ cr16) -+ basic_machine=cr16-unknown -+ os=-elf -+ ;; - crds | unos) - basic_machine=m68k-crds - ;; -+ crisv32 | crisv32-* | etraxfs*) -+ basic_machine=crisv32-axis -+ ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; -+ crx) -+ basic_machine=crx-unknown -+ os=-elf -+ ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec -@@ -461,16 +521,20 @@ case $basic_machine in - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ djgpp) -+ basic_machine=i586-pc -+ os=-msdosdjgpp -+ ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; -@@ -611,66 +675,71 @@ case $basic_machine in - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; --#### MozillaHack -- i386-msvc | msvc) -- basic_machine=i386-pc -- os=-msvc -+ mingw32ce) -+ basic_machine=arm-unknown -+ os=-mingw32ce - ;; --#### End MozillaHack - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; -- mmix*) -- basic_machine=mmix-knuth -- os=-mmixware -- ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; -@@ -729,30 +798,29 @@ case $basic_machine in - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; -- nv1) -- basic_machine=nv1-cray -- os=-unicosmp -- ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; -- or32 | or32-*) -+ openrisc | openrisc-*) - basic_machine=or32-unknown -- os=-coff -+ ;; -+ os400) -+ basic_machine=powerpc-ibm -+ os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k -@@ -760,43 +828,63 @@ case $basic_machine in - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; -- pentiumii | pentium2) -+ pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; -+ pentium4) -+ basic_machine=i786-pc -+ ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -- pentiumii-* | pentium2-*) -+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -+ pentium4-*) -+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` -@@ -819,16 +907,20 @@ case $basic_machine in - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) -@@ -845,23 +937,37 @@ case $basic_machine in - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; -+ sde) -+ basic_machine=mipsisa32-sde -+ os=-elf -+ ;; -+ sei) -+ basic_machine=mips-sei -+ os=-seiux -+ ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; -+ sh5el) -+ basic_machine=sh5le-unknown -+ ;; -+ sh64) -+ basic_machine=sh64-unknown -+ ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; -@@ -926,45 +1032,49 @@ case $basic_machine in - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; -- tic4x | c4x*) -- basic_machine=tic4x-unknown -- os=-coff -- ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; -+ tile*) -+ basic_machine=tile-unknown -+ os=-linux-gnu -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; -+ tpf) -+ basic_machine=s390x-ibm -+ os=-tpf -+ ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; -@@ -998,16 +1108,20 @@ case $basic_machine in - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; -+ xbox) -+ basic_machine=i686-pc -+ os=-mingw32 -+ ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) -@@ -1028,39 +1142,39 @@ case $basic_machine in - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; -+ mmix) -+ basic_machine=mmix-knuth -+ ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparc | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; -@@ -1116,40 +1230,40 @@ case $os in - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. --#### MozillaHack --# msvc --#### End MozillaHack - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ -- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -openbsd* | -solidbsd* \ -+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ -+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ -- | -msvc* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -- | -powermax* | -dnix*) -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os -@@ -1157,34 +1271,40 @@ case $os in - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; -+ -linux-dietlibc) -+ os=-linux-dietlibc -+ ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; -+ -os400*) -+ os=-os400 -+ ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf -@@ -1196,16 +1316,19 @@ case $os in - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; -+ -syllable*) -+ os=-syllable -+ ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova -@@ -1218,16 +1341,19 @@ case $os in - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; -+ -tpf*) -+ os=-tpf -+ ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 -@@ -1254,16 +1380,19 @@ case $os in - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; -+ -zvmoe) -+ os=-zvmoe -+ ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -@@ -1276,25 +1405,34 @@ else - - # Note that if you're going to try to match "-MANUFACTURER" here (say, - # "-sun"), then you have to tell the case statement up towards the top - # that MANUFACTURER isn't an operating system. Otherwise, code above - # will signal an error saying that MANUFACTURER isn't an operating - # system, and we'll never get to this point. - - case $basic_machine in -+ score-*) -+ os=-elf -+ ;; -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) -@@ -1310,16 +1448,19 @@ case $basic_machine in - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; -+ mep-*) -+ os=-elf -+ ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff -@@ -1328,19 +1469,25 @@ case $basic_machine in - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; -+ *-haiku) -+ os=-haiku -+ ;; - *-ibm) - os=-aix - ;; -+ *-knuth) -+ os=-mmixware -+ ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf -@@ -1463,19 +1610,25 @@ case $basic_machine in - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; -+ -os400*) -+ vendor=ibm -+ ;; - -ptx*) - vendor=sequent - ;; -+ -tpf*) -+ vendor=ibm -+ ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi -@@ -1490,16 +1643,16 @@ case $basic_machine in - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; - esac - - echo $basic_machine$os --exit 0 -+exit - - # Local variables: - # eval: (add-hook 'write-file-hooks 'time-stamp) - # time-stamp-start: "timestamp='" - # time-stamp-format: "%:y-%02m-%02d" - # time-stamp-end: "'" - # End: -Index: mozilla/nsprpub/lib/ds/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/lib/ds/Makefile.in,v -retrieving revision 1.35.2.1 -diff -u -8 -p -r1.35.2.1 Makefile.in ---- mozilla/nsprpub/lib/ds/Makefile.in 19 Oct 2006 00:39:28 -0000 1.35.2.1 -+++ mozilla/nsprpub/lib/ds/Makefile.in 9 Feb 2009 04:04:16 -0000 -@@ -180,18 +180,22 @@ endif - export:: $(TARGETS) - $(INSTALL) -m 444 $(HEADERS) $(dist_includedir) - $(INSTALL) -m 444 $(TARGETS) $(dist_libdir) - ifdef SHARED_LIBRARY - ifeq ($(OS_ARCH),HP-UX) - $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_libdir) - $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_bindir) - else -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_bindir)/lib -+else - $(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_bindir) - endif - endif -+endif - ifeq ($(MOZ_BITS),16) - $(INSTALL) -m 444 $(HEADERS) $(MOZ_INCL) - $(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/lib - $(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/bin - endif - - -Index: mozilla/nsprpub/lib/libc/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/lib/libc/src/Makefile.in,v -retrieving revision 1.31.2.1 -diff -u -8 -p -r1.31.2.1 Makefile.in ---- mozilla/nsprpub/lib/libc/src/Makefile.in 19 Oct 2006 00:39:28 -0000 1.31.2.1 -+++ mozilla/nsprpub/lib/libc/src/Makefile.in 9 Feb 2009 04:04:17 -0000 -@@ -182,16 +182,20 @@ endif - - export:: $(TARGETS) - $(INSTALL) -m 444 $(TARGETS) $(dist_libdir) - ifdef SHARED_LIBRARY - ifeq ($(OS_ARCH),HP-UX) - $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_libdir) - $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_bindir) - else -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_bindir)/lib -+else - $(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_bindir) - endif - endif -+endif - ifeq ($(MOZ_BITS),16) - $(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/lib - $(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/bin - endif - -Index: mozilla/nsprpub/lib/prstreams/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/lib/prstreams/Makefile.in,v -retrieving revision 1.21.2.1 -diff -u -8 -p -r1.21.2.1 Makefile.in ---- mozilla/nsprpub/lib/prstreams/Makefile.in 19 Oct 2006 00:39:28 -0000 1.21.2.1 -+++ mozilla/nsprpub/lib/prstreams/Makefile.in 9 Feb 2009 04:04:17 -0000 -@@ -64,17 +64,17 @@ ifeq ($(OS_ARCH),SunOS) - endif - - ifeq ($(OS_ARCH), IRIX) - ifneq ($(OS_RELEASE),5.3) - CCC_ONLY_FLAGS += -exceptions - endif - endif - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CFLAGS += -frtti -fexceptions - endif - - INCLUDES = -I$(dist_includedir) - - HEADERS = $(wildcard $(srcdir)/*.h) - - CSRCS = \ -@@ -113,17 +113,17 @@ else - MKSHLIB = makeC++SharedLib_r -p 0 - endif - OS_LIBS += -ldl - endif - endif - endif - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - OS_LIBS = -lstdc++.r4 - endif - - ifeq ($(OS_ARCH), UNIXWARE) - OS_LIBS += -lC - endif - - EXTRA_LIBS = $(LIBNSPR) -Index: mozilla/nsprpub/pr/include/prio.h -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/include/prio.h,v -retrieving revision 3.40 -diff -u -8 -p -r3.40 prio.h ---- mozilla/nsprpub/pr/include/prio.h 25 Apr 2004 15:00:47 -0000 3.40 -+++ mozilla/nsprpub/pr/include/prio.h 9 Feb 2009 04:04:25 -0000 -@@ -169,38 +169,41 @@ struct PRIPv6Addr { - #define pr_s6_addr32 _S6_un._S6_u32 - #define pr_s6_addr64 _S6_un._S6_u64 - - typedef struct PRIPv6Addr PRIPv6Addr; - - union PRNetAddr { - struct { - PRUint16 family; /* address family (0x00ff maskable) */ --#ifdef XP_BEOS -- char data[10]; /* Be has a smaller structure */ --#else -+#ifndef XP_BEOS - char data[14]; /* raw address data */ -+#else -+ char data[30]; - #endif - } raw; - struct { - PRUint16 family; /* address family (AF_INET) */ - PRUint16 port; /* port number */ - PRUint32 ip; /* The actual 32 bits of address */ --#ifdef XP_BEOS -- char pad[4]; /* Be has a smaller structure */ --#else -+#ifndef XP_BEOS - char pad[8]; -+#else -+ char pad[24]; - #endif - } inet; - struct { - PRUint16 family; /* address family (AF_INET6) */ - PRUint16 port; /* port number */ - PRUint32 flowinfo; /* routing information */ - PRIPv6Addr ip; /* the actual 128 bits of address */ - PRUint32 scope_id; /* set of interfaces for a scope */ -+#ifdef XP_BEOS -+ char pad[4]; -+#endif - } ipv6; - #if defined(XP_UNIX) || defined(XP_OS2_EMX) - struct { /* Unix domain socket address */ - PRUint16 family; /* address family (AF_UNIX) */ - #ifdef XP_OS2 - char path[108]; /* null-terminated pathname */ - /* bind fails if size is not 108. */ - #else -Index: mozilla/nsprpub/pr/include/prtypes.h -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/include/prtypes.h,v -retrieving revision 3.30.2.2 -diff -u -8 -p -r3.30.2.2 prtypes.h ---- mozilla/nsprpub/pr/include/prtypes.h 5 Apr 2006 21:51:21 -0000 3.30.2.2 -+++ mozilla/nsprpub/pr/include/prtypes.h 9 Feb 2009 04:04:26 -0000 -@@ -93,29 +93,48 @@ - #define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type - - #define PR_CALLBACK - #define PR_CALLBACK_DECL - #define PR_STATIC_CALLBACK(__x) static __x - - #elif defined(XP_BEOS) - -+/* GCC 3.3 and later support the visibility attribute. */ -+#if (__GNUC__ >= 4) || \ -+ (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) -+#define PR_VISIBILITY_DEFAULT __attribute__((visibility("default"))) -+#define PR_EXPORT(__type) extern PR_VISIBILITY_DEFAULT __type -+#define PR_EXPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type -+#define PR_IMPORT(__type) extern PR_VISIBILITY_DEFAULT __type -+#define PR_IMPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type -+ -+#define PR_EXTERN(__type) extern PR_VISIBILITY_DEFAULT __type -+#define PR_IMPLEMENT(__type) PR_VISIBILITY_DEFAULT __type -+#define PR_EXTERN_DATA(__type) extern PR_VISIBILITY_DEFAULT __type -+#define PR_IMPLEMENT_DATA(__type) PR_VISIBILITY_DEFAULT __type -+#define PR_CALLBACK -+#define PR_CALLBACK_DECL -+#define PR_STATIC_CALLBACK(__x) static __x -+ -+#else - #define PR_EXPORT(__type) extern __declspec(dllexport) __type - #define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type - #define PR_IMPORT(__type) extern __declspec(dllexport) __type - #define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type - - #define PR_EXTERN(__type) extern __declspec(dllexport) __type - #define PR_IMPLEMENT(__type) __declspec(dllexport) __type - #define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type - #define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type - - #define PR_CALLBACK - #define PR_CALLBACK_DECL - #define PR_STATIC_CALLBACK(__x) static __x -+#endif - - #elif defined(WIN16) - - #define PR_CALLBACK_DECL __cdecl - - #if defined(_WINDLL) - #define PR_EXPORT(__type) extern __type _cdecl _export _loadds - #define PR_IMPORT(__type) extern __type _cdecl _export _loadds -Index: mozilla/nsprpub/pr/include/md/_beos.cfg -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/include/md/_beos.cfg,v -retrieving revision 3.5.214.1 -diff -u -8 -p -r3.5.214.1 _beos.cfg ---- mozilla/nsprpub/pr/include/md/_beos.cfg 5 Apr 2006 22:00:45 -0000 3.5.214.1 -+++ mozilla/nsprpub/pr/include/md/_beos.cfg 9 Feb 2009 04:04:27 -0000 -@@ -15,16 +15,17 @@ - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): -+ * Fredrik Holmqvist - * - * 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 -@@ -35,33 +36,38 @@ - * - * ***** END LICENSE BLOCK ***** */ - - #ifndef nspr_cpucfg___ - #define nspr_cpucfg___ - - #ifndef XP_BEOS - #define XP_BEOS --#undef XP_UNIX - #endif - - #ifndef BEOS - #define BEOS - #endif - - #define PR_AF_INET6 5 /* same as AF_INET6 */ - - #ifdef __powerpc__ - #undef IS_LITTLE_ENDIAN - #define IS_BIG_ENDIAN 1 - #else - #define IS_LITTLE_ENDIAN 1 - #undef IS_BIG_ENDIAN - #endif - -+/* -+ * Fixme: Should be done according to arch -+ * Currently only x86/ia64. -+ */ -+#define PR_ALIGN_OF_WORD 4 -+ - #define PR_BYTES_PER_BYTE 1 - #define PR_BYTES_PER_SHORT 2 - #define PR_BYTES_PER_INT 4 - #define PR_BYTES_PER_INT64 8 - #define PR_BYTES_PER_LONG 4 - #define PR_BYTES_PER_FLOAT 4 - #define PR_BYTES_PER_DOUBLE 8 - #define PR_BYTES_PER_WORD 4 -Index: mozilla/nsprpub/pr/include/md/_beos.h -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/include/md/_beos.h,v -retrieving revision 3.23 -diff -u -8 -p -r3.23 _beos.h ---- mozilla/nsprpub/pr/include/md/_beos.h 17 Jan 2005 22:00:53 -0000 3.23 -+++ mozilla/nsprpub/pr/include/md/_beos.h 9 Feb 2009 04:04:27 -0000 -@@ -15,16 +15,17 @@ - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): -+ * Fredrik Holmqvist - * - * 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 -@@ -33,27 +34,26 @@ - * 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 ***** */ - - #ifndef nspr_beos_defs_h___ - #define nspr_beos_defs_h___ - --#include "prtypes.h" --#include "prio.h" --#include "prthread.h" --#include "prproces.h" --#include "prmem.h" --#include "obsolete/prsem.h" - #include -- --#include --#include - #include -+#include -+ -+/* -+ * Hack for Cross compile -+ */ -+#define FD_SETSIZE 1024 -+ -+#undef bool - - /* - * Internal configuration macros - */ - - #ifdef BONE_VERSION - #define _PR_HAVE_SOCKADDR_LEN - #endif -@@ -62,104 +62,66 @@ - #define _PR_SI_SYSNAME "BEOS" - #ifdef __powerpc__ - #define _PR_SI_ARCHITECTURE "ppc" - #else - #define _PR_SI_ARCHITECTURE "x86" - #endif - #define PR_DLL_SUFFIX ".so" - --#define _PR_VMBASE 0x30000000 --#define _PR_STACK_VMBASE 0x50000000 - #define _MD_DEFAULT_STACK_SIZE 65536L --#define _MD_MMAP_FLAGS MAP_PRIVATE - - #undef HAVE_STACK_GROWING_UP - #define HAVE_DLL --#define _PR_NO_CLOCK_TIMER - - /* - * The Atomic operations - */ - - #define _PR_HAVE_ATOMIC_OPS -+#ifdef __powerpc__ - #define _MD_INIT_ATOMIC _MD_AtomicInit -+#else -+#define _MD_INIT_ATOMIC() -+#endif - #define _MD_ATOMIC_INCREMENT _MD_AtomicIncrement - #define _MD_ATOMIC_ADD _MD_AtomicAdd - #define _MD_ATOMIC_DECREMENT _MD_AtomicDecrement - #define _MD_ATOMIC_SET _MD_AtomicSet - -+/* Makes sure to don't create cvar when creating sem */ - #define HAVE_CVAR_BUILT_ON_SEM -+ -+/* Not sure this is needed, but no harm. */ - #define _PR_GLOBAL_THREADS_ONLY -+ - #define _PR_BTHREADS --#define _PR_NEED_FAKE_POLL --#define _PR_HAVE_PEEK_BUFFER --#define _PR_PEEK_BUFFER_MAX (16 * 1024) --#define _PR_FD_NEED_EMULATE_MSG_PEEK(fd) 1 --#define _PR_CONNECT_DOES_NOT_BIND -+ - #define _PR_HAVE_O_APPEND - --/* Define threading functions and objects as native BeOS */ -+/* Define threading functions and objects as native BeOS -+ Used by bthreads. */ -+ - struct _MDThread { - thread_id tid; /* BeOS thread handle */ - sem_id joinSem; /* sems used to synchronzie joining */ - PRBool is_joining; /* TRUE if someone is currently waiting to - join this thread */ - }; - --struct _MDThreadStack { -- PRInt8 notused; --}; -- --/* -- * Lock and Semaphore related definitions -- */ -- --struct _MDLock { -- sem_id semaphoreID; -- int32 benaphoreCount; --}; -- --struct _MDCVar { -- sem_id sem1; -- sem_id sem2; -- int16 count; --}; -- --struct _MDSemaphore { -- sem_id sid; --}; -- --/* --** CPU-related definitions --*/ --struct _MDCPU { -- int8 unused; --}; -- - /* - ** Process-related definitions - */ - struct _MDProcess { - pid_t pid; - }; - --struct _MDSegment { -- PRInt8 notused; --}; -- - /* - ** File- and directory-related definitions - */ -- --#ifndef BONE_VERSION --#define BE_SOCK_SHUTDOWN_READ 0x01 --#define BE_SOCK_SHUTDOWN_WRITE 0x02 --#endif -- - struct _MDFileDesc { - PRInt32 osfd; - PRInt32 sock_state; - PRBool accepted_socket; - PRNetAddr peer_addr; - #ifndef BONE_VERSION - PRBool connectValueValid; - int connectReturnValue; -@@ -173,441 +135,114 @@ struct _MDDir { - - #define PR_DIRECTORY_SEPARATOR '/' - #define PR_DIRECTORY_SEPARATOR_STR "/" - #define PR_PATH_SEPARATOR ':' - #define PR_PATH_SEPARATOR_STR ":" - - #define GETTIMEOFDAY(tp) gettimeofday((tp), NULL) - --/* --- Memory-mapped files stuff --- not implemented on BeOS */ -- --struct _MDFileMap { -- PRInt8 unused; --}; - - /* - * Network related definitions. - */ - - #ifndef BONE_VERSION -+#define BE_SOCK_SHUTDOWN_READ 0x01 -+#define BE_SOCK_SHUTDOWN_WRITE 0x02 -+ - #define IPPROTO_IP 0 - #define AF_UNIX 2 - #define TCP_NODELAY SO_NONBLOCK - #define SO_LINGER -1 - #define SO_ERROR 4 --#endif -- --#define _PR_INTERRUPT_CHECK_INTERVAL_SECS 5 - --#ifndef BONE_VERSION - /* these aren't actually used. if they are, we're screwed */ - struct protoent { - char *p_name; /* official protocol name */ - char **p_aliases; /* alias list */ - int p_proto; /* protocol # */ - }; - - struct protoent* getprotobyname(const char* name); - struct protoent* getprotobynumber(int number); - #endif - -+/* Used by bnet.c */ -+#define _PR_INTERRUPT_CHECK_INTERVAL_SECS 5 -+ - /* - * malloc() related definitions. -+ * Avoids prmalloc.c's and prmem's code - */ -- - #undef _PR_OVERRIDE_MALLOC - - /* Miscellaneous */ - --#define _MD_ERRNO() (errno) -+#define _MD_ERRNO() (errno) - --#define _MD_CLEANUP_BEFORE_EXIT _MD_cleanup_before_exit --#define _MD_EXIT _MD_exit -+#define _MD_CLEANUP_BEFORE_EXIT() -+#define _MD_EXIT exit - - #define _MD_GET_ENV getenv - #define _MD_PUT_ENV putenv - --#define _MD_EARLY_INIT _MD_early_init --#define _MD_FINAL_INIT _MD_final_init -- --/* CPU Stuff */ -- --#define _MD_INIT_CPUS _MD_init_cpus --#define _MD_WAKEUP_CPUS _MD_wakeup_cpus --#define _MD_START_INTERRUPTS _MD_start_interrupts --#define _MD_STOP_INTERRUPTS _MD_stop_interrupts --#define _MD_DISABLE_CLOCK_INTERRUPTS _MD_disable_clock_interrupts --#define _MD_BLOCK_CLOCK_INTERRUPTS _MD_block_clock_interrupts --#define _MD_UNBLOCK_CLOCK_INTERRUPTS _MD_unblock_clock_interrupts --#define _MD_CLOCK_INTERRUPT _MD_clock_interrupt --#define _MD_INIT_STACK _MD_init_stack --#define _MD_CLEAR_STACK _MD_clear_stack --// #define _MD_GET_INTSOFF _MD_get_intsoff --// #define _MD_SET_INTSOFF _MD_set_intsoff --#define _MD_CURRENT_CPU _MD_current_cpu --#define _MD_SET_CURRENT_CPU _MD_set_current_cpu --#define _MD_INIT_RUNNING_CPU _MD_init_running_cpu --#define _MD_PAUSE_CPU _MD_pause_cpu -+#define _MD_EARLY_INIT() -+#ifdef BONE_VERSION -+#define _MD_FINAL_INIT() -+#else -+#define _MD_FINAL_INIT _MD_final_init_netserver -+#endif - - /* Thread stuff */ - - #define _MD_CURRENT_THREAD() PR_GetCurrentThread() --// #define _MD_GET_ATTACHED_THREAD _MD_get_attached_thread --#define _MD_LAST_THREAD _MD_last_thread --#define _MD_SET_CURRENT_THREAD _MD_set_current_THREAD --#define _MD_SET_LAST_THREAD _MD_set_last_thread --#define _MD_INIT_THREAD _MD_init_thread --#define _MD_EXIT_THREAD _MD_exit_thread --#define _MD_INIT_ATTACHED_THREAD _MD_init_attached_thread -- --#define _MD_SUSPEND_THREAD _MD_suspend_thread --#define _MD_RESUME_THREAD _MD_resume_thread --#define _MD_SUSPEND_CPU _MD_suspend_cpu --#define _MD_RESUME_CPU _MD_resume_cpu --#define _MD_BEGIN_SUSPEND_ALL _MD_begin_suspend_all --#define _MD_END_SUSPEND_ALL _MD_end_suspend_all --#define _MD_BEGIN_RESUME_ALL _MD_begin_resume_all --#define _MD_END_RESUME_ALL _MD_end_resume_all -- --#define _MD_GET_SP _MD_get_sp -- --#define _MD_CLEAN_THREAD _MD_clean_thread --#define _MD_CREATE_PRIMORDIAL_USER_THREAD _MD_create_primordial_user_thread --#define _MD_CREATE_USER_THREAD _MD_create_user_thread --#define _MD_INIT_PRIMORDIAL_THREAD _MD_init_primordial_thread --#define _MD_CREATE_THREAD _MD_create_thread --#define _MD_YIELD _MD_yield --#define _MD_SET_PRIORITY _MD_set_priority -- --#define _MD_SUSPENDALL _MD_suspendall --#define _MD_RESUMEALL _MD_resumeall -- --#define _MD_SWITCH_CONTEXT _MD_switch_context --#define _MD_RESTORE_CONTEXT _MD_restore_context -- --#define _MD_WAIT _MD_wait --#define _MD_WAKEUP_WAITER _MD_wakeup_waiter -- --#define _MD_SETTHREADAFFINITYMASK _MD_setthreadaffinitymask --#define _MD_GETTHREADAFFINITYMASK _MD_getthreadaffinitymask -- --/* Thread Synchronization */ -- --#define _MD_INIT_LOCKS _MD_init_locks --#define _MD_NEW_LOCK _MD_new_lock --#define _MD_FREE_LOCK _MD_free_lock --#define _MD_LOCK _MD_lock --#define _MD_TEST_AND_LOCK _MD_test_and_lock --#define _MD_UNLOCK _MD_unlock --#define _MD_IOQ_LOCK _MD_ioq_lock --#define _MD_IOQ_UNLOCK _MD_ioq_unlock --#define _MD_NEW_SEM _MD_new_sem --#define _MD_DESTROY_SEM _MD_destroy_sem --#define _MD_TIMED_WAIT_SEM _MD_timed_wait_sem --#define _MD_WAIT_SEM _MD_wait_sem --#define _MD_POST_SEM _MD_post_sem --// #define _MD_NEW_CV _MD_new_cv --// #define _MD_FREE_CV _MD_free_cv --// #define _MD_WAIT_CV _MD_wait_cv --// #define _MD_NOTIFY_CV _MD_notify_cv --// #define _MD_NOTIFYALL_CV _MD_notifyall_cv -+ - - /* File I/O */ - --/* don't need any I/O initializations */ --#define _MD_INIT_IO() --#define _MD_INIT_FILEDESC(fd) -- --#define _MD_OPEN_DIR _MD_open_dir --#define _MD_READ_DIR _MD_read_dir --#define _MD_CLOSE_DIR _MD_close_dir --#define _MD_MAKE_NONBLOCK _MD_make_nonblock --#define _MD_SET_FD_INHERITABLE _MD_set_fd_inheritable --#define _MD_INIT_FD_INHERITABLE _MD_init_fd_inheritable --#define _MD_QUERY_FD_INHERITABLE _MD_query_fd_inheritable --#define _MD_OPEN _MD_open --#define _MD_OPEN_FILE _MD_open --#define _MD_CLOSE_FILE _MD_close_file --#define _MD_READ _MD_read --#define _MD_WRITE _MD_write --#define _MD_WRITEV _MD_writev -+#define _PR_MD_WRITE -+ -+/* -+These are defined in primpl.h so that they are avail for all, but we -+have no calls, and pthreads doesn't either. - #define _MD_LSEEK _MD_lseek - #define _MD_LSEEK64 _MD_lseek64 --#define _MD_FSYNC _MD_fsync --#define _MD_DELETE _MD_delete -+ - #define _MD_GETFILEINFO _MD_getfileinfo - #define _MD_GETFILEINFO64 _MD_getfileinfo64 - #define _MD_GETOPENFILEINFO _MD_getopenfileinfo - #define _MD_GETOPENFILEINFO64 _MD_getopenfileinfo64 --#define _MD_RENAME _MD_rename --#define _MD_ACCESS _MD_access --#define _MD_STAT stat --#define _MD_MKDIR _MD_mkdir --#define _MD_MAKE_DIR _MD_mkdir --#define _MD_RMDIR _MD_rmdir --#define _MD_PR_POLL _MD_pr_poll -+*/ - - /* Network I/O */ - --#define _MD_CLOSE_SOCKET _MD_close_socket --#define _MD_CONNECT _MD_connect --#define _MD_ACCEPT _MD_accept --#define _MD_BIND _MD_bind --#define _MD_LISTEN _MD_listen --#define _MD_SHUTDOWN _MD_shutdown --#define _MD_RECV _MD_recv --#define _MD_SEND _MD_send --#define _MD_ACCEPT_READ _MD_accept_read --#define _MD_GETSOCKNAME _MD_getsockname --#define _MD_GETPEERNAME _MD_getpeername --#define _MD_GETSOCKOPT _MD_getsockopt --#define _MD_SETSOCKOPT _MD_setsockopt --#define _MD_RECVFROM _MD_recvfrom --#define _MD_SENDTO _MD_sendto --#define _MD_SOCKETPAIR _MD_socketpair --#define _MD_SOCKET _MD_socket --#define _MD_SOCKETAVAILABLE _MD_socketavailable --#define _MD_PIPEAVAILABLE _MD_socketavailable -- --#define _MD_GET_SOCKET_ERROR() (errno) -+#define _MD_GET_SOCKET_ERROR() (errno) - #define _MD_GETHOSTNAME _MD_gethostname - --#define _MD_SELECT select -- - /* Process management */ - - #define _MD_CREATE_PROCESS _MD_create_process - #define _MD_DETACH_PROCESS _MD_detach_process - #define _MD_WAIT_PROCESS _MD_wait_process - #define _MD_KILL_PROCESS _MD_kill_process - --/* Atomic data operations */ -- --// #define _MD_INIT_ATOMIC _MD_init_atomic --// #define _MD_ATOMIC_INCREMENT _MD_atomic_increment --// #define _MD_ATOMIC_DECREMENT _MD_atomic_decrement --// #define _MD_ATOMIC_SET _MD_atomic_set -- --/* memory management */ -- --#define _MD_INIT_SEGS _MD_init_segs --#define _MD_ALLOC_SEGMENT _MD_alloc_segment --#define _MD_FREE_SEGMENT _MD_free_segment -- - /* Memory mapped file I/O */ - - #define _MD_CREATE_FILE_MAP _MD_create_file_map - #define _MD_GET_MEM_MAP_ALIGNMENT _MD_get_mem_map_alignment - #define _MD_MEM_MAP _MD_mem_map - #define _MD_MEM_UNMAP _MD_mem_unmap - #define _MD_CLOSE_FILE_MAP _MD_close_file_map - - /* Time related */ - --#define _MD_NOW _MD_now --#define _MD_INTERVAL_INIT _MD_interval_init -+#define _MD_INTERVAL_INIT() - #define _MD_GET_INTERVAL _MD_get_interval - #define _MD_INTERVAL_PER_SEC _MD_interval_per_sec - - /* File locking */ - - #define _MD_LOCKFILE _MD_lockfile - #define _MD_TLOCKFILE _MD_tlockfile - #define _MD_UNLOCKFILE _MD_unlockfile - --/** -- * Prototypes for machine dependent function implementations. (Too bad -- * NSPR's MD system blows so much that we have to reiterate every stinking -- * thing we implement here in our MD header file.) -- */ -- --/* Miscellaneous */ -- --NSPR_API(void) _MD_cleanup_before_exit(void); --NSPR_API(void) _MD_exit(PRIntn status); -- --NSPR_API(char*) _MD_get_env(const char *name); --NSPR_API(PRIntn) _MD_put_env(const char *name); -- --NSPR_API(void) _MD_early_init(void); --NSPR_API(void) _MD_final_init(void); -- --/* CPU Stuff */ -- --NSPR_API(void) _MD_init_cpus(); --NSPR_API(void) _MD_wakeup_cpus(); --NSPR_API(void) _MD_start_interrupts(void); --NSPR_API(void) _MD_stop_interrupts(void); --NSPR_API(void) _MD_disable_clock_interrupts(void); --NSPR_API(void) _MD_block_clock_interrupts(void); --NSPR_API(void) _MD_unblock_clock_interrupts(void); --NSPR_API(void) _MD_clock_interrupt(void); --// NSPR_API(void) _MD_init_stack(PRThreadStack *ts, PRIntn redzone); --// NSPR_API(void) _MD_clear_stack(PRThreadStack* ts); --// NSPR_API(PRInt32) _MD_get_intsoff(void); --// NSPR_API(void) _MD_set_intsoff(PRInt32 _val); --// NSPR_API(_PRCPU*) _MD_current_cpu(void); --// NSPR_API(void) _MD_set_current_cpu(_PRCPU *cpu); --// NSPR_API(void) _MD_init_running_cpu(_PRCPU *cpu); --NSPR_API(PRInt32) _MD_pause_cpu(PRIntervalTime timeout); -- --/* Thread stuff */ -- --// NSPR_API(PRThread*) _MD_current_thread(void); --NSPR_API(PRThread*) _MD_get_attached_thread(void); --NSPR_API(PRThread*) _MD_last_thread(void); --NSPR_API(void) _MD_set_current_thread(PRThread *thread); --NSPR_API(void) _MD_set_last_thread(PRThread *thread); --NSPR_API(PRStatus) _MD_init_thread(PRThread *thread); --NSPR_API(void) _MD_exit_thread(PRThread *thread); --NSPR_API(PRStatus) _MD_init_attached_thread(PRThread *thread); -- --NSPR_API(void) _MD_suspend_thread(PRThread *thread); --NSPR_API(void) _MD_resume_thread(PRThread *thread); --// NSPR_API(void) _MD_suspend_cpu(_PRCPU *cpu); --// NSPR_API(void) _MD_resume_cpu(_PRCPU *cpu); --NSPR_API(void) _MD_begin_suspend_all(void); --NSPR_API(void) _MD_end_suspend_all(void); --NSPR_API(void) _MD_begin_resume_all(void); --NSPR_API(void) _MD_end_resume_all(void); -- --NSPR_API(void *) _MD_get_sp(PRThread *thread); -- --NSPR_API(void) _MD_clean_thread(PRThread *thread); --NSPR_API(void) _MD_create_primordial_user_thread(PRThread *); --NSPR_API(PRThread*) _MD_create_user_thread(PRUint32 stacksize, void (*start)(void *), void *arg); --NSPR_API(void) _MD_init_primordial_thread(PRThread *thread); --NSPR_API(PRStatus) _MD_create_thread(PRThread *thread, void (*start)(void *), PRThreadPriority priority, PRThreadScope scope, PRThreadState state, PRUint32 stackSize); --NSPR_API(void) _MD_yield(void); --NSPR_API(void) _MD_set_priority(struct _MDThread *md, PRThreadPriority newPri); -- --NSPR_API(void) _MD_suspendall(void); --NSPR_API(void) _MD_resumeall(void); -- --NSPR_API(void) _MD_init_context(PRThread *thread, char *top, void (*start) (void), PRBool *status); --NSPR_API(void) _MD_switch_context(PRThread *thread); --NSPR_API(void) _MD_restore_context(PRThread *thread); -- --NSPR_API(PRStatus) _MD_wait(PRThread *, PRIntervalTime timeout); --NSPR_API(PRStatus) _MD_wakeup_waiter(PRThread *); -- --NSPR_API(PRInt32) _MD_setthreadaffinitymask(PRThread *thread, PRUint32 mask ); --NSPR_API(PRInt32) _MD_getthreadaffinitymask(PRThread *thread, PRUint32 *mask); -- --/* Thread Synchronization */ -- --NSPR_API(void) _MD_init_locks(void); --NSPR_API(PRStatus) _MD_new_lock(struct _MDLock *md); --NSPR_API(void) _MD_free_lock(struct _MDLock *md); --NSPR_API(void) _MD_lock(struct _MDLock *md); --NSPR_API(PRIntn) _MD_test_and_lock(struct _MDLock *md); --NSPR_API(void) _MD_unlock(struct _MDLock *md); --NSPR_API(void) _MD_ioq_lock(void); --NSPR_API(void) _MD_ioq_unlock(void); --NSPR_API(void) _MD_new_sem(struct _MDSemaphore *md, PRUintn value); --NSPR_API(void) _MD_destroy_sem(struct _MDSemaphore *md); --NSPR_API(PRStatus) _MD_timed_wait_sem(struct _MDSemaphore *md, PRIntervalTime timeout); --NSPR_API(PRStatus) _MD_wait_sem(struct _MDSemaphore *md); --NSPR_API(void) _MD_post_sem(struct _MDSemaphore *md); --// NSPR_API(PRInt32) _MD_new_cv(struct _MDCVar *md); --// NSPR_API(void) _MD_free_cv(struct _MDCVar *md); --// NSPR_API(void) _MD_wait_cv(struct _MDCVar *mdCVar, struct _MDLock *mdLock, PRIntervalTime timeout); --// NSPR_API(void) _MD_notify_cv(struct _MDCVar *md, struct _MDLock *lock); --// NSPR_API(void) _MD_notifyall_cv(struct _MDCVar *md, struct _MDLock *lock); -- --/* File I/O */ -- --// NSPR_API(void) _MD_init_io(void); --NSPR_API(PRStatus) _MD_open_dir(struct _MDDir *md,const char *name); --NSPR_API(char *) _MD_read_dir(struct _MDDir *md, PRIntn flags); --NSPR_API(PRInt32) _MD_close_dir(struct _MDDir *md); --NSPR_API(void) _MD_make_nonblock(PRFileDesc *fd); --NSPR_API(void) _MD_init_fd_inheritable(PRFileDesc *fd, PRBool imported); --NSPR_API(void) _MD_query_fd_inheritable(PRFileDesc *fd); --NSPR_API(PRInt32) _MD_open(const char *name, PRIntn osflags, PRIntn mode); --NSPR_API(PRInt32) _MD_close_file(PRInt32 osfd); --NSPR_API(PRInt32) _MD_read(PRFileDesc *fd, void *buf, PRInt32 amount); --NSPR_API(PRInt32) _MD_write(PRFileDesc *fd, const void *buf, PRInt32 amount); --NSPR_API(PRInt32) _MD_writev(PRFileDesc *fd, const PRIOVec *iov, PRInt32 iov_size, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_lseek(PRFileDesc *fd, PRInt32 offset, int whence); --NSPR_API(PRInt64) _MD_lseek64(PRFileDesc *fd, PRInt64 offset, int whence); --NSPR_API(PRInt32) _MD_fsync(PRFileDesc *fd); --NSPR_API(PRInt32) _MD_delete(const char *name); --NSPR_API(PRInt32) _MD_getfileinfo(const char *fn, PRFileInfo *info); --NSPR_API(PRInt32) _MD_getfileinfo64(const char *fn, PRFileInfo64 *info); --NSPR_API(PRInt32) _MD_getopenfileinfo(const PRFileDesc *fd, PRFileInfo *info); --NSPR_API(PRInt32) _MD_getopenfileinfo64(const PRFileDesc *fd, PRFileInfo64 *info); --NSPR_API(PRInt32) _MD_rename(const char *from, const char *to); --NSPR_API(PRInt32) _MD_access(const char *name, PRIntn how); --NSPR_API(PRInt32) _MD_stat(const char *name, struct stat *buf); --NSPR_API(PRInt32) _MD_mkdir(const char *name, PRIntn mode); --NSPR_API(PRInt32) _MD_rmdir(const char *name); --NSPR_API(PRInt32) _MD_pr_poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout); -- --/* Network I/O */ --NSPR_API(PRInt32) _MD_close_socket(PRInt32 osfd); --NSPR_API(PRInt32) _MD_connect(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_bind(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen); --NSPR_API(PRInt32) _MD_listen(PRFileDesc *fd, PRIntn backlog); --NSPR_API(PRInt32) _MD_shutdown(PRFileDesc *fd, PRIntn how); --NSPR_API(PRInt32) _MD_recv(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_send(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_accept_read(PRFileDesc *sd, PRInt32 *newSock, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout); --// NSPR_API(PRInt32) _MD_fast_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout, PRBool fast, _PR_AcceptTimeoutCallback callback, void *callbackArg); --// NSPR_API(PRInt32) _MD_fast_accept_read(PRFileDesc *sd, PRInt32 *newSock, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout, PRBool fast, _PR_AcceptTimeoutCallback callback, void *callbackArg); --// NSPR_API(void) _MD_update_accept_context(PRInt32 s, PRInt32 ls); --NSPR_API(PRStatus) _MD_getsockname(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen); --NSPR_API(PRStatus) _MD_getpeername(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen); --NSPR_API(PRStatus) _MD_getsockopt(PRFileDesc *fd, PRInt32 level, PRInt32 optname, char* optval, PRInt32* optlen); --NSPR_API(PRStatus) _MD_setsockopt(PRFileDesc *fd, PRInt32 level, PRInt32 optname, const char* optval, PRInt32 optlen); --NSPR_API(PRInt32) _MD_recvfrom(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_sendto(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags, const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_socketpair(int af, int type, int flags, PRInt32 *osfd); --NSPR_API(PRInt32) _MD_socket(int af, int type, int flags); --NSPR_API(PRInt32) _MD_socketavailable(PRFileDesc *fd); -- --// NSPR_API(PRInt32) _MD_get_socket_error(void); --NSPR_API(PRStatus) _MD_gethostname(char *name, PRUint32 namelen); -- --/* Process management */ -- --NSPR_API(PRProcess *) _MD_create_process(const char *path, char *const *argv, char *const *envp, const PRProcessAttr *attr); --NSPR_API(PRStatus) _MD_detach_process(PRProcess *process); --NSPR_API(PRStatus) _MD_wait_process(PRProcess *process, PRInt32 *exitCode); --NSPR_API(PRStatus) _MD_kill_process(PRProcess *process); -- --/* Atomic data operations */ -- --// NSPR_API(void) _MD_init_atomic(void); --// NSPR_API(PRInt32) _MD_atomic_increment(PRInt32 *); --// NSPR_API(PRInt32) _MD_atomic_decrement(PRInt32 *); --// NSPR_API(PRInt32) _MD_atomic_set(PRInt32 *, PRInt32); -- --/* Memory management */ -- --NSPR_API(void) _MD_init_segs(void); --NSPR_API(PRStatus) _MD_alloc_segment(PRSegment *seg, PRUint32 size, void *vaddr); --NSPR_API(void) _MD_free_segment(PRSegment *seg); -- --/* Memory mapped file I/O */ -- --NSPR_API(PRStatus) _MD_create_file_map(PRFileMap *fmap, PRInt64 size); --NSPR_API(PRInt32) _MD_get_mem_map_alignment(void); --NSPR_API(void *) _MD_mem_map(PRFileMap *fmap, PRInt64 offset, PRUint32 len); --NSPR_API(PRStatus) _MD_mem_unmap(void *addr, PRUint32 size); --NSPR_API(PRStatus) _MD_close_file_map(PRFileMap *fmap); -- --/* Time related */ -- --NSPR_API(PRTime) _MD_now(void); --NSPR_API(void) _MD_interval_init(void); --NSPR_API(PRIntervalTime) _MD_get_interval(void); --NSPR_API(PRIntervalTime) _MD_interval_per_sec(void); -- --/* File locking */ -- --NSPR_API(PRStatus) _MD_lockfile(PRInt32 osfd); --NSPR_API(PRStatus) _MD_tlockfile(PRInt32 osfd); --NSPR_API(PRStatus) _MD_unlockfile(PRInt32 osfd); -- - #endif /* _nspr_beos_defs_h___*/ -Index: mozilla/nsprpub/pr/include/private/primpl.h -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/include/private/primpl.h,v -retrieving revision 3.84.2.2 -diff -u -8 -p -r3.84.2.2 primpl.h ---- mozilla/nsprpub/pr/include/private/primpl.h 25 Jul 2007 07:08:28 -0000 3.84.2.2 -+++ mozilla/nsprpub/pr/include/private/primpl.h 9 Feb 2009 04:04:34 -0000 -@@ -45,20 +45,16 @@ - * This macro causes chaos if signal.h gets included before pthread.h. - * To be safe, we include pthread.h first. - */ - - #if defined(_PR_PTHREADS) - #include - #endif - --#if defined(_PR_BTHREADS) --#include --#endif -- - #ifdef WINNT - /* Need to force service-pack 3 extensions to be defined by - ** setting _WIN32_WINNT to NT 4.0 for winsock.h, winbase.h, winnt.h. - */ - #ifndef _WIN32_WINNT - #define _WIN32_WINNT 0x0400 - #elif (_WIN32_WINNT < 0x0400) - #undef _WIN32_WINNT -@@ -223,16 +219,30 @@ typedef struct PTDebug - } PTDebug; - - #endif /* defined(DEBUG) */ - - NSPR_API(void) PT_FPrintStats(PRFileDesc *fd, const char *msg); - - #else /* defined(_PR_PTHREADS) */ - -+#ifdef _PR_BTHREADS -+#define _MD_GET_ATTACHED_THREAD() (_PR_MD_CURRENT_THREAD()) -+ -+#define _PR_IS_NATIVE_THREAD(thread) 1 -+#define _PR_IS_NATIVE_THREAD_SUPPORTED() 1 -+/* -+extern PRInt32 _PR_MD_WRITE(PRFileDesc *fd, const void *buf, PRInt32 amount); -+#define _PR_MD_WRITE _MD_WRITE -+*/ -+NSPR_API(PRThread*) _PR_MD_CURRENT_THREAD(void); -+#define _PR_MD_CURRENT_THREAD _MD_CURRENT_THREAD -+ -+#else /* defined(_PR_BTHREADS) */ -+ - NSPR_API(void) PT_FPrintStats(PRFileDesc *fd, const char *msg); - - /* - ** This section is contains those parts needed to implement NSPR on - ** platforms in general. One would assume that the pthreads implementation - ** included lots of the same types, at least conceptually. - */ - -@@ -1296,16 +1306,17 @@ extern PRStatus _PR_MD_SET_FD_INHERITABL - PR_SetError( PR_PENDING_INTERRUPT_ERROR, 0); \ - } else { \ - PR_SetError(PR_IO_TIMEOUT_ERROR, 0); \ - } - - extern void *_PR_MD_GET_SP(PRThread *thread); - #define _PR_MD_GET_SP _MD_GET_SP - -+#endif /* defined(_PR_BTHREADS) */ - #endif /* defined(_PR_PTHREADS) */ - - /************************************************************************/ - /************************************************************************* - ** The remainder of the definitions are shared by pthreads and the classic - ** NSPR code. These too may be conditionalized. - *************************************************************************/ - /************************************************************************/ -@@ -1550,17 +1561,20 @@ struct PRThreadStack { - char *stackTop; /* top of stack from C's point of view */ - PRUint32 stackSize; /* size of usable portion of the stack */ - - PRSegment *seg; - PRThread* thr; /* back pointer to thread owning this stack */ - - #if defined(_PR_PTHREADS) - #else /* defined(_PR_PTHREADS) */ -+#if defined(_PR_BTHREADS) -+#else /* defined(_PR_BTHREADS) */ - _MDThreadStack md; -+#endif /* defined(_PR_BTHREADS) */ - #endif /* defined(_PR_PTHREADS) */ - }; - - extern void _PR_DestroyThreadPrivate(PRThread*); - - typedef void (PR_CALLBACK *_PRStartFn)(void *); - - struct PRThread { -@@ -1603,19 +1617,16 @@ struct PRThread { - PRUint32 syspoll_count; /* number of elements in syspoll_list */ - #if defined(_PR_POLL_WITH_SELECT) - int *selectfd_list; /* Unix fd's that PR_Poll selects on */ - PRUint32 selectfd_count; /* number of elements in selectfd_list */ - #endif - #elif defined(_PR_BTHREADS) - PRUint32 flags; - _MDThread md; -- PRBool io_pending; -- PRInt32 io_fd; -- PRBool io_suspended; - #else /* not pthreads or Be threads */ - _MDLock threadLock; /* Lock to protect thread state variables. - * Protects the following fields: - * state - * priority - * links - * wait - * cpu -@@ -1689,17 +1700,19 @@ struct PRProcessAttr { - - struct PRProcess { - _MDProcess md; - }; - - struct PRFileMap { - PRFileDesc *fd; - PRFileMapProtect prot; -+#if !defined(XP_BEOS) - _MDFileMap md; -+#endif /* !defined(XP_BEOS) */ - }; - - /************************************************************************/ - - /* - ** File descriptors of the NSPR layer can be in one of the - ** following states (stored in the 'state' field of struct - ** PRFilePrivate): -@@ -1760,18 +1773,20 @@ struct PRDir { - #ifdef MOZ_UNICODE - struct PRDirUTF16 { - PRDirEntry d; - _MDDirUTF16 md; - }; - #endif /* MOZ_UNICODE */ - - extern void _PR_InitSegs(void); -+#if !defined(_PR_BTHREADS) - extern void _PR_InitStacks(void); - extern void _PR_InitTPD(void); -+#endif /* !defined(_PR_BTHREADS) */ - extern void _PR_InitMem(void); - extern void _PR_InitEnv(void); - extern void _PR_InitCMon(void); - extern void _PR_InitIO(void); - extern void _PR_InitLog(void); - extern void _PR_InitNet(void); - extern void _PR_InitClock(void); - extern void _PR_InitLinker(void); -@@ -1812,17 +1827,20 @@ extern PRBool _PR_Obsolete(const char *o - /************************************************************************/ - - struct PRSegment { - void *vaddr; - PRUint32 size; - PRUintn flags; - #if defined(_PR_PTHREADS) - #else /* defined(_PR_PTHREADS) */ -+#if defined(_PR_BTHREADS) -+#else /* defined(_PR_BTHREADS) */ - _MDSegment md; -+#endif /* defined(_PR_BTHREADS) */ - #endif /* defined(_PR_PTHREADS) */ - }; - - /* PRSegment.flags */ - #define _PR_SEG_VM 0x1 - - /************************************************************************/ - -@@ -2109,28 +2127,28 @@ extern void _PR_MD_QUERY_FD_INHERITABLE( - /* --- PR_GetRandomNoise() related things --- */ - - extern PRSize _PR_MD_GetRandomNoise( void *buf, PRSize size ); - #define _PR_MD_GET_RANDOM_NOISE(buf,size) _PR_MD_GetRandomNoise((buf),(size)) - extern PRSize _pr_CopyLowBits( void *dest, PRSize dstlen, void *src, PRSize srclen ); - - /* end PR_GetRandomNoise() related */ - --#ifdef XP_BEOS -+#if defined(XP_BEOS) && !defined(BONE_VERSION) - - extern PRLock *_connectLock; - - typedef struct _ConnectListNode { - PRInt32 osfd; - PRNetAddr addr; - PRUint32 addrlen; - PRIntervalTime timeout; - } ConnectListNode; - - extern ConnectListNode connectList[64]; - - extern PRUint32 connectCount; - --#endif /* XP_BEOS */ -+#endif /* XP_BEOS && !BONE_VERSION */ - - PR_END_EXTERN_C - - #endif /* primpl_h___ */ -Index: mozilla/nsprpub/pr/src/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/Makefile.in,v -retrieving revision 1.40.2.2 -diff -u -8 -p -r1.40.2.2 Makefile.in ---- mozilla/nsprpub/pr/src/Makefile.in 19 Oct 2006 00:39:28 -0000 1.40.2.2 -+++ mozilla/nsprpub/pr/src/Makefile.in 9 Feb 2009 04:04:35 -0000 -@@ -270,36 +270,33 @@ endif - - ifdef USE_PTHREADS - OBJS += \ - pthreads/$(OBJDIR)/ptsynch.$(OBJ_SUFFIX) \ - pthreads/$(OBJDIR)/ptio.$(OBJ_SUFFIX) \ - pthreads/$(OBJDIR)/ptthread.$(OBJ_SUFFIX) \ - pthreads/$(OBJDIR)/ptmisc.$(OBJ_SUFFIX) - else -+ifndef USE_BTHREADS - OBJS += \ - io/$(OBJDIR)/prdir.$(OBJ_SUFFIX) \ - io/$(OBJDIR)/prfile.$(OBJ_SUFFIX) \ - io/$(OBJDIR)/prio.$(OBJ_SUFFIX) \ - io/$(OBJDIR)/prsocket.$(OBJ_SUFFIX) \ -- misc/$(OBJDIR)/pripcsem.$(OBJ_SUFFIX) -- --ifndef USE_BTHREADS --OBJS += \ -- threads/$(OBJDIR)/prcthr.$(OBJ_SUFFIX) \ -- threads/$(OBJDIR)/prdump.$(OBJ_SUFFIX) \ -- threads/$(OBJDIR)/prmon.$(OBJ_SUFFIX) \ -- threads/$(OBJDIR)/prsem.$(OBJ_SUFFIX) \ -- threads/combined/$(OBJDIR)/prucpu.$(OBJ_SUFFIX) \ -- threads/combined/$(OBJDIR)/prucv.$(OBJ_SUFFIX) \ -- threads/combined/$(OBJDIR)/prulock.$(OBJ_SUFFIX) \ -- threads/combined/$(OBJDIR)/prustack.$(OBJ_SUFFIX) \ -- threads/combined/$(OBJDIR)/pruthr.$(OBJ_SUFFIX) -+ misc/$(OBJDIR)/pripcsem.$(OBJ_SUFFIX) \ -+ threads/$(OBJDIR)/prcthr.$(OBJ_SUFFIX) \ -+ threads/$(OBJDIR)/prdump.$(OBJ_SUFFIX) \ -+ threads/$(OBJDIR)/prmon.$(OBJ_SUFFIX) \ -+ threads/$(OBJDIR)/prsem.$(OBJ_SUFFIX) \ -+ threads/combined/$(OBJDIR)/prucpu.$(OBJ_SUFFIX) \ -+ threads/combined/$(OBJDIR)/prucv.$(OBJ_SUFFIX) \ -+ threads/combined/$(OBJDIR)/prulock.$(OBJ_SUFFIX) \ -+ threads/combined/$(OBJDIR)/prustack.$(OBJ_SUFFIX) \ -+ threads/combined/$(OBJDIR)/pruthr.$(OBJ_SUFFIX) - endif -- - endif - - ifeq ($(USE_CPLUS), 1) - OBJS += \ - cplus/$(OBJDIR)/rcbase.$(OBJ_SUFFIX) \ - cplus/$(OBJDIR)/rccv.$(OBJ_SUFFIX) \ - cplus/$(OBJDIR)/rcfileio.$(OBJ_SUFFIX) \ - cplus/$(OBJDIR)/rcinrval.$(OBJ_SUFFIX) \ -@@ -397,19 +394,23 @@ endif - - export:: $(TARGETS) - $(INSTALL) -m 444 $(TARGETS) $(dist_libdir) - ifdef SHARED_LIBRARY - ifeq ($(OS_ARCH),HP-UX) - $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_libdir) - $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_bindir) - else -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_bindir)/lib -+else - $(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_bindir) - endif - endif -+endif - ifeq ($(MOZ_BITS),16) - $(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/lib - $(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/bin - endif - - ifeq ($(BUILD_AIX_RTL_LIBC),1) - $(AIX_RTL_LIBC): /usr/ccs/lib/libc.a - rtl_enable -o $@ $< -Index: mozilla/nsprpub/pr/src/bthreads/bsrcs.mk -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/bthreads/bsrcs.mk,v -retrieving revision 3.6 -diff -u -8 -p -r3.6 bsrcs.mk ---- mozilla/nsprpub/pr/src/bthreads/bsrcs.mk 25 Apr 2004 15:00:57 -0000 3.6 -+++ mozilla/nsprpub/pr/src/bthreads/bsrcs.mk 9 Feb 2009 04:04:35 -0000 -@@ -15,16 +15,17 @@ - # The Original Code is the Netscape Portable Runtime (NSPR). - # - # The Initial Developer of the Original Code is - # Netscape Communications Corporation. - # Portions created by the Initial Developer are Copyright (C) 1998-2000 - # the Initial Developer. All Rights Reserved. - # - # Contributor(s): -+# Fredrik Holmqvist - # - # 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 -@@ -41,9 +42,11 @@ - - BTCSRCS = \ - btthread.c \ - btlocks.c \ - btcvar.c \ - btmon.c \ - btsem.c \ - btmisc.c \ -+ btfile.c \ -+ btio.c \ - $(NULL) -Index: mozilla/nsprpub/pr/src/bthreads/btcvar.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/bthreads/btcvar.c,v -retrieving revision 3.9 -diff -u -8 -p -r3.9 btcvar.c ---- mozilla/nsprpub/pr/src/bthreads/btcvar.c 23 Feb 2005 17:43:13 -0000 3.9 -+++ mozilla/nsprpub/pr/src/bthreads/btcvar.c 9 Feb 2009 04:04:36 -0000 -@@ -15,33 +15,32 @@ - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): -- * -+ * Fredrik Holmqvist -+ * - * 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 ***** */ - --#include -- - #include "primpl.h" - - /* - ** Create a new condition variable. - ** - ** "lock" is the lock used to protect the condition variable. - ** - ** Condition variables are synchronization objects that threads can use -@@ -52,25 +51,25 @@ - */ - PR_IMPLEMENT(PRCondVar*) - PR_NewCondVar (PRLock *lock) - { - PRCondVar *cv = PR_NEW( PRCondVar ); - PR_ASSERT( NULL != lock ); - if( NULL != cv ) - { -- cv->lock = lock; -- cv->sem = create_sem(0, "CVSem"); -- cv->handshakeSem = create_sem(0, "CVHandshake"); -- cv->signalSem = create_sem( 0, "CVSignal"); -- cv->signalBenCount = 0; -- cv->ns = cv->nw = 0; -- PR_ASSERT( cv->sem >= B_NO_ERROR ); -- PR_ASSERT( cv->handshakeSem >= B_NO_ERROR ); -- PR_ASSERT( cv->signalSem >= B_NO_ERROR ); -+ cv->lock = lock; -+ cv->sem = create_sem(0, "CVSem"); -+ cv->handshakeSem = create_sem(0, "CVHandshake"); -+ cv->signalSem = create_sem( 0, "CVSignal"); -+ cv->signalBenCount = 0; -+ cv->ns = cv->nw = 0; -+ PR_ASSERT( cv->sem >= B_NO_ERROR ); -+ PR_ASSERT( cv->handshakeSem >= B_NO_ERROR ); -+ PR_ASSERT( cv->signalSem >= B_NO_ERROR ); - } - return cv; - } /* PR_NewCondVar */ - - /* - ** Destroy a condition variable. There must be no thread - ** waiting on the condvar. The caller is responsible for guaranteeing - ** that the condvar is no longer in use. -@@ -118,69 +117,69 @@ PR_IMPLEMENT(void) - ** Returns PR_FAILURE if the caller has not locked the lock associated - ** with the condition variable or the thread was interrupted (PR_Interrupt()). - ** The particular reason can be extracted with PR_GetError(). - */ - PR_IMPLEMENT(PRStatus) - PR_WaitCondVar (PRCondVar *cvar, PRIntervalTime timeout) - { - status_t err; -- if( timeout == PR_INTERVAL_NO_WAIT ) -+ if( timeout == PR_INTERVAL_NO_WAIT ) - { - PR_Unlock( cvar->lock ); - PR_Lock( cvar->lock ); - return PR_SUCCESS; - } - -- if( atomic_add( &cvar->signalBenCount, 1 ) > 0 ) -+ if( _MD_ATOMIC_INCREMENT( &cvar->signalBenCount ) > 1 ) - { -- if (acquire_sem(cvar->signalSem) == B_INTERRUPTED) -+ if (acquire_sem(cvar->signalSem) == B_INTERRUPTED) - { -- atomic_add( &cvar->signalBenCount, -1 ); -+ _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ); - return PR_FAILURE; - } - } - cvar->nw += 1; -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } - - PR_Unlock( cvar->lock ); -- if( timeout==PR_INTERVAL_NO_TIMEOUT ) -+ if( timeout==PR_INTERVAL_NO_TIMEOUT ) - { -- err = acquire_sem(cvar->sem); -- } -- else -+ err = acquire_sem(cvar->sem); -+ } -+ else - { -- err = acquire_sem_etc(cvar->sem, 1, B_RELATIVE_TIMEOUT, PR_IntervalToMicroseconds(timeout) ); -+ err = acquire_sem_etc(cvar->sem, 1, B_RELATIVE_TIMEOUT, PR_IntervalToMicroseconds(timeout) ); - } - -- if( atomic_add( &cvar->signalBenCount, 1 ) > 0 ) -+ if( _MD_ATOMIC_INCREMENT( &cvar->signalBenCount ) > 1 ) - { - while (acquire_sem(cvar->signalSem) == B_INTERRUPTED); - } - - if (cvar->ns > 0) - { - release_sem_etc(cvar->handshakeSem, 1, B_DO_NOT_RESCHEDULE); - cvar->ns -= 1; - } - cvar->nw -= 1; -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } - - PR_Lock( cvar->lock ); -- if(err!=B_NO_ERROR) -+ if(err==B_NO_ERROR || (err == B_TIMED_OUT && timeout!=PR_INTERVAL_NO_TIMEOUT)) - { -- return PR_FAILURE; -+ return PR_SUCCESS; - } -- return PR_SUCCESS; -+ return PR_FAILURE; - } - - /* - ** Notify ONE thread that is currently waiting on 'cvar'. Which thread is - ** dependent on the implementation of the runtime. Common sense would dictate - ** that all threads waiting on a single condition have identical semantics, - ** therefore which one gets notified is not significant. - ** -@@ -189,88 +188,88 @@ PR_IMPLEMENT(PRStatus) - ** notify is called. - ** - ** Returns PR_FAILURE if the caller has not locked the lock associated - ** with the condition variable. - */ - PR_IMPLEMENT(PRStatus) - PR_NotifyCondVar (PRCondVar *cvar) - { -- status_t err ; -- if( atomic_add( &cvar->signalBenCount, 1 ) > 0 ) -+ status_t err; -+ if( _MD_ATOMIC_INCREMENT( &cvar->signalBenCount) > 1 ) - { -- if (acquire_sem(cvar->signalSem) == B_INTERRUPTED) -+ if (acquire_sem(cvar->signalSem) == B_INTERRUPTED) - { -- atomic_add( &cvar->signalBenCount, -1 ); -+ _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ); - return PR_FAILURE; - } - } - if (cvar->nw > cvar->ns) - { - cvar->ns += 1; - release_sem_etc(cvar->sem, 1, B_DO_NOT_RESCHEDULE); -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } - -- while (acquire_sem(cvar->handshakeSem) == B_INTERRUPTED) -+ while (acquire_sem(cvar->handshakeSem) == B_INTERRUPTED) - { -- err = B_INTERRUPTED; -+ err = B_INTERRUPTED; - } - } - else - { -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } - } -- return PR_SUCCESS; -+ return PR_SUCCESS; - } - - /* - ** Notify all of the threads waiting on the condition variable. The order - ** that the threads are notified is indeterminant. The lock that protects - ** the condition must be held. - ** - ** Returns PR_FAILURE if the caller has not locked the lock associated - ** with the condition variable. - */ - PR_IMPLEMENT(PRStatus) - PR_NotifyAllCondVar (PRCondVar *cvar) - { - int32 handshakes; - status_t err = B_OK; - -- if( atomic_add( &cvar->signalBenCount, 1 ) > 0 ) -+ if( _MD_ATOMIC_INCREMENT( &cvar->signalBenCount) > 1 ) - { -- if (acquire_sem(cvar->signalSem) == B_INTERRUPTED) -+ if (acquire_sem(cvar->signalSem) == B_INTERRUPTED) - { -- atomic_add( &cvar->signalBenCount, -1 ); -+ _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ); - return PR_FAILURE; - } - } - - if (cvar->nw > cvar->ns) - { - handshakes = cvar->nw - cvar->ns; -- cvar->ns = cvar->nw; -- release_sem_etc(cvar->sem, handshakes, B_DO_NOT_RESCHEDULE); -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ cvar->ns = cvar->nw; -+ release_sem_etc(cvar->sem, handshakes, B_DO_NOT_RESCHEDULE); -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } - -- while (acquire_sem_etc(cvar->handshakeSem, handshakes, 0, 0) == B_INTERRUPTED) -+ while (acquire_sem_etc(cvar->handshakeSem, handshakes, 0, 0) == B_INTERRUPTED) - { -- err = B_INTERRUPTED; -+ err = B_INTERRUPTED; - } - } - else - { -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } - } - return PR_SUCCESS; - } -Index: mozilla/nsprpub/pr/src/bthreads/btfile.c -=================================================================== -RCS file: mozilla/nsprpub/pr/src/bthreads/btfile.c -diff -N mozilla/nsprpub/pr/src/bthreads/btfile.c ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ mozilla/nsprpub/pr/src/bthreads/btfile.c 5 Nov 2008 20:51:44 -0000 -@@ -0,0 +1,994 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* ***** 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 the Netscape Portable Runtime (NSPR). -+ * -+ * The Initial Developer of the Original Code is -+ * Netscape Communications Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 1998-2000 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Roy Yokoyama -+ * -+ * 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 ***** */ -+ -+#include "primpl.h" -+ -+static PRLock *_pr_flock_lock; /* For PR_LockFile() etc. */ -+static PRCondVar *_pr_flock_cv; /* For PR_LockFile() etc. */ -+ -+PRErrorCode -+map_default_error(int err) -+{ -+ switch (err) { -+ case EACCES: -+ return PR_NO_ACCESS_RIGHTS_ERROR; -+ case EADDRINUSE: -+ return PR_ADDRESS_IN_USE_ERROR; -+ case EADDRNOTAVAIL: -+ return PR_ADDRESS_NOT_AVAILABLE_ERROR; -+ case EAFNOSUPPORT: -+ return PR_ADDRESS_NOT_SUPPORTED_ERROR; -+ /*Same as EWOULDBLOCK*/ -+ case EAGAIN: -+ return PR_WOULD_BLOCK_ERROR; -+#if EALREADY != EBUSY -+ case EALREADY: -+ return PR_ALREADY_INITIATED_ERROR; -+#endif -+ case EBADF: -+ return PR_BAD_DESCRIPTOR_ERROR; -+ case EBUSY: -+ return PR_FILESYSTEM_MOUNTED_ERROR; -+ case ECONNABORTED: -+ return PR_CONNECT_ABORTED_ERROR; -+ case ECONNREFUSED: -+ return PR_CONNECT_REFUSED_ERROR; -+ case EDEADLK: -+ return PR_DEADLOCK_ERROR; -+ case EEXIST: -+ return PR_FILE_EXISTS_ERROR; -+ case EFAULT: -+ return PR_ACCESS_FAULT_ERROR; -+ case EFBIG: -+ return PR_FILE_TOO_BIG_ERROR; -+ case EHOSTUNREACH: -+ return PR_HOST_UNREACHABLE_ERROR; -+ case EINPROGRESS: -+ return PR_IN_PROGRESS_ERROR; -+ case EINTR: -+ return PR_PENDING_INTERRUPT_ERROR; -+ case EINVAL: -+ return PR_INVALID_ARGUMENT_ERROR; -+ case EIO: -+ return PR_IO_ERROR; -+ case EISCONN: -+ return PR_IS_CONNECTED_ERROR; -+ case EISDIR: -+ return PR_IS_DIRECTORY_ERROR; -+ case ELOOP: -+ return PR_LOOP_ERROR; -+ case EMFILE: -+ return PR_PROC_DESC_TABLE_FULL_ERROR; -+ case EMLINK: -+ return PR_MAX_DIRECTORY_ENTRIES_ERROR; -+ case EMSGSIZE: -+ return PR_INVALID_ARGUMENT_ERROR; -+ case ENAMETOOLONG: -+ return PR_NAME_TOO_LONG_ERROR; -+ case ENETUNREACH: -+ return PR_NETWORK_UNREACHABLE_ERROR; -+ case ENFILE: -+ return PR_SYS_DESC_TABLE_FULL_ERROR; -+ case ENOBUFS: -+ return PR_INSUFFICIENT_RESOURCES_ERROR; -+ case ENODEV: -+ case ENOENT: -+ return PR_FILE_NOT_FOUND_ERROR; -+ case ENOLCK: -+ return PR_FILE_IS_LOCKED_ERROR; -+#if 0 -+ case ENOLINK: -+ return PR_REMOTE_FILE_ERROR; -+#endif -+ case ENOMEM: -+ return PR_OUT_OF_MEMORY_ERROR; -+ case ENOPROTOOPT: -+ return PR_INVALID_ARGUMENT_ERROR; -+ case ENOSPC: -+ return PR_NO_DEVICE_SPACE_ERROR; -+ case ENOTCONN: -+ return PR_NOT_CONNECTED_ERROR; -+ case ENOTDIR: -+ return PR_NOT_DIRECTORY_ERROR; -+ case ENOTSOCK: -+ return PR_NOT_SOCKET_ERROR; -+ case ENXIO: -+ return PR_FILE_NOT_FOUND_ERROR; -+ case EOPNOTSUPP: -+ return PR_NOT_TCP_SOCKET_ERROR; -+ case EOVERFLOW: -+ return PR_BUFFER_OVERFLOW_ERROR; -+ case EPERM: -+ return PR_NO_ACCESS_RIGHTS_ERROR; -+ case EPIPE: -+ return PR_CONNECT_RESET_ERROR; -+ case EPROTONOSUPPORT: -+ return PR_PROTOCOL_NOT_SUPPORTED_ERROR; -+ case EPROTOTYPE: -+ return PR_ADDRESS_NOT_SUPPORTED_ERROR; -+ case ERANGE: -+ return PR_INVALID_METHOD_ERROR; -+ case EROFS: -+ return PR_READ_ONLY_FILESYSTEM_ERROR; -+ case ESPIPE: -+ return PR_INVALID_METHOD_ERROR; -+ case ETIMEDOUT: -+ return PR_IO_TIMEOUT_ERROR; -+ case EXDEV: -+ return PR_NOT_SAME_DEVICE_ERROR; -+ default: -+ return PR_UNKNOWN_ERROR; -+ } -+} -+ -+ -+inline void -+set_open_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EAGAIN: -+ case ENOMEM: -+ prError = PR_INSUFFICIENT_RESOURCES_ERROR; -+ break; -+ case EBUSY: -+ prError = PR_IO_ERROR; -+ break; -+ case ENODEV: -+ prError = PR_FILE_NOT_FOUND_ERROR; -+ break; -+ case EOVERFLOW: -+ prError = PR_FILE_TOO_BIG_ERROR; -+ break; -+ case ETIMEDOUT: -+ prError = PR_REMOTE_FILE_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_rename_error(int err) -+{ -+ PR_SetError(err == EEXIST ? PR_DIRECTORY_NOT_EMPTY_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_unlink_error(int err) -+{ -+ PR_SetError(err == EPERM ? PR_IS_DIRECTORY_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_opendir_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_closedir_error(int err) -+{ -+ PR_SetError( err == EINVAL ? PR_BAD_DESCRIPTOR_ERROR : map_default_error(err), err); -+} -+ -+inline void -+set_readdir_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case 0: -+ case ENOENT: -+ prError = PR_NO_MORE_FILES_ERROR; -+ break; -+ case EOVERFLOW: -+ case EINVAL: -+ case ENXIO: -+ prError = PR_IO_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_mkdir_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+ -+inline void -+set_rmdir_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case ENOTEMPTY: -+ case EEXIST: -+ case EINVAL: -+ prError = PR_DIRECTORY_NOT_EMPTY_ERROR; -+ break; -+ case ETIMEDOUT: -+ prError = PR_REMOTE_FILE_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_close_error(int err) -+{ -+ PR_SetError( err == ETIMEDOUT ? PR_REMOTE_FILE_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_read_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_INVALID_METHOD_ERROR; -+ break; -+ case ENXIO: -+ prError = PR_INVALID_ARGUMENT_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_write_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_INVALID_METHOD_ERROR; -+ break; -+ case ENXIO: -+ prError = PR_INVALID_ARGUMENT_ERROR; -+ break; -+ case ETIMEDOUT: -+ prError = PR_REMOTE_FILE_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_lseek_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+ -+inline void -+set_fsync_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_INVALID_METHOD_ERROR; -+ break; -+ case ETIMEDOUT: -+ prError = PR_REMOTE_FILE_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_fstat_error(int err) -+{ -+ PR_SetError(err == ETIMEDOUT ? PR_REMOTE_FILE_ERROR : map_default_error(err), err); -+} -+ -+/* TODO: using uint8 instead of bool due to code that uses bool as var name in hard to change places -+ therefore we had to undef it. Or we need to change Haiku's headers around so we can include -+ everything we need except the bool decl. */ -+PRFileDesc * bt_CreateFileDesc(PRIntn osfd, const PRIOMethods * methods, _PRTriStateBool inheritable, uint8 nonblocking) { -+ const int blocking = 1; -+ PRFileDesc *fd = _PR_Getfd(); -+ if (fd == NULL) -+ { -+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ return NULL; -+ } -+ fd->secret->md.osfd = osfd; -+ fd->secret->state = _PR_FILEDESC_OPEN; -+ fd->secret->inheritable = inheritable; -+ fd->methods = methods; -+ if (nonblocking) -+ setsockopt(osfd, SOL_SOCKET, SO_NONBLOCK, &blocking, sizeof(blocking)); -+ return fd; -+} -+ -+ -+PR_IMPLEMENT(PRFileDesc*) PR_GetSpecialFD(PRSpecialFD osfd) -+{ -+ PR_ASSERT(osfd >= PR_StandardInput && osfd <= PR_StandardError); -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ -+ switch (osfd) -+ { -+ case PR_StandardInput: return _pr_stdin; -+ case PR_StandardOutput: return _pr_stdout; -+ case PR_StandardError: return _pr_stderr; -+ default: -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ } -+ return NULL; -+} /* PR_GetSpecialFD */ -+ -+ -+PR_IMPLEMENT(PRFileDesc*) PR_Open(const char *name, PRIntn flags, PRIntn mode) -+{ -+ return PR_OpenFile(name, flags, mode); -+} /* PR_Open */ -+ -+PR_IMPLEMENT(PRFileDesc*) PR_OpenFile(const char *name, PRIntn flags, PRIntn mode) -+{ -+ PRFileDesc *fd = NULL; -+ PRInt32 osflags; -+ PRInt32 osfd, err; -+ -+ if (flags & PR_RDWR) { -+ osflags = O_RDWR; -+ } else if (flags & PR_WRONLY) { -+ osflags = O_WRONLY; -+ } else { -+ osflags = O_RDONLY; -+ } -+ -+ if (flags & PR_EXCL) -+ osflags |= O_EXCL; -+ if (flags & PR_APPEND) -+ osflags |= O_APPEND; -+ if (flags & PR_TRUNCATE) -+ osflags |= O_TRUNC; -+ if (flags & PR_SYNC) { -+/* Ummmm. BeOS doesn't appear to -+ support sync in any way shape or -+ form. */ -+ return PR_NOT_IMPLEMENTED_ERROR; -+ } -+ -+ if (flags & PR_CREATE_FILE) -+ { -+ osflags |= O_CREAT; -+ } -+ -+ osfd = open(name, osflags, mode); -+ if (osfd < 0) { -+ err = _MD_ERRNO(); -+ set_open_error(err); -+ } -+ -+ if(osfd>=0) { -+ fd = bt_CreateFileDesc(osfd, PR_GetFileMethods(), _PR_TRI_TRUE, false); -+ if (fd == NULL) close(osfd); /* $$$ whoops! this is bad $$$ */ -+ } -+ return fd; -+} /* PR_OpenFile */ -+ -+/* -+** Import an existing OS file to NSPR -+*/ -+PR_IMPLEMENT(PRFileDesc*) PR_ImportFile(PRInt32 osfd) -+{ -+ PRFileDesc *fd = NULL; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ -+ fd = bt_CreateFileDesc(osfd, PR_GetFileMethods(), _PR_TRI_UNKNOWN, false); -+ if (NULL == fd) close(osfd); -+ return fd; -+} -+ -+/* -+** Import an existing OS pipe to NSPR -+*/ -+PR_IMPLEMENT(PRFileDesc*) PR_ImportPipe(PRInt32 osfd) -+{ -+ PRFileDesc *fd = NULL; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ fd = bt_CreateFileDesc(osfd, PR_GetPipeMethods(), _PR_TRI_UNKNOWN, true); -+ -+ if (NULL == fd) close(osfd); -+ return fd; -+} -+ -+ -+PR_IMPLEMENT(PRStatus) PR_Rename(const char *from, const char *to) -+{ -+ PRInt32 rv = -1, err; -+ -+ if (0 == access(to, F_OK)) -+ PR_SetError(PR_FILE_EXISTS_ERROR, 0); -+ else -+ { -+ rv = rename(from, to); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_rename_error(err); -+ } -+ } -+ if (rv < 0) { -+ return PR_FAILURE; -+ } else { -+ return PR_SUCCESS; -+ } -+} -+ -+PR_IMPLEMENT(PRStatus) PR_Delete(const char *name) -+{ -+ PRInt32 rv, err; -+ -+ rv = unlink(name); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_unlink_error(err); -+ return PR_FAILURE; -+ } else -+ return PR_SUCCESS; -+} -+ -+ -+PR_IMPLEMENT(PRDir*) PR_OpenDir(const char *name) -+{ -+ PRDir *dir; -+ PRInt32 err; -+ -+ dir = PR_NEW(PRDir); -+ if (dir) { -+ dir->md.d = opendir(name); -+ if (NULL == dir->md.d) { -+ err = _MD_ERRNO(); -+ set_opendir_error(err); -+ PR_DELETE(dir); -+ return NULL; -+ } -+ } else { -+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ } -+ return dir; -+} -+ -+PR_IMPLEMENT(PRDirEntry*) PR_ReadDir(PRDir *dir, PRDirFlags flags) -+{ -+ PRInt32 err; -+ struct dirent *de; -+ for (;;) { -+ /* -+ * XXX: readdir() is not MT-safe -+ */ -+ _MD_ERRNO() = 0; -+ de = readdir(dir->md.d); -+ -+ if (!de) { -+ err = _MD_ERRNO(); -+ set_readdir_error(err); -+ return 0; -+ } -+ -+ if ((flags & PR_SKIP_DOT) && -+ (de->d_name[0] == '.') && (de->d_name[1] == 0)) -+ continue; -+ -+ if ((flags & PR_SKIP_DOT_DOT) && -+ (de->d_name[0] == '.') && (de->d_name[1] == '.') && -+ (de->d_name[2] == 0)) -+ continue; -+ -+ if ((flags & PR_SKIP_HIDDEN) && (de->d_name[1] == '.')) -+ continue; -+ -+ break; -+ } -+ -+ dir->d.name = de->d_name; -+ return de->d_name ? &dir->d : NULL; -+} -+ -+PR_IMPLEMENT(PRStatus) PR_CloseDir(PRDir *dir) -+{ -+ PRInt32 rv, err; -+ -+ if (dir && dir->md.d) { -+ rv = closedir(dir->md.d); -+ PR_DELETE(dir); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_closedir_error(err); -+ return PR_FAILURE; -+ } -+ } -+ return PR_SUCCESS; -+} -+ -+PR_IMPLEMENT(PRStatus) PR_MkDir(const char *name, PRIntn mode) -+{ -+ status_t rv; -+ int err; -+ -+ rv = mkdir(name, mode); -+ -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_mkdir_error(err); -+ return PR_FAILURE; -+ } -+ return PR_SUCCESS; -+} -+ -+PR_IMPLEMENT(PRStatus) PR_MakeDir(const char *name, PRIntn mode) -+{ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ return PR_MkDir(name, mode); -+} -+ -+PR_IMPLEMENT(PRStatus) PR_RmDir(const char *name) -+{ -+ PRInt32 rv, err; -+ -+ rv = rmdir(name); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_rmdir_error(err); -+ return PR_FAILURE; -+ } else -+ return PR_SUCCESS; -+} -+ -+PR_IMPLEMENT(PRInt32) -+PR_FileDesc2NativeHandle(PRFileDesc *fd) -+{ -+ if (fd) { -+ fd = PR_GetIdentitiesLayer(fd, PR_NSPR_IO_LAYER); -+ } -+ if (!fd) { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return -1; -+ } -+ -+ return fd->secret->md.osfd; -+} -+ -+#ifdef MOZ_UNICODE -+/* -+ * UTF16 Interface -+ */ -+PR_IMPLEMENT(PRDirUTF16*) PR_OpenDirUTF16(const PRUnichar *name) -+{ -+ PRDirUTF16 *dir; -+ PRStatus sts; -+ -+ dir = PR_NEW(PRDirUTF16); -+ if (dir) { -+ sts = _PR_MD_OPEN_DIR_UTF16(&dir->md,name); -+ if (sts != PR_SUCCESS) { -+ PR_DELETE(dir); -+ return NULL; -+ } -+ } else { -+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ } -+ return dir; -+} -+ -+PR_IMPLEMENT(PRDirEntryUTF16*) PR_ReadDirUTF16(PRDirUTF16 *dir, PRDirFlags flags) -+{ -+ /* -+ * _MD_READ_DIR_UTF16 return a PRUnichar* to the name; allocation in -+ * machine-dependent code -+ */ -+ PRUnichar* name = _PR_MD_READ_DIR_UTF16(&dir->md, flags); -+ dir->d.name = name; -+ return name ? &dir->d : NULL; -+} -+ -+PR_IMPLEMENT(PRStatus) PR_CloseDirUTF16(PRDirUTF16 *dir) -+{ -+ PRInt32 rv; -+ -+ if (dir) { -+ rv = _PR_MD_CLOSE_DIR_UTF16(&dir->md); -+ PR_DELETE(dir); -+ if (rv < 0) -+ return PR_FAILURE; -+ else -+ return PR_SUCCESS; -+ } -+ return PR_SUCCESS; -+} -+ -+#endif /* MOZ_UNICODE */ -+ -+ -+static PRStatus PR_CALLBACK FileClose(PRFileDesc *fd) -+{ -+ PRInt32 err; -+ if (!fd || !fd->secret -+ || (fd->secret->state != _PR_FILEDESC_OPEN -+ && fd->secret->state != _PR_FILEDESC_CLOSED)) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ if (fd->secret->state == _PR_FILEDESC_OPEN) { -+ if (close(fd->secret->md.osfd) < 0) { -+ err = _MD_ERRNO(); -+ set_close_error(err); -+ return PR_FAILURE; -+ } -+ fd->secret->state = _PR_FILEDESC_CLOSED; -+ } -+ PR_ASSERT(fd); -+ _PR_Putfd(fd); -+ return PR_SUCCESS; -+} -+ -+static PRInt32 PR_CALLBACK FileRead(PRFileDesc *fd, void *buf, PRInt32 amount) -+{ -+ PRInt32 rv,err = 0; -+ -+ rv = read(fd->secret->md.osfd, buf, amount); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_read_error(err); -+ PR_ASSERT(rv == -1); -+ } -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("read -> %d", rv)); -+ return rv; -+} -+ -+static PRInt32 PR_CALLBACK FileWrite(PRFileDesc *fd, const void *buf, PRInt32 amount) -+{ -+ PRInt32 rv,err = 0; -+ PRInt32 temp, count; -+ -+ count = 0; -+ while (amount > 0) { -+ temp = write(fd->secret->md.osfd, buf, amount); -+ if (temp < 0) { -+ err = _MD_ERRNO(); -+ set_write_error(err); -+ count = -1; -+ break; -+ } -+ count += temp; -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ buf = (const void*) ((const char*)buf + temp); -+ amount -= temp; -+ } -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("write -> %d", count)); -+ return count; -+} -+ -+static PRInt32 PR_CALLBACK FileAvailable(PRFileDesc *fd) -+{ -+ PRInt32 result, cur, end, err; -+ -+ cur = lseek(fd->secret->md.osfd, 0, PR_SEEK_CUR); -+ -+ if (cur >= 0) -+ end = lseek(fd->secret->md.osfd, 0, PR_SEEK_END); -+ -+ if ((cur < 0) || (end < 0)) { -+ err = _MD_ERRNO(); -+ set_lseek_error(err); -+ return -1; -+ } -+ -+ result = end - cur; -+ lseek(fd->secret->md.osfd, cur, PR_SEEK_SET); -+ -+ return result; -+} -+ -+static PRInt64 PR_CALLBACK FileAvailable64(PRFileDesc *fd) -+{ -+ PRInt64 result, cur, end; -+ PRInt64 minus_one; -+ PRInt32 err; -+ -+ cur = lseek(fd->secret->md.osfd, LL_ZERO, PR_SEEK_CUR); -+ -+ if (LL_GE_ZERO(cur)) -+ end = lseek(fd->secret->md.osfd, LL_ZERO, PR_SEEK_END); -+ -+ if (!LL_GE_ZERO(cur) || !LL_GE_ZERO(end)) { -+ LL_I2L(minus_one, -1); -+ err = _MD_ERRNO(); -+ set_lseek_error(err); -+ return minus_one; -+ } -+ LL_SUB(result, end, cur); -+ lseek(fd->secret->md.osfd, cur, PR_SEEK_SET); -+ return result; -+} -+ -+static PRStatus PR_CALLBACK FileSync(PRFileDesc *fd) -+{ -+ PRInt32 result, err; -+ result = fsync(fd->secret->md.osfd); -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_fsync_error(err); -+ return PR_FAILURE; -+ } -+ return PR_SUCCESS; -+} -+ -+static PROffset32 PR_CALLBACK FileSeek(PRFileDesc *fd, PROffset32 offset, PRSeekWhence whence) -+{ -+ PROffset32 result; -+ PRInt32 err; -+ result = lseek(fd->secret->md.osfd, offset, whence); -+ if(result<0) { -+ err = _MD_ERRNO(); -+ set_lseek_error(err); -+ } -+ return result; -+} -+ -+static PROffset64 PR_CALLBACK FileSeek64(PRFileDesc *fd, PROffset64 offset, PRSeekWhence whence) -+{ -+ PROffset64 result; -+ PRInt32 err; -+ -+ result = lseek(fd->secret->md.osfd, offset, whence); -+ if(!LL_GE_ZERO(result)) { -+ err = _MD_ERRNO(); -+ set_lseek_error(err); -+ } -+ return result; -+} -+ -+static PRStatus PR_CALLBACK FileGetInfo(PRFileDesc *fd, PRFileInfo *info) -+{ -+ struct stat sb; -+ PRInt64 s, s2us; -+ PRInt32 rv, err; -+ -+ rv = fstat(fd->secret->md.osfd, &sb); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_fstat_error(err); -+ return PR_FAILURE; -+ } -+ if(info) { -+ if (S_IFREG & sb.st_mode) -+ info->type = PR_FILE_FILE ; -+ else if (S_IFDIR & sb.st_mode) -+ info->type = PR_FILE_DIRECTORY; -+ else -+ info->type = PR_FILE_OTHER; -+ /* Use lower 32 bits of file size */ -+ info->size = ( sb.st_size & 0xffffffff); -+ LL_I2L(s, sb.st_mtime); -+ LL_I2L(s2us, PR_USEC_PER_SEC); -+ LL_MUL(s, s, s2us); -+ info->modifyTime = s; -+ LL_I2L(s, sb.st_ctime); -+ LL_MUL(s, s, s2us); -+ info->creationTime = s; -+ } -+ return PR_SUCCESS; -+} -+ -+static PRStatus PR_CALLBACK FileGetInfo64(PRFileDesc *fd, PRFileInfo64 *info) -+{ -+ struct stat sb; -+ PRInt64 s, s2us; -+ PRInt32 rv, err; -+ -+ rv = fstat(fd->secret->md.osfd, &sb); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_fstat_error(err); -+ return PR_FAILURE; -+ } -+ if(info) { -+ if (S_IFREG & sb.st_mode) -+ info->type = PR_FILE_FILE ; -+ else if (S_IFDIR & sb.st_mode) -+ info->type = PR_FILE_DIRECTORY; -+ else -+ info->type = PR_FILE_OTHER; -+ info->size = sb.st_size; -+ LL_I2L(s, sb.st_mtime); -+ LL_I2L(s2us, PR_USEC_PER_SEC); -+ LL_MUL(s, s, s2us); -+ info->modifyTime = s; -+ LL_I2L(s, sb.st_ctime); -+ LL_MUL(s, s, s2us); -+ info->creationTime = s; -+ } -+ return PR_SUCCESS; -+} -+ -+static PRInt16 PR_CALLBACK FilePoll( -+ PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags) -+{ -+ *out_flags = 0; -+ return in_flags; -+} /* FilePoll */ -+ -+ -+static PRIOMethods _pr_fileMethods = { -+ PR_DESC_FILE, -+ FileClose, -+ FileRead, -+ FileWrite, -+ FileAvailable, -+ FileAvailable64, -+ FileSync, -+ FileSeek, -+ FileSeek64, -+ FileGetInfo, -+ FileGetInfo64, -+ (PRWritevFN)_PR_InvalidInt, -+ (PRConnectFN)_PR_InvalidStatus, -+ (PRAcceptFN)_PR_InvalidDesc, -+ (PRBindFN)_PR_InvalidStatus, -+ (PRListenFN)_PR_InvalidStatus, -+ (PRShutdownFN)_PR_InvalidStatus, -+ (PRRecvFN)_PR_InvalidInt, -+ (PRSendFN)_PR_InvalidInt, -+ (PRRecvfromFN)_PR_InvalidInt, -+ (PRSendtoFN)_PR_InvalidInt, -+ FilePoll, -+ (PRAcceptreadFN)_PR_InvalidInt, -+ (PRTransmitfileFN)_PR_InvalidInt, -+ (PRGetsocknameFN)_PR_InvalidStatus, -+ (PRGetpeernameFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRGetsocketoptionFN)_PR_InvalidStatus, -+ (PRSetsocketoptionFN)_PR_InvalidStatus, -+ (PRSendfileFN)_PR_InvalidInt, -+ (PRConnectcontinueFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+PR_IMPLEMENT(const PRIOMethods*) PR_GetFileMethods(void) -+{ -+ return &_pr_fileMethods; -+} -+ -+ -+static PRInt32 PR_CALLBACK PipeAvailable(PRFileDesc *fd) -+{ -+ PRInt32 rv; -+ rv = _bt_socketavailable(fd); -+ return rv; -+} -+ -+static PRInt64 PR_CALLBACK PipeAvailable64(PRFileDesc *fd) -+{ -+ PRInt64 rv; -+ LL_I2L(rv, _bt_socketavailable(fd)); -+ return rv; -+} -+ -+static PRStatus PR_CALLBACK PipeSync(PRFileDesc *fd) -+{ -+ return PR_SUCCESS; -+} -+ -+ -+static PRIOMethods _pr_pipeMethods = { -+ PR_DESC_PIPE, -+ FileClose, -+ FileRead, -+ FileWrite, -+ PipeAvailable, -+ PipeAvailable64, -+ PipeSync, -+ (PRSeekFN)_PR_InvalidInt, -+ (PRSeek64FN)_PR_InvalidInt64, -+ (PRFileInfoFN)_PR_InvalidStatus, -+ (PRFileInfo64FN)_PR_InvalidStatus, -+ (PRWritevFN)_PR_InvalidInt, -+ (PRConnectFN)_PR_InvalidStatus, -+ (PRAcceptFN)_PR_InvalidDesc, -+ (PRBindFN)_PR_InvalidStatus, -+ (PRListenFN)_PR_InvalidStatus, -+ (PRShutdownFN)_PR_InvalidStatus, -+ (PRRecvFN)_PR_InvalidInt, -+ (PRSendFN)_PR_InvalidInt, -+ (PRRecvfromFN)_PR_InvalidInt, -+ (PRSendtoFN)_PR_InvalidInt, -+ FilePoll, -+ (PRAcceptreadFN)_PR_InvalidInt, -+ (PRTransmitfileFN)_PR_InvalidInt, -+ (PRGetsocknameFN)_PR_InvalidStatus, -+ (PRGetpeernameFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRGetsocketoptionFN)_PR_InvalidStatus, -+ (PRSetsocketoptionFN)_PR_InvalidStatus, -+ (PRSendfileFN)_PR_InvalidInt, -+ (PRConnectcontinueFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+PR_IMPLEMENT(const PRIOMethods*) PR_GetPipeMethods(void) -+{ -+ return &_pr_pipeMethods; -+} -+ -+void _PR_InitIO(void) { -+ const PRIOMethods *methods = PR_GetFileMethods(); -+ _PR_InitFdCache(); -+ _pr_flock_lock = PR_NewLock(); -+ _pr_flock_cv = PR_NewCondVar(_pr_flock_lock); -+ _pr_stdin = bt_CreateFileDesc(0, PR_GetFileMethods(), _PR_TRI_UNKNOWN, false); -+ _pr_stdout = bt_CreateFileDesc(1, PR_GetFileMethods(), _PR_TRI_UNKNOWN, false); -+ _pr_stderr = bt_CreateFileDesc(2, PR_GetFileMethods(), _PR_TRI_UNKNOWN, false); -+} -+ -Index: mozilla/nsprpub/pr/src/bthreads/btio.c -=================================================================== -RCS file: mozilla/nsprpub/pr/src/bthreads/btio.c -diff -N mozilla/nsprpub/pr/src/bthreads/btio.c ---- /dev/null 1 Jan 1970 00:00:00 -0000 -+++ mozilla/nsprpub/pr/src/bthreads/btio.c 5 Nov 2008 20:51:44 -0000 -@@ -0,0 +1,2424 @@ -+/* -*- Mode: C++; c-basic-offset: 4 -*- */ -+/* ***** 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 the Netscape Portable Runtime (NSPR). -+ * -+ * The Initial Developer of the Original Code is -+ * Netscape Communications Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 1998-2000 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * -+ * 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 ***** */ -+ -+#include "primpl.h" -+#include -+#include -+#include -+ -+#define READ_FD 1 -+#define WRITE_FD 2 -+ -+#ifdef BONE_VERSION -+inline int closesocket(int socket) { -+ return close(socket); -+} -+#endif -+ -+ -+inline void -+set_stat_error(int err) -+{ -+ PR_SetError(err == ETIMEDOUT ? PR_REMOTE_FILE_ERROR : map_default_error(err), err); -+} -+ -+inline void -+set_access_error(int err) -+{ -+ PR_SetError(err == ETIMEDOUT ? PR_REMOTE_FILE_ERROR : map_default_error(err), err); -+} -+ -+inline void -+set_select_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_writev_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_connect_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EACCES: -+ case ELOOP: -+ case ENOENT: -+ prError = PR_ADDRESS_NOT_SUPPORTED_ERROR; -+ break; -+ case ENXIO: -+ prError = PR_IO_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+ -+} -+ -+inline void -+set_accept_error(int err) -+{ -+ PR_SetError(err == ENODEV ? PR_NOT_TCP_SOCKET_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_bind_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_SOCKET_ADDRESS_IS_BOUND_ERROR; -+ break; -+ case EIO: -+ case EISDIR: -+ case ELOOP: -+ case ENOENT: -+ case ENOTDIR: -+ case EROFS: -+ prError = PR_ADDRESS_NOT_SUPPORTED_ERROR; -+ break; -+ case ENXIO: -+ prError = PR_IO_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+inline void -+set_listen_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_shutdown_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_socketpair_error(int err) -+{ -+ PR_SetError(err == ENOMEM ? PR_INSUFFICIENT_RESOURCES_ERROR : map_default_error(err), err); -+} -+ -+inline void -+set_recv_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_recvfrom_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+ -+inline void -+set_send_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_sendto_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_getsockname_error(int err) -+{ -+ PR_SetError(err == ENOMEM ? PR_INSUFFICIENT_RESOURCES_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_getpeername_error(int err) -+{ -+ PR_SetError(err == ENOMEM ? PR_INSUFFICIENT_RESOURCES_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_getsockopt_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_BUFFER_OVERFLOW_ERROR; -+ break; -+ case ENOMEM: -+ prError = PR_INSUFFICIENT_RESOURCES_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+inline void -+set_setsockopt_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_BUFFER_OVERFLOW_ERROR; -+ break; -+ case ENOMEM: -+ prError = PR_INSUFFICIENT_RESOURCES_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_socket_error(int err) -+{ -+ PR_SetError( err == ENOMEM ? PR_INSUFFICIENT_RESOURCES_ERROR : map_default_error(err), err); -+} -+ -+ -+PR_IMPLEMENT(PRStatus) PR_GetFileInfo(const char *fn, PRFileInfo *info) -+{ -+ struct stat sb; -+ PRInt32 rv, err; -+ PRInt64 s, s2us; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ rv = stat(fn, &sb); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_stat_error(err); -+ return PR_FAILURE; -+ } -+ if (info) { -+ if (S_IFREG & sb.st_mode) -+ info->type = PR_FILE_FILE; -+ else if (S_IFDIR & sb.st_mode) -+ info->type = PR_FILE_DIRECTORY; -+ else -+ info->type = PR_FILE_OTHER; -+ -+ /* Use lower 32 bits of file size */ -+ info->size = sb.st_size & 0xffffffff; -+ LL_I2L(s, sb.st_mtime); -+ LL_I2L(s2us, PR_USEC_PER_SEC); -+ LL_MUL(s, s, s2us); -+ info->modifyTime = s; -+ LL_I2L(s, sb.st_ctime); -+ LL_MUL(s, s, s2us); -+ info->creationTime = s; -+ } -+ -+ return PR_SUCCESS; -+} -+ -+ -+PR_IMPLEMENT(PRStatus) PR_GetFileInfo64(const char *fn, PRFileInfo64 *info) -+{ -+ struct stat sb; -+ PRInt32 rv, err; -+ PRInt64 s, s2us; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ rv = stat(fn, &sb); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_stat_error(err); -+ return PR_FAILURE; -+ } -+ if (info) { -+ if (S_IFREG & sb.st_mode) -+ info->type = PR_FILE_FILE; -+ else if (S_IFDIR & sb.st_mode) -+ info->type = PR_FILE_DIRECTORY; -+ else -+ info->type = PR_FILE_OTHER; -+ -+ /* For the 64 bit version we can use -+ * the native st_size without modification -+ */ -+ info->size = sb.st_size; -+ LL_I2L(s, sb.st_mtime); -+ LL_I2L(s2us, PR_USEC_PER_SEC); -+ LL_MUL(s, s, s2us); -+ info->modifyTime = s; -+ LL_I2L(s, sb.st_ctime); -+ LL_MUL(s, s, s2us); -+ info->creationTime = s; -+ } -+ -+ return PR_SUCCESS; -+} -+ -+PR_IMPLEMENT(PRStatus) PR_Access(const char *name, PRAccessHow how) -+{ -+ PRInt32 rv, err; -+ int checkFlags; -+ struct stat buf; -+ -+ switch (how) { -+ case PR_ACCESS_WRITE_OK: -+ checkFlags = S_IWUSR | S_IWGRP | S_IWOTH; -+ break; -+ -+ case PR_ACCESS_READ_OK: -+ checkFlags = S_IRUSR | S_IRGRP | S_IROTH; -+ break; -+ -+ case PR_ACCESS_EXISTS: -+ /* we don't need to examine st_mode. */ -+ break; -+ -+ default: { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return PR_FAILURE; -+ } -+ } -+ -+ rv = stat(name, &buf); -+ if (rv == 0 && how != PR_ACCESS_EXISTS && (!(buf.st_mode & checkFlags))) { -+ PR_SetError(PR_NO_ACCESS_RIGHTS_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_access_error(err); -+ return PR_FAILURE; -+ } else -+ return PR_SUCCESS; -+} -+ -+ -+PRInt32 -+_bt_socketavailable (PRFileDesc *fd) -+{ -+#ifdef BONE_VERSION -+ PRInt32 result; -+ -+ if (ioctl(fd->secret->md.osfd, FIONREAD, &result) < 0) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, _MD_ERRNO()); -+ return -1; -+ } -+ return result; -+#else -+ return PR_NOT_IMPLEMENTED_ERROR; -+#endif -+} -+ -+ -+#if defined(DEBUG) -+ -+PRBool IsValidNetAddr(const PRNetAddr *addr) -+{ -+ if ((addr != NULL) -+ && (addr->raw.family != PR_AF_INET6) -+ && (addr->raw.family != PR_AF_INET)) { -+ return PR_FALSE; -+ } -+ return PR_TRUE; -+} -+ -+static PRBool IsValidNetAddrLen(const PRNetAddr *addr, PRInt32 addr_len) -+{ -+ /* -+ * The definition of the length of a Unix domain socket address -+ * is not uniform, so we don't check it. -+ */ -+ if ((addr != NULL) -+ && (PR_NETADDR_SIZE(addr) != addr_len)) { -+ return PR_FALSE; -+ } -+ return PR_TRUE; -+} -+ -+#endif /* DEBUG */ -+ -+static PRInt32 socket_io_wait(PRInt32 osfd, PRInt32 fd_type, -+ PRIntervalTime timeout) -+{ -+ PRInt32 rv = -1; -+ struct timeval tv; -+ PRIntervalTime epoch, now, elapsed, remaining; -+ PRBool wait_for_remaining; -+ PRInt32 syserror; -+ fd_set rd_wr; -+ -+ switch (timeout) { -+ case PR_INTERVAL_NO_WAIT: -+ PR_SetError(PR_IO_TIMEOUT_ERROR, 0); -+ break; -+ case PR_INTERVAL_NO_TIMEOUT: -+ /* -+ * This is a special case of the 'default' case below. -+ * Please see the comments there. -+ */ -+ tv.tv_sec = _PR_INTERRUPT_CHECK_INTERVAL_SECS; -+ tv.tv_usec = 0; -+ FD_ZERO(&rd_wr); -+ do { -+ FD_SET(osfd, &rd_wr); -+ if (fd_type == READ_FD) -+ rv = select(osfd + 1, &rd_wr, NULL, NULL, &tv); -+ else -+ rv = select(osfd + 1, NULL, &rd_wr, NULL, &tv); -+ if (rv == -1 && (syserror = _MD_ERRNO()) != EINTR) { -+#ifdef BONE_VERSION -+ set_select_error(syserror); -+#else -+ if (syserror == EBADF) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, EBADF); -+ } else { -+ PR_SetError(PR_UNKNOWN_ERROR, syserror); -+ } -+#endif -+ break; -+ } -+ } while (rv == 0 || (rv == -1 && syserror == EINTR)); -+ break; -+ default: -+ now = epoch = PR_IntervalNow(); -+ remaining = timeout; -+ FD_ZERO(&rd_wr); -+ do { -+ /* -+ * We block in select for at most -+ * _PR_INTERRUPT_CHECK_INTERVAL_SECS seconds, -+ * so that there is an upper limit on the delay -+ * before the interrupt bit is checked. -+ */ -+ wait_for_remaining = PR_TRUE; -+ tv.tv_sec = PR_IntervalToSeconds(remaining); -+ if (tv.tv_sec > _PR_INTERRUPT_CHECK_INTERVAL_SECS) { -+ wait_for_remaining = PR_FALSE; -+ tv.tv_sec = _PR_INTERRUPT_CHECK_INTERVAL_SECS; -+ tv.tv_usec = 0; -+ } else { -+ tv.tv_usec = PR_IntervalToMicroseconds( -+ remaining - -+ PR_SecondsToInterval(tv.tv_sec)); -+ } -+ FD_SET(osfd, &rd_wr); -+ if (fd_type == READ_FD) -+ rv = select(osfd + 1, &rd_wr, NULL, NULL, &tv); -+ else -+ rv = select(osfd + 1, NULL, &rd_wr, NULL, &tv); -+ /* -+ * we don't consider EINTR a real error -+ */ -+ if (rv == -1 && (syserror = _MD_ERRNO()) != EINTR) { -+#ifdef BONE_VERSION -+ set_select_error(syserror); -+#else -+ if (syserror == EBADF) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, EBADF); -+ } else { -+ PR_SetError(PR_UNKNOWN_ERROR, syserror); -+ } -+#endif -+ break; -+ } -+ /* -+ * We loop again if select timed out or got interrupted -+ * by a signal, and the timeout deadline has not passed yet. -+ */ -+ if (rv == 0 || (rv == -1 && syserror == EINTR)) { -+ /* -+ * If select timed out, we know how much time -+ * we spent in blocking, so we can avoid a -+ * PR_IntervalNow() call. -+ */ -+ if (rv == 0) { -+ if (wait_for_remaining) { -+ now += remaining; -+ } else { -+ now += PR_SecondsToInterval(tv.tv_sec) -+ + PR_MicrosecondsToInterval(tv.tv_usec); -+ } -+ } else { -+ now = PR_IntervalNow(); -+ } -+ elapsed = (PRIntervalTime) (now - epoch); -+ if (elapsed >= timeout) { -+ PR_SetError(PR_IO_TIMEOUT_ERROR, 0); -+ rv = -1; -+ break; -+ } else { -+ remaining = timeout - elapsed; -+ } -+ } -+ } while (rv == 0 || (rv == -1 && syserror == EINTR)); -+ break; -+ } -+ return(rv); -+} -+ -+ -+static PRInt32 PR_CALLBACK SocketWritev(PRFileDesc *fd, const PRIOVec *iov, -+PRInt32 iov_size, PRIntervalTime timeout) -+{ -+#ifdef BONE_VERSION -+ int w, err = 0; -+ const PRIOVec *tmp_iov; -+#define LOCAL_MAXIOV 8 -+ PRIOVec local_iov[LOCAL_MAXIOV]; -+ PRIOVec *iov_copy = NULL; -+ int tmp_out; -+ int index, iov_cnt; -+ int count=0, sz = 0; /* 'count' is the return value. */ -+ int i, amount = 0; -+ -+ /* -+ * Assume the first writev will succeed. Copy iov's only on -+ * failure. -+ */ -+ tmp_iov = iov; -+ for (index = 0; index < iov_size; index++) -+ sz += iov[index].iov_len; -+ -+ iov_cnt = iov_size; -+ -+ while (sz > 0) { -+/* -+ /* -+ * Calculate the total number of bytes to be sent; needed for -+ * optimization later. -+ * We could avoid this if this number was passed in; but it is -+ * probably not a big deal because iov_size is usually small (less than -+ * 3) -+ */ -+ if (!fd->secret->nonblocking) { -+ for (i=0; isecret->md.osfd, (const struct iovec*)tmp_iov, iov_size)) == -1) { -+ err = _MD_ERRNO(); -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ if ((w = socket_io_wait(fd->secret->md.osfd, WRITE_FD, timeout))<0) -+ goto done; -+ -+ } else if (err == EINTR) { -+ continue; -+ } else { -+ break; -+ } -+ } -+ /* -+ * optimization; if bytes sent is less than "amount" call -+ * select before returning. This is because it is likely that -+ * the next writev() call will return EWOULDBLOCK. -+ */ -+ if ((!fd->secret->nonblocking) && (w > 0) && (w < amount) -+ && (timeout != PR_INTERVAL_NO_WAIT)) { -+ if (socket_io_wait(fd->secret->md.osfd, WRITE_FD, timeout) < 0) { -+ w = -1; -+ goto done; -+ } -+ } -+ -+ if (w < 0) { -+ set_writev_error(err); -+ } -+done: -+ -+ -+ if (w < 0) { -+ count = -1; -+ break; -+ } -+ count += w; -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ sz -= w; -+ -+ if (sz > 0) { -+ /* find the next unwritten vector */ -+ for ( index = 0, tmp_out = count; -+ tmp_out >= iov[index].iov_len; -+ tmp_out -= iov[index].iov_len, index++){;} /* nothing to execute */ -+ -+ if (tmp_iov == iov) { -+ /* -+ * The first writev failed so we -+ * must copy iov's around. -+ * Avoid calloc/free if there -+ * are few enough iov's. -+ */ -+ if (iov_size - index <= LOCAL_MAXIOV) -+ iov_copy = local_iov; -+ else if ((iov_copy = (PRIOVec *) PR_CALLOC((iov_size - index) * -+ sizeof *iov_copy)) == NULL) { -+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ return -1; -+ } -+ tmp_iov = iov_copy; -+ } -+ -+ PR_ASSERT(tmp_iov == iov_copy); -+ -+ /* fill in the first partial read */ -+ iov_copy[0].iov_base = &(((char *)iov[index].iov_base)[tmp_out]); -+ iov_copy[0].iov_len = iov[index].iov_len - tmp_out; -+ index++; -+ -+ /* copy the remaining vectors */ -+ for (iov_cnt=1; indexsecret->md.osfd; -+ -+#ifndef BONE_VERSION -+ fd->secret->md.connectValueValid = PR_FALSE; -+#endif -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ PRNetAddr addrCopy; -+ -+ addrCopy = *addr; -+ ((struct sockaddr *) &addrCopy)->sa_len = addrlen; -+ ((struct sockaddr *) &addrCopy)->sa_family = addr->raw.family; -+#endif -+ -+ /* (Copied from unix.c) -+ * We initiate the connection setup by making a nonblocking connect() -+ * call. If the connect() call fails, there are two cases we handle -+ * specially: -+ * 1. The connect() call was interrupted by a signal. In this case -+ * we simply retry connect(). -+ * 2. The NSPR socket is nonblocking and connect() fails with -+ * EINPROGRESS. We first wait until the socket becomes writable. -+ * Then we try to find out whether the connection setup succeeded -+ * or failed. -+ */ -+ -+retry: -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ if ((rv = connect(osfd, (struct sockaddr *)&addrCopy, addrlen)) == -1) { -+#else -+ if ((rv = connect(osfd, (struct sockaddr *)addr, addrlen)) == -1) { -+#endif -+ err = _MD_ERRNO(); -+#ifndef BONE_VERSION -+ fd->secret->md.connectReturnValue = rv; -+ fd->secret->md.connectReturnError = err; -+ fd->secret->md.connectValueValid = PR_TRUE; -+#endif -+ if( err == EINTR ) { -+#ifndef BONE_VERSION -+ snooze( 100000L ); -+#endif -+ goto retry; -+ } -+ -+#ifndef BONE_VERSION -+ if(!fd->secret->nonblocking && ((err == EINPROGRESS) || (err==EAGAIN) || (err==EALREADY))) { -+ -+ /* -+ ** There's no timeout on this connect, but that's not -+ ** a big deal, since the connect times out anyways -+ ** after 30 seconds. Just sleep for 1/10th of a second -+ ** and retry until we go through or die. -+ */ -+ goto retry; -+ } -+ -+ if( fd->secret->nonblocking && ((err == EAGAIN) || (err == EINPROGRESS))) { -+ PR_Lock(_connectLock); -+ if (connectCount < sizeof(connectList)/sizeof(connectList[0])) { -+ connectList[connectCount].osfd = osfd; -+ memcpy(&connectList[connectCount].addr, addr, addrlen); -+ connectList[connectCount].addrlen = addrlen; -+ connectList[connectCount].timeout = timeout; -+ connectCount++; -+ PR_Unlock(_connectLock); -+ set_connect_error(err); -+ } else { -+ PR_Unlock(_connectLock); -+ PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, 0); -+ } -+ return rv; -+ } -+#else /* BONE_VERSION */ -+ if(!fd->secret->nonblocking && (err == EINTR)) { -+ -+ rv = socket_io_wait(osfd, WRITE_FD, timeout); -+ if (rv == -1) { -+ return -1; -+ } -+ -+ PR_ASSERT(rv == 1); -+/* _MD_beos_get_nonblocking_connect_error always return PR_NOT_IMPLEMENTED.. -+ err = _MD_beos_get_nonblocking_connect_error(osfd); -+ if (err != 0) { -+ set_connect_error(err); -+ return -1; -+ } -+*/ -+ return 0; -+ } -+#endif -+ -+ set_connect_error(err); -+ } -+ -+ return rv; -+} -+ -+ -+static PRStatus PR_CALLBACK SocketConnect( -+ PRFileDesc *fd, const PRNetAddr *addr, PRIntervalTime timeout) -+{ -+ PRInt32 rv; /* Return value of _PR_MD_CONNECT */ -+ const PRNetAddr *addrp = addr; -+#if defined(_PR_INET6) -+ PRNetAddr addrCopy; -+ if (addr->raw.family == PR_AF_INET6) { -+ addrCopy = *addr; -+ addrCopy.raw.family = AF_INET6; -+ addrp = &addrCopy; -+ } -+#endif -+ -+ rv = _bt_CONNECT(fd, addrp, PR_NETADDR_SIZE(addr), timeout); -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("connect -> %d", rv)); -+ if (rv == 0) -+ return PR_SUCCESS; -+ else -+ return PR_FAILURE; -+} -+ -+static PRStatus PR_CALLBACK SocketConnectContinue( -+ PRFileDesc *fd, PRInt16 out_flags) -+{ -+ PRInt32 osfd; -+ int err; -+ int rv; -+ -+ if (out_flags & PR_POLL_NVAL) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); -+ return PR_FAILURE; -+ } -+ if ((out_flags & (PR_POLL_WRITE | PR_POLL_EXCEPT | PR_POLL_ERR)) == 0) { -+ PR_ASSERT(out_flags == 0); -+ PR_SetError(PR_IN_PROGRESS_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ osfd = fd->secret->md.osfd; -+ -+ -+#ifdef BONE_VERSION /* bug 122364 */ -+ /* temporary workaround until getsockopt(SO_ERROR) works in BONE */ -+ if (out_flags & PR_POLL_EXCEPT) { -+ PR_SetError(PR_CONNECT_REFUSED_ERROR, 0); -+ return PR_FAILURE; -+ } -+ PR_ASSERT(out_flags & PR_POLL_WRITE); -+ return PR_SUCCESS; -+#else -+ rv = recv(fd->secret->md.osfd, NULL, 0, 0); -+ PR_ASSERT(-1 == rv || 0 == rv); -+ -+ if (-1 == rv && 0 != errno && errno != EAGAIN && errno != EWOULDBLOCK ) { -+ set_connect_error(errno); -+ return PR_FAILURE; -+ } -+ else -+ return PR_SUCCESS; -+#endif -+} -+ -+PRInt32 -+_bt_accept (PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, -+ PRIntervalTime timeout) -+{ -+ PRInt32 osfd = fd->secret->md.osfd; -+ PRInt32 rv, err; -+ -+ while ((rv = accept(osfd, (struct sockaddr *) addr, -+ (int *)addrlen)) == -1) { -+ err = _MD_ERRNO(); -+ -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ /* If it's SUPPOSED to be a blocking thread, wait -+ * a while to see if the triggering condition gets -+ * satisfied. -+ */ -+ /* Assume that we're always using a native thread */ -+ if ((rv = socket_io_wait(osfd, READ_FD, timeout)) < 0) -+ goto done; -+ } else if (err == EINTR) { -+ continue; -+ } else { -+ break; -+ } -+ } -+ if (rv < 0) { -+ set_accept_error(err); -+ } else if (addr != NULL) { -+ /* bug 134099 */ -+ err = getpeername(rv, (struct sockaddr *) addr, (int *)addrlen); -+ } -+done: -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ if (rv != -1) { -+ /* Mask off the first byte of struct sockaddr (the length field) */ -+ if (addr) { -+ addr->raw.family = ((struct sockaddr *) addr)->sa_family; -+ } -+ } -+#endif /* _PR_HAVE_SOCKADDR_LEN */ -+ return(rv); -+} -+ -+ -+ -+static PRFileDesc* PR_CALLBACK SocketAccept(PRFileDesc *fd, PRNetAddr *addr, -+PRIntervalTime timeout) -+{ -+ PRInt32 osfd; -+ PRFileDesc *fd2; -+ PRUint32 al; -+ -+ al = sizeof(PRNetAddr); -+ osfd = _bt_accept(fd, addr, &al, timeout); -+ if (osfd == -1) -+ return 0; -+ fd2 = bt_CreateFileDesc(osfd, PR_GetTCPMethods(), _PR_TRI_TRUE, true); -+ if (!fd2) { -+ closesocket(osfd); -+ -+ return NULL; -+ } -+ -+ fd2->secret->nonblocking = fd->secret->nonblocking; -+ fd2->secret->inheritable = fd->secret->inheritable; -+ -+#ifdef _PR_INET6 -+ if (addr && (AF_INET6 == addr->raw.family)) -+ addr->raw.family = PR_AF_INET6; -+#endif -+ PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE); -+ PR_ASSERT(IsValidNetAddrLen(addr, al) == PR_TRUE); -+ -+ return fd2; -+} -+ -+ -+static PRStatus PR_CALLBACK SocketBind(PRFileDesc *fd, const PRNetAddr *addr) -+{ -+ PRInt32 result, err; -+ const PRNetAddr *addrp = addr; -+#if defined(_PR_INET6) || defined(_PR_HAVE_SOCKADDR_LEN) -+ PRNetAddr addrCopy; -+#endif -+ -+ PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE); -+#if defined(_PR_INET6) -+ if (addr->raw.family == PR_AF_INET6) { -+ addrCopy = *addr; -+ addrCopy.raw.family = AF_INET6; -+ addrp = &addrCopy; -+ } -+#endif -+ -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ addrCopy = *addrp; -+ ((struct sockaddr *) &addrCopy)->sa_len = PR_NETADDR_SIZE(addrp); -+ ((struct sockaddr *) &addrCopy)->sa_family = addr->raw.family; -+ result = bind(fd->secret->md.osfd, (struct sockaddr *) &addrCopy, PR_NETADDR_SIZE(addrp)); -+#else -+ result = bind(fd->secret->md.osfd, (struct sockaddr *) addrp, PR_NETADDR_SIZE(addrp)); -+#endif -+ -+ -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_bind_error(err); -+ return PR_FAILURE; -+ } -+ return PR_SUCCESS; -+} -+ -+static PRStatus PR_CALLBACK SocketListen(PRFileDesc *fd, PRIntn backlog) -+{ -+ PRInt32 result,err; -+#ifndef BONE_VERSION -+ /* Bug workaround! Setting listen to 0 on Be accepts no connections. -+ ** On most UN*Xes this sets the default. -+ */ -+ -+ if( backlog == 0 ) backlog = 5; -+#endif -+ result = listen(fd->secret->md.osfd, backlog); -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_listen_error(err); -+ return PR_FAILURE; -+ } -+ return PR_SUCCESS; -+} -+ -+static PRStatus PR_CALLBACK SocketShutdown(PRFileDesc *fd, PRIntn how) -+{ -+ PRInt32 result,err; -+#ifndef BONE_VERSION -+ if (how == PR_SHUTDOWN_SEND) -+ fd->secret->md.sock_state = BE_SOCK_SHUTDOWN_WRITE; -+ else if (how == PR_SHUTDOWN_RCV) -+ fd->secret->md.sock_state = BE_SOCK_SHUTDOWN_READ; -+ else if (how == PR_SHUTDOWN_BOTH) { -+ fd->secret->md.sock_state = (BE_SOCK_SHUTDOWN_WRITE | BE_SOCK_SHUTDOWN_READ); -+ } -+#else /* BONE_VERSION */ -+ result = shutdown(fd->secret->md.osfd, how); -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_shutdown_error(err); -+ return PR_FAILURE; -+ } -+#endif -+ return PR_SUCCESS; -+} -+ -+PRInt32 -+_bt_recv (PRFileDesc *fd, void *buf, PRInt32 amount, PRInt32 flags, -+ PRIntervalTime timeout) -+{ -+ PRInt32 osfd = fd->secret->md.osfd; -+ PRInt32 rv, err; -+ -+#ifndef BONE_VERSION -+ if (fd->secret->md.sock_state & BE_SOCK_SHUTDOWN_READ) { -+ set_recv_error(EPIPE); -+ return -1; -+ } -+#endif -+ -+#ifdef BONE_VERSION -+ /* -+ ** Gah, stupid hack. If reading a zero amount, instantly return success. -+ ** BONE beta 6 returns EINVAL for reads of zero bytes, which parts of -+ ** mozilla use to check for socket availability. -+ */ -+ -+ if( 0 == amount ) return(0); -+#endif -+ -+ while ((rv = recv(osfd, buf, amount, flags)) == -1) { -+ err = _MD_ERRNO(); -+ -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ /* If socket was supposed to be blocking, -+ wait a while for the condition to be -+ satisfied. */ -+ if ((rv = socket_io_wait(osfd, READ_FD, timeout)) < 0) -+ goto done; -+ } else if (err == EINTR) { -+ continue; -+ } else -+ break; -+ } -+ -+ if (rv < 0) { -+ set_recv_error(err); -+ } -+ -+done: -+ return(rv); -+} -+ -+static PRInt32 PR_CALLBACK SocketRecv(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, -+PRIntervalTime timeout) -+{ -+ PRInt32 rv; -+ -+ if ((flags != 0) && (flags != PR_MSG_PEEK)) { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return -1; -+ } -+ -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("recv: fd=%p osfd=%d buf=%p amount=%d flags=%d", -+ fd, fd->secret->md.osfd, buf, amount, flags)); -+ -+ -+ rv = _bt_recv(fd, buf, amount, flags, timeout); -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("recv -> %d, error = %d, os error = %d", -+ rv, PR_GetError(), PR_GetOSError())); -+ -+ return rv; -+} -+ -+static PRInt32 PR_CALLBACK SocketRead(PRFileDesc *fd, void *buf, PRInt32 amount) -+{ -+ return SocketRecv(fd, buf, amount, 0, PR_INTERVAL_NO_TIMEOUT); -+} -+ -+PRInt32 -+_bt_send (PRFileDesc *fd, const void *buf, PRInt32 amount, PRInt32 flags, -+ PRIntervalTime timeout) -+{ -+ PRInt32 osfd = fd->secret->md.osfd; -+ PRInt32 rv, err; -+ -+#ifndef BONE_VERSION -+ if (fd->secret->md.sock_state & BE_SOCK_SHUTDOWN_WRITE) -+ { -+ set_send_error(EPIPE); -+ return -1; -+ } -+#endif -+ -+ while ((rv = send(osfd, buf, amount, flags)) == -1) { -+ err = _MD_ERRNO(); -+ -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ -+#ifndef BONE_VERSION -+ -+ /* in UNIX implementations, you could do a socket_io_wait here. -+ * but since BeOS doesn't yet support WRITE notification in select, -+ * you're spanked. -+ */ -+ snooze( 10000L ); -+ continue; -+#else /* BONE_VERSION */ -+ if ((rv = socket_io_wait(osfd, WRITE_FD, timeout))< 0) -+ goto done; -+#endif -+ -+ } else if (err == EINTR) { -+ continue; -+ } else { -+ break; -+ } -+ } -+ -+#ifdef BONE_VERSION -+ /* -+ * optimization; if bytes sent is less than "amount" call -+ * select before returning. This is because it is likely that -+ * the next writev() call will return EWOULDBLOCK. -+ */ -+ if ((!fd->secret->nonblocking) && (rv > 0) && (rv < amount) -+ && (timeout != PR_INTERVAL_NO_WAIT)) { -+ if (socket_io_wait(osfd, WRITE_FD, timeout) < 0) { -+ rv = -1; -+ goto done; -+ } -+ } -+#endif /* BONE_VERSION */ -+ -+ if (rv < 0) { -+ set_send_error(err); -+ } -+ -+#ifdef BONE_VERSION -+done: -+#endif -+ return(rv); -+} -+ -+ -+static PRInt32 PR_CALLBACK SocketSend(PRFileDesc *fd, const void *buf, PRInt32 amount, -+PRIntn flags, PRIntervalTime timeout) -+{ -+ PRInt32 temp, count; -+ -+ count = 0; -+ while (amount > 0) { -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, -+ ("send: fd=%p osfd=%d buf=%p amount=%d", -+ fd, fd->secret->md.osfd, buf, amount)); -+ temp = _bt_send(fd, buf, amount, flags, timeout); -+ if (temp < 0) { -+ count = -1; -+ break; -+ } -+ -+ count += temp; -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ buf = (const void*) ((const char*)buf + temp); -+ -+ amount -= temp; -+ } -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("send -> %d", count)); -+ return count; -+} -+ -+static PRInt32 PR_CALLBACK SocketWrite(PRFileDesc *fd, const void *buf, PRInt32 amount) -+{ -+ return SocketSend(fd, buf, amount, 0, PR_INTERVAL_NO_TIMEOUT); -+} -+ -+static PRStatus PR_CALLBACK SocketClose(PRFileDesc *fd) -+{ -+ if (!fd || !fd->secret -+ || (fd->secret->state != _PR_FILEDESC_OPEN -+ && fd->secret->state != _PR_FILEDESC_CLOSED)) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ if (fd->secret->state == _PR_FILEDESC_OPEN) { -+ if (closesocket(fd->secret->md.osfd) < 0) { -+ return PR_FAILURE; -+ } -+ -+ fd->secret->state = _PR_FILEDESC_CLOSED; -+ } -+ -+ PR_ASSERT(fd); -+ _PR_Putfd(fd); -+ return PR_SUCCESS; -+} -+ -+static PRInt32 PR_CALLBACK SocketAvailable(PRFileDesc *fd) -+{ -+ PRInt32 rv; -+ rv = _bt_socketavailable(fd); -+ return rv; -+} -+ -+static PRInt64 PR_CALLBACK SocketAvailable64(PRFileDesc *fd) -+{ -+ PRInt64 rv; -+ LL_I2L(rv, _bt_socketavailable(fd)); -+ return rv; -+} -+ -+static PRStatus PR_CALLBACK SocketSync(PRFileDesc *fd) -+{ -+ return PR_SUCCESS; -+} -+ -+PRInt32 -+_bt_sendto (PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags, -+ const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout) -+{ -+ PRInt32 osfd = fd->secret->md.osfd; -+ PRInt32 rv, err; -+ -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ PRNetAddr addrCopy; -+ -+ addrCopy = *addr; -+ ((struct sockaddr *) &addrCopy)->sa_len = addrlen; -+ ((struct sockaddr *) &addrCopy)->sa_family = addr->raw.family; -+ -+ while ((rv = sendto(osfd, buf, amount, flags, -+ (struct sockaddr *) &addrCopy, addrlen)) == -1) { -+#else -+ while ((rv = sendto(osfd, buf, amount, flags, -+ (struct sockaddr *) addr, addrlen)) == -1) { -+#endif -+ err = _MD_ERRNO(); -+ -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ -+#ifdef BONE_VERSION -+ if ((rv = socket_io_wait(osfd, WRITE_FD, timeout))< 0) -+ goto done; -+#endif -+ } else if (err == EINTR) { -+ continue; -+ -+ } else { -+ break; -+ } -+ } -+ -+ if (rv < 0) { -+ set_sendto_error(err); -+ } -+ -+#ifdef BONE_VERSION -+done: -+#endif -+ return(rv); -+} -+ -+ -+static PRInt32 PR_CALLBACK SocketSendTo( -+ PRFileDesc *fd, const void *buf, PRInt32 amount, -+ PRIntn flags, const PRNetAddr *addr, PRIntervalTime timeout) -+{ -+ PRInt32 temp, count; -+ const PRNetAddr *addrp = addr; -+#if defined(_PR_INET6) -+ PRNetAddr addrCopy; -+#endif -+ -+ PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE); -+#if defined(_PR_INET6) -+ if (addr->raw.family == PR_AF_INET6) { -+ addrCopy = *addr; -+ addrCopy.raw.family = AF_INET6; -+ addrp = &addrCopy; -+ } -+#endif -+ -+ count = 0; -+ while (amount > 0) { -+ temp = _bt_sendto(fd, buf, amount, flags, -+ addrp, PR_NETADDR_SIZE(addr), timeout); -+ if (temp < 0) { -+ count = -1; -+ break; -+ } -+ count += temp; -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ buf = (const void*) ((const char*)buf + temp); -+ amount -= temp; -+ } -+ return count; -+} -+ -+PRInt32 -+_bt_recvfrom (PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, -+ PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout) -+{ -+ PRInt32 osfd = fd->secret->md.osfd; -+ PRInt32 rv, err; -+ -+ while ((*addrlen = PR_NETADDR_SIZE(addr)), -+ ((rv = recvfrom(osfd, buf, amount, flags, -+ (struct sockaddr *) addr, -+ (int *)addrlen)) == -1)) { -+ err = _MD_ERRNO(); -+ -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ if ((rv = socket_io_wait(osfd, READ_FD, timeout)) < 0) -+ goto done; -+ -+ } else if (err == EINTR) { -+ continue; -+ } else { -+ break; -+ } -+ } -+ -+ if (rv < 0) { -+ set_recvfrom_error(err); -+ } -+ -+done: -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ if (rv != -1) { -+ /* ignore the sa_len field of struct sockaddr */ -+ if (addr) { -+ addr->raw.family = ((struct sockaddr *) addr)->sa_family; -+ } -+ } -+#endif /* _PR_HAVE_SOCKADDR_LEN */ -+ return(rv); -+} -+ -+ -+ -+static PRInt32 PR_CALLBACK SocketRecvFrom(PRFileDesc *fd, void *buf, PRInt32 amount, -+PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout) -+{ -+ PRInt32 rv; -+ PRUint32 al; -+ -+ al = sizeof(PRNetAddr); -+ rv = _bt_recvfrom(fd, buf, amount, flags, addr, &al, timeout); -+#ifdef _PR_INET6 -+ if (addr && (AF_INET6 == addr->raw.family)) -+ addr->raw.family = PR_AF_INET6; -+#endif -+ return rv; -+} -+ -+static PRInt32 PR_CALLBACK SocketAcceptRead(PRFileDesc *sd, PRFileDesc **nd, -+PRNetAddr **raddr, void *buf, PRInt32 amount, -+PRIntervalTime timeout) -+{ -+ /* The socket must be in blocking mode. */ -+ if (sd->secret->nonblocking) { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return -1; -+ } -+ *nd = NULL; -+ -+ return PR_EmulateAcceptRead(sd, nd, raddr, buf, amount, timeout); -+} -+ -+ -+static PRInt32 PR_CALLBACK SocketSendFile( -+ PRFileDesc *sd, PRSendFileData *sfd, -+ PRTransmitFileFlags flags, PRIntervalTime timeout) -+{ -+ /* The socket must be in blocking mode. */ -+ if (sd->secret->nonblocking) { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return -1; -+ } -+ return PR_EmulateSendFile(sd, sfd, flags, timeout); -+} -+ -+static PRInt32 PR_CALLBACK SocketTransmitFile(PRFileDesc *sd, PRFileDesc *fd, -+const void *headers, PRInt32 hlen, PRTransmitFileFlags flags, -+PRIntervalTime timeout) -+{ -+ PRSendFileData sfd; -+ -+ sfd.fd = fd; -+ sfd.file_offset = 0; -+ sfd.file_nbytes = 0; -+ sfd.header = headers; -+ sfd.hlen = hlen; -+ sfd.trailer = NULL; -+ sfd.tlen = 0; -+ -+ return(SocketSendFile(sd, &sfd, flags, timeout)); -+} -+ -+static PRStatus PR_CALLBACK SocketGetName(PRFileDesc *fd, PRNetAddr *addr) -+{ -+ PRInt32 result, err; -+ PRUint32 addrlen; -+ -+ addrlen = sizeof(PRNetAddr); -+ result = getsockname(fd->secret->md.osfd, (struct sockaddr *) addr, &addrlen); -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_getsockname_error(err); -+ return PR_FAILURE; -+ } -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ if (result == 0) { -+ /* ignore the sa_len field of struct sockaddr */ -+ if (addr) { -+ addr->raw.family = ((struct sockaddr *) addr)->sa_family; -+ } -+ } -+#endif /* _PR_HAVE_SOCKADDR_LEN */ -+ -+#ifdef _PR_INET6 -+ if (AF_INET6 == addr->raw.family) -+ addr->raw.family = PR_AF_INET6; -+#endif -+ PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE); -+ PR_ASSERT(IsValidNetAddrLen(addr, addrlen) == PR_TRUE); -+ return PR_SUCCESS; -+} -+ -+static PRStatus PR_CALLBACK SocketGetPeerName(PRFileDesc *fd, PRNetAddr *addr) -+{ -+ PRInt32 result, err; -+ PRUint32 addrlen; -+ -+ addrlen = sizeof(PRNetAddr); -+ result = getpeername(fd->secret->md.osfd, (struct sockaddr *) addr, &addrlen); -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_getpeername_error(err); -+ return PR_FAILURE; -+ } -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ if (result == 0) { -+ /* ignore the sa_len field of struct sockaddr */ -+ if (addr) { -+ addr->raw.family = ((struct sockaddr *) addr)->sa_family; -+ } -+ } -+#endif /* _PR_HAVE_SOCKADDR_LEN */ -+ -+#ifdef _PR_INET6 -+ if (AF_INET6 == addr->raw.family) -+ addr->raw.family = PR_AF_INET6; -+#endif -+ PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE); -+ PR_ASSERT(IsValidNetAddrLen(addr, addrlen) == PR_TRUE); -+ return PR_SUCCESS; -+} -+ -+static PRInt16 PR_CALLBACK SocketPoll( -+ PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags) -+{ -+ *out_flags = 0; -+ return in_flags; -+} /* SocketPoll */ -+ -+ -+PRStatus PR_CALLBACK SocketGetOption(PRFileDesc *fd, PRSocketOptionData *data) -+{ -+ PRStatus rv; -+ PRInt32 level, name, length, err; -+ -+ /* -+ * PR_SockOpt_Nonblocking is a special case that does not -+ * translate to a getsockopt() call -+ */ -+ if (PR_SockOpt_Nonblocking == data->option) -+ { -+ data->value.non_blocking = fd->secret->nonblocking; -+ return PR_SUCCESS; -+ } -+ -+ rv = _PR_MapOptionName(data->option, &level, &name); -+ if (PR_SUCCESS != rv) return rv; -+ -+ switch (data->option) -+ { -+ case PR_SockOpt_Linger: -+ { -+#ifdef BONE_VERSION -+ struct linger linger; -+ length = sizeof(linger); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char *) &linger, &length)) -+ { -+ PR_ASSERT(sizeof(linger) == length); -+ data->value.linger.polarity = -+ (linger.l_onoff) ? PR_TRUE : PR_FALSE; -+ data->value.linger.linger = -+ PR_SecondsToInterval(linger.l_linger); -+ return PR_SUCCESS; -+ } -+ break; -+#else -+ PR_SetError( PR_NOT_IMPLEMENTED_ERROR, 0 ); -+ return PR_FAILURE; -+#endif -+ } -+ case PR_SockOpt_Reuseaddr: -+ case PR_SockOpt_Keepalive: -+ case PR_SockOpt_NoDelay: -+ case PR_SockOpt_Broadcast: -+ { -+ PRIntn value; -+ length = sizeof(value); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char *) &value, &length)) -+ { -+ data->value.reuse_addr = (0 == value) ? PR_FALSE : PR_TRUE; -+ return PR_SUCCESS; -+ } -+ break; -+ } -+ case PR_SockOpt_McastLoopback: -+ { -+ PRUint8 bool; -+ length = sizeof(bool); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char*)&bool, &length)) -+ { -+ data->value.mcast_loopback = (0 == bool) ? PR_FALSE : PR_TRUE; -+ return PR_SUCCESS; -+ } -+ break; -+ } -+ case PR_SockOpt_RecvBufferSize: -+ case PR_SockOpt_SendBufferSize: -+ case PR_SockOpt_MaxSegment: -+ { -+ PRIntn value; -+ length = sizeof(value); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char*)&value, &length)) -+ { -+ data->value.recv_buffer_size = value; -+ return PR_SUCCESS; -+ } -+ break; -+ } -+ case PR_SockOpt_IpTimeToLive: -+ case PR_SockOpt_IpTypeOfService: -+ { -+ /* These options should really be an int (or PRIntn). */ -+ length = sizeof(PRUintn); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char*)&data->value.ip_ttl, &length)) -+ return PR_SUCCESS; -+ break; -+ } -+ case PR_SockOpt_McastTimeToLive: -+ { -+ PRUint8 ttl; -+ length = sizeof(ttl); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char*)&ttl, &length)) -+ { -+ data->value.mcast_ttl = ttl; -+ return PR_SUCCESS; -+ } -+ break; -+ } -+#ifdef IP_ADD_MEMBERSHIP -+ case PR_SockOpt_AddMember: -+ case PR_SockOpt_DropMember: -+ { -+ struct ip_mreq mreq; -+ length = sizeof(mreq); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char*)&mreq, &length)) -+ { -+ data->value.add_member.mcaddr.inet.ip = -+ mreq.imr_multiaddr.s_addr; -+ data->value.add_member.ifaddr.inet.ip = -+ mreq.imr_interface.s_addr; -+ return PR_SUCCESS; -+ } -+ break; -+ } -+#endif /* IP_ADD_MEMBERSHIP */ -+ case PR_SockOpt_McastInterface: -+ { -+ /* This option is a struct in_addr. */ -+ length = sizeof(data->value.mcast_if.inet.ip); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, -+ (char*)&data->value.mcast_if.inet.ip, &length)) -+ return PR_SUCCESS; -+ break; -+ } -+ default: -+ PR_NOT_REACHED("Unknown socket option"); -+ break; -+ } -+ err = _MD_ERRNO(); -+ set_getsockopt_error(err); -+ return PR_FAILURE; -+} /* SocketGetOption */ -+ -+PRStatus PR_CALLBACK SocketSetOption(PRFileDesc *fd, const PRSocketOptionData *data) -+{ -+ PRStatus rv; -+ PRInt32 level, name, result, err; -+ -+ /* -+ * PR_SockOpt_Nonblocking is a special case that does not -+ * translate to a setsockopt call. -+ */ -+ if (PR_SockOpt_Nonblocking == data->option) -+ { -+ fd->secret->nonblocking = data->value.non_blocking; -+ return PR_SUCCESS; -+ } -+ -+ rv = _PR_MapOptionName(data->option, &level, &name); -+ if (PR_SUCCESS != rv) return rv; -+ -+ switch (data->option) -+ { -+ case PR_SockOpt_Linger: -+ { -+#ifdef BONE_VERSION -+ struct linger linger; -+ linger.l_onoff = data->value.linger.polarity; -+ linger.l_linger = PR_IntervalToSeconds(data->value.linger.linger); -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&linger, sizeof(linger)); -+ break; -+#else -+ PR_SetError( PR_NOT_IMPLEMENTED_ERROR, 0 ); -+ return PR_FAILURE; -+#endif -+ } -+ case PR_SockOpt_Reuseaddr: -+ case PR_SockOpt_Keepalive: -+ case PR_SockOpt_NoDelay: -+ case PR_SockOpt_Broadcast: -+ { -+ PRIntn value; -+ value = (data->value.reuse_addr) ? 1 : 0; -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&value, sizeof(value)); -+ break; -+ } -+ case PR_SockOpt_McastLoopback: -+ { -+ PRUint8 bool; -+ bool = data->value.mcast_loopback ? 1 : 0; -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&bool, sizeof(bool)); -+ break; -+ } -+ case PR_SockOpt_RecvBufferSize: -+ case PR_SockOpt_SendBufferSize: -+ case PR_SockOpt_MaxSegment: -+ { -+ PRIntn value = data->value.recv_buffer_size; -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&value, sizeof(value)); -+ break; -+ } -+ case PR_SockOpt_IpTimeToLive: -+ case PR_SockOpt_IpTypeOfService: -+ { -+ /* These options should really be an int (or PRIntn). */ -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&data->value.ip_ttl, sizeof(PRUintn)); -+ break; -+ } -+ case PR_SockOpt_McastTimeToLive: -+ { -+ PRUint8 ttl; -+ ttl = data->value.mcast_ttl; -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&ttl, sizeof(ttl)); -+ break; -+ } -+#ifdef IP_ADD_MEMBERSHIP -+ case PR_SockOpt_AddMember: -+ case PR_SockOpt_DropMember: -+ { -+ struct ip_mreq mreq; -+ mreq.imr_multiaddr.s_addr = -+ data->value.add_member.mcaddr.inet.ip; -+ mreq.imr_interface.s_addr = -+ data->value.add_member.ifaddr.inet.ip; -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&mreq, sizeof(mreq)); -+ break; -+ } -+#endif /* IP_ADD_MEMBERSHIP */ -+ case PR_SockOpt_McastInterface: -+ { -+ /* This option is a struct in_addr. */ -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&data->value.mcast_if.inet.ip, -+ sizeof(data->value.mcast_if.inet.ip)); -+ break; -+ } -+ default: -+ PR_NOT_REACHED("Unknown socket option"); -+ break; -+ } -+ if (0 == result) -+ return PR_SUCCESS; -+ err = _MD_ERRNO(); -+ set_setsockopt_error(err); -+ return PR_FAILURE; -+} /* SocketSetOption */ -+ -+ -+ -+static PRIOMethods tcpMethods = { -+ PR_DESC_SOCKET_TCP, -+ SocketClose, -+ SocketRead, -+ SocketWrite, -+ SocketAvailable, -+ SocketAvailable64, -+ SocketSync, -+ (PRSeekFN)_PR_InvalidInt, -+ (PRSeek64FN)_PR_InvalidInt64, -+ (PRFileInfoFN)_PR_InvalidStatus, -+ (PRFileInfo64FN)_PR_InvalidStatus, -+ SocketWritev, -+ SocketConnect, -+ SocketAccept, -+ SocketBind, -+ SocketListen, -+ SocketShutdown, -+ SocketRecv, -+ SocketSend, -+ (PRRecvfromFN)_PR_InvalidInt, -+ (PRSendtoFN)_PR_InvalidInt, -+ SocketPoll, -+ SocketAcceptRead, -+ SocketTransmitFile, -+ SocketGetName, -+ SocketGetPeerName, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ SocketGetOption, -+ SocketSetOption, -+ SocketSendFile, -+ SocketConnectContinue, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+static PRIOMethods udpMethods = { -+ PR_DESC_SOCKET_UDP, -+ SocketClose, -+ SocketRead, -+ SocketWrite, -+ SocketAvailable, -+ SocketAvailable64, -+ SocketSync, -+ (PRSeekFN)_PR_InvalidInt, -+ (PRSeek64FN)_PR_InvalidInt64, -+ (PRFileInfoFN)_PR_InvalidStatus, -+ (PRFileInfo64FN)_PR_InvalidStatus, -+ SocketWritev, -+ SocketConnect, -+ (PRAcceptFN)_PR_InvalidDesc, -+ SocketBind, -+ SocketListen, -+ SocketShutdown, -+ SocketRecv, -+ SocketSend, -+ SocketRecvFrom, -+ SocketSendTo, -+ SocketPoll, -+ (PRAcceptreadFN)_PR_InvalidInt, -+ (PRTransmitfileFN)_PR_InvalidInt, -+ SocketGetName, -+ SocketGetPeerName, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ SocketGetOption, -+ SocketSetOption, -+ (PRSendfileFN)_PR_InvalidInt, -+ (PRConnectcontinueFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+ -+static PRIOMethods socketpollfdMethods = { -+ (PRDescType) 0, -+ (PRCloseFN)_PR_InvalidStatus, -+ (PRReadFN)_PR_InvalidInt, -+ (PRWriteFN)_PR_InvalidInt, -+ (PRAvailableFN)_PR_InvalidInt, -+ (PRAvailable64FN)_PR_InvalidInt64, -+ (PRFsyncFN)_PR_InvalidStatus, -+ (PRSeekFN)_PR_InvalidInt, -+ (PRSeek64FN)_PR_InvalidInt64, -+ (PRFileInfoFN)_PR_InvalidStatus, -+ (PRFileInfo64FN)_PR_InvalidStatus, -+ (PRWritevFN)_PR_InvalidInt, -+ (PRConnectFN)_PR_InvalidStatus, -+ (PRAcceptFN)_PR_InvalidDesc, -+ (PRBindFN)_PR_InvalidStatus, -+ (PRListenFN)_PR_InvalidStatus, -+ (PRShutdownFN)_PR_InvalidStatus, -+ (PRRecvFN)_PR_InvalidInt, -+ (PRSendFN)_PR_InvalidInt, -+ (PRRecvfromFN)_PR_InvalidInt, -+ (PRSendtoFN)_PR_InvalidInt, -+ SocketPoll, -+ (PRAcceptreadFN)_PR_InvalidInt, -+ (PRTransmitfileFN)_PR_InvalidInt, -+ (PRGetsocknameFN)_PR_InvalidStatus, -+ (PRGetpeernameFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRGetsocketoptionFN)_PR_InvalidStatus, -+ (PRSetsocketoptionFN)_PR_InvalidStatus, -+ (PRSendfileFN)_PR_InvalidInt, -+ (PRConnectcontinueFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+static PRIOMethods _pr_socketpollfd_methods = { -+ (PRDescType) 0, -+ (PRCloseFN)_PR_InvalidStatus, -+ (PRReadFN)_PR_InvalidInt, -+ (PRWriteFN)_PR_InvalidInt, -+ (PRAvailableFN)_PR_InvalidInt, -+ (PRAvailable64FN)_PR_InvalidInt64, -+ (PRFsyncFN)_PR_InvalidStatus, -+ (PRSeekFN)_PR_InvalidInt, -+ (PRSeek64FN)_PR_InvalidInt64, -+ (PRFileInfoFN)_PR_InvalidStatus, -+ (PRFileInfo64FN)_PR_InvalidStatus, -+ (PRWritevFN)_PR_InvalidInt, -+ (PRConnectFN)_PR_InvalidStatus, -+ (PRAcceptFN)_PR_InvalidDesc, -+ (PRBindFN)_PR_InvalidStatus, -+ (PRListenFN)_PR_InvalidStatus, -+ (PRShutdownFN)_PR_InvalidStatus, -+ (PRRecvFN)_PR_InvalidInt, -+ (PRSendFN)_PR_InvalidInt, -+ (PRRecvfromFN)_PR_InvalidInt, -+ (PRSendtoFN)_PR_InvalidInt, -+ SocketPoll, -+ (PRAcceptreadFN)_PR_InvalidInt, -+ (PRTransmitfileFN)_PR_InvalidInt, -+ (PRGetsocknameFN)_PR_InvalidStatus, -+ (PRGetpeernameFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRGetsocketoptionFN)_PR_InvalidStatus, -+ (PRSetsocketoptionFN)_PR_InvalidStatus, -+ (PRSendfileFN)_PR_InvalidInt, -+ (PRConnectcontinueFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+PR_IMPLEMENT(const PRIOMethods*) PR_GetTCPMethods() -+{ -+ return &tcpMethods; -+} -+ -+PR_IMPLEMENT(const PRIOMethods*) PR_GetUDPMethods() -+{ -+ return &udpMethods; -+} -+ -+static const PRIOMethods* PR_GetSocketPollFdMethods(void) -+{ -+ return &_pr_socketpollfd_methods; -+} /* PR_GetSocketPollFdMethods */ -+ -+PR_IMPLEMENT(PRInt32) PR_Poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout) -+{ -+ PRInt32 rv = 0; -+ /* -+ * This code is almost a duplicate of w32poll.c's _PR_MD_PR_POLL(). -+ */ -+ fd_set rd, wt, ex; -+ PRFileDesc *bottom; -+ PRPollDesc *pd, *epd; -+ PRInt32 maxfd = -1, ready, err; -+ PRIntervalTime remaining, elapsed, start; -+ -+ struct timeval tv, *tvp = NULL; -+ -+ if (0 == npds) { -+ PR_Sleep(timeout); -+ return rv; -+ } -+ -+ FD_ZERO(&rd); -+ FD_ZERO(&wt); -+ FD_ZERO(&ex); -+ -+ ready = 0; -+ for (pd = pds, epd = pd + npds; pd < epd; pd++) -+ { -+ PRInt16 in_flags_read = 0, in_flags_write = 0; -+ PRInt16 out_flags_read = 0, out_flags_write = 0; -+ -+ if ((NULL != pd->fd) && (0 != pd->in_flags)) -+ { -+ if (pd->in_flags & PR_POLL_READ) -+ { -+ in_flags_read = (pd->fd->methods->poll)(pd->fd, pd->in_flags & ~PR_POLL_WRITE, &out_flags_read); -+ } -+ if (pd->in_flags & PR_POLL_WRITE) -+ { -+ in_flags_write = (pd->fd->methods->poll)(pd->fd, pd->in_flags & ~PR_POLL_READ, &out_flags_write); -+ } -+ if ((0 != (in_flags_read & out_flags_read)) -+ || (0 != (in_flags_write & out_flags_write))) -+ { -+ /* this one's ready right now */ -+ if (0 == ready) -+ { -+ /* -+ * We will have to return without calling the -+ * system poll/select function. So zero the -+ * out_flags fields of all the poll descriptors -+ * before this one. -+ */ -+ PRPollDesc *prev; -+ for (prev = pds; prev < pd; prev++) -+ { -+ prev->out_flags = 0; -+ } -+ } -+ ready += 1; -+ pd->out_flags = out_flags_read | out_flags_write; -+ } -+ else -+ { -+ pd->out_flags = 0; /* pre-condition */ -+ -+ /* make sure this is an NSPR supported stack */ -+ bottom = PR_GetIdentitiesLayer(pd->fd, PR_NSPR_IO_LAYER); -+ PR_ASSERT(NULL != bottom); /* what to do about that? */ -+ if ((NULL != bottom) -+ && (_PR_FILEDESC_OPEN == bottom->secret->state)) -+ { -+ if (0 == ready) -+ { -+ PRInt32 osfd = bottom->secret->md.osfd; -+ if (osfd > maxfd) maxfd = osfd; -+ if (in_flags_read & PR_POLL_READ) -+ { -+ pd->out_flags |= _PR_POLL_READ_SYS_READ; -+ FD_SET(osfd, &rd); -+ } -+ if (in_flags_read & PR_POLL_WRITE) -+ { -+ pd->out_flags |= _PR_POLL_READ_SYS_WRITE; -+ FD_SET(osfd, &wt); -+ } -+ if (in_flags_write & PR_POLL_READ) -+ { -+ pd->out_flags |= _PR_POLL_WRITE_SYS_READ; -+ FD_SET(osfd, &rd); -+ } -+ if (in_flags_write & PR_POLL_WRITE) -+ { -+ pd->out_flags |= _PR_POLL_WRITE_SYS_WRITE; -+ FD_SET(osfd, &wt); -+ } -+ if (pd->in_flags & PR_POLL_EXCEPT) FD_SET(osfd, &ex); -+ } -+ } -+ else -+ { -+ if (0 == ready) -+ { -+ PRPollDesc *prev; -+ for (prev = pds; prev < pd; prev++) -+ { -+ prev->out_flags = 0; -+ } -+ } -+ ready += 1; /* this will cause an abrupt return */ -+ pd->out_flags = PR_POLL_NVAL; /* bogii */ -+ } -+ } -+ } -+ else -+ { -+ pd->out_flags = 0; -+ } -+ } -+ -+ if (0 != ready) return ready; /* no need to block */ -+ -+ remaining = timeout; -+ start = PR_IntervalNow(); -+ -+ retry: -+ if (timeout != PR_INTERVAL_NO_TIMEOUT) -+ { -+ PRInt32 ticksPerSecond = PR_TicksPerSecond(); -+ tv.tv_sec = remaining / ticksPerSecond; -+ tv.tv_usec = PR_IntervalToMicroseconds( remaining % ticksPerSecond ); -+ tvp = &tv; -+ } -+ -+ ready = select(maxfd + 1, &rd, &wt, &ex, tvp); -+ -+ if (ready == -1 && errno == EINTR) -+ { -+ if (timeout == PR_INTERVAL_NO_TIMEOUT) goto retry; -+ else -+ { -+ elapsed = (PRIntervalTime) (PR_IntervalNow() - start); -+ if (elapsed > timeout) ready = 0; /* timed out */ -+ else -+ { -+ remaining = timeout - elapsed; -+ goto retry; -+ } -+ } -+ } -+ -+ /* -+ ** Now to unravel the select sets back into the client's poll -+ ** descriptor list. Is this possibly an area for pissing away -+ ** a few cycles or what? -+ */ -+ if (ready > 0) -+ { -+ ready = 0; -+ for (pd = pds, epd = pd + npds; pd < epd; pd++) -+ { -+ PRInt16 out_flags = 0; -+ if ((NULL != pd->fd) && (0 != pd->in_flags)) -+ { -+ PRInt32 osfd; -+ bottom = PR_GetIdentitiesLayer(pd->fd, PR_NSPR_IO_LAYER); -+ PR_ASSERT(NULL != bottom); -+ -+ osfd = bottom->secret->md.osfd; -+ -+ if (FD_ISSET(osfd, &rd)) -+ { -+ if (pd->out_flags & _PR_POLL_READ_SYS_READ) -+ out_flags |= PR_POLL_READ; -+ if (pd->out_flags & _PR_POLL_WRITE_SYS_READ) -+ out_flags |= PR_POLL_WRITE; -+ } -+ if (FD_ISSET(osfd, &wt)) -+ { -+ if (pd->out_flags & _PR_POLL_READ_SYS_WRITE) -+ out_flags |= PR_POLL_READ; -+ if (pd->out_flags & _PR_POLL_WRITE_SYS_WRITE) -+ out_flags |= PR_POLL_WRITE; -+ } -+ if (FD_ISSET(osfd, &ex)) out_flags |= PR_POLL_EXCEPT; -+ -+/* Workaround for nonblocking connects under net_server */ -+#ifndef BONE_VERSION -+ if (out_flags) -+ { -+ /* check if it is a pending connect */ -+ int i = 0, j = 0; -+ PR_Lock( _connectLock ); -+ for( i = 0; i < connectCount; i++ ) -+ { -+ if(connectList[i].osfd == osfd) -+ { -+ int connectError; -+ int connectResult; -+ -+ connectResult = connect(connectList[i].osfd, -+ &connectList[i].addr, -+ connectList[i].addrlen); -+ connectError = errno; -+ -+ if(connectResult < 0 ) -+ { -+ if(connectError == EINTR || connectError == EWOULDBLOCK || -+ connectError == EINPROGRESS || connectError == EALREADY) -+ { -+ break; -+ } -+ } -+ -+ if(i == (connectCount - 1)) -+ { -+ connectList[i].osfd = -1; -+ } else { -+ for(j = i; j < connectCount; j++ ) -+ { -+ memcpy( &connectList[j], &connectList[j+1], -+ sizeof(connectList[j])); -+ } -+ } -+ connectCount--; -+ -+ bottom->secret->md.connectReturnValue = connectResult; -+ bottom->secret->md.connectReturnError = connectError; -+ bottom->secret->md.connectValueValid = PR_TRUE; -+ break; -+ } -+ } -+ PR_Unlock( _connectLock ); -+ } -+#endif -+ } -+ pd->out_flags = out_flags; -+ if (out_flags) ready++; -+ } -+ PR_ASSERT(ready > 0); -+ } -+ else if (ready < 0) -+ { -+ err = _MD_ERRNO(); -+ if (err == EBADF) -+ { -+ /* Find the bad fds */ -+ ready = 0; -+ for (pd = pds, epd = pd + npds; pd < epd; pd++) -+ { -+ pd->out_flags = 0; -+ if ((NULL != pd->fd) && (0 != pd->in_flags)) -+ { -+ bottom = PR_GetIdentitiesLayer(pd->fd, PR_NSPR_IO_LAYER); -+ if (fcntl(bottom->secret->md.osfd, F_GETFL, 0) == -1) -+ { -+ pd->out_flags = PR_POLL_NVAL; -+ ready++; -+ } -+ } -+ } -+ PR_ASSERT(ready > 0); -+ } -+ else set_select_error(err); -+ } -+ -+ return ready; -+} /* PR_POLL */ -+ -+PR_IMPLEMENT(PRFileDesc*) PR_CreateSocketPollFd(PRInt32 osfd) -+{ -+ PRFileDesc *fd; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ -+ fd = _PR_Getfd(); -+ -+ if (fd == NULL) PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ else -+ { -+ fd->secret->md.osfd = osfd; -+ fd->secret->inheritable = _PR_TRI_FALSE; -+ fd->secret->state = _PR_FILEDESC_OPEN; -+ fd->methods = PR_GetSocketPollFdMethods(); -+ } -+ -+ return fd; -+} /* PR_CreateSocketPollFD */ -+ -+PR_IMPLEMENT(PRStatus) PR_DestroySocketPollFd(PRFileDesc *fd) -+{ -+ if (NULL == fd) -+ { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); -+ return PR_FAILURE; -+ } -+ fd->secret->state = _PR_FILEDESC_CLOSED; -+ _PR_Putfd(fd); -+ return PR_SUCCESS; -+} /* PR_DestroySocketPollFd */ -+ -+ -+PR_IMPLEMENT(PRFileDesc *) PR_ImportTCPSocket(PRInt32 osfd) -+{ -+ PRFileDesc *fd; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ fd = bt_CreateFileDesc(osfd, PR_GetTCPMethods(), _PR_TRI_UNKNOWN, true); -+ if (fd == NULL) -+ closesocket(osfd); -+ return(fd); -+} -+ -+PR_IMPLEMENT(PRFileDesc *) PR_ImportUDPSocket(PRInt32 osfd) -+{ -+ PRFileDesc *fd; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ fd = bt_CreateFileDesc(osfd, PR_GetUDPMethods(), _PR_TRI_UNKNOWN, true); -+ if (fd == NULL) -+ closesocket(osfd); -+ return(fd); -+} -+ -+ -+#ifndef XP_HAIKU -+int socketpair (int family, int type, int protocol, int sv[2]) -+{ -+ int insock, outsock, acceptedsock; -+ struct sockaddr_in addrs[2]; -+ int alen; -+ /* that's really only so we can build... */ -+ /*fprintf(stderr, "socketpair(%d, %d, %d)\n", family, type, protocol);*/ -+ if (family != AF_INET) { -+ /*fatal*/fprintf(stderr, "socketpair(%d, %d, %d): family not supported\n", family, type, protocol); -+ errno = EPFNOSUPPORT; -+ return -1; -+ } -+ if (type != SOCK_DGRAM && type != SOCK_STREAM) { -+ errno = EPROTONOSUPPORT; -+ return -1; -+ } -+ addrs[0].sin_family = AF_INET; -+ addrs[0].sin_port = 0; -+ addrs[0].sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+ addrs[1].sin_family = AF_INET; -+ addrs[1].sin_port = 0; -+ addrs[1].sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+ alen = sizeof(struct sockaddr_in); -+ -+ insock = socket(family, type, protocol); -+ if (insock < 0) -+ goto err1; -+ if (bind(insock, (struct sockaddr *)&addrs[0], alen) < 0) -+ goto err2; -+ if (getsockname(insock, (struct sockaddr *)&addrs[0], &alen) < 0) -+ goto err2; -+ if (type == SOCK_STREAM) -+ listen(insock, 2); -+ -+ outsock = socket(family, type, protocol); -+ if (outsock < 0) -+ goto err2; -+ alen = sizeof(struct sockaddr_in); -+ if (bind(outsock, (struct sockaddr *)&addrs[1], alen) < 0) -+ goto err2; -+ if (getsockname(outsock, (struct sockaddr *)&addrs[1], &alen) < 0) -+ goto err3; -+ addrs[0].sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+ addrs[1].sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+ /*fprintf(stderr, "socketpair: %08lx:%d <-> %08lx:%d\n", -+ ((struct sockaddr_in *)&addrs[0])->sin_addr.s_addr, -+ ((struct sockaddr_in *)&addrs[0])->sin_port, -+ ((struct sockaddr_in *)&addrs[1])->sin_addr.s_addr, -+ ((struct sockaddr_in *)&addrs[1])->sin_port);*/ -+ -+ if (connect(outsock, (struct sockaddr *)&addrs[0], alen) < 0) -+ goto err3; -+ if (type == SOCK_DGRAM) { -+ if (connect(insock, (struct sockaddr *)&addrs[1], alen) < 0) -+ goto err3; -+ sv[0] = insock; -+ } else { -+ acceptedsock = accept(insock, (struct sockaddr *)&addrs[1], &alen); -+ if (acceptedsock < 0) -+ goto err3; -+ closesocket(insock); -+ sv[0] = acceptedsock; -+ } -+ sv[1] = outsock; -+ return 0; -+err3: -+ closesocket(outsock); -+err2: -+ closesocket(insock); -+err1: -+ fprintf(stderr,"socketpair: error 0x%08x\n", errno); -+ return -1; -+} -+#endif -+ -+PR_IMPLEMENT(PRStatus) PR_NewTCPSocketPair(PRFileDesc *f[]) -+{ -+ PRInt32 rv, osfd[2]; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+#ifdef XP_HAIKU -+ rv = socketpair(AF_UNIX, SOCK_STREAM, 0, osfd); -+#else -+ rv = socketpair(AF_INET, SOCK_STREAM, 0, osfd); -+#endif -+ if (rv == -1) { -+ return PR_FAILURE; -+ } -+ f[0] = bt_CreateFileDesc(osfd[0], PR_GetTCPMethods(), _PR_TRI_TRUE, true); -+ if (NULL == f[0]) { -+ closesocket(osfd[0]); -+ closesocket(osfd[1]); -+ /* PR_AllocFileDesc() has invoked PR_SetError(). */ -+ return PR_FAILURE; -+ } -+ f[1] = bt_CreateFileDesc(osfd[1], PR_GetTCPMethods(), _PR_TRI_TRUE, true); -+ if (NULL == f[1]) { -+ PR_Close(f[0]); -+ closesocket(osfd[1]); -+ /* PR_AllocFileDesc() has invoked PR_SetError(). */ -+ return PR_FAILURE; -+ } -+ return PR_SUCCESS; -+} -+ -+ -+PR_IMPLEMENT(PRStatus) PR_GetConnectStatus(const PRPollDesc *pd) { -+ PRInt32 osfd; -+#ifndef BONE_VERSION -+ int rv; -+#endif -+ PRFileDesc *bottom; -+ -+ if (pd->out_flags & PR_POLL_NVAL) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ if ((pd->out_flags & (PR_POLL_WRITE | PR_POLL_EXCEPT | PR_POLL_ERR)) == 0) { -+ PR_ASSERT(pd->out_flags == 0); -+ PR_SetError(PR_IN_PROGRESS_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ -+ /* Find the NSPR layer and invoke its connectcontinue method */ -+ bottom = PR_GetIdentitiesLayer(pd->fd, PR_NSPR_IO_LAYER); -+ if (NULL == bottom) -+ { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ osfd = bottom->secret->md.osfd; -+#ifdef BONE_VERSION /* bug 122364 */ -+ /* temporary workaround until getsockopt(SO_ERROR) works in BONE */ -+ if (pd->out_flags & PR_POLL_EXCEPT) { -+ PR_SetError(PR_CONNECT_REFUSED_ERROR, 0); -+ return PR_FAILURE; -+ } -+ PR_ASSERT(pd->out_flags & PR_POLL_WRITE); -+ return PR_SUCCESS; -+#else -+ rv = recv(bottom->secret->md.osfd, NULL, 0, 0); -+ PR_ASSERT(-1 == rv || 0 == rv); -+ -+ if (-1 == rv && 0 != errno && errno != EAGAIN && errno != EWOULDBLOCK ) { -+ set_connect_error(errno); -+ return PR_FAILURE; -+ } -+ else -+ return PR_SUCCESS; -+#endif /* BONE_VERSION */ -+} -+ -+PR_IMPLEMENT(PRFileDesc*) PR_Socket(PRInt32 domain, PRInt32 type, PRInt32 proto) -+{ -+ PRInt32 osfd, err; -+ PRFileDesc *fd; -+ PRInt32 tmp_domain = domain; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ if (PR_AF_INET != domain -+ && PR_AF_INET6 != domain -+ ) { -+ PR_SetError(PR_ADDRESS_NOT_SUPPORTED_ERROR, 0); -+ return NULL; -+ } -+ if( type != SOCK_STREAM && type != SOCK_DGRAM ) -+ { -+ PR_SetError(PR_ADDRESS_NOT_SUPPORTED_ERROR, 0); -+ return NULL; -+ } -+ -+#if defined(_PR_INET6_PROBE) -+ if (PR_AF_INET6 == domain) { -+ if (_pr_ipv6_is_present == PR_FALSE) -+ domain = AF_INET; -+ else -+ domain = AF_INET6; -+ } -+#elif defined(_PR_INET6) -+ if (PR_AF_INET6 == domain) -+ domain = AF_INET6; -+#else -+ if (PR_AF_INET6 == domain) -+ domain = AF_INET; -+#endif /* _PR_INET6 */ -+#ifndef BONE_VERSION -+ osfd = socket(domain, type, 0); -+#else -+ osfd = socket(domain, type, proto); -+#endif -+ if (osfd == -1) { -+ err = _MD_ERRNO(); -+ set_socket_error(err); -+ return 0; -+ } -+ fd = bt_CreateFileDesc(osfd, SOCK_STREAM == type?PR_GetTCPMethods() : PR_GetUDPMethods(), _PR_TRI_TRUE, true); -+ -+ if (fd != NULL) { -+#if defined(_PR_INET6_PROBE) || !defined(_PR_INET6) -+ /* -+ * For platforms with no support for IPv6 -+ * create layered socket for IPv4-mapped IPv6 addresses -+ */ -+ if (PR_AF_INET6 == tmp_domain && PR_AF_INET == domain) { -+ if (PR_FAILURE == _pr_push_ipv6toipv4_layer(fd)) { -+ PR_Close(fd); -+ fd = NULL; -+ } -+ } -+#endif -+ } else -+ closesocket(osfd); -+ -+ return fd; -+} -+ -+ -+PR_IMPLEMENT(PRFileDesc *) PR_NewTCPSocket(void) -+{ -+ return PR_Socket(AF_INET, SOCK_STREAM, 0); -+} -+ -+PR_IMPLEMENT(PRFileDesc*) PR_NewUDPSocket(void) -+{ -+ return PR_Socket(AF_INET, SOCK_DGRAM, 0); -+} -+ -+PR_IMPLEMENT(PRFileDesc *) PR_OpenTCPSocket(PRIntn af) -+{ -+ return PR_Socket(af, SOCK_STREAM, 0); -+} -+ -+PR_IMPLEMENT(PRFileDesc*) PR_OpenUDPSocket(PRIntn af) -+{ -+ return PR_Socket(af, SOCK_DGRAM, 0); -+} -+ -Index: mozilla/nsprpub/pr/src/bthreads/btlocks.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/bthreads/btlocks.c,v -retrieving revision 3.7 -diff -u -8 -p -r3.7 btlocks.c ---- mozilla/nsprpub/pr/src/bthreads/btlocks.c 23 Feb 2005 17:43:13 -0000 3.7 -+++ mozilla/nsprpub/pr/src/bthreads/btlocks.c 9 Feb 2009 04:04:36 -0000 -@@ -38,44 +38,38 @@ - /* - ** File: btlocks.c - ** Description: Implemenation for thread locks using bthreads - ** Exports: prlock.h - */ - - #include "primpl.h" - --#include --#include -- - void - _PR_InitLocks (void) - { - } - - PR_IMPLEMENT(PRLock*) - PR_NewLock (void) - { - PRLock *lock; - status_t semresult; - - if (!_pr_initialized) _PR_ImplicitInitialization(); - - lock = PR_NEWZAP(PRLock); - if (lock != NULL) { -- -- lock->benaphoreCount = 0; -- lock->semaphoreID = create_sem( 0, "nsprLockSem" ); -- if( lock->semaphoreID < B_NO_ERROR ) { -- -- PR_DELETE( lock ); -- lock = NULL; -- } -+ lock->benaphoreCount = 0; -+ lock->semaphoreID = create_sem( 0, "nsprLockSem" ); -+ if( lock->semaphoreID < B_NO_ERROR ) { -+ PR_DELETE( lock ); -+ lock = NULL; -+ } - } -- - return lock; - } - - PR_IMPLEMENT(void) - PR_DestroyLock (PRLock* lock) - { - status_t result; - -@@ -83,34 +77,34 @@ PR_IMPLEMENT(void) - result = delete_sem(lock->semaphoreID); - PR_ASSERT(result == B_NO_ERROR); - PR_DELETE(lock); - } - - PR_IMPLEMENT(void) - PR_Lock (PRLock* lock) - { -+ status_t result; -+ - PR_ASSERT(lock != NULL); - -- if( atomic_add( &lock->benaphoreCount, 1 ) > 0 ) { -- -- if( acquire_sem(lock->semaphoreID ) != B_NO_ERROR ) { -- -- atomic_add( &lock->benaphoreCount, -1 ); -- return; -- } -+ if( _MD_ATOMIC_INCREMENT( &lock->benaphoreCount) > 1 ) { -+ result = acquire_sem(lock->semaphoreID ); -+ PR_ASSERT(result == B_NO_ERROR); -+ if( result != B_NO_ERROR ) { -+ _MD_ATOMIC_DECREMENT( &lock->benaphoreCount); -+ return; -+ } - } -- - lock->owner = find_thread( NULL ); - } - - PR_IMPLEMENT(PRStatus) - PR_Unlock (PRLock* lock) - { - PR_ASSERT(lock != NULL); - lock->owner = NULL; -- if( atomic_add( &lock->benaphoreCount, -1 ) > 1 ) { -- -- release_sem_etc( lock->semaphoreID, 1, B_DO_NOT_RESCHEDULE ); -+ if( _MD_ATOMIC_DECREMENT( &lock->benaphoreCount ) > 0 ) { -+ release_sem_etc( lock->semaphoreID, 1, B_DO_NOT_RESCHEDULE ); - } - - return PR_SUCCESS; - } -Index: mozilla/nsprpub/pr/src/bthreads/btmisc.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/bthreads/btmisc.c,v -retrieving revision 3.5 -diff -u -8 -p -r3.5 btmisc.c ---- mozilla/nsprpub/pr/src/bthreads/btmisc.c 25 Apr 2004 15:00:57 -0000 3.5 -+++ mozilla/nsprpub/pr/src/bthreads/btmisc.c 9 Feb 2009 04:04:37 -0000 -@@ -15,17 +15,18 @@ - * The Original Code is the Netscape Portable Runtime (NSPR). - * - * The Initial Developer of the Original Code is - * Netscape Communications Corporation. - * Portions created by the Initial Developer are Copyright (C) 1998-2000 - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): -- * -+ * Fredrik Holmqvist -+ * - * 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 -@@ -33,72 +34,38 @@ - * 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 ***** */ - - #include "primpl.h" - #include - --// void _PR_InitCPUs(void) {PT_LOG("_PR_InitCPUs")} --// void _MD_StartInterrupts(void) {PT_LOG("_MD_StartInterrupts")} -- --/* this is a total hack.. */ -- -+/* this is a total hack.. -+ * It's needed for netserver to compile. -+ * See nsprpub/pr/include/prnetdb.h -+ */ -+#ifndef BONE_VERSION - struct protoent* getprotobyname(const char* name) - { - return 0; - } - - struct protoent* getprotobynumber(int number) - { - return 0; - } -- --/* this is needed by prinit for some reason */ --void --_PR_InitStacks (void) --{ --} -- --/* this is needed by prinit for some reason */ --void --_PR_InitTPD (void) --{ --} -- --/* --** Create extra virtual processor threads. Generally used with MP systems. --*/ --PR_IMPLEMENT(void) -- PR_SetConcurrency (PRUintn numCPUs) --{ --} -- --/* --** Set thread recycle mode to on (1) or off (0) --*/ --PR_IMPLEMENT(void) -- PR_SetThreadRecycleMode (PRUint32 flag) --{ --} -+#endif - - /* - ** Get context registers, return with error for now. - */ -- - PR_IMPLEMENT(PRWord *) - _MD_HomeGCRegisters( PRThread *t, int isCurrent, int *np ) - { - return 0; - } - --PR_IMPLEMENT(void *) --PR_GetSP( PRThread *t ) --{ -- return 0; --} -- - PR_IMPLEMENT(PRStatus) - PR_EnumerateThreads( PREnumerator func, void *arg ) - { - return PR_FAILURE; - } -Index: mozilla/nsprpub/pr/src/bthreads/btsem.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/bthreads/btsem.c,v -retrieving revision 3.7 -diff -u -8 -p -r3.7 btsem.c ---- mozilla/nsprpub/pr/src/bthreads/btsem.c 23 Feb 2005 17:43:13 -0000 3.7 -+++ mozilla/nsprpub/pr/src/bthreads/btsem.c 9 Feb 2009 04:04:37 -0000 -@@ -33,51 +33,52 @@ - * 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 ***** */ - - #include - - #include "primpl.h" -+#include "obsolete/prsem.h" - - /* - ** Create a new semaphore object. - */ - PR_IMPLEMENT(PRSemaphore*) - PR_NewSem (PRUintn value) - { -- PRSemaphore *semaphore; -+ PRSemaphore *semaphore; - -- if (!_pr_initialized) _PR_ImplicitInitialization(); -+ if (!_pr_initialized) _PR_ImplicitInitialization(); - -- semaphore = PR_NEWZAP(PRSemaphore); -- if (NULL != semaphore) { -- if ((semaphore->sem = create_sem(value, "nspr_sem")) < B_NO_ERROR) -- return NULL; -- else -- return semaphore; -- } -- return NULL; -+ semaphore = PR_NEWZAP(PRSemaphore); -+ if (NULL != semaphore) { -+ if ((semaphore->sem = create_sem(value, "nspr_sem")) < B_NO_ERROR) -+ return NULL; -+ else -+ return semaphore; -+ } -+ return NULL; - } - - /* - ** Destroy the given semaphore object. - ** - */ - PR_IMPLEMENT(void) - PR_DestroySem (PRSemaphore *sem) - { -- status_t result; -+ status_t result; - -- PR_ASSERT(sem != NULL); -- result = delete_sem(sem->sem); -- PR_ASSERT(result == B_NO_ERROR); -- PR_DELETE(sem); --} -+ PR_ASSERT(sem != NULL); -+ result = delete_sem(sem->sem); -+ PR_ASSERT(result == B_NO_ERROR); -+ PR_DELETE(sem); -+} - - /* - ** Wait on a Semaphore. - ** - ** This routine allows a calling thread to wait or proceed depending upon - ** the state of the semahore sem. The thread can proceed only if the - ** counter value of the semaphore sem is currently greater than 0. If the - ** value of semaphore sem is positive, it is decremented by one and the -@@ -86,45 +87,45 @@ PR_IMPLEMENT(void) - ** semaphore to be released by another thread. - ** - ** This routine can return PR_PENDING_INTERRUPT if the waiting thread - ** has been interrupted. - */ - PR_IMPLEMENT(PRStatus) - PR_WaitSem (PRSemaphore *sem) - { -- PR_ASSERT(sem != NULL); -- if (acquire_sem(sem->sem) == B_NO_ERROR) -- return PR_SUCCESS; -- else -- return PR_FAILURE; -+ PR_ASSERT(sem != NULL); -+ if (acquire_sem(sem->sem) == B_NO_ERROR) -+ return PR_SUCCESS; -+ else -+ return PR_FAILURE; - } - - /* - ** This routine increments the counter value of the semaphore. If other - ** threads are blocked for the semaphore, then the scheduler will - ** determine which ONE thread will be unblocked. - */ - PR_IMPLEMENT(void) - PR_PostSem (PRSemaphore *sem) - { -- status_t result; -+ status_t result; - -- PR_ASSERT(sem != NULL); -- result = release_sem_etc(sem->sem, 1, B_DO_NOT_RESCHEDULE); -- PR_ASSERT(result == B_NO_ERROR); -+ PR_ASSERT(sem != NULL); -+ result = release_sem_etc(sem->sem, 1, B_DO_NOT_RESCHEDULE); -+ PR_ASSERT(result == B_NO_ERROR); - } - - /* - ** Returns the value of the semaphore referenced by sem without affecting - ** the state of the semaphore. The value represents the semaphore value - ** at the time of the call, but may not be the actual value when the - ** caller inspects it. - */ - PR_IMPLEMENT(PRUintn) - PR_GetValueSem (PRSemaphore *sem) - { -- sem_info info; -+ sem_info info; - -- PR_ASSERT(sem != NULL); -- get_sem_info(sem->sem, &info); -- return info.count; -+ PR_ASSERT(sem != NULL); -+ get_sem_info(sem->sem, &info); -+ return info.count; - } -Index: mozilla/nsprpub/pr/src/bthreads/btthread.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/bthreads/btthread.c,v -retrieving revision 3.8 -diff -u -8 -p -r3.8 btthread.c ---- mozilla/nsprpub/pr/src/bthreads/btthread.c 25 Apr 2004 15:00:57 -0000 3.8 -+++ mozilla/nsprpub/pr/src/bthreads/btthread.c 9 Feb 2009 04:04:39 -0000 -@@ -45,39 +45,39 @@ - - #include - #include - #include - - /* values for PRThread.state */ - #define BT_THREAD_PRIMORD 0x01 /* this is the primordial thread */ - #define BT_THREAD_SYSTEM 0x02 /* this is a system thread */ --#define BT_THREAD_JOINABLE 0x04 /* this is a joinable thread */ -+#define BT_THREAD_JOINABLE 0x04 /* this is a joinable thread */ - - struct _BT_Bookeeping - { - PRLock *ml; /* a lock to protect ourselves */ -- sem_id cleanUpSem; /* the primoridal thread will block on this -- sem while waiting for the user threads */ -- PRInt32 threadCount; /* user thred count */ -+ sem_id cleanUpSem; /* the primoridal thread will block on this -+ sem while waiting for the user threads */ -+ PRInt32 threadCount; /* user thred count */ - - } bt_book = { NULL, B_ERROR, 0 }; - - --#define BT_TPD_LIMIT 128 /* number of TPD slots we'll provide (arbitrary) */ -+#define BT_TPD_LIMIT 128 /* number of TPD slots we'll provide (arbitrary) */ - - /* these will be used to map an index returned by PR_NewThreadPrivateIndex() - to the corresponding beos native TLS slot number, and to the destructor - for that slot - note that, because it is allocated globally, this data - will be automatically zeroed for us when the program begins */ - static int32 tpd_beosTLSSlots[BT_TPD_LIMIT]; - static PRThreadPrivateDTOR tpd_dtors[BT_TPD_LIMIT]; - --static vint32 tpd_slotsUsed=0; /* number of currently-allocated TPD slots */ --static int32 tls_prThreadSlot; /* TLS slot in which PRThread will be stored */ -+static vint32 tpd_slotsUsed=0; /* number of currently-allocated TPD slots */ -+static int32 tls_prThreadSlot; /* TLS slot in which PRThread will be stored */ - - /* this mutex will be used to synchronize access to every - PRThread.md.joinSem and PRThread.md.is_joining (we could - actually allocate one per thread, but that seems a bit excessive, - especially considering that there will probably be little - contention, PR_JoinThread() is allowed to block anyway, and the code - protected by the mutex is short/fast) */ - static PRLock *joinSemLock; -@@ -89,355 +89,346 @@ static PRThread *_bt_AttachThread(); - - void - _PR_InitThreads (PRThreadType type, PRThreadPriority priority, - PRUintn maxPTDs) - { - PRThread *primordialThread; - PRUint32 beThreadPriority; - -- /* allocate joinSem mutex */ -- joinSemLock = PR_NewLock(); -- if (joinSemLock == NULL) -- { -- PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -- return; -+ /* allocate joinSem mutex */ -+ joinSemLock = PR_NewLock(); -+ if (joinSemLock == NULL) -+ { -+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ return; - } - - /* - ** Create and initialize NSPR structure for our primordial thread. - */ - - primordialThread = PR_NEWZAP(PRThread); - if( NULL == primordialThread ) - { - PR_SetError( PR_OUT_OF_MEMORY_ERROR, 0 ); - return; - } - -- primordialThread->md.joinSem = B_ERROR; -+ primordialThread->md.joinSem = B_ERROR; - - /* - ** Set the priority to the desired level. - */ - - beThreadPriority = _bt_MapNSPRToNativePriority( priority ); -- - set_thread_priority( find_thread( NULL ), beThreadPriority ); -- - primordialThread->priority = priority; - -- -- /* set the thread's state - note that the thread is not joinable */ -+ /* set the thread's state - note that the thread is not joinable */ - primordialThread->state |= BT_THREAD_PRIMORD; -- if (type == PR_SYSTEM_THREAD) -- primordialThread->state |= BT_THREAD_SYSTEM; -+ if (type == PR_SYSTEM_THREAD) -+ primordialThread->state |= BT_THREAD_SYSTEM; - - /* - ** Allocate a TLS slot for the PRThread structure (just using - ** native TLS, as opposed to NSPR TPD, will make PR_GetCurrentThread() - ** somewhat faster, and will leave one more TPD slot for our client) - */ -- -- tls_prThreadSlot = tls_allocate(); -+ -+ tls_prThreadSlot = tls_allocate(); - - /* - ** Stuff our new PRThread structure into our thread specific - ** slot. - */ - -- tls_set(tls_prThreadSlot, primordialThread); -+ tls_set(tls_prThreadSlot, primordialThread); - -- /* allocate lock for bt_book */ -+ /* allocate lock for bt_book */ - bt_book.ml = PR_NewLock(); - if( NULL == bt_book.ml ) - { -- PR_SetError( PR_OUT_OF_MEMORY_ERROR, 0 ); -- return; -+ PR_SetError( PR_OUT_OF_MEMORY_ERROR, 0 ); -+ return; - } - } - - PRUint32 - _bt_MapNSPRToNativePriority( PRThreadPriority priority ) -- { -+{ - switch( priority ) - { -- case PR_PRIORITY_LOW: return( B_LOW_PRIORITY ); -- case PR_PRIORITY_NORMAL: return( B_NORMAL_PRIORITY ); -- case PR_PRIORITY_HIGH: return( B_DISPLAY_PRIORITY ); -- case PR_PRIORITY_URGENT: return( B_URGENT_DISPLAY_PRIORITY ); -- default: return( B_NORMAL_PRIORITY ); -+ case PR_PRIORITY_LOW: return( B_LOW_PRIORITY ); -+ case PR_PRIORITY_NORMAL: return( B_NORMAL_PRIORITY ); -+ case PR_PRIORITY_HIGH: return( B_DISPLAY_PRIORITY ); -+ case PR_PRIORITY_URGENT: return( B_URGENT_DISPLAY_PRIORITY ); -+ default: return( B_NORMAL_PRIORITY ); - } - } - - PRThreadPriority - _bt_MapNativeToNSPRPriority(PRUint32 priority) -- { -- if (priority < B_NORMAL_PRIORITY) -- return PR_PRIORITY_LOW; -- if (priority < B_DISPLAY_PRIORITY) -- return PR_PRIORITY_NORMAL; -- if (priority < B_URGENT_DISPLAY_PRIORITY) -- return PR_PRIORITY_HIGH; -- return PR_PRIORITY_URGENT; -+{ -+ if (priority < B_NORMAL_PRIORITY) -+ return PR_PRIORITY_LOW; -+ if (priority < B_DISPLAY_PRIORITY) -+ return PR_PRIORITY_NORMAL; -+ if (priority < B_URGENT_DISPLAY_PRIORITY) -+ return PR_PRIORITY_HIGH; -+ return PR_PRIORITY_URGENT; - } - - PRUint32 - _bt_mapNativeToNSPRPriority( int32 priority ) - { - switch( priority ) - { -- case PR_PRIORITY_LOW: return( B_LOW_PRIORITY ); -- case PR_PRIORITY_NORMAL: return( B_NORMAL_PRIORITY ); -- case PR_PRIORITY_HIGH: return( B_DISPLAY_PRIORITY ); -- case PR_PRIORITY_URGENT: return( B_URGENT_DISPLAY_PRIORITY ); -- default: return( B_NORMAL_PRIORITY ); -+ case PR_PRIORITY_LOW: return( B_LOW_PRIORITY ); -+ case PR_PRIORITY_NORMAL: return( B_NORMAL_PRIORITY ); -+ case PR_PRIORITY_HIGH: return( B_DISPLAY_PRIORITY ); -+ case PR_PRIORITY_URGENT: return( B_URGENT_DISPLAY_PRIORITY ); -+ default: return( B_NORMAL_PRIORITY ); - } - } - - /* This method is called by all NSPR threads as they exit */ - void _bt_CleanupThread(void *arg) - { -- PRThread *me = PR_GetCurrentThread(); -- int32 i; -+ PRThread *me = PR_GetCurrentThread(); -+ int32 i; - -- /* first, clean up all thread-private data */ -- for (i = 0; i < tpd_slotsUsed; i++) -- { -- void *oldValue = tls_get(tpd_beosTLSSlots[i]); -- if ( oldValue != NULL && tpd_dtors[i] != NULL ) -- (*tpd_dtors[i])(oldValue); -- } -- -- /* if this thread is joinable, wait for someone to join it */ -- if (me->state & BT_THREAD_JOINABLE) -- { -- /* protect access to our joinSem */ -- PR_Lock(joinSemLock); -- -- if (me->md.is_joining) -- { -- /* someone is already waiting to join us (they've -- allocated a joinSem for us) - let them know we're -- ready */ -- delete_sem(me->md.joinSem); -- -- PR_Unlock(joinSemLock); -- -- } -- else -- { -- /* noone is currently waiting for our demise - it -- is our responsibility to allocate the joinSem -- and block on it */ -- me->md.joinSem = create_sem(0, "join sem"); -- -- /* we're done accessing our joinSem */ -- PR_Unlock(joinSemLock); -- -- /* wait for someone to join us */ -- while (acquire_sem(me->md.joinSem) == B_INTERRUPTED); -- } -- } -- -- /* if this is a user thread, we must update our books */ -- if ((me->state & BT_THREAD_SYSTEM) == 0) -- { -- /* synchronize access to bt_book */ -- PR_Lock( bt_book.ml ); -- -- /* decrement the number of currently-alive user threads */ -- bt_book.threadCount--; -+ /* first, clean up all thread-private data */ -+ for (i = 0; i < tpd_slotsUsed; i++) -+ { -+ void *oldValue = tls_get(tpd_beosTLSSlots[i]); -+ if ( oldValue != NULL && tpd_dtors[i] != NULL ) -+ (*tpd_dtors[i])(oldValue); -+ } -+ -+ /* if this thread is joinable, wait for someone to join it */ -+ if (me->state & BT_THREAD_JOINABLE) -+ { -+ /* protect access to our joinSem */ -+ PR_Lock(joinSemLock); -+ -+ if (me->md.is_joining) -+ { -+ /* someone is already waiting to join us (they've -+ allocated a joinSem for us) - let them know we're -+ ready */ -+ delete_sem(me->md.joinSem); -+ PR_Unlock(joinSemLock); -+ } -+ else -+ { -+ /* noone is currently waiting for our demise - it -+ is our responsibility to allocate the joinSem -+ and block on it */ -+ me->md.joinSem = create_sem(0, "join sem"); -+ /* we're done accessing our joinSem */ -+ PR_Unlock(joinSemLock); -+ /* wait for someone to join us */ -+ while (acquire_sem(me->md.joinSem) == B_INTERRUPTED); -+ } -+ } - -- if (bt_book.threadCount == 0 && bt_book.cleanUpSem != B_ERROR) { -- /* we are the last user thread, and the primordial thread is -- blocked in PR_Cleanup() waiting for us to finish - notify -- it */ -- delete_sem(bt_book.cleanUpSem); -- } -+ /* if this is a user thread, we must update our books */ -+ if ((me->state & BT_THREAD_SYSTEM) == 0) -+ { -+ /* synchronize access to bt_book */ -+ PR_Lock( bt_book.ml ); -+ /* decrement the number of currently-alive user threads */ -+ bt_book.threadCount--; -+ if (bt_book.threadCount == 0 && bt_book.cleanUpSem != B_ERROR) { -+ /* we are the last user thread, and the primordial thread is -+ blocked in PR_Cleanup() waiting for us to finish - notify -+ it */ -+ delete_sem(bt_book.cleanUpSem); -+ } - - PR_Unlock( bt_book.ml ); -- } -+ } - -- /* finally, delete this thread's PRThread */ -- PR_DELETE(me); -+ /* finally, delete this thread's PRThread */ -+ PR_DELETE(me); - } - - /** - * This is a wrapper that all threads invoke that allows us to set some - * things up prior to a thread's invocation and clean up after a thread has - * exited. - */ - static void* - _bt_root (void* arg) -- { -+{ - PRThread *thred = (PRThread*)arg; - PRIntn rv; - void *privData; - status_t result; - int i; - -- /* save our PRThread object into our TLS */ -- tls_set(tls_prThreadSlot, thred); -- -+ /* save our PRThread object into our TLS */ -+ tls_set(tls_prThreadSlot, thred); - thred->startFunc(thred->arg); /* run the dang thing */ -+ /* clean up */ -+ _bt_CleanupThread(NULL); - -- /* clean up */ -- _bt_CleanupThread(NULL); -- -- return 0; -+ return 0; - } - - PR_IMPLEMENT(PRThread*) - PR_CreateThread (PRThreadType type, void (*start)(void* arg), void* arg, - PRThreadPriority priority, PRThreadScope scope, - PRThreadState state, PRUint32 stackSize) - { - PRUint32 bePriority; -- - PRThread* thred; - - if (!_pr_initialized) _PR_ImplicitInitialization(); - -- thred = PR_NEWZAP(PRThread); -- if (thred == NULL) -- { -+ thred = PR_NEWZAP(PRThread); -+ if (thred == NULL) -+ { - PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); - return NULL; - } - - thred->md.joinSem = B_ERROR; -+ thred->arg = arg; -+ thred->startFunc = start; -+ thred->priority = priority; - -- thred->arg = arg; -- thred->startFunc = start; -- thred->priority = priority; -- -- if( state == PR_JOINABLE_THREAD ) -- { -- thred->state |= BT_THREAD_JOINABLE; -- } -- -- /* keep some books */ -- -- PR_Lock( bt_book.ml ); -- -- if (type == PR_USER_THREAD) -- { -- bt_book.threadCount++; -- } -+ if( state == PR_JOINABLE_THREAD ) -+ { -+ thred->state |= BT_THREAD_JOINABLE; -+ } - -- PR_Unlock( bt_book.ml ); -+ /* keep some books */ -+ PR_Lock( bt_book.ml ); - -- bePriority = _bt_MapNSPRToNativePriority( priority ); -+ if (type == PR_USER_THREAD) -+ { -+ bt_book.threadCount++; -+ } - -- thred->md.tid = spawn_thread((thread_func)_bt_root, "moz-thread", -+ PR_Unlock( bt_book.ml ); -+ bePriority = _bt_MapNSPRToNativePriority( priority ); -+ thred->md.tid = spawn_thread((thread_func)_bt_root, "moz-thread", - bePriority, thred); -- if (thred->md.tid < B_OK) { -- PR_SetError(PR_UNKNOWN_ERROR, thred->md.tid); -- PR_DELETE(thred); -- return NULL; -- } -+ if (thred->md.tid < B_OK) { -+ PR_SetError(PR_UNKNOWN_ERROR, thred->md.tid); -+ PR_DELETE(thred); -+ return NULL; -+ } - -- if (resume_thread(thred->md.tid) < B_OK) { -- PR_SetError(PR_UNKNOWN_ERROR, 0); -- PR_DELETE(thred); -- return NULL; -- } -+ if (resume_thread(thred->md.tid) < B_OK) { -+ PR_SetError(PR_UNKNOWN_ERROR, 0); -+ PR_DELETE(thred); -+ return NULL; -+ } - - return thred; -- } -+} - - PR_IMPLEMENT(PRThread*) -- PR_AttachThread(PRThreadType type, PRThreadPriority priority, -- PRThreadStack *stack) -+ PR_AttachThread(PRThreadType type, PRThreadPriority priority, -+ PRThreadStack *stack) - { -- /* PR_GetCurrentThread() will attach a thread if necessary */ -- return PR_GetCurrentThread(); -+ /* PR_GetCurrentThread() will attach a thread if necessary */ -+ return PR_GetCurrentThread(); - } - - PR_IMPLEMENT(void) -- PR_DetachThread() -+ PR_DetachThread() - { -- /* we don't support detaching */ -+ /* we don't support detaching */ - } - - PR_IMPLEMENT(PRStatus) - PR_JoinThread (PRThread* thred) - { - status_t eval, status; - - PR_ASSERT(thred != NULL); - -- if ((thred->state & BT_THREAD_JOINABLE) == 0) -+ if ((thred->state & BT_THREAD_JOINABLE) == 0) -+ { -+ PR_SetError( PR_INVALID_ARGUMENT_ERROR, 0 ); -+ return( PR_FAILURE ); -+ } -+ -+ /* synchronize access to the thread's joinSem */ -+ PR_Lock(joinSemLock); -+ -+ if (thred->md.is_joining) - { -- PR_SetError( PR_INVALID_ARGUMENT_ERROR, 0 ); -- return( PR_FAILURE ); -+ /* another thread is already waiting to join the specified -+ thread - we must fail */ -+ PR_Unlock(joinSemLock); -+ return PR_FAILURE; - } - -- /* synchronize access to the thread's joinSem */ -- PR_Lock(joinSemLock); -- -- if (thred->md.is_joining) -- { -- /* another thread is already waiting to join the specified -- thread - we must fail */ -- PR_Unlock(joinSemLock); -- return PR_FAILURE; -- } -- -- /* let others know we are waiting to join */ -- thred->md.is_joining = PR_TRUE; -- -- if (thred->md.joinSem == B_ERROR) -- { -- /* the thread hasn't finished yet - it is our responsibility to -- allocate a joinSem and wait on it */ -- thred->md.joinSem = create_sem(0, "join sem"); -- -- /* we're done changing the joinSem now */ -- PR_Unlock(joinSemLock); -- -- /* wait for the thread to finish */ -- while (acquire_sem(thred->md.joinSem) == B_INTERRUPTED); -- -- } -- else -- { -- /* the thread has already finished, and has allocated the -- joinSem itself - let it know it can finally die */ -- delete_sem(thred->md.joinSem); -- -- PR_Unlock(joinSemLock); -+ /* let others know we are waiting to join */ -+ thred->md.is_joining = PR_TRUE; -+ -+ if (thred->md.joinSem == B_ERROR) -+ { -+ /* the thread hasn't finished yet - it is our responsibility to -+ allocate a joinSem and wait on it */ -+ thred->md.joinSem = create_sem(0, "join sem"); -+ -+ /* we're done changing the joinSem now */ -+ PR_Unlock(joinSemLock); -+ -+ /* wait for the thread to finish */ -+ while (acquire_sem(thred->md.joinSem) == B_INTERRUPTED); -+ -+ } -+ else -+ { -+ /* the thread has already finished, and has allocated the -+ joinSem itself - let it know it can finally die */ -+ delete_sem(thred->md.joinSem); -+ -+ PR_Unlock(joinSemLock); - } - -- /* make sure the thread is dead */ -+ /* make sure the thread is dead */ - wait_for_thread(thred->md.tid, &eval); - - return PR_SUCCESS; - } - - PR_IMPLEMENT(PRThread*) - PR_GetCurrentThread () - { - PRThread* thred; - - if (!_pr_initialized) _PR_ImplicitInitialization(); - - thred = (PRThread *)tls_get( tls_prThreadSlot); -- if (thred == NULL) -- { -- /* this thread doesn't have a PRThread structure (it must be -- a native thread not created by the NSPR) - assimilate it */ -- thred = _bt_AttachThread(); -- } -+ if (thred == NULL) -+ { -+ /* this thread doesn't have a PRThread structure (it must be -+ a native thread not created by the NSPR) - assimilate it */ -+ thred = _bt_AttachThread(); -+ } - PR_ASSERT(NULL != thred); - - return thred; - } - -+PR_IMPLEMENT(void*)PR_GetSP(PRThread *thred) -+{ -+ thread_info tInfo; -+ get_thread_info(thred->md.tid, &tInfo); -+ return tInfo.stack_base; /* or should it be _end? */ -+} -+ - PR_IMPLEMENT(PRThreadScope) - PR_GetThreadScope (const PRThread* thred) - { - PR_ASSERT(thred != NULL); - return PR_GLOBAL_THREAD; - } - - PR_IMPLEMENT(PRThreadType) -@@ -448,17 +439,17 @@ PR_IMPLEMENT(PRThreadType) - PR_SYSTEM_THREAD : PR_USER_THREAD; - } - - PR_IMPLEMENT(PRThreadState) - PR_GetThreadState (const PRThread* thred) - { - PR_ASSERT(thred != NULL); - return (thred->state & BT_THREAD_JOINABLE)? -- PR_JOINABLE_THREAD: PR_UNJOINABLE_THREAD; -+ PR_JOINABLE_THREAD: PR_UNJOINABLE_THREAD; - } - - PR_IMPLEMENT(PRThreadPriority) - PR_GetThreadPriority (const PRThread* thred) - { - PR_ASSERT(thred != NULL); - return thred->priority; - } /* PR_GetThreadPriority */ -@@ -474,82 +465,82 @@ PR_IMPLEMENT(void) PR_SetThreadPriority( - bePriority = _bt_MapNSPRToNativePriority( newPri ); - set_thread_priority( thred->md.tid, bePriority ); - } - - PR_IMPLEMENT(PRStatus) - PR_NewThreadPrivateIndex (PRUintn* newIndex, - PRThreadPrivateDTOR destructor) - { -- int32 index; -+ int32 index; - - if (!_pr_initialized) _PR_ImplicitInitialization(); - -- /* reserve the next available tpd slot */ -- index = atomic_add( &tpd_slotsUsed, 1 ); -- if (index >= BT_TPD_LIMIT) -- { -- /* no slots left - decrement value, then fail */ -- atomic_add( &tpd_slotsUsed, -1 ); -- PR_SetError( PR_TPD_RANGE_ERROR, 0 ); -- return( PR_FAILURE ); -- } -- -- /* allocate a beos-native TLS slot for this index (the new slot -- automatically contains NULL) */ -- tpd_beosTLSSlots[index] = tls_allocate(); -+ /* reserve the next available tpd slot */ -+ index = atomic_add( &tpd_slotsUsed, 1 ); -+ if (index >= BT_TPD_LIMIT) -+ { -+ /* no slots left - decrement value, then fail */ -+ atomic_add( &tpd_slotsUsed, -1 ); -+ PR_SetError( PR_TPD_RANGE_ERROR, 0 ); -+ return( PR_FAILURE ); -+ } -+ -+ /* allocate a beos-native TLS slot for this index (the new slot -+ automatically contains NULL) */ -+ tpd_beosTLSSlots[index] = tls_allocate(); - -- /* remember the destructor */ -- tpd_dtors[index] = destructor; -+ /* remember the destructor */ -+ tpd_dtors[index] = destructor; - - *newIndex = (PRUintn)index; - - return( PR_SUCCESS ); - } - - PR_IMPLEMENT(PRStatus) - PR_SetThreadPrivate (PRUintn index, void* priv) - { -- void *oldValue; -+ void *oldValue; - - /* - ** Sanity checking - */ - - if(index < 0 || index >= tpd_slotsUsed || index >= BT_TPD_LIMIT) - { -- PR_SetError( PR_TPD_RANGE_ERROR, 0 ); -- return( PR_FAILURE ); -+ PR_SetError( PR_TPD_RANGE_ERROR, 0 ); -+ return( PR_FAILURE ); - } - -- /* if the old value isn't NULL, and the dtor for this slot isn't -- NULL, we must destroy the data */ -- oldValue = tls_get(tpd_beosTLSSlots[index]); -- if (oldValue != NULL && tpd_dtors[index] != NULL) -- (*tpd_dtors[index])(oldValue); -+ /* if the old value isn't NULL, and the dtor for this slot isn't -+ NULL, we must destroy the data */ -+ oldValue = tls_get(tpd_beosTLSSlots[index]); -+ if (oldValue != NULL && tpd_dtors[index] != NULL) -+ (*tpd_dtors[index])(oldValue); - -- /* save new value */ -- tls_set(tpd_beosTLSSlots[index], priv); -+ /* save new value */ -+ tls_set(tpd_beosTLSSlots[index], priv); - -- return( PR_SUCCESS ); -- } -+ return( PR_SUCCESS ); -+} - - PR_IMPLEMENT(void*) - PR_GetThreadPrivate (PRUintn index) - { -- /* make sure the index is valid */ -- if (index < 0 || index >= tpd_slotsUsed || index >= BT_TPD_LIMIT) -+ /* make sure the index is valid */ -+ if (index < 0 || index >= tpd_slotsUsed || index >= BT_TPD_LIMIT) - { -- PR_SetError( PR_TPD_RANGE_ERROR, 0 ); -- return NULL; -+ PR_SetError( PR_TPD_RANGE_ERROR, 0 ); -+ return NULL; - } - -- /* return the value */ -- return tls_get( tpd_beosTLSSlots[index] ); -- } -+ /* return the value */ -+ return tls_get( tpd_beosTLSSlots[index] ); -+} - - - PR_IMPLEMENT(PRStatus) - PR_Interrupt (PRThread* thred) - { - PRIntn rv; - - PR_ASSERT(thred != NULL); -@@ -622,73 +613,73 @@ PR_IMPLEMENT(PRStatus) - - PR_ASSERT(me->state & BT_THREAD_PRIMORD); - if ((me->state & BT_THREAD_PRIMORD) == 0) { - return PR_FAILURE; - } - - PR_Lock( bt_book.ml ); - -- if (bt_book.threadCount != 0) -+ if (bt_book.threadCount != 0) - { -- /* we'll have to wait for some threads to finish - create a -- sem to block on */ -- bt_book.cleanUpSem = create_sem(0, "cleanup sem"); -+ /* we'll have to wait for some threads to finish - create a -+ sem to block on */ -+ bt_book.cleanUpSem = create_sem(0, "cleanup sem"); - } - - PR_Unlock( bt_book.ml ); - -- /* note that, if all the user threads were already dead, we -- wouldn't have created a sem above, so this acquire_sem() -- will fail immediately */ -- while (acquire_sem(bt_book.cleanUpSem) == B_INTERRUPTED); -+ /* note that, if all the user threads were already dead, we -+ wouldn't have created a sem above, so this acquire_sem() -+ will fail immediately */ -+ while (acquire_sem(bt_book.cleanUpSem) == B_INTERRUPTED); - - return PR_SUCCESS; - } - - PR_IMPLEMENT(void) - PR_ProcessExit (PRIntn status) - { - exit(status); - } - - PRThread *_bt_AttachThread() - { -- PRThread *thread; -- thread_info tInfo; -+ PRThread *thread; -+ thread_info tInfo; - -- /* make sure this thread doesn't already have a PRThread structure */ -- PR_ASSERT(tls_get(tls_prThreadSlot) == NULL); -+ /* make sure this thread doesn't already have a PRThread structure */ -+ PR_ASSERT(tls_get(tls_prThreadSlot) == NULL); - -- /* allocate a PRThread structure for this thread */ -- thread = PR_NEWZAP(PRThread); -- if (thread == NULL) -- { -- PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -- return NULL; -- } -- -- /* get the native thread's current state */ -- get_thread_info(find_thread(NULL), &tInfo); -- -- /* initialize new PRThread */ -- thread->md.tid = tInfo.thread; -- thread->md.joinSem = B_ERROR; -- thread->priority = _bt_MapNativeToNSPRPriority(tInfo.priority); -- -- /* attached threads are always non-joinable user threads */ -- thread->state = 0; -- -- /* increment user thread count */ -- PR_Lock(bt_book.ml); -- bt_book.threadCount++; -- PR_Unlock(bt_book.ml); -- -- /* store this thread's PRThread */ -- tls_set(tls_prThreadSlot, thread); -- -- /* the thread must call _bt_CleanupThread() before it dies, in order -- to clean up its PRThread, synchronize with the primordial thread, -- etc. */ -- on_exit_thread(_bt_CleanupThread, NULL); -- -- return thread; -+ /* allocate a PRThread structure for this thread */ -+ thread = PR_NEWZAP(PRThread); -+ if (thread == NULL) -+ { -+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ return NULL; -+ } -+ -+ /* get the native thread's current state */ -+ get_thread_info(find_thread(NULL), &tInfo); -+ -+ /* initialize new PRThread */ -+ thread->md.tid = tInfo.thread; -+ thread->md.joinSem = B_ERROR; -+ thread->priority = _bt_MapNativeToNSPRPriority(tInfo.priority); -+ -+ /* attached threads are always non-joinable user threads */ -+ thread->state = 0; -+ -+ /* increment user thread count */ -+ PR_Lock(bt_book.ml); -+ bt_book.threadCount++; -+ PR_Unlock(bt_book.ml); -+ -+ /* store this thread's PRThread */ -+ tls_set(tls_prThreadSlot, thread); -+ -+ /* the thread must call _bt_CleanupThread() before it dies, in order -+ to clean up its PRThread, synchronize with the primordial thread, -+ etc. */ -+ on_exit_thread(_bt_CleanupThread, NULL); -+ -+ return thread; - } -Index: mozilla/nsprpub/pr/src/io/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/io/Makefile.in,v -retrieving revision 1.13 -diff -u -8 -p -r1.13 Makefile.in ---- mozilla/nsprpub/pr/src/io/Makefile.in 25 Apr 2004 15:00:58 -0000 1.13 -+++ mozilla/nsprpub/pr/src/io/Makefile.in 9 Feb 2009 04:04:39 -0000 -@@ -64,23 +64,25 @@ CSRCS = \ - prmmap.c \ - prpolevt.c \ - prprf.c \ - prscanf.c \ - prstdio.c \ - $(NULL) - - ifndef USE_PTHREADS -+ifndef USE_BTHREADS - CSRCS += \ - prdir.c \ - prfile.c \ - prio.c \ - prsocket.c \ - $(NULL) - endif -+endif - - TARGETS = $(OBJS) - - INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private - - DEFINES += -D_NSPR_BUILD_ - - include $(topsrcdir)/config/rules.mk -Index: mozilla/nsprpub/pr/src/io/prmapopt.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/io/prmapopt.c,v -retrieving revision 3.18 -diff -u -8 -p -r3.18 prmapopt.c ---- mozilla/nsprpub/pr/src/io/prmapopt.c 25 Apr 2004 15:00:58 -0000 3.18 -+++ mozilla/nsprpub/pr/src/io/prmapopt.c 9 Feb 2009 04:04:40 -0000 -@@ -69,17 +69,17 @@ - /* NEXTSTEP is special: this must come before netinet/tcp.h. */ - #include /* n_short, n_long, n_time */ - #endif - - #if defined(XP_UNIX) || defined(OS2) || (defined(XP_BEOS) && defined(BONE_VERSION)) - #include /* TCP_NODELAY, TCP_MAXSEG */ - #endif - --#ifndef _PR_PTHREADS -+#if !defined(_PR_PTHREADS) && !defined(_PR_BTHREADS) - - PRStatus PR_CALLBACK _PR_SocketGetSocketOption(PRFileDesc *fd, PRSocketOptionData *data) - { - PRStatus rv; - PRInt32 length; - PRInt32 level, name; - - /* -@@ -94,34 +94,29 @@ PRStatus PR_CALLBACK _PR_SocketGetSocket - - rv = _PR_MapOptionName(data->option, &level, &name); - if (PR_SUCCESS == rv) - { - switch (data->option) - { - case PR_SockOpt_Linger: - { --#if !defined(XP_BEOS) || defined(BONE_VERSION) - struct linger linger; - length = sizeof(linger); - rv = _PR_MD_GETSOCKOPT( - fd, level, name, (char *) &linger, &length); - if (PR_SUCCESS == rv) - { - PR_ASSERT(sizeof(linger) == length); - data->value.linger.polarity = - (linger.l_onoff) ? PR_TRUE : PR_FALSE; - data->value.linger.linger = - PR_SecondsToInterval(linger.l_linger); - } - break; --#else -- PR_SetError( PR_NOT_IMPLEMENTED_ERROR, 0 ); -- return PR_FAILURE; --#endif - } - case PR_SockOpt_Reuseaddr: - case PR_SockOpt_Keepalive: - case PR_SockOpt_NoDelay: - case PR_SockOpt_Broadcast: - { - #ifdef WIN32 /* Winsock */ - BOOL value; -@@ -252,27 +247,22 @@ PRStatus PR_CALLBACK _PR_SocketSetSocket - - rv = _PR_MapOptionName(data->option, &level, &name); - if (PR_SUCCESS == rv) - { - switch (data->option) - { - case PR_SockOpt_Linger: - { --#if !defined(XP_BEOS) || defined(BONE_VERSION) - struct linger linger; - linger.l_onoff = data->value.linger.polarity; - linger.l_linger = PR_IntervalToSeconds(data->value.linger.linger); - rv = _PR_MD_SETSOCKOPT( - fd, level, name, (char*)&linger, sizeof(linger)); - break; --#else -- PR_SetError( PR_NOT_IMPLEMENTED_ERROR, 0 ); -- return PR_FAILURE; --#endif - } - case PR_SockOpt_Reuseaddr: - case PR_SockOpt_Keepalive: - case PR_SockOpt_NoDelay: - case PR_SockOpt_Broadcast: - { - #ifdef WIN32 /* Winsock */ - BOOL value; -@@ -350,17 +340,17 @@ PRStatus PR_CALLBACK _PR_SocketSetSocket - default: - PR_NOT_REACHED("Unknown socket option"); - break; - } - } - return rv; - } /* _PR_SocketSetSocketOption */ - --#endif /* ! _PR_PTHREADS */ -+#endif /* ! _PR_PTHREADS && ! _PR_BTHREADS */ - - /* - ********************************************************************* - ********************************************************************* - ** - ** Make sure that the following is at the end of this file, - ** because we will be playing with macro redefines. - ** -Index: mozilla/nsprpub/pr/src/io/prsocket.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/io/prsocket.c,v -retrieving revision 3.57.2.2 -diff -u -8 -p -r3.57.2.2 prsocket.c ---- mozilla/nsprpub/pr/src/io/prsocket.c 7 Nov 2007 22:24:04 -0000 3.57.2.2 -+++ mozilla/nsprpub/pr/src/io/prsocket.c 9 Feb 2009 04:04:44 -0000 -@@ -59,17 +59,17 @@ PRBool IsValidNetAddr(const PRNetAddr *a - - static PRBool IsValidNetAddrLen(const PRNetAddr *addr, PRInt32 addr_len) - { - /* - * The definition of the length of a Unix domain socket address - * is not uniform, so we don't check it. - */ - if ((addr != NULL) --#if defined(XP_UNIX) || defined(XP_OS2_EMX) -+#if defined(XP_UNIX) || defined(XP_OS2_EMX) || defined(XP_BEOS) - && (addr->raw.family != AF_UNIX) - #endif - && (PR_NETADDR_SIZE(addr) != addr_len)) { - #if defined(LINUX) && __GLIBC__ == 2 && __GLIBC_MINOR__ == 1 - /* - * In glibc 2.1, struct sockaddr_in6 is 24 bytes. In glibc 2.2 - * and in the 2.4 kernel, struct sockaddr_in6 has the scope_id - * field and is 28 bytes. It is possible for socket functions -Index: mozilla/nsprpub/pr/src/linking/prlink.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/linking/prlink.c,v -retrieving revision 3.81.2.5 -diff -u -8 -p -r3.81.2.5 prlink.c ---- mozilla/nsprpub/pr/src/linking/prlink.c 6 Oct 2006 23:36:22 -0000 3.81.2.5 -+++ mozilla/nsprpub/pr/src/linking/prlink.c 9 Feb 2009 04:04:49 -0000 -@@ -194,18 +194,20 @@ struct PRLibrary { - NSModule dlh; - #else - void* dlh; - #endif - #endif - - #ifdef XP_BEOS - void* dlh; -+#ifndef XP_HAIKU - void* stub_dlh; - #endif -+#endif - }; - - static PRLibrary *pr_loadmap; - static PRLibrary *pr_exe_loadmap; - static PRMonitor *pr_linker_lock; - static char* _pr_currentLibPath = NULL; - - static PRLibrary *pr_LoadLibraryByPathname(const char *name, PRIntn flags); -@@ -844,16 +846,29 @@ pr_LoadLibraryByPathname(const char *nam - } - /* the list of loaded library names are always kept in UTF-8 - * on Win32 platforms */ - result = pr_UnlockedFindLibrary(utf8name); - #else - result = pr_UnlockedFindLibrary(name); - #endif - -+#ifdef XP_BEOS -+ /* Havn't seen this happen so far, but it doesn't slow anything -+ down so let's keep it */ -+ for (result = pr_loadmap; result != NULL; result = result->next) { -+ /* hopefully, our caller will always use the same string -+ to refer to the same library */ -+ if (strcmp(name, result->name) == 0) { -+ result->refCount++; -+ break; -+ } -+ } -+#endif -+ - if (result != NULL) goto unlock; - - lm = PR_NEWZAP(PRLibrary); - if (lm == NULL) { - oserr = _MD_ERRNO(); - goto unlock; - } - lm->staticTable = NULL; -@@ -997,108 +1012,97 @@ pr_LoadLibraryByPathname(const char *nam - lm->name = strdup(name); - lm->dlh = h; - lm->next = pr_loadmap; - pr_loadmap = lm; - } - #endif /* HAVE_DLL */ - #endif /* XP_UNIX */ - -- lm->refCount = 1; -- - #ifdef XP_BEOS -- { -- image_info info; -- int32 cookie = 0; -+ { /* Code block to allow variable inits. :/ */ -+ /* it appears the library isn't yet loaded - load it now */ -+#ifdef XP_HAIKU -+ image_id imageid = load_add_on(name); -+#else - image_id imageid = B_ERROR; - image_id stubid = B_ERROR; -- PRLibrary *p; -+ char stubName [B_PATH_NAME_LENGTH + 1]; - -- for (p = pr_loadmap; p != NULL; p = p->next) { -- /* hopefully, our caller will always use the same string -- to refer to the same library */ -- if (strcmp(name, p->name) == 0) { -- /* we've already loaded this library */ -- imageid = info.id; -- lm->refCount++; -- break; -- } -- } -+ /* the following is a work-around to a "bug" in the beos - -+ the beos system loader allows only 32M (system-wide) -+ to be used by code loaded as "add-ons" (code loaded -+ through the 'load_add_on()' system call, which includes -+ mozilla components), but allows 256M to be used by -+ shared libraries. -+ -+ unfortunately, mozilla is too large to fit into the -+ "add-on" space, so we must trick the loader into -+ loading some of the components as shared libraries. this -+ is accomplished by creating a "stub" add-on (an empty -+ shared object), and linking it with the component -+ (the actual .so file generated by the build process, -+ without any modifications). when this stub is loaded -+ by load_add_on(), the loader will automatically load the -+ component into the shared library space. -+ */ - -- if(imageid == B_ERROR) { -- /* it appears the library isn't yet loaded - load it now */ -- char stubName [B_PATH_NAME_LENGTH + 1]; -- -- /* the following is a work-around to a "bug" in the beos - -- the beos system loader allows only 32M (system-wide) -- to be used by code loaded as "add-ons" (code loaded -- through the 'load_add_on()' system call, which includes -- mozilla components), but allows 256M to be used by -- shared libraries. -- -- unfortunately, mozilla is too large to fit into the -- "add-on" space, so we must trick the loader into -- loading some of the components as shared libraries. this -- is accomplished by creating a "stub" add-on (an empty -- shared object), and linking it with the component -- (the actual .so file generated by the build process, -- without any modifications). when this stub is loaded -- by load_add_on(), the loader will automatically load the -- component into the shared library space. -- */ -- -- strcpy(stubName, name); -- strcat(stubName, ".stub"); -- -- /* first, attempt to load the stub (thereby loading the -- component as a shared library */ -- if ((stubid = load_add_on(stubName)) > B_ERROR) { -- /* the stub was loaded successfully. */ -- imageid = B_FILE_NOT_FOUND; -- -- cookie = 0; -- while (get_next_image_info(0, &cookie, &info) == B_OK) { -- const char *endOfSystemName = strrchr(info.name, '/'); -- const char *endOfPassedName = strrchr(name, '/'); -- if( 0 == endOfSystemName ) -- endOfSystemName = info.name; -- else -- endOfSystemName++; -- if( 0 == endOfPassedName ) -- endOfPassedName = name; -- else -- endOfPassedName++; -- if (strcmp(endOfSystemName, endOfPassedName) == 0) { -- /* this is the actual component - remember it */ -- imageid = info.id; -- break; -- } -- } -+ strcpy(stubName, name); -+ strcat(stubName, ".stub"); - -- } else { -- /* we failed to load the "stub" - try to load the -- component directly as an add-on */ -- stubid = B_ERROR; -- imageid = load_add_on(name); -+ /* first, attempt to load the stub (thereby loading the -+ component as a shared library */ -+ if ((stubid = load_add_on(stubName)) > B_ERROR) { -+ -+ const char *endOfPassedName = strrchr(name, '/'); -+ image_info info; -+ int32 cookie = 0; -+ -+ /* the stub was loaded successfully. */ -+ imageid = B_FILE_NOT_FOUND; -+ if( 0 == endOfPassedName ) -+ endOfPassedName = name; -+ else -+ endOfPassedName++; -+ -+ while (get_next_image_info(0, &cookie, &info) == B_OK) { -+ const char *endOfSystemName = strrchr(info.name, '/'); -+ if( 0 == endOfSystemName ) -+ endOfSystemName = info.name; -+ else -+ endOfSystemName++; -+ if (strcmp(endOfSystemName, endOfPassedName) == 0) { -+ /* this is the actual component - remember it */ -+ imageid = info.id; -+ break; -+ } - } -+ } else { -+ /* we failed to load the "stub" - try to load the -+ component directly as an add-on */ -+ stubid = B_ERROR; -+ imageid = load_add_on(name); - } -- -+#endif /* XP_HAIKU */ - if (imageid <= B_ERROR) { - oserr = imageid; -- PR_DELETE( lm ); -+ PR_DELETE(lm); - goto unlock; - } - lm->name = strdup(name); - lm->dlh = (void*)imageid; -+#ifndef XP_HAIKU - lm->stub_dlh = (void*)stubid; -+#endif - lm->next = pr_loadmap; - pr_loadmap = lm; - } --#endif -+#endif /* XP_BEOS */ - -+ lm->refCount = 1; - result = lm; /* success */ - PR_LOG(_pr_linker_lm, PR_LOG_MIN, ("Loaded library %s (load lib)", lm->name)); - - unlock: - if (result == NULL) { - PR_SetError(PR_LOAD_LIBRARY_ERROR, oserr); - DLLErrorInternal(oserr); /* sets error text */ - } -@@ -1249,21 +1253,25 @@ PR_UnloadLibrary(PRLibrary *lib) - if (--lib->refCount > 0) { - PR_LOG(_pr_linker_lm, PR_LOG_MIN, - ("%s decr => %d", - lib->name, lib->refCount)); - goto done; - } - - #ifdef XP_BEOS -+#ifdef XP_HAIKU -+ unload_add_on( (image_id) lib->dlh ); -+#else - if(((image_id)lib->stub_dlh) == B_ERROR) - unload_add_on( (image_id) lib->dlh ); - else - unload_add_on( (image_id) lib->stub_dlh); --#endif -+#endif /* XP_HAIKU */ -+#endif /* XP_BEOS */ - - #ifdef XP_UNIX - #ifdef HAVE_DLL - #ifdef USE_DLFCN - result = dlclose(lib->dlh); - #elif defined(USE_HPSHL) - result = shl_unload(lib->dlh); - #elif defined(USE_MACH_DYLD) -Index: mozilla/nsprpub/pr/src/md/beos/beos.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/md/beos/beos.c,v -retrieving revision 3.5 -diff -u -8 -p -r3.5 beos.c ---- mozilla/nsprpub/pr/src/md/beos/beos.c 25 Apr 2004 15:00:59 -0000 3.5 -+++ mozilla/nsprpub/pr/src/md/beos/beos.c 9 Feb 2009 04:04:50 -0000 -@@ -32,233 +32,178 @@ - * 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 ***** */ - - #include "primpl.h" - --#include --#include --#include --#include --#include --#include - #include --#include --#include -- - /* - * Make sure _PRSockLen_t is 32-bit, because we will cast a PRUint32* or - * PRInt32* pointer to a _PRSockLen_t* pointer. - */ - #define _PRSockLen_t int - --/* --** Global lock variable used to bracket calls into rusty libraries that --** aren't thread safe (like libc, libX, etc). --*/ --static PRLock *_pr_rename_lock = NULL; --static PRMonitor *_pr_Xfe_mon = NULL; - --/* -- * Variables used by the GC code, initialized in _MD_InitSegs(). -- * _pr_zero_fd should be a static variable. Unfortunately, there is -- * still some Unix-specific code left in function PR_GrowSegment() -- * in file memory/prseg.c that references it, so it needs -- * to be a global variable for now. -- */ --PRInt32 _pr_zero_fd = -1; --static PRLock *_pr_md_lock = NULL; -+#ifndef BONE_VERSION -+PRLock *_connectLock = NULL; - --sigset_t timer_set; -+/* Workaround for nonblocking connects under net_server */ -+PRUint32 connectCount = 0; -+ConnectListNode connectList[64]; - --void _PR_UnixInit() -+void -+_MD_final_init_netserver(void) - { -- struct sigaction sigact; -- int rv; -- -- sigemptyset(&timer_set); -- -- sigact.sa_handler = SIG_IGN; -- sigemptyset(&sigact.sa_mask); -- sigact.sa_flags = 0; -- rv = sigaction(SIGPIPE, &sigact, 0); -- PR_ASSERT(0 == rv); -- -- _pr_rename_lock = PR_NewLock(); -- PR_ASSERT(NULL != _pr_rename_lock); -- _pr_Xfe_mon = PR_NewMonitor(); -- PR_ASSERT(NULL != _pr_Xfe_mon); -+ _connectLock = PR_NewLock(); -+ PR_ASSERT(NULL != _connectLock); -+ /* Workaround for nonblocking connects under net_server */ -+ connectCount = 0; - } -+#endif /* !BONE_VERSION */ - --/* -- *----------------------------------------------------------------------- -- * -- * PR_Now -- -- * -- * Returns the current time in microseconds since the epoch. -- * The epoch is midnight January 1, 1970 GMT. -- * The implementation is machine dependent. This is the Unix -- * implementation. -- * Cf. time_t time(time_t *tp) -- * -- *----------------------------------------------------------------------- -- */ -- --PR_IMPLEMENT(PRTime) --PR_Now(void) --{ -- struct timeval tv; -- PRInt64 s, us, s2us; - -- GETTIMEOFDAY(&tv); -- LL_I2L(s2us, PR_USEC_PER_SEC); -- LL_I2L(s, tv.tv_sec); -- LL_I2L(us, tv.tv_usec); -- LL_MUL(s, s, s2us); -- LL_ADD(s, s, us); -- return s; --} -+#ifdef __powerpc__ -+static PRLock *monitor = NULL; - --PRIntervalTime --_PR_UNIX_GetInterval() -+void -+_MD_AtomicInit(void) - { -- struct timeval time; -- PRIntervalTime ticks; -- -- (void)GETTIMEOFDAY(&time); /* fallicy of course */ -- ticks = (PRUint32)time.tv_sec * PR_MSEC_PER_SEC; /* that's in milliseconds */ -- ticks += (PRUint32)time.tv_usec / PR_USEC_PER_MSEC; /* so's that */ -- return ticks; --} /* _PR_SUNOS_GetInterval */ -- --PRIntervalTime _PR_UNIX_TicksPerSecond() --{ -- return 1000; /* this needs some work :) */ -+ if (monitor == NULL) { -+ monitor = PR_NewLock(); -+ } - } -- --/************************************************************************/ -+#endif /* __powerpc__ */ - - /* --** Special hacks for xlib. Xlib/Xt/Xm is not re-entrant nor is it thread --** safe. Unfortunately, neither is mozilla. To make these programs work --** in a pre-emptive threaded environment, we need to use a lock. -+** This is exceedingly messy. atomic_add returns the last value, NSPR -+** expects the new value. We just add or subtract 1 from the result. -+** The actual memory update is atomic. - */ - --void PR_XLock() -+PRInt32 -+_MD_AtomicAdd( PRInt32 *ptr, PRInt32 val ) - { -- PR_EnterMonitor(_pr_Xfe_mon); -+ return atomic_add( (long *)ptr, val ) + val; - } - --void PR_XUnlock() -+PRInt32 -+_MD_AtomicIncrement( PRInt32 *val ) - { -- PR_ExitMonitor(_pr_Xfe_mon); -+ return atomic_add( (long *)val, 1 ) + 1; - } - --PRBool PR_XIsLocked() -+PRInt32 -+_MD_AtomicDecrement( PRInt32 *val ) - { -- return (PR_InMonitor(_pr_Xfe_mon)) ? PR_TRUE : PR_FALSE; -+ return atomic_add( (long *)val, -1 ) - 1; - } - --void PR_XWait(int ms) -+PRInt32 -+_MD_AtomicSet( PRInt32 *val, PRInt32 newval ) - { -- PR_Wait(_pr_Xfe_mon, PR_MillisecondsToInterval(ms)); --} -- --void PR_XNotify(void) --{ -- PR_Notify(_pr_Xfe_mon); --} -+ PRInt32 result; -+#ifdef __powerpc__ -+ if (!_pr_initialized) { -+ _PR_ImplicitInitialization(); -+ } -+ PR_Lock(monitor); -+ result = *val; -+ *val = newval; -+ PR_Unlock(monitor); -+#else -+ asm volatile ("xchgl %0, %1" -+ : "=r"(result), "=m"(*val) -+ : "0"(newval), "m"(*val)); - --void PR_XNotifyAll(void) --{ -- PR_NotifyAll(_pr_Xfe_mon); -+#endif /* __powerpc__ */ -+ return result; - } - --#if !defined(BEOS) --#ifdef HAVE_BSD_FLOCK -- --#include -+/* -+ *----------------------------------------------------------------------- -+ * -+ * PR_Now -- -+ * -+ * Returns the current time in microseconds since the epoch. -+ * The epoch is midnight January 1, 1970 GMT. -+ * The implementation is machine dependent. -+ * -+ *----------------------------------------------------------------------- -+ */ - --PR_IMPLEMENT(PRStatus) --_MD_LOCKFILE (PRInt32 f) -+PR_IMPLEMENT(PRTime) -+PR_Now(void) - { -- PRInt32 rv; -- rv = flock(f, LOCK_EX); -- if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_FLOCK_ERROR(_MD_ERRNO()); -- return PR_FAILURE; -+ return (PRTime) real_time_clock_usecs(); - } - --PR_IMPLEMENT(PRStatus) --_MD_TLOCKFILE (PRInt32 f) -+PRIntervalTime -+_MD_get_interval(void) - { -- PRInt32 rv; -- rv = flock(f, LOCK_EX|LOCK_NB); -- if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_FLOCK_ERROR(_MD_ERRNO()); -- return PR_FAILURE; -+ return (PRIntervalTime) real_time_clock_usecs() / 10; - } - --PR_IMPLEMENT(PRStatus) --_MD_UNLOCKFILE (PRInt32 f) -+PRIntervalTime -+_MD_interval_per_sec(void) - { -- PRInt32 rv; -- rv = flock(f, LOCK_UN); -- if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_FLOCK_ERROR(_MD_ERRNO()); -- return PR_FAILURE; -+ return 100000L; - } --#else - --PR_IMPLEMENT(PRStatus) --_MD_LOCKFILE (PRInt32 f) -+PRSize -+_PR_MD_GetRandomNoise( void *buf, PRSize size ) - { -- PRInt32 rv; -- rv = lockf(f, F_LOCK, 0); -- if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_LOCKF_ERROR(_MD_ERRNO()); -- return PR_FAILURE; --} -+ struct timeval tv; -+ int n = 0; -+ int s; - --PR_IMPLEMENT(PRStatus) --_MD_TLOCKFILE (PRInt32 f) --{ -- PRInt32 rv; -- rv = lockf(f, F_TLOCK, 0); -- if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_LOCKF_ERROR(_MD_ERRNO()); -- return PR_FAILURE; --} -+ GETTIMEOFDAY(&tv); -+ -+ if ( size >= 0 ) { -+ s = _pr_CopyLowBits((char*)buf+n, size, &tv.tv_usec, sizeof(tv.tv_usec)); -+ size -= s; -+ n += s; -+ } -+ if ( size >= 0 ) { -+ s = _pr_CopyLowBits((char*)buf+n, size, &tv.tv_sec, sizeof(tv.tv_sec)); -+ size -= s; -+ n += s; -+ } -+ return n; -+} /* end _PR_MD_GetRandomNoise() */ - --PR_IMPLEMENT(PRStatus) --_MD_UNLOCKFILE (PRInt32 f) -+ -+/* Needed by prinit.c:612 */ -+void -+_PR_MD_QUERY_FD_INHERITABLE(PRFileDesc *fd) - { -- PRInt32 rv; -- rv = lockf(f, F_ULOCK, 0); -- if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_LOCKF_ERROR(_MD_ERRNO()); -- return PR_FAILURE; -+ int flags; -+ -+ PR_ASSERT(_PR_TRI_UNKNOWN == fd->secret->inheritable); -+ flags = fcntl(fd->secret->md.osfd, F_GETFD, 0); -+ PR_ASSERT(-1 != flags); -+ fd->secret->inheritable = (flags & FD_CLOEXEC) ? -+ _PR_TRI_FALSE : _PR_TRI_TRUE; - } --#endif - --PR_IMPLEMENT(PRStatus) -- _MD_GETHOSTNAME (char *name, PRUint32 namelen) -+PRStatus -+_MD_gethostname(char *name, PRUint32 namelen) - { -- PRIntn rv; -+ PRInt32 rv, err; - - rv = gethostname(name, namelen); -- if (0 == rv) { -- return PR_SUCCESS; -+ if (rv == 0) -+ { -+ err = _MD_ERRNO(); -+ switch (err) { -+ case EFAULT: -+ PR_SetError(PR_ACCESS_FAULT_ERROR, err); -+ break; -+ default: -+ PR_SetError(PR_UNKNOWN_ERROR, err); -+ break; -+ } -+ return PR_FAILURE; - } -- _PR_MD_MAP_GETHOSTNAME_ERROR(_MD_ERRNO()); -- return PR_FAILURE; -+ return PR_SUCCESS; - } -- --#endif -Index: mozilla/nsprpub/pr/src/md/beos/bproc.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/md/beos/bproc.c,v -retrieving revision 3.6 -diff -u -8 -p -r3.6 bproc.c ---- mozilla/nsprpub/pr/src/md/beos/bproc.c 25 Apr 2004 15:00:59 -0000 3.6 -+++ mozilla/nsprpub/pr/src/md/beos/bproc.c 9 Feb 2009 04:04:50 -0000 -@@ -31,207 +31,209 @@ - * 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 ***** */ - - #include "primpl.h" --#include -+#include - #include -+#include -+#include - - #define _PR_SIGNALED_EXITSTATUS 256 - - PRProcess* - _MD_create_process (const char *path, char *const *argv, -- char *const *envp, const PRProcessAttr *attr) -+ char *const *envp, const PRProcessAttr *attr) - { -- PRProcess *process; -- int nEnv, idx; -- char *const *childEnvp; -- char **newEnvp = NULL; -- int flags; -- -- process = PR_NEW(PRProcess); -- if (!process) { -- PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -- return NULL; -- } -- -- childEnvp = envp; -- if (attr && attr->fdInheritBuffer) { -- if (NULL == childEnvp) { -- childEnvp = environ; -- } -- for (nEnv = 0; childEnvp[nEnv]; nEnv++) { -- } -- newEnvp = (char **) PR_MALLOC((nEnv + 2) * sizeof(char *)); -- if (NULL == newEnvp) { -- PR_DELETE(process); -- PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -- return NULL; -- } -- for (idx = 0; idx < nEnv; idx++) { -- newEnvp[idx] = childEnvp[idx]; -- } -- newEnvp[idx++] = attr->fdInheritBuffer; -- newEnvp[idx] = NULL; -- childEnvp = newEnvp; -- } -- -- process->md.pid = fork(); -- -- if ((pid_t) -1 == process->md.pid) { -- PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, errno); -- PR_DELETE(process); -- if (newEnvp) { -- PR_DELETE(newEnvp); -- } -- return NULL; -- } else if (0 == process->md.pid) { /* the child process */ -- /* -- * If the child process needs to exit, it must call _exit(). -- * Do not call exit(), because exit() will flush and close -- * the standard I/O file descriptors, and hence corrupt -- * the parent process's standard I/O data structures. -- */ -- -- if (attr) { -- /* the osfd's to redirect stdin, stdout, and stderr to */ -- int in_osfd = -1, out_osfd = -1, err_osfd = -1; -- -- if (attr->stdinFd -- && attr->stdinFd->secret->md.osfd != 0) { -- in_osfd = attr->stdinFd->secret->md.osfd; -- if (dup2(in_osfd, 0) != 0) { -- _exit(1); /* failed */ -- } -- flags = fcntl(0, F_GETFL, 0); -- if (flags & O_NONBLOCK) { -- fcntl(0, F_SETFL, flags & ~O_NONBLOCK); -- } -- } -- if (attr->stdoutFd -- && attr->stdoutFd->secret->md.osfd != 1) { -- out_osfd = attr->stdoutFd->secret->md.osfd; -- if (dup2(out_osfd, 1) != 1) { -- _exit(1); /* failed */ -- } -- flags = fcntl(1, F_GETFL, 0); -- if (flags & O_NONBLOCK) { -- fcntl(1, F_SETFL, flags & ~O_NONBLOCK); -- } -- } -- if (attr->stderrFd -- && attr->stderrFd->secret->md.osfd != 2) { -- err_osfd = attr->stderrFd->secret->md.osfd; -- if (dup2(err_osfd, 2) != 2) { -- _exit(1); /* failed */ -- } -- flags = fcntl(2, F_GETFL, 0); -- if (flags & O_NONBLOCK) { -- fcntl(2, F_SETFL, flags & ~O_NONBLOCK); -- } -- } -- if (in_osfd != -1) { -- close(in_osfd); -- } -- if (out_osfd != -1 && out_osfd != in_osfd) { -- close(out_osfd); -- } -- if (err_osfd != -1 && err_osfd != in_osfd -- && err_osfd != out_osfd) { -- close(err_osfd); -- } -- if (attr->currentDirectory) { -- if (chdir(attr->currentDirectory) < 0) { -- _exit(1); /* failed */ -- } -- } -- } -- -- if (childEnvp) { -- (void)execve(path, argv, childEnvp); -- } else { -- /* Inherit the environment of the parent. */ -- (void)execv(path, argv); -- } -- /* Whoops! It returned. That's a bad sign. */ -- _exit(1); -- } -- -- if (newEnvp) { -- PR_DELETE(newEnvp); -- } -+ PRProcess *process; -+ int nEnv, idx; -+ char *const *childEnvp; -+ char **newEnvp = NULL; -+ int flags; -+ -+ process = PR_NEW(PRProcess); -+ if (!process) { -+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ return NULL; -+ } -+ -+ childEnvp = envp; -+ if (attr && attr->fdInheritBuffer) { -+ if (NULL == childEnvp) { -+ childEnvp = environ; -+ } -+ for (nEnv = 0; childEnvp[nEnv]; nEnv++) { -+ } -+ newEnvp = (char **) PR_MALLOC((nEnv + 2) * sizeof(char *)); -+ if (NULL == newEnvp) { -+ PR_DELETE(process); -+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ return NULL; -+ } -+ for (idx = 0; idx < nEnv; idx++) { -+ newEnvp[idx] = childEnvp[idx]; -+ } -+ newEnvp[idx++] = attr->fdInheritBuffer; -+ newEnvp[idx] = NULL; -+ childEnvp = newEnvp; -+ } -+ -+ process->md.pid = fork(); -+ -+ if ((pid_t) -1 == process->md.pid) { -+ PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, errno); -+ PR_DELETE(process); -+ if (newEnvp) { -+ PR_DELETE(newEnvp); -+ } -+ return NULL; -+ } else if (0 == process->md.pid) { /* the child process */ -+ /* -+ * If the child process needs to exit, it must call _exit(). -+ * Do not call exit(), because exit() will flush and close -+ * the standard I/O file descriptors, and hence corrupt -+ * the parent process's standard I/O data structures. -+ */ -+ -+ if (attr) { -+ /* the osfd's to redirect stdin, stdout, and stderr to */ -+ int in_osfd = -1, out_osfd = -1, err_osfd = -1; -+ -+ if (attr->stdinFd -+ && attr->stdinFd->secret->md.osfd != 0) { -+ in_osfd = attr->stdinFd->secret->md.osfd; -+ if (dup2(in_osfd, 0) != 0) { -+ _exit(1); /* failed */ -+ } -+ flags = fcntl(0, F_GETFL, 0); -+ if (flags & O_NONBLOCK) { -+ fcntl(0, F_SETFL, flags & ~O_NONBLOCK); -+ } -+ } -+ if (attr->stdoutFd -+ && attr->stdoutFd->secret->md.osfd != 1) { -+ out_osfd = attr->stdoutFd->secret->md.osfd; -+ if (dup2(out_osfd, 1) != 1) { -+ _exit(1); /* failed */ -+ } -+ flags = fcntl(1, F_GETFL, 0); -+ if (flags & O_NONBLOCK) { -+ fcntl(1, F_SETFL, flags & ~O_NONBLOCK); -+ } -+ } -+ if (attr->stderrFd -+ && attr->stderrFd->secret->md.osfd != 2) { -+ err_osfd = attr->stderrFd->secret->md.osfd; -+ if (dup2(err_osfd, 2) != 2) { -+ _exit(1); /* failed */ -+ } -+ flags = fcntl(2, F_GETFL, 0); -+ if (flags & O_NONBLOCK) { -+ fcntl(2, F_SETFL, flags & ~O_NONBLOCK); -+ } -+ } -+ if (in_osfd != -1) { -+ close(in_osfd); -+ } -+ if (out_osfd != -1 && out_osfd != in_osfd) { -+ close(out_osfd); -+ } -+ if (err_osfd != -1 && err_osfd != in_osfd -+ && err_osfd != out_osfd) { -+ close(err_osfd); -+ } -+ if (attr->currentDirectory) { -+ if (chdir(attr->currentDirectory) < 0) { -+ _exit(1); /* failed */ -+ } -+ } -+ } -+ -+ if (childEnvp) { -+ (void)execve(path, argv, childEnvp); -+ } else { -+ /* Inherit the environment of the parent. */ -+ (void)execv(path, argv); -+ } -+ /* Whoops! It returned. That's a bad sign. */ -+ _exit(1); -+ } -+ -+ if (newEnvp) { -+ PR_DELETE(newEnvp); -+ } - -- return process; -+ return process; - } - - PRStatus - _MD_detach_process (PRProcess *process) - { -- /* If we kept a process table like unix does, -- * we'd remove the entry here. -- * Since we dont', just delete the process variable -- */ -- PR_DELETE(process); -- return PR_SUCCESS; -+ /* If we kept a process table like unix does, -+ * we'd remove the entry here. -+ * Since we dont', just delete the process variable -+ */ -+ PR_DELETE(process); -+ return PR_SUCCESS; - } - - PRStatus - _MD_wait_process (PRProcess *process, PRInt32 *exitCode) - { -- PRStatus retVal = PR_SUCCESS; -- int ret, status; -- -- /* Ignore interruptions */ -- do { -- ret = waitpid(process->md.pid, &status, 0); -- } while (ret == -1 && errno == EINTR); -- -- /* -- * waitpid() cannot return 0 because we did not invoke it -- * with the WNOHANG option. -- */ -- PR_ASSERT(0 != ret); -+ PRStatus retVal = PR_SUCCESS; -+ int ret, status; -+ -+ /* Ignore interruptions */ -+ do { -+ ret = waitpid(process->md.pid, &status, 0); -+ } while (ret == -1 && errno == EINTR); -+ -+ /* -+ * waitpid() cannot return 0 because we did not invoke it -+ * with the WNOHANG option. -+ */ -+ PR_ASSERT(0 != ret); - -- if (ret < 0) { -+ if (ret < 0) { - PR_SetError(PR_UNKNOWN_ERROR, _MD_ERRNO()); -- return PR_FAILURE; -- } -+ return PR_FAILURE; -+ } - -- /* If child process exited normally, return child exit code */ -- if (WIFEXITED(status)) { -- *exitCode = WEXITSTATUS(status); -- } else { -- PR_ASSERT(WIFSIGNALED(status)); -- *exitCode = _PR_SIGNALED_EXITSTATUS; -- } -+ /* If child process exited normally, return child exit code */ -+ if (WIFEXITED(status)) { -+ *exitCode = WEXITSTATUS(status); -+ } else { -+ PR_ASSERT(WIFSIGNALED(status)); -+ *exitCode = _PR_SIGNALED_EXITSTATUS; -+ } - -- PR_DELETE(process); -- return PR_SUCCESS; -+ PR_DELETE(process); -+ return PR_SUCCESS; - } - - PRStatus - _MD_kill_process (PRProcess *process) - { -- PRErrorCode prerror; -- PRInt32 oserror; -- -- if (kill(process->md.pid, SIGKILL) == 0) { -- return PR_SUCCESS; -- } -- oserror = errno; -- switch (oserror) { -+ PRErrorCode prerror; -+ PRInt32 oserror; -+ -+ if (kill(process->md.pid, SIGKILL) == 0) { -+ return PR_SUCCESS; -+ } -+ oserror = errno; -+ switch (oserror) { - case EPERM: -- prerror = PR_NO_ACCESS_RIGHTS_ERROR; -- break; -+ prerror = PR_NO_ACCESS_RIGHTS_ERROR; -+ break; - case ESRCH: -- prerror = PR_INVALID_ARGUMENT_ERROR; -- break; -+ prerror = PR_INVALID_ARGUMENT_ERROR; -+ break; - default: -- prerror = PR_UNKNOWN_ERROR; -- break; -- } -- PR_SetError(prerror, oserror); -- return PR_FAILURE; -+ prerror = PR_UNKNOWN_ERROR; -+ break; -+ } -+ PR_SetError(prerror, oserror); -+ return PR_FAILURE; - } -Index: mozilla/nsprpub/pr/src/md/beos/bsrcs.mk -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/md/beos/bsrcs.mk,v -retrieving revision 3.6 -diff -u -8 -p -r3.6 bsrcs.mk ---- mozilla/nsprpub/pr/src/md/beos/bsrcs.mk 25 Apr 2004 15:00:59 -0000 3.6 -+++ mozilla/nsprpub/pr/src/md/beos/bsrcs.mk 9 Feb 2009 04:04:50 -0000 -@@ -15,16 +15,17 @@ - # The Original Code is the Netscape Portable Runtime (NSPR). - # - # The Initial Developer of the Original Code is - # Netscape Communications Corporation. - # Portions created by the Initial Developer are Copyright (C) 1998-2000 - # the Initial Developer. All Rights Reserved. - # - # Contributor(s): -+# Fredrik Holmqvist - # - # 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 -@@ -37,18 +38,11 @@ - - - # this file lists the source files to be compiled (used in Makefile) and - # then enumerated as object files (in objs.mk) for inclusion in the NSPR - # shared library - - MDCSRCS = \ - beos.c \ -- beos_errors.c \ -- bfile.c \ -- bmisc.c \ -- bnet.c \ - bproc.c \ -- brng.c \ -- bseg.c \ -- btime.c \ - bmmap.c \ - $(NULL) -Index: mozilla/nsprpub/pr/src/memory/prseg.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/memory/prseg.c,v -retrieving revision 3.8 -diff -u -8 -p -r3.8 prseg.c ---- mozilla/nsprpub/pr/src/memory/prseg.c 25 Apr 2004 15:01:01 -0000 3.8 -+++ mozilla/nsprpub/pr/src/memory/prseg.c 9 Feb 2009 04:04:51 -0000 -@@ -32,26 +32,26 @@ - * 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 ***** */ - - #include "primpl.h" - --#if defined(_PR_PTHREADS) -+#if defined(_PR_PTHREADS) || defined(_PR_BTHREADS) - - /* - ** The pthreads version doesn't use these functions. - */ - void _PR_InitSegs(void) - { - } - --#else /* _PR_PTHREADS */ -+#else /* _PR_PTHREADS || defined(_PR_BTHREADS) */ - - void _PR_InitSegs(void) - { - _PR_MD_INIT_SEGS(); - } - - /* - ** Allocate a memory segment. The size value is rounded up to the native -@@ -85,9 +85,9 @@ PRSegment* _PR_NewSegment(PRUint32 size, - ** Free a memory segment. - */ - void _PR_DestroySegment(PRSegment *seg) - { - _PR_MD_FREE_SEGMENT(seg); - PR_DELETE(seg); - } - --#endif /* _PR_PTHREADS */ -+#endif /* _PR_PTHREADS || defined(_PR_BTHREADS) */ -Index: mozilla/nsprpub/pr/src/misc/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/misc/Makefile.in,v -retrieving revision 1.19 -diff -u -8 -p -r1.19 Makefile.in ---- mozilla/nsprpub/pr/src/misc/Makefile.in 8 Nov 2004 02:52:56 -0000 1.19 -+++ mozilla/nsprpub/pr/src/misc/Makefile.in 9 Feb 2009 04:04:52 -0000 -@@ -66,20 +66,22 @@ CSRCS = \ - prsystem.c \ - prtime.c \ - prthinfo.c \ - prtpool.c \ - prtrace.c \ - $(NULL) - - ifndef USE_PTHREADS -+ifndef USE_BTHREADS - CSRCS += \ - pripcsem.c \ - $(NULL) - endif -+endif - - TARGETS = $(OBJS) - - INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private - - DEFINES += -D_NSPR_BUILD_ - - RELEASE_BINS = $(srcdir)/compile-et.pl $(srcdir)/prerr.properties -Index: mozilla/nsprpub/pr/src/misc/prinit.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/misc/prinit.c,v -retrieving revision 3.43.2.1 -diff -u -8 -p -r3.43.2.1 prinit.c ---- mozilla/nsprpub/pr/src/misc/prinit.c 1 Dec 2006 00:34:11 -0000 3.43.2.1 -+++ mozilla/nsprpub/pr/src/misc/prinit.c 9 Feb 2009 04:04:54 -0000 -@@ -195,18 +195,20 @@ static void _PR_InitStuff(void) - _pr_shma_lm = PR_NewLogModule("shma"); - - /* NOTE: These init's cannot depend on _PR_MD_CURRENT_THREAD() */ - _PR_MD_EARLY_INIT(); - - _PR_InitLocks(); - _PR_InitAtomic(); - _PR_InitSegs(); -+#if !defined(_PR_BTHREADS) - _PR_InitStacks(); - _PR_InitTPD(); -+#endif /*!defined(_PR_BTHREADS) */ - _PR_InitEnv(); - _PR_InitLayerCache(); - _PR_InitClock(); - - _pr_sleeplock = PR_NewLock(); - PR_ASSERT(NULL != _pr_sleeplock); - - #ifdef GC_LEAK_DETECTOR -Index: mozilla/nsprpub/pr/src/misc/pripcsem.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/misc/pripcsem.c,v -retrieving revision 3.5 -diff -u -8 -p -r3.5 pripcsem.c ---- mozilla/nsprpub/pr/src/misc/pripcsem.c 25 Apr 2004 15:01:01 -0000 3.5 -+++ mozilla/nsprpub/pr/src/misc/pripcsem.c 9 Feb 2009 04:04:54 -0000 -@@ -41,19 +41,19 @@ - * Description: implements the named semaphores API in prsemipc.h - * for classic NSPR. If _PR_HAVE_NAMED_SEMAPHORES is not defined, - * the named semaphore functions all fail with the error code - * PR_NOT_IMPLEMENTED_ERROR. - */ - - #include "primpl.h" - --#ifdef _PR_PTHREADS -+#if defined(_PR_PTHREADS) || defined(_PR_BTHREADS) - --#error "This file should not be compiled for the pthreads version" -+#error "This file should not be compiled for the pthreads or bthreads version" - - #else - - #ifndef _PR_HAVE_NAMED_SEMAPHORES - - PRSem * _PR_MD_OPEN_SEMAPHORE( - const char *osname, PRIntn flags, PRIntn mode, PRUintn value) - { -@@ -122,9 +122,9 @@ PR_IMPLEMENT(PRStatus) PR_DeleteSemaphor - if (!_pr_initialized) _PR_ImplicitInitialization(); - if (_PR_MakeNativeIPCName(name, osname, sizeof(osname), _PRIPCSem) - == PR_FAILURE) { - return PR_FAILURE; - } - return _PR_MD_DELETE_SEMAPHORE(osname); - } - --#endif /* _PR_PTHREADS */ -+#endif /* _PR_PTHREADS || _PR_BTHREADS */ -Index: mozilla/security/coreconf/BeOS.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/coreconf/BeOS.mk,v -retrieving revision 1.2 -diff -u -8 -p -r1.2 BeOS.mk ---- mozilla/security/coreconf/BeOS.mk 25 Apr 2004 15:02:17 -0000 1.2 -+++ mozilla/security/coreconf/BeOS.mk 9 Feb 2009 04:05:05 -0000 -@@ -56,17 +56,17 @@ ifeq ($(OS_TEST),ppc) - CPU_ARCH = ppc - else - OS_REL_CFLAGS = -Di386 - CPU_ARCH = x86 - endif - - MKSHLIB = $(CC) -nostart -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) - ifdef BUILD_OPT -- OPTIMIZER = -O2 -+ OPTIMIZER = -O3 - endif - - OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wall -pipe - OS_LIBS = -lbe - - DEFINES += -DBEOS - - ifdef USE_PTHREADS -Index: mozilla/security/coreconf/arch.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/coreconf/arch.mk,v -retrieving revision 1.19.2.1 -diff -u -8 -p -r1.19.2.1 arch.mk ---- mozilla/security/coreconf/arch.mk 14 Nov 2007 22:47:33 -0000 1.19.2.1 -+++ mozilla/security/coreconf/arch.mk 9 Feb 2009 04:05:06 -0000 -@@ -57,16 +57,17 @@ - ifeq ($(USE_64), 1) - 64BIT_TAG=_64 - else - 64BIT_TAG= - endif - - OS_ARCH := $(subst /,_,$(shell uname -s)) - -+ - # - # Attempt to differentiate between sparc and x86 Solaris - # - - OS_TEST := $(shell uname -m) - ifeq ($(OS_TEST),i86pc) - OS_RELEASE := $(shell uname -r)_$(OS_TEST) - else -Index: mozilla/security/coreconf/config.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/coreconf/config.mk,v -retrieving revision 1.17.28.3 -diff -u -8 -p -r1.17.28.3 config.mk ---- mozilla/security/coreconf/config.mk 4 May 2007 06:54:05 -0000 1.17.28.3 -+++ mozilla/security/coreconf/config.mk 9 Feb 2009 04:05:07 -0000 -@@ -32,16 +32,17 @@ - # 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 ***** - - # Configuration information for building in the "Core Components" source module - -+ - ####################################################################### - # [1.0] Master "Core Components" source and release # - # tags # - ####################################################################### - ifndef MK_ARCH - include $(CORE_DEPTH)/coreconf/arch.mk - endif - -@@ -57,24 +58,30 @@ endif - # [3.0] Master "Core Components" -specific macros # - # (dependent upon tags) # - # # - # We are moving towards just having a $(OS_TARGET).mk file # - # as opposed to multiple $(OS_TARGET)$(OS_RELEASE).mk files, # - # one for each OS release. # - ####################################################################### - -+ -+ - TARGET_OSES = FreeBSD BSD_OS NetBSD OpenUNIX OS2 QNX Darwin BeOS OpenBSD \ - OpenVMS AIX - - ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET))) - include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk - else -+ifeq ($(OS_ARCH), Haiku) -+include $(CORE_DEPTH)/coreconf/BeOS.mk -+else - include $(CORE_DEPTH)/coreconf/$(OS_TARGET)$(OS_RELEASE).mk - endif -+endif - - ####################################################################### - # [4.0] Master "Core Components" source and release tags # - # (dependent upon tags) # - ####################################################################### - PLATFORM = $(OBJDIR_NAME) - - ####################################################################### -Index: mozilla/security/manager/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/security/manager/Makefile.in,v -retrieving revision 1.57.4.6 -diff -u -8 -p -r1.57.4.6 Makefile.in ---- mozilla/security/manager/Makefile.in 23 May 2008 23:45:26 -0000 1.57.4.6 -+++ mozilla/security/manager/Makefile.in 9 Feb 2009 04:05:08 -0000 -@@ -257,30 +257,45 @@ ifndef MOZ_NATIVE_NSS - $(MAKE) -C $(topsrcdir)/security/nss-fips/lib/util $(DEFAULT_GMAKE_FLAGS) clean - # In NSS 3.11.8-3.11.9, lib/ssl/derive.c includes cmd/lib/secutil.h. - $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS) export - $(MAKE) -C $(topsrcdir)/security/nss/lib $(DEFAULT_GMAKE_FLAGS) DIRS="util base dev pki pki1 certdb certhigh pk11wrap cryptohi nss ssl pkcs12 pkcs7 smime crmf jar ckfw ckfw/builtins" - ifndef SKIP_CHK - $(MAKE) -C $(topsrcdir)/security/nss/cmd/lib $(DEFAULT_GMAKE_FLAGS) - $(MAKE) -C $(topsrcdir)/security/nss/cmd/shlibsign $(DEFAULT_GMAKE_FLAGS) - endif -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) -m 755 $(DIST)/lib/$(LOADABLE_ROOT_MODULE) $(DIST)/bin/add-ons -+else - $(INSTALL) -m 755 $(DIST)/lib/$(LOADABLE_ROOT_MODULE) $(DIST)/bin -+endif - ifndef SKIP_CHK - $(INSTALL) -m 644 $(DIST)/lib/$(SOFTOKEN3_CHK) $(DIST)/bin - endif -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) -m 755 $(DIST)/lib/$(SOFTOKEN3_LIB) $(DIST)/bin/lib -+ $(INSTALL) -m 755 $(DIST)/lib/$(NSS3_LIB) $(DIST)/bin/lib -+ $(INSTALL) -m 755 $(DIST)/lib/$(SSL3_LIB) $(DIST)/bin/lib -+ $(INSTALL) -m 755 $(DIST)/lib/$(SMIME3_LIB) $(DIST)/bin/lib -+else - $(INSTALL) -m 755 $(DIST)/lib/$(SOFTOKEN3_LIB) $(DIST)/bin - $(INSTALL) -m 755 $(DIST)/lib/$(NSS3_LIB) $(DIST)/bin - $(INSTALL) -m 755 $(DIST)/lib/$(SSL3_LIB) $(DIST)/bin - $(INSTALL) -m 755 $(DIST)/lib/$(SMIME3_LIB) $(DIST)/bin -+endif - ifdef HAVE_FREEBL_LIBS - ifndef SKIP_CHK - $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_CHK) $(DIST)/bin - endif -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_LIB) $(DIST)/bin/add-ons -+else - $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_LIB) $(DIST)/bin - endif -+endif - ifdef HAVE_FREEBL_LIBS_32 - ifndef SKIP_CHK - $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_32INT_CHK) $(DIST)/bin - $(INSTALL) -m 644 $(DIST)/lib/$(FREEBL_32FPU_CHK) $(DIST)/bin - endif - $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_32INT_LIB) $(DIST)/bin - $(INSTALL) -m 755 $(DIST)/lib/$(FREEBL_32FPU_LIB) $(DIST)/bin - endif -Index: mozilla/security/nss/cmd/lib/secutil.h -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/cmd/lib/secutil.h,v -retrieving revision 1.18.24.1 -diff -u -8 -p -r1.18.24.1 secutil.h ---- mozilla/security/nss/cmd/lib/secutil.h 19 Jul 2006 00:25:03 -0000 1.18.24.1 -+++ mozilla/security/nss/cmd/lib/secutil.h 9 Feb 2009 04:05:13 -0000 -@@ -407,16 +407,16 @@ SECU_GetOptionArg(secuCommand *cmd, int - /* Return informative error string */ - char *SECU_ErrorString(int16 err); - - /* Return informative error string. Does not call XP_GetString */ - char *SECU_ErrorStringRaw(int16 err); - - void printflags(char *trusts, unsigned int flags); - --#ifndef XP_UNIX -+#if !defined(XP_UNIX) && !defined(XP_BEOS) - extern int ffs(unsigned int i); - #endif - - #include "secerr.h" - #include "sslerr.h" - - #endif /* _SEC_UTIL_H_ */ -Index: mozilla/security/nss/lib/dev/ckhelper.c -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/lib/dev/ckhelper.c,v -retrieving revision 1.34.28.1 -diff -u -8 -p -r1.34.28.1 ckhelper.c ---- mozilla/security/nss/lib/dev/ckhelper.c 16 Nov 2007 05:25:07 -0000 1.34.28.1 -+++ mozilla/security/nss/lib/dev/ckhelper.c 9 Feb 2009 04:05:17 -0000 -@@ -225,33 +225,33 @@ NSS_IMPLEMENT PRBool - nssCKObject_IsAttributeTrue ( - CK_OBJECT_HANDLE object, - CK_ATTRIBUTE_TYPE attribute, - nssSession *session, - NSSSlot *slot, - PRStatus *rvStatus - ) - { -- CK_BBOOL bool; -+ CK_BBOOL boolval; - CK_ATTRIBUTE_PTR attr; - CK_ATTRIBUTE atemplate = { 0, NULL, 0 }; - CK_RV ckrv; - void *epv = nssSlot_GetCryptokiEPV(slot); - attr = &atemplate; -- NSS_CK_SET_ATTRIBUTE_VAR(attr, attribute, bool); -+ NSS_CK_SET_ATTRIBUTE_VAR(attr, attribute, boolval); - nssSession_EnterMonitor(session); - ckrv = CKAPI(epv)->C_GetAttributeValue(session->handle, object, - &atemplate, 1); - nssSession_ExitMonitor(session); - if (ckrv != CKR_OK) { - *rvStatus = PR_FAILURE; - return PR_FALSE; - } - *rvStatus = PR_SUCCESS; -- return (PRBool)(bool == CK_TRUE); -+ return (PRBool)(boolval == CK_TRUE); - } - - NSS_IMPLEMENT PRStatus - nssCKObject_SetAttributes ( - CK_OBJECT_HANDLE object, - CK_ATTRIBUTE_PTR obj_template, - CK_ULONG count, - nssSession *session, -Index: mozilla/security/nss/lib/ssl/config.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/lib/ssl/config.mk,v -retrieving revision 1.21.2.1 -diff -u -8 -p -r1.21.2.1 config.mk ---- mozilla/security/nss/lib/ssl/config.mk 1 May 2007 06:09:31 -0000 1.21.2.1 -+++ mozilla/security/nss/lib/ssl/config.mk 9 Feb 2009 04:05:19 -0000 -@@ -103,17 +103,17 @@ EXTRA_SHARED_LIBS += \ - -L$(DIST)/lib \ - -lnss3 \ - -L$(NSPR_LIB_DIR) \ - -lplc4 \ - -lplds4 \ - -lnspr4 \ - $(NULL) - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_SHARED_LIBS += -lbe - endif - - ifeq ($(OS_ARCH), Darwin) - EXTRA_SHARED_LIBS += -dylib_file @executable_path/libsoftokn3.dylib:$(DIST)/lib/libsoftokn3.dylib - endif - - ifeq ($(OS_TARGET),SunOS) -Index: mozilla/security/nss/lib/freebl/unix_rand.c -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/lib/freebl/unix_rand.c,v -retrieving revision 1.17.10.5 -diff -u -r1.17.10.5 unix_rand.c ---- mozilla/security/nss/lib/freebl/unix_rand.c 12 Oct 2006 22:50:48 -0000 1.17.10.5 -+++ mozilla/security/nss/lib/freebl/unix_rand.c 27 Feb 2008 22:18:39 -0000 -@@ -666,7 +666,7 @@ - #endif /* VMS */ - - #ifdef BEOS --#include -+#include - - static size_t - GetHighResClock(void *buf, size_t maxbytes) -Index: mozilla/security/nss-fips/lib/freebl/unix_rand.c -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/lib/freebl/unix_rand.c,v -retrieving revision 1.17.10.5 -diff -u -8 -p -r1.17.10.5 unix_rand.c ---- mozilla/security/nss-fips/lib/freebl/unix_rand.c 12 Oct 2006 22:50:48 -0000 1.17.10.5 -+++ mozilla/security/nss-fips/lib/freebl/unix_rand.c 9 Feb 2009 04:05:28 -0000 -@@ -661,17 +661,17 @@ GetHighResClock(void *buf, size_t maxbyt - - t = asm("rpcc %v0"); - return CopyLowBits(buf, maxbytes, &t, sizeof(t)); - } - - #endif /* VMS */ - - #ifdef BEOS --#include -+#include - - static size_t - GetHighResClock(void *buf, size_t maxbytes) - { - bigtime_t bigtime; /* Actually an int64 */ - - bigtime = real_time_clock_usecs(); - return CopyLowBits(buf, maxbytes, &bigtime, sizeof(bigtime)); -Index: mozilla/security/nss-fips/lib/ssl/config.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/lib/ssl/config.mk,v -retrieving revision 1.21 -diff -u -8 -p -r1.21 config.mk ---- mozilla/security/nss-fips/lib/ssl/config.mk 19 Oct 2005 01:04:16 -0000 1.21 -+++ mozilla/security/nss-fips/lib/ssl/config.mk 9 Feb 2009 04:05:30 -0000 -@@ -99,17 +99,17 @@ EXTRA_SHARED_LIBS += \ - -L$(DIST)/lib \ - -lnss3 \ - -L$(NSPR_LIB_DIR) \ - -lplc4 \ - -lplds4 \ - -lnspr4 \ - $(NULL) - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_SHARED_LIBS += -lbe - endif - - ifeq ($(OS_ARCH), Darwin) - EXTRA_SHARED_LIBS += -dylib_file @executable_path/libsoftokn3.dylib:$(DIST)/lib/libsoftokn3.dylib - endif - - ifeq ($(OS_TARGET),SunOS) -Index: mozilla/toolkit/library/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/toolkit/library/Makefile.in,v -retrieving revision 1.16.2.10 -diff -u -8 -p -r1.16.2.10 Makefile.in ---- mozilla/toolkit/library/Makefile.in 31 Aug 2007 02:40:21 -0000 1.16.2.10 -+++ mozilla/toolkit/library/Makefile.in 9 Feb 2009 04:05:45 -0000 -@@ -359,17 +359,17 @@ endif - ifdef MOZ_ENABLE_XPRINT - EXTRA_DSO_LDOPTS += $(MOZ_XPRINT_LDFLAGS) - endif - - ifdef MOZ_ENABLE_PANGO - EXTRA_DSO_LDOPTS += $(MOZ_PANGO_LIBS) - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_DSO_LDOPTS += -lbe - endif - - ifeq ($(OS_ARCH),WINNT) - EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool comdlg32) - ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC)) - EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp) - endif -Index: mozilla/toolkit/mozapps/installer/package-name.mk -=================================================================== -RCS file: /cvsroot/mozilla/toolkit/mozapps/installer/package-name.mk,v -retrieving revision 1.4.8.3 -diff -u -8 -p -r1.4.8.3 package-name.mk ---- mozilla/toolkit/mozapps/installer/package-name.mk 4 Apr 2008 09:21:26 -0000 1.4.8.3 -+++ mozilla/toolkit/mozapps/installer/package-name.mk 9 Feb 2009 04:05:47 -0000 -@@ -54,16 +54,19 @@ ifeq ($(OS_ARCH),Darwin) - MOZ_PKG_PLATFORM := mac - endif - ifeq ($(TARGET_OS),linux-gnu) - MOZ_PKG_PLATFORM := linux-$(TARGET_CPU) - endif - ifeq ($(OS_ARCH),OS2) - MOZ_PKG_PLATFORM := os2 - endif -+ifeq ($(OS_ARCH), Haiku) -+MOZ_PKG_PLATFORM := Haiku -+endif - ifeq ($(OS_ARCH), BeOS) - ifeq (,$(filter-out 6.%, $(OS_RELEASE))) - MOZ_PKG_PLATFORM := Zeta - else - ifeq (,$(filter-out 5.1, $(OS_RELEASE))) - MOZ_PKG_PLATFORM := BeOS-bone - else - ifeq (,$(filter-out 5.0.4, $(OS_RELEASE))) -Index: mozilla/toolkit/mozapps/installer/packager.mk -=================================================================== -RCS file: /cvsroot/mozilla/toolkit/mozapps/installer/packager.mk,v -retrieving revision 1.16.2.18 -diff -u -8 -p -r1.16.2.18 packager.mk ---- mozilla/toolkit/mozapps/installer/packager.mk 4 Apr 2008 20:31:10 -0000 1.16.2.18 -+++ mozilla/toolkit/mozapps/installer/packager.mk 9 Feb 2009 04:05:49 -0000 -@@ -43,21 +43,24 @@ include $(topsrcdir)/toolkit/mozapps/ins - # This is how we create the Unix binary packages we release to the public. - # Currently the only format is tar.gz (TGZ), but it should be fairly easy - # to add .rpm (RPM) and .deb (DEB) later. - - ifndef MOZ_PKG_FORMAT - ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) - MOZ_PKG_FORMAT = DMG - else --ifeq (,$(filter-out OS2 WINNT BeOS, $(OS_ARCH))) -+ifeq (,$(filter-out OS2 WINNT BeOS Haiku, $(OS_ARCH))) - MOZ_PKG_FORMAT = ZIP - ifeq ($(OS_ARCH),OS2) - INSTALLER_DIR = os2 - else -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+INSTALLER_DIR = beos -+endif - ifeq ($(OS_ARCH), WINNT) - INSTALLER_DIR = windows - endif - endif - else - ifeq (,$(filter-out SunOS, $(OS_ARCH))) - MOZ_PKG_FORMAT = BZ2 - else -@@ -246,19 +249,19 @@ $(MOZ_PKG_REMOVALS_GEN): $(MOZ_PKG_REMOV - $(PERL) $(topsrcdir)/config/preprocessor.pl -Fsubstitution $(DEFINES) $(ACDEFINES) $(MOZ_PKG_REMOVALS) > $(MOZ_PKG_REMOVALS_GEN) - endif - - GARBAGE += $(DIST)/$(PACKAGE) $(PACKAGE) - - ifeq ($(OS_ARCH),IRIX) - STRIP_FLAGS = -f - endif --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - STRIP_FLAGS = -g --PLATFORM_EXCLUDE_LIST = ! -name "*.stub" ! -name "$(MOZ_PKG_APPNAME)-bin" -+PLATFORM_EXCLUDE_LIST = ! -name "*.stub" ! -name "$(MOZ_PKG_APPNAME)" - endif - ifeq ($(OS_ARCH),OS2) - STRIP = $(srcdir)/os2/strip.cmd - STRIP_FLAGS = - PLATFORM_EXCLUDE_LIST = ! -name "*.ico" - endif - - ifneq (,$(filter WINNT OS2,$(OS_ARCH))) -Index: mozilla/toolkit/xre/nsXREDirProvider.cpp -=================================================================== -RCS file: /cvsroot/mozilla/toolkit/xre/nsXREDirProvider.cpp,v -retrieving revision 1.37.2.11 -diff -u -8 -p -r1.37.2.11 nsXREDirProvider.cpp ---- mozilla/toolkit/xre/nsXREDirProvider.cpp 8 May 2007 19:25:29 -0000 1.37.2.11 -+++ mozilla/toolkit/xre/nsXREDirProvider.cpp 9 Feb 2009 04:05:57 -0000 -@@ -71,17 +71,17 @@ - #ifndef CSIDL_PROGRAM_FILES - #define CSIDL_PROGRAM_FILES 0x0026 - #endif - #endif - #ifdef XP_MACOSX - #include "nsILocalFileMac.h" - #endif - #ifdef XP_BEOS --#include -+#include - #include - #endif - #ifdef XP_UNIX - #include - #endif - #ifdef XP_OS2 - #define INCL_DOS - #include -Index: mozilla/widget/src/beos/nsDragService.cpp -=================================================================== -RCS file: /cvsroot/mozilla/widget/src/beos/nsDragService.cpp,v -retrieving revision 1.13.28.5 -diff -u -8 -p -r1.13.28.5 nsDragService.cpp ---- mozilla/widget/src/beos/nsDragService.cpp 13 Aug 2008 12:41:28 -0000 1.13.28.5 -+++ mozilla/widget/src/beos/nsDragService.cpp 9 Feb 2009 04:06:02 -0000 -@@ -250,17 +250,17 @@ nsDragService::InvokeDragSession (nsIDOM - dragRect = view->Frame(); - // do we need to offset? - } - - PR_LOG(sDragLm, PR_LOG_DEBUG, ("invoking mDragView->DragMessage")); - bool noBitmap = true; - - //This is the code for image-dragging, currently disabled. See comments in beginning of file. --# ifdef 0 -+#if 0 - do - { - PRUint32 dataSize; - PRUint32 noItems; - mSourceDataItems->Count(&noItems); - if (noItems!=1) - { - PR_LOG(sDragLm, PR_LOG_DEBUG, ("Transferables are not ==1, no drag bitmap!")); -@@ -307,17 +307,17 @@ nsDragService::InvokeDragSession (nsIDOM - if (aBitmap==NULL || !aBitmap->IsValid()) { - PR_LOG(sDragLm, PR_LOG_DEBUG, ("Could not get BBitmap, no drag bitmap %s!", aBitmap==NULL?"(null)":"(not valid)" )); - break; - } - - view->DragMessage(mDragMessage, aBitmap, B_OP_OVER, BPoint(-4,-4), view); - noBitmap = false; - } while(false); --# endif -+#endif - - if (noBitmap) - view->DragMessage(mDragMessage, dragRect, view); - - StartDragSession(); - view->UnlockLooper(); - return NS_OK; - } -Index: mozilla/xpcom/build/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/xpcom/build/Makefile.in,v -retrieving revision 1.90.2.3 -diff -u -8 -p -r1.90.2.3 Makefile.in ---- mozilla/xpcom/build/Makefile.in 29 Mar 2008 06:56:29 -0000 1.90.2.3 -+++ mozilla/xpcom/build/Makefile.in 9 Feb 2009 04:06:06 -0000 -@@ -168,17 +168,17 @@ ifdef GC_LEAK_DETECTOR - DEFINES += -DGC_LEAK_DETECTOR - endif - - ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) - CXXFLAGS += $(TK_CFLAGS) - EXTRA_DSO_LDOPTS += $(TK_LIBS) - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_DSO_LDOPTS += -lbe - endif - - ifneq (,$(filter gtk2,$(MOZ_WIDGET_TOOLKIT))) - EXTRA_DSO_LDOPTS += $(MOZ_GTK2_LIBS) - endif - - ifeq ($(OS_ARCH),WINNT) -Index: mozilla/xpcom/obsolete/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/xpcom/obsolete/Makefile.in,v -retrieving revision 1.17 -diff -u -8 -p -r1.17 Makefile.in ---- mozilla/xpcom/obsolete/Makefile.in 30 Jan 2005 21:33:45 -0000 1.17 -+++ mozilla/xpcom/obsolete/Makefile.in 9 Feb 2009 04:06:09 -0000 -@@ -115,17 +115,17 @@ DEFINES += -D_IMPL_NS_COM_OBSOLETE - - EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) - - ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) - CXXFLAGS += $(TK_CFLAGS) - EXTRA_DSO_LDOPTS += $(TK_LIBS) - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_DSO_LDOPTS += -lbe - endif - - ifeq ($(OS_ARCH),WINNT) - EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, shell32 ole32) - ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC)) - EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME, imagehlp) - endif -Index: mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in,v -retrieving revision 1.80.4.6 -diff -u -8 -p -r1.80.4.6 Makefile.in ---- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 19 Feb 2008 21:11:34 -0000 1.80.4.6 -+++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 9 Feb 2009 04:06:11 -0000 -@@ -90,21 +90,23 @@ endif - # IA64 Linux - ifneq (,$(filter Linux,$(OS_ARCH))) - ifneq (,$(findstring ia64,$(OS_TEST))) - CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp - ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s - endif - endif - # --# BeOS/Intel (uses the same unixish_x86 code) -+# BeOS/Intel (uses the same as Linux, works well. Migrate others!) - # --ifeq ($(OS_ARCH)$(OS_TEST),BeOSBePC) -+#ifeq ($(OS_ARCH)$(OS_TEST),BeOSBePC) -+ifeq (,$(filter-out BeOSBePC HaikuBePC, $(OS_ARCH)$(OS_TEST))) - CPPSRCS := xptcinvoke_gcc_x86_unix.cpp xptcstubs_gcc_x86_unix.cpp - endif -+ - # - # Neutrino/Intel (uses the same unixish_x86 code) - # - ifeq ($(OS_TARGET),NTO) - ifeq ($(OS_TEST),x86) - CPPSRCS := xptcinvoke_unixish_x86.cpp xptcstubs_unixish_x86.cpp - endif - ifeq ($(OS_TEST),arm) -Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h -=================================================================== -RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h,v -retrieving revision 1.18.28.3 -diff -u -8 -p -r1.18.28.3 xptc_platforms_unixish_x86.h ---- mozilla/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h 9 Apr 2007 20:01:13 -0000 1.18.28.3 -+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h 9 Feb 2009 04:06:12 -0000 -@@ -133,17 +133,22 @@ - /* Old gcc 2.7.x.x. What does gcc 2.8.x do?? */ - #define CFRONT_STYLE_THIS_ADJUST - #else - /* egcs and later */ - #define THUNK_BASED_THIS_ADJUST - #endif - - #elif defined(__BEOS__) -+#if (__GNUC__ == 2) - #define CFRONT_STYLE_THIS_ADJUST -+#else -+#define THUNK_BASED_THIS_ADJUST -+#endif -+ - - #elif defined(__sun__) || defined(__sun) - #if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ - #define THUNK_BASED_THIS_ADJUST - #else - #define CFRONT_STYLE_THIS_ADJUST - #endif - -Index: mozilla/xpfe/bootstrap/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/xpfe/bootstrap/Attic/Makefile.in,v -retrieving revision 1.283.2.6 -diff -u -8 -p -r1.283.2.6 Makefile.in ---- mozilla/xpfe/bootstrap/Makefile.in 29 Sep 2007 20:15:11 -0000 1.283.2.6 -+++ mozilla/xpfe/bootstrap/Makefile.in 9 Feb 2009 04:06:16 -0000 -@@ -113,18 +113,22 @@ ifdef MOZ_ENABLE_XREMOTE - REQUIRES += xremoteservice - endif - - include $(topsrcdir)/config/config.mk - - ifeq ($(USE_SHORT_LIBNAME),1) - PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX) - else -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+PROGRAM = $(MOZ_APP_NAME)$(BIN_SUFFIX) -+else - PROGRAM = $(MOZ_APP_NAME)-bin$(BIN_SUFFIX) - endif -+endif - - # Force applications to be built non-statically - # when building the mozcomps meta component - ifneq (,$(filter mozcomps,$(MOZ_META_COMPONENTS))) - BUILD_STATIC_LIBS= - BUILD_SHARED_LIBS=1 - ifdef MOZ_COMPONENTLIB - DEFINES += -D_MOZCOMPS_SHARED_LIBRARY -D_BUILD_STATIC_BIN -@@ -406,17 +410,17 @@ ifndef GNU_CC - LDFLAGS += /HEAP:0x40000 - endif - endif - - CXXFLAGS += $(MOZ_TOOLKIT_REGISTRY_CFLAGS) - - LOCAL_INCLUDES += -I$(srcdir) -I. - --ifneq (,$(filter-out OS2 WINNT,$(OS_ARCH))) -+ifneq (,$(filter-out OS2 WINNT BeOS Haiku,$(OS_ARCH))) - $(MOZ_APP_NAME).1: mozilla.man.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk - @sed -e "s|\@bindir\@|$(bindir)|g" -e "s|\@mozappdir\@|$(mozappdir)|g" \ - -e "s|\@MOZ_APP_DISPLAYNAME\@|$(MOZ_APP_DISPLAYNAME)|g" \ - -e "s|\@MOZ_APP_NAME\@|$(MOZ_APP_NAME)|g" \ - -e "s|\@MOZ_APP_VERSION\@|${MOZ_APP_VERSION}|g" < $< > $@ - - libs:: $(MOZ_APP_NAME).1 - $(INSTALL) $< $(DIST)/man/man1 -Index: mozilla/xpfe/bootstrap/nsSigHandlers.cpp -=================================================================== -RCS file: /cvsroot/mozilla/xpfe/bootstrap/nsSigHandlers.cpp,v -retrieving revision 1.41.18.1 -diff -u -8 -p -r1.41.18.1 nsSigHandlers.cpp ---- mozilla/xpfe/bootstrap/nsSigHandlers.cpp 22 Jun 2006 22:31:13 -0000 1.41.18.1 -+++ mozilla/xpfe/bootstrap/nsSigHandlers.cpp 9 Feb 2009 04:06:17 -0000 -@@ -55,17 +55,18 @@ - #include // atoi - #endif - - #if defined(SOLARIS) - #include - #endif - - #ifdef XP_BEOS --#include -+#include -+#include - #include - #include "nsCOMPtr.h" - #include "nsIServiceManager.h" - #include "nsIAppStartup.h" - #include "nsXPFEComponentsCID.h" - #endif - - #ifdef MOZ_WIDGET_PHOTON -Index: mozilla/xpinstall/packager/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/xpinstall/packager/Attic/Makefile.in,v -retrieving revision 1.68.4.1 -diff -u -8 -p -r1.68.4.1 Makefile.in ---- mozilla/xpinstall/packager/Makefile.in 20 Feb 2006 17:42:11 -0000 1.68.4.1 -+++ mozilla/xpinstall/packager/Makefile.in 9 Feb 2009 04:06:26 -0000 -@@ -43,17 +43,17 @@ srcdir = @srcdir@ - VPATH = @srcdir@ - - include $(DEPTH)/config/autoconf.mk - - OSPACKAGE = unix - ifeq ($(OS_ARCH),IRIX) - STRIP_FLAGS = -f - endif --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - STRIP_FLAGS = -g - PLATFORM_EXCLUDE_LIST = ! -name "*.stub" ! -name "$(MOZ_PKG_APPNAME)-bin" - endif - ifeq ($(OS_ARCH),OS2) - STRIP = $(srcdir)/os2/strip.cmd - STRIP_FLAGS = - OSPACKAGE = os2 - PLATFORM_EXCLUDE_LIST = ! -name "*.ico" -Index: mozilla/xulrunner/app/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/xulrunner/app/Makefile.in,v -retrieving revision 1.23.2.4 -diff -u -8 -p -r1.23.2.4 Makefile.in ---- mozilla/xulrunner/app/Makefile.in 9 Apr 2008 06:50:54 -0000 1.23.2.4 -+++ mozilla/xulrunner/app/Makefile.in 9 Feb 2009 04:06:32 -0000 -@@ -54,17 +54,17 @@ DIRS = profile - PREF_JS_EXPORTS = $(srcdir)/xulrunner.js - GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/,xulrunner.js) - - DEFINES += -DAB_CD=$(AB_CD) - - ifeq ($(USE_SHORT_LIBNAME), 1) - PROGRAM = xulrunner$(BIN_SUFFIX) - else --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - PROGRAM = xulrunner$(BIN_SUFFIX) - else - PROGRAM = xulrunner-bin$(BIN_SUFFIX) - endif - endif - - DEFINES += -DXULRUNNER_PROGNAME=\"xulrunner\" - -@@ -80,17 +80,17 @@ REQUIRES = \ - xulrunner \ - $(NULL) - - CPPSRCS = nsXULRunnerApp.cpp - - ifeq ($(OS_ARCH),WINNT) - CPPSRCS += nsRegisterGREWin.cpp - else --ifneq (,$(filter OS2 Darwin,$(OS_ARCH))) -+ifneq (,$(filter OS2 Darwin BeOS Haiku,$(OS_ARCH))) - CPPSRCS += nsRegisterGREVoid.cpp - else - CPPSRCS += nsRegisterGREUnix.cpp - endif - endif - - LOCAL_INCLUDES += \ - -I$(topsrcdir)/toolkit/xre \ -@@ -169,17 +169,17 @@ endif - ifdef BUILD_STATIC_LIBS - RCFLAGS += -DMOZ_STATIC_BUILD - endif - ifdef DEBUG - RCFLAGS += -DDEBUG - endif - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - OS_LIBS += -ltracker - endif - - ifeq ($(OS_ARCH),OS2) - RESFILE=splashos2.res - RCFLAGS += -DMOZ_XULRUNNER - ifdef BUILD_STATIC_LIBS - EXE_DEF_FILE = xulrunner.def -@@ -237,17 +237,17 @@ $(EXE_DEF_FILE): - @echo WinQueryProperty = PMMERGE.5450 >>$(EXE_DEF_FILE) - @echo WinRemoveProperty = PMMERGE.5451 >>$(EXE_DEF_FILE) - @echo WinSetProperty = PMMERGE.5452 >>$(EXE_DEF_FILE) - - LDFLAGS += -Zlinker /NOE - endif - endif - --ifneq (,$(filter-out OS2 WINNT Darwin BeOS,$(OS_ARCH))) -+ifneq (,$(filter-out OS2 WINNT Darwin BeOS Haiku,$(OS_ARCH))) - - xulrunner:: mozilla.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk - cat $< | sed -e "s|%MOZAPPDIR%|$(mozappdir)|" \ - -e "s|%MOZ_USER_DIR%|.mozilla/xulrunner|" \ - -e "s|%MREDIR%|$(mredir)|" > $@ - chmod +x $@ - - libs:: xulrunner diff --git a/www-client/mozilla_firefox/old-patches/firstrun-default-page.diff b/www-client/mozilla_firefox/old-patches/firstrun-default-page.diff deleted file mode 100644 index 46db657ab..000000000 --- a/www-client/mozilla_firefox/old-patches/firstrun-default-page.diff +++ /dev/null @@ -1,36 +0,0 @@ -Index: mozilla/browser/app/firefox-branding.js -=================================================================== -RCS file: /cvsroot/mozilla/browser/app/firefox-branding.js,v -retrieving revision 1.1.2.2 -diff -u -8 -p -w -r1.1.2.2 firefox-branding.js ---- mozilla/browser/app/firefox-branding.js 12 Sep 2006 15:50:19 -0000 1.1.2.2 -+++ mozilla/browser/app/firefox-branding.js 7 Jul 2009 12:20:54 -0000 -@@ -1,16 +1,15 @@ - pref("startup.homepage_override_url","http://www.mozilla.org/projects/%APP%/%VERSION%/whatsnew/"); --pref("startup.homepage_welcome_url","http://www.mozilla.org/projects/%APP%/%VERSION%/firstrun/"); - // URL user can browse to manually if for some reason all update installation - // attempts fail. - pref("app.update.url.manual", "http://www.mozilla.org/products/%APP%/"); - // A default value for the "More information about this update" link - // supplied in the "An update is available" page of the update wizard. - pref("app.update.url.details", "http://www.mozilla.org/projects/%APP%/"); - - // Release notes URL --pref("app.releaseNotesURL", "http://www.mozilla.org/projects/%APP%/%VERSION%/releasenotes/"); -+pref("app.releaseNotesURL", "about:buildconfig"); - - // Search codes belong only in builds with official branding - pref("browser.search.param.yahoo-fr", ""); - pref("browser.search.param.yahoo-fr-cjkt", ""); - pref("browser.search.param.yahoo-f-CN", ""); -Index: mozilla/browser/base/content/browserconfig.properties -=================================================================== -RCS file: /cvsroot/mozilla/browser/base/content/browserconfig.properties,v -retrieving revision 1.4.4.1 -diff -u -8 -p -w -r1.4.4.1 browserconfig.properties ---- mozilla/browser/base/content/browserconfig.properties 17 Mar 2006 04:17:56 -0000 1.4.4.1 -+++ mozilla/browser/base/content/browserconfig.properties 7 Jul 2009 12:31:48 -0000 -@@ -1,2 +1,2 @@ - # Do NOT localize or otherwise change these values --browser.startup.homepage=http://www.mozilla.org/projects/bonecho/ -+browser.startup.homepage=http://svn.berlios.de/svnroot/repos/haiku/haiku/trunk/docs/welcome/welcome.html diff --git a/www-client/mozilla_firefox/old-patches/forReorderPatches-browser.zip b/www-client/mozilla_firefox/old-patches/forReorderPatches-browser.zip deleted file mode 100644 index bdaef70cc..000000000 Binary files a/www-client/mozilla_firefox/old-patches/forReorderPatches-browser.zip and /dev/null differ diff --git a/www-client/mozilla_firefox/old-patches/greyMenuSelection.patch b/www-client/mozilla_firefox/old-patches/greyMenuSelection.patch deleted file mode 100644 index b86bea0a6..000000000 --- a/www-client/mozilla_firefox/old-patches/greyMenuSelection.patch +++ /dev/null @@ -1,28 +0,0 @@ -Index: mozilla/widget/src/beos/nsLookAndFeel.cpp -=================================================================== -RCS file: /cvsroot/mozilla/widget/src/beos/nsLookAndFeel.cpp,v -retrieving revision 1.27 -diff -u -8 -p -r1.27 nsLookAndFeel.cpp ---- mozilla/widget/src/beos/nsLookAndFeel.cpp 26 Oct 2004 01:45:26 -0000 1.27 -+++ mozilla/widget/src/beos/nsLookAndFeel.cpp 19 Feb 2009 04:37:06 -0000 -@@ -157,19 +157,17 @@ nsresult nsLookAndFeel::NativeGetColor(c - aColor = NS_RGB(0x00, 0x00, 0x00); - break; - case eColor_graytext: - aColor = NS_RGB(0x77, 0x77, 0x77); - break; - case eColor_highlight: - case eColor__moz_menuhover: - { -- // B_MENU_SELECTION_BACKGROUND_COLOR is used for text selection -- // this blue colors seems more suitable -- color = ui_color(B_KEYBOARD_NAVIGATION_COLOR); -+ color = ui_color(B_MENU_SELECTION_BACKGROUND_COLOR ); - aColor = NS_RGB(color.red, color.green, color.blue); - } - break; - case eColor_highlighttext: - case eColor__moz_menuhovertext: - { - color = ui_color(B_MENU_SELECTED_ITEM_TEXT_COLOR); - aColor = NS_RGB(color.red, color.green, color.blue); diff --git a/www-client/mozilla_firefox/old-patches/launch-kill-dowhile.patch b/www-client/mozilla_firefox/old-patches/launch-kill-dowhile.patch deleted file mode 100644 index e42a6c15e..000000000 --- a/www-client/mozilla_firefox/old-patches/launch-kill-dowhile.patch +++ /dev/null @@ -1,406 +0,0 @@ -Index: mozilla/widget/src/beos/nsAppShell.cpp -=================================================================== -RCS file: /cvsroot/mozilla/widget/src/beos/nsAppShell.cpp,v -retrieving revision 1.29.8.2 -diff -u -8 -p -r1.29.8.2 nsAppShell.cpp ---- mozilla/widget/src/beos/nsAppShell.cpp 3 Jul 2007 09:33:54 -0000 1.29.8.2 -+++ mozilla/widget/src/beos/nsAppShell.cpp 19 Feb 2009 06:12:35 -0000 -@@ -113,20 +113,38 @@ nsAppShell::nsAppShell() - //------------------------------------------------------------------------- - - NS_IMETHODIMP nsAppShell::Create(int* argc, char ** argv) - { - // system wide unique names - // NOTE: this needs to be run from within the main application thread - char portname[64]; - char semname[64]; -- PR_snprintf(portname, sizeof(portname), "event%lx", -- (long unsigned) PR_GetCurrentThread()); -- PR_snprintf(semname, sizeof(semname), "sync%lx", -- (long unsigned) PR_GetCurrentThread()); -+ int32 cookie = 0; -+ image_info iinfo; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &cookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ PR_snprintf(portname, sizeof(portname), "event%lx", -+ (long unsigned) find_thread(leaf)); -+ PR_snprintf(semname, sizeof(semname), "sync%lx", -+ (long unsigned) find_thread(leaf)); -+ } -+ else -+ { -+ PR_snprintf(portname, sizeof(portname), "event%lx", -+ (long unsigned) find_thread(0)); -+ PR_snprintf(semname, sizeof(semname), "sync%lx", -+ (long unsigned) find_thread(0)); -+ } -+ } while(iinfo.type != B_APP_IMAGE); - - #ifdef DEBUG - printf("nsAppShell::Create portname: %s, semname: %s\n", portname, semname); - #endif - /* - * Set up the port for communicating. As restarts thru execv may occur - * and ports survive those (with faulty events as result). Combined with the fact - * that plevent.c can setup the port ahead of us we need to take extra -@@ -337,19 +355,33 @@ NS_IMETHODIMP nsAppShell::GetNativeEvent - - return NS_OK; - } - - NS_IMETHODIMP nsAppShell::DispatchNativeEvent(PRBool aRealEvent, void *aEvent) - { - // should we check for eventport initialization ? - char portname[64]; -- PR_snprintf(portname, sizeof(portname), "event%lx", -- (long unsigned) PR_GetCurrentThread()); -- -+ int32 cookie = 0; -+ image_info iinfo; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &cookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ PR_snprintf(portname, sizeof(portname), "event%lx", -+ (long unsigned) find_thread(leaf)); -+ } -+ else -+ PR_snprintf(portname, sizeof(portname), "event%lx", -+ (long unsigned) find_thread(0)/*PR_GetCurrentThread()*/); -+ } while(iinfo.type != B_APP_IMAGE); -+ - if((eventport = find_port(portname)) < 0) - { - // not initialized - #ifdef DEBUG - printf("nsAppShell::DispatchNativeEvent() was called before init\n"); - #endif - fflush(stdout); - return NS_ERROR_FAILURE; -Index: mozilla/widget/src/beos/nsToolkit.cpp -=================================================================== -RCS file: /cvsroot/mozilla/widget/src/beos/nsToolkit.cpp,v -retrieving revision 1.23.8.1 -diff -u -8 -p -r1.23.8.1 nsToolkit.cpp ---- mozilla/widget/src/beos/nsToolkit.cpp 3 Jul 2007 09:33:54 -0000 1.23.8.1 -+++ mozilla/widget/src/beos/nsToolkit.cpp 19 Feb 2009 06:12:35 -0000 -@@ -37,16 +37,17 @@ - - #include "nsToolkit.h" - #include "prmon.h" - #include "prtime.h" - #include "nsGUIEvent.h" - #include "nsSwitchToUIThread.h" - #include "plevent.h" - #include "prprf.h" -+#include - - // - // Static thread local storage index of the Toolkit - // object associated with a given thread... - // - static PRUintn gToolkitTLSIndex = 0; - - //------------------------------------------------------------------------- -@@ -84,20 +85,36 @@ void nsToolkit::RunPump(void* arg) - gThreadState = PR_TRUE; - - PR_Notify(info->monitor); - PR_ExitMonitor(info->monitor); - - delete info; - - // system wide unique names -- PR_snprintf(portname, sizeof(portname), "event%lx", -- (long unsigned) PR_GetCurrentThread()); -- -- port_id event = create_port(100, portname); -+ int32 cookie = 0; -+ image_info iinfo; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &cookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ PR_snprintf(portname, sizeof(portname), "event%lx", -+ (long unsigned) find_thread(leaf)); -+ } -+ else -+ { -+ PR_snprintf(portname, sizeof(portname), "event%lx", -+ (long unsigned) find_thread(0)); -+ } -+ } while(iinfo.type != B_APP_IMAGE); -+ -+ port_id event = create_port(200, portname); - - while(read_port(event, &code, &id, sizeof(id)) >= 0) - { - switch(code) - { - case WM_CALLMETHOD : - { - MethodInfo *mInfo = (MethodInfo *)id.data; -@@ -125,16 +142,17 @@ void nsToolkit::RunPump(void* arg) - // - // constructor - // - //------------------------------------------------------------------------- - nsToolkit::nsToolkit() - { - localthread = false; - mGuiThread = NULL; -+ mGUIThreadID = 0; - } - - - //------------------------------------------------------------------------- - // - // destructor - // - //------------------------------------------------------------------------- -@@ -182,17 +200,33 @@ void nsToolkit::CreateUIThread() - 0); - - // wait for the gui thread to start - while(gThreadState == PR_FALSE) - { - PR_Wait(monitor, PR_INTERVAL_NO_TIMEOUT); - } - } -- -+ -+ image_info iinfo; -+ int32 cookie = 0; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &cookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ mGUIThreadID = find_thread(leaf); -+ } -+ else -+ { -+ mGUIThreadID = find_thread(0); -+ } -+ } while(iinfo.type != B_APP_IMAGE); - // at this point the thread is running - PR_ExitMonitor(monitor); - PR_DestroyMonitor(monitor); - } - - - //------------------------------------------------------------------------- - // -@@ -213,28 +247,42 @@ NS_METHOD nsToolkit::Init(PRThread *aThr - { - localthread = true; - - // create a thread where the message pump will run - CreateUIThread(); - } - - cached = false; -- -+ image_info iinfo; -+ int32 cookie = 0; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &cookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ mGUIThreadID = find_thread(leaf); -+ } -+ else -+ { -+ mGUIThreadID = find_thread(0); -+ } -+ } while(iinfo.type != B_APP_IMAGE); - return NS_OK; - } - - void nsToolkit::GetInterface() - { - if(! cached) - { - char portname[64]; -- - PR_snprintf(portname, sizeof(portname), "event%lx", -- (long unsigned) mGuiThread); -+ (long unsigned) mGUIThreadID); - - eventport = find_port(portname); - - cached = true; - } - } - - void nsToolkit::CallMethod(MethodInfo *info) -Index: mozilla/widget/src/beos/nsToolkit.h -=================================================================== -RCS file: /cvsroot/mozilla/widget/src/beos/nsToolkit.h,v -retrieving revision 1.5.8.1 -diff -u -8 -p -r1.5.8.1 nsToolkit.h ---- mozilla/widget/src/beos/nsToolkit.h 3 Jul 2007 09:33:54 -0000 1.5.8.1 -+++ mozilla/widget/src/beos/nsToolkit.h 19 Feb 2009 06:12:36 -0000 -@@ -66,16 +66,17 @@ public: - void Kill(); - private: - virtual ~nsToolkit(); - void CreateUIThread(void); - - protected: - // Thread Id of the "main" Gui thread. - PRThread *mGuiThread; -+ thread_id mGUIThreadID; - static void RunPump(void* arg); - void GetInterface(); - bool cached; - bool localthread; - port_id eventport; - }; - - #endif // TOOLKIT_H -Index: mozilla/xpcom/threads/plevent.c -=================================================================== -RCS file: /cvsroot/mozilla/xpcom/threads/Attic/plevent.c,v -retrieving revision 1.54.2.1 -diff -u -8 -p -r1.54.2.1 plevent.c ---- mozilla/xpcom/threads/plevent.c 26 Sep 2005 19:43:34 -0000 1.54.2.1 -+++ mozilla/xpcom/threads/plevent.c 19 Feb 2009 06:12:40 -0000 -@@ -61,16 +61,18 @@ - #if defined(XP_UNIX) - /* for fcntl */ - #include - #include - #endif - - #if defined(XP_BEOS) - #include -+#include -+#include - #endif - - #if defined(XP_MACOSX) - #if defined(MOZ_WIDGET_COCOA) - #include - #define MAC_USE_CFRUNLOOPSOURCE - #elif defined(TARGET_CARBON) - /* #include */ -@@ -903,21 +905,50 @@ failed: - * Otherwise we need to create the sem and the port, deleting any open ports before. - */ - - sem_info info; - int32 cookie = 0; - - char portname[64]; - char semname[64]; -- PR_snprintf(portname, sizeof(portname), "event%lx", -- (long unsigned) self->handlerThread); -- PR_snprintf(semname, sizeof(semname), "sync%lx", -- (long unsigned) self->handlerThread); - -+struct _MDThread -+{ -+ thread_id tid; -+ sem_id joinSem; -+ PRBool is_joining; -+}; -+ struct _MDThread md; -+ -+ -+//#include "private/primpl.h" -+ image_info iinfo; -+ int32 icookie = 0; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &icookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ PR_snprintf(portname, sizeof(portname), "event%lx", -+ (long unsigned) find_thread(leaf)); -+ PR_snprintf(semname, sizeof(semname), "sync%lx", -+ (long unsigned) find_thread(leaf)); -+ } -+ else -+ { -+ PR_snprintf(portname, sizeof(portname), "event%lx", -+ (long unsigned) find_thread(0)); -+ PR_snprintf(semname, sizeof(semname), "sync%lx", -+ (long unsigned) find_thread(0)); -+ } -+ } while(iinfo.type != B_APP_IMAGE); -+ - self->eventport = find_port(portname); - while(get_next_sem_info(0, &cookie, &info) == B_OK) - { - if(strcmp(semname, info.name) != 0) { - continue; - } - - /* found semaphore */ -@@ -926,17 +957,17 @@ failed: - } - return PR_SUCCESS; - } - /* setup the port and semaphore */ - if(self->eventport >= 0) - { - delete_port( self->eventport ); - } -- self->eventport = create_port(200, portname); -+ self->eventport = create_port(512, portname); - /* We don't use the sem, but it has to be there - */ - create_sem(0, semname); - return PR_SUCCESS; - #else - return PR_SUCCESS; - #endif - } -@@ -1259,26 +1290,28 @@ _pl_NativeNotify(PLEventQueue* self) - - #if defined(XP_BEOS) - struct ThreadInterfaceData - { - void *data; - thread_id waitingThread; - }; - -+ - static PRStatus - _pl_NativeNotify(PLEventQueue* self) - { - struct ThreadInterfaceData id; - id.data = self; - id.waitingThread = 0; - write_port(self->eventport, 'natv', &id, sizeof(id)); - - return PR_SUCCESS; /* Is this correct? */ - } -+ - #endif /* XP_BEOS */ - - #if defined(XP_MACOSX) - static PRStatus - _pl_NativeNotify(PLEventQueue* self) - { - #if defined(MAC_USE_CFRUNLOOPSOURCE) - CFRunLoopSourceSignal(self->mRunLoopSource); diff --git a/www-client/mozilla_firefox/old-patches/mozilla-rdefs.zip b/www-client/mozilla_firefox/old-patches/mozilla-rdefs.zip deleted file mode 100644 index 456c1a758..000000000 Binary files a/www-client/mozilla_firefox/old-patches/mozilla-rdefs.zip and /dev/null differ diff --git a/www-client/mozilla_firefox/old-patches/nsAppRunner.patch b/www-client/mozilla_firefox/old-patches/nsAppRunner.patch deleted file mode 100644 index 7e100a850..000000000 --- a/www-client/mozilla_firefox/old-patches/nsAppRunner.patch +++ /dev/null @@ -1,25 +0,0 @@ -Index: mozilla/toolkit/xre/nsAppRunner.cpp -=================================================================== -RCS file: /cvsroot/mozilla/toolkit/xre/nsAppRunner.cpp,v -retrieving revision 1.113.2.24 -diff -u -4 -r1.113.2.24 nsAppRunner.cpp ---- mozilla/toolkit/xre/nsAppRunner.cpp 8 Nov 2007 11:56:25 -0000 1.113.2.24 -+++ mozilla/toolkit/xre/nsAppRunner.cpp 16 Feb 2009 19:19:26 -0000 -@@ -1360,12 +1360,13 @@ - - #elif defined(XP_BEOS) - int32 cookie = 0; - image_info info; -- -- if(get_next_image_info(0, &cookie, &info) != B_OK) -- return NS_ERROR_FAILURE; -- -+ do { -+ if(get_next_image_info(0, &cookie, &info) != B_OK) -+ return NS_ERROR_FAILURE; -+ } while(info.type != B_APP_IMAGE); -+ - rv = NS_NewNativeLocalFile(nsDependentCString(info.name), PR_TRUE, - getter_AddRefs(lf)); - if (NS_FAILED(rv)) - return rv; diff --git a/www-client/mozilla_firefox/old-patches/prpolevt-fix.patch b/www-client/mozilla_firefox/old-patches/prpolevt-fix.patch deleted file mode 100644 index 6c67e6503..000000000 --- a/www-client/mozilla_firefox/old-patches/prpolevt-fix.patch +++ /dev/null @@ -1,32 +0,0 @@ -Index: mozilla/nsprpub/pr/src/io/prpolevt.c -=================================================================== -RCS file: /cvsroot/mozilla/nsprpub/pr/src/io/prpolevt.c,v -retrieving revision 3.15 -diff -u -8 -p -r3.15 prpolevt.c ---- mozilla/nsprpub/pr/src/io/prpolevt.c 25 Apr 2004 15:00:58 -0000 3.15 -+++ mozilla/nsprpub/pr/src/io/prpolevt.c 18 Feb 2009 02:06:41 -0000 -@@ -443,20 +443,20 @@ PR_IMPLEMENT(PRFileDesc *) PR_NewPollabl - #else - if (PR_NewTCPSocketPair(fd) == PR_FAILURE) { - fd[0] = fd[1] = NULL; - goto errorExit; - } - /* - * set the TCP_NODELAY option to reduce notification latency - */ -- socket_opt.option = PR_SockOpt_NoDelay; -- socket_opt.value.no_delay = PR_TRUE; -- rv = PR_SetSocketOption(fd[1], &socket_opt); -- PR_ASSERT(PR_SUCCESS == rv); -+// socket_opt.option = PR_SockOpt_NoDelay; -+// socket_opt.value.no_delay = PR_TRUE; -+// rv = PR_SetSocketOption(fd[1], &socket_opt); -+// PR_ASSERT(PR_SUCCESS == rv); - #endif - - event->secret->writeEnd = fd[1]; - if (PR_PushIOLayer(fd[0], PR_TOP_IO_LAYER, event) == PR_FAILURE) { - goto errorExit; - } - - return fd[0]; diff --git a/www-client/mozilla_firefox/old-patches/sunbird-makefile-apprunner-rsrc.zip b/www-client/mozilla_firefox/old-patches/sunbird-makefile-apprunner-rsrc.zip deleted file mode 100644 index b48cf7294..000000000 Binary files a/www-client/mozilla_firefox/old-patches/sunbird-makefile-apprunner-rsrc.zip and /dev/null differ diff --git a/www-client/mozilla_firefox/patches/2009-09-27/bezilla.step-by-step.txt b/www-client/mozilla_firefox/patches/2009-09-27/bezilla.step-by-step.txt deleted file mode 100644 index 329eb07b1..000000000 --- a/www-client/mozilla_firefox/patches/2009-09-27/bezilla.step-by-step.txt +++ /dev/null @@ -1,18 +0,0 @@ -Note: use --dry-run, as some patches may need -p1 and others may not apply cleanly. - -r01-config-star.patch # patches config.guess, config.sub -r02-configure-in-withGCC4andCrossCompile.patch # same as above, plus additions from `svn diff -r 7:8` -r03a-makefile-in.patch # Adds "Haiku" to the OS_ARCH tests. -r03b-starmk.patch # More adding "Haiku" to the OS_ARCH tests. -r04a-rdef-support-in-Makefile.patch # Adds rdef support to Makefiles. -r04b-just-rdefs-no-Makefile.patch # various *.rdef -r05-fix-shlibsign.README # Discussion that led to the patch. -r05-fix-shlibsign.patch # hack/fix for someone defines true/false to 1/0 -r06-nss-gcc4.patch # possible gcc4 and header fixes for nss/ -r07-working-nspr-from-haikuports.patch # applying this instead of 89-unmodified.patch will allow proper compilation, at the cost of losing your newest nspr work. -r08-misc.patch # numerous patches. not sure which patches are dependant on each other. - # Fonts, AppRunner, AppShell, DragService, nsToolKit, plevent, maybe more. -r09-sunbird-options-fix.patch # small fix for Sunbird's option window -r11-bookmarks-v2.patch # changes the default startup page, bookmarks, allows UserGuide and Welcome to be fetched locally or from svn -r10-grey-menu-color.patch # switches the blue menu highlight selection color for grey. -r12-releasenotes.patch # removes the 2nd first-run tab, changes release notes to about:buildconfig diff --git a/www-client/mozilla_firefox/patches/2009-09-27/r01-config-star.patch b/www-client/mozilla_firefox/patches/2009-09-27/r01-config-star.patch deleted file mode 100644 index 4a08a242c..000000000 --- a/www-client/mozilla_firefox/patches/2009-09-27/r01-config-star.patch +++ /dev/null @@ -1,5296 +0,0 @@ -Index: build/autoconf/config.guess -=================================================================== ---- build/autoconf/config.guess (revision 15) -+++ build/autoconf/config.guess (working copy) -@@ -1,9 +1,10 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2009-04-27' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -17,13 +18,15 @@ - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Originally written by Per Bothner . - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. -@@ -53,8 +56,8 @@ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -66,11 +69,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -104,8 +107,9 @@ - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; -- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || -+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; - dummy=$tmp/dummy ; - tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -@@ -122,7 +126,7 @@ - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; --esac ;' -+esac ; set_cc_for_build= ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. - # (ghazi@noc.rutgers.edu 1994-08-24) -@@ -157,6 +161,7 @@ - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; -+ sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched -@@ -195,50 +200,32 @@ - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" -- exit 0 ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- arc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- macppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvmeppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- pmax:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sgi:OpenBSD:*:*) -- echo mipseb-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- wgrisc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -+ exit ;; -+ *:ekkoBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -+ exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; -+ macppc:MirBSD:*:*) -+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; -+ *:MirBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; - alpha:OSF1:*:*) -- if test $UNAME_RELEASE = "V4.0"; then -+ case $UNAME_RELEASE in -+ *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` -- fi -+ ;; -+ *5.*) -+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -+ ;; -+ esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU -@@ -276,39 +263,49 @@ - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac -+ # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. -- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit 0 ;; -+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -+ exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix -- exit 0 ;; -+ exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 -- exit 0 ;; -+ exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 -- exit 0;; -+ exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos -- exit 0 ;; -+ exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos -- exit 0 ;; -+ exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition -- exit 0 ;; -+ exit ;; -+ *:z/VM:*:*) -+ echo s390-ibm-zvmoe -+ exit ;; -+ *:OS400:*:*) -+ echo powerpc-ibm-os400 -+ exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} -- exit 0;; -+ exit ;; -+ arm:riscos:*:*|arm:RISCOS:*:*) -+ echo arm-unknown-riscos -+ exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp -- exit 0;; -+ exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then -@@ -316,29 +313,48 @@ - else - echo pyramid-pyramid-bsd - fi -- exit 0 ;; -+ exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 -- exit 0 ;; -- DRS?6000:UNIX_SV:4.2*:7*) -+ exit ;; -+ DRS?6000:unix:4.0:6*) -+ echo sparc-icl-nx6 -+ exit ;; -+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in -- sparc) echo sparc-icl-nx7 && exit 0 ;; -+ sparc) echo sparc-icl-nx7; exit ;; - esac ;; -+ s390x:SunOS:*:*) -+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -- i86pc:SunOS:5.*:*) -- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; -+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) -+ eval $set_cc_for_build -+ SUN_ARCH="i386" -+ # If there is a compiler, see if it is configured for 64-bit objects. -+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. -+ # This test works for both compilers. -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ SUN_ARCH="x86_64" -+ fi -+ fi -+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) -@@ -347,10 +363,10 @@ - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` -- exit 0 ;; -+ exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 -@@ -362,10 +378,10 @@ - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac -- exit 0 ;; -+ exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor -@@ -376,37 +392,40 @@ - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ m68k:machten:*:*) -+ echo m68k-apple-machten${UNAME_RELEASE} -+ exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 -- exit 0 ;; -+ exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -430,32 +449,33 @@ - exit (-1); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c \ -- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && -+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && -+ SYSTEM_NAME=`$dummy $dummyarg` && -+ { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax -- exit 0 ;; -+ exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix -- exit 0 ;; -+ exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 -- exit 0 ;; -+ exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 -- exit 0 ;; -+ exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` -@@ -471,29 +491,29 @@ - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 -- exit 0 ;; -+ exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 -- exit 0 ;; -+ exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd -- exit 0 ;; -+ exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` -- exit 0 ;; -+ exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. -- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix -- exit 0 ;; -+ exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` -@@ -501,7 +521,7 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build -@@ -516,15 +536,19 @@ - exit(0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -- echo rs6000-ibm-aix3.2.5 -+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` -+ then -+ echo "$SYSTEM_NAME" -+ else -+ echo rs6000-ibm-aix3.2.5 -+ fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi -- exit 0 ;; -- *:AIX:*:[45]) -+ exit ;; -+ *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 -@@ -537,28 +561,28 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix -- exit 0 ;; -+ exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 -- exit 0 ;; -+ exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to -- exit 0 ;; # report: romp-ibm BSD 4.3 -+ exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx -- exit 0 ;; -+ exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 -- exit 0 ;; -+ exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd -- exit 0 ;; -+ exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 -- exit 0 ;; -+ exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in -@@ -620,9 +644,19 @@ - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then -- # avoid double evaluation of $set_cc_for_build -- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build -- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null -+ eval $set_cc_for_build -+ -+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating -+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler -+ # generating 64-bit code. GNU and HP use different nomenclature: -+ # -+ # $ CC_FOR_BUILD=cc ./config.guess -+ # => hppa2.0w-hp-hpux11.23 -+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess -+ # => hppa64-hp-hpux11.23 -+ -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else -@@ -630,11 +664,11 @@ - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -662,153 +696,192 @@ - exit (0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 -- exit 0 ;; -+ exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd -- exit 0 ;; -+ exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd -- exit 0 ;; -+ exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix -- exit 0 ;; -+ exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf -- exit 0 ;; -+ exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf -- exit 0 ;; -+ exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi -- exit 0 ;; -+ exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites -- exit 0 ;; -+ exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - *:UNICOS/mp:*:*) -- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; -+ 5000:UNIX_System_V:4.*:*) -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:FreeBSD:*:*) -- # Determine whether the default compiler uses glibc. -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #if __GLIBC__ >= 2 -- LIBC=gnu -- #else -- LIBC= -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} -- exit 0 ;; -+ case ${UNAME_MACHINE} in -+ pc98) -+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ esac -+ exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -- exit 0 ;; -- i*:MINGW*:*) -+ exit ;; -+ *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 -- exit 0 ;; --#### MozillaHack --# Netscape's hacked uname -- xx:WINNT:* | xx:WIN95:*) -- echo i586-pc-msvc -- exit 0 ;; --### End MozillaHack -+ exit ;; -+ i*:windows32*:*) -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 -+ exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 -- exit 0 ;; -- x86:Interix*:3*) -- echo i586-pc-interix3 -- exit 0 ;; -+ exit ;; -+ *:Interix*:[3456]*) -+ case ${UNAME_MACHINE} in -+ x86) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ EM64T | authenticamd | genuineintel) -+ echo x86_64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks -- exit 0 ;; -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix -- exit 0 ;; -+ exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin -- exit 0 ;; -+ exit ;; -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) -+ echo x86_64-unknown-cygwin -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin -- exit 0 ;; -+ exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - *:GNU:*:*) -+ # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -- exit 0 ;; -+ exit ;; -+ *:GNU/*:*:*) -+ # other systems with GNU libc and userland -+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -+ exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix -- exit 0 ;; -+ exit ;; - arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ fi -+ exit ;; -+ avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ cris:Linux:*:*) -+ echo cris-axis-linux-gnu -+ exit ;; -+ crisv32:Linux:*:*) -+ echo crisv32-axis-linux-gnu -+ exit ;; -+ frv:Linux:*:*) -+ echo frv-unknown-linux-gnu -+ exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ m32r*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -825,8 +898,12 @@ - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build -@@ -844,15 +921,22 @@ - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -+ or32:Linux:*:*) -+ echo or32-unknown-linux-gnu -+ exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; -@@ -866,7 +950,10 @@ - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -- exit 0 ;; -+ exit ;; -+ padre:Linux:*:*) -+ echo sparc-unknown-linux-gnu -+ exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -@@ -874,22 +961,31 @@ - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac -- exit 0 ;; -+ exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux -- exit 0 ;; -+ exit ;; -+ sh64*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent -@@ -907,15 +1003,12 @@ - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit 0 ;; -- coff-i386) -- echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit 0 ;; -+ exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit 0 ;; -+ exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build -@@ -932,23 +1025,33 @@ - LIBC=gnulibc1 - # endif - #else -- #ifdef __INTEL_COMPILER -+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif -+ #ifdef __dietlibc__ -+ LIBC=dietlibc -+ #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^LIBC/{ -+ s: ::g -+ p -+ }'`" -+ test x"${LIBC}" != x && { -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ exit -+ } -+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 -- exit 0 ;; -+ exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... -@@ -956,24 +1059,27 @@ - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx -- exit 0 ;; -+ exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop -- exit 0 ;; -+ exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos -- exit 0 ;; -+ exit ;; -+ i*86:syllable:*:*) -+ echo ${UNAME_MACHINE}-pc-syllable -+ exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then -@@ -981,15 +1087,16 @@ - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi -- exit 0 ;; -- i*86:*:5:[78]*) -+ exit ;; -+ i*86:*:5:[678]*) -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi -- exit 0 ;; -+ exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv -- exit 0 ;; -+ exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv -- exit 0 ;; -+ exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix -- exit 0 ;; -- M68*:*:R3V[567]*:*) -- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) -+ exit ;; -+ M68*:*:R3V[5678]*:*) -+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; -+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4 && exit 0 ;; -+ && { echo i486-ncr-sysv4; exit; } ;; -+ NCR*:*:4.2:* | MPRAS*:*:4.2:*) -+ OS_REL='.3' -+ test -r /etc/.relid \ -+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` -+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 -- exit 0 ;; -+ exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` -@@ -1081,78 +1201,84 @@ - else - echo ns32k-sni-sysv - fi -- exit 0 ;; -+ exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 -- exit 0 ;; --#### MozillaHack -- *:*OpenVMS*:*:*) -- case "${UNAME_SYSTEM}" in -- POSIX_for_OpenVMS_AXP) echo alpha-dec-openvmsposix ;; -- POSIX_for_OpenVMS_VAX) echo vax-dec-openvmsposix ;; -- OpenVMS) echo alpha-dec-openvms ;; -- *) echo unknown-dec-openvms ;; -- esac -- exit 0 ;; --#### End MozillaHack -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 -- exit 0 ;; -+ exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 -- exit 0 ;; -+ exit ;; -+ i*86:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo ${UNAME_MACHINE}-stratus-vos -+ exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos -- exit 0 ;; -+ exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 -- exit 0 ;; -+ exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos -- exit 0 ;; -+ exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos -- exit 0 ;; -+ exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos -- exit 0 ;; -+ exit ;; -+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. -+ echo i586-pc-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ SX-7:SUPER-UX:*:*) -+ echo sx7-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8:SUPER-UX:*:*) -+ echo sx8-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8R:SUPER-UX:*:*) -+ echo sx8r-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Darwin:*:*) -- case `uname -p` in -- *86) UNAME_PROCESSOR=i686 ;; -- powerpc) UNAME_PROCESSOR=powerpc ;; -+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -+ case $UNAME_PROCESSOR in -+ unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then -@@ -1160,22 +1286,25 @@ - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:QNX:*:4*) - echo i386-pc-qnx -- exit 0 ;; -- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) -+ exit ;; -+ NSE-?:NONSTOP_KERNEL:*:*) -+ echo nse-tandem-nsk${UNAME_RELEASE} -+ exit ;; -+ NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux -- exit 0 ;; -+ exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv -- exit 0 ;; -+ exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 -@@ -1186,25 +1315,50 @@ - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 -- exit 0 ;; -+ exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 -- exit 0 ;; -+ exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex -- exit 0 ;; -+ exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 -- exit 0 ;; -+ exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 -- exit 0 ;; -+ exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 -- exit 0 ;; -+ exit ;; - *:ITS:*:*) - echo pdp10-unknown-its -- exit 0 ;; -+ exit ;; -+ SEI:*:*:SEIUX) -+ echo mips-sei-seiux${UNAME_RELEASE} -+ exit ;; -+ *:DragonFly:*:*) -+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ exit ;; -+ *:*VMS:*:*) -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ case "${UNAME_MACHINE}" in -+ A*) echo alpha-dec-vms ; exit ;; -+ I*) echo ia64-dec-vms ; exit ;; -+ V*) echo vax-dec-vms ; exit ;; -+ esac ;; -+ *:XENIX:*:SysV) -+ echo i386-pc-xenix -+ exit ;; -+ i*86:skyos:*:*) -+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' -+ exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; -+ i*86:AROS:*:*) -+ echo ${UNAME_MACHINE}-pc-aros -+ exit ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 -@@ -1236,7 +1390,7 @@ - #endif - - #if defined (__arm) && defined (__acorn) && defined (__unix) -- printf ("arm-acorn-riscix"); exit (0); -+ printf ("arm-acorn-riscix\n"); exit (0); - #endif - - #if defined (hp300) && !defined (hpux) -@@ -1325,11 +1479,12 @@ - } - EOF - --$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - - # Apollos put the system type in the environment. - --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } -+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - - # Convex versions that predate uname can use getsysinfo(1) - -@@ -1338,22 +1493,22 @@ - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - c34*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - c38*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - c4*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - esac - fi - -@@ -1364,7 +1519,9 @@ - the operating system you are using. It is advised that you - download the most up to date version of the config scripts from - -- ftp://ftp.gnu.org/pub/gnu/config/ -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -+and -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - - If the version you run ($0) is already up to date, please - send the following data and any information you think might be -Index: build/autoconf/config.sub -=================================================================== ---- build/autoconf/config.sub (revision 15) -+++ build/autoconf/config.sub (working copy) -@@ -1,9 +1,10 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2009-04-17' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -21,14 +22,15 @@ - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, --# Boston, MA 02111-1307, USA. -- -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. -+# - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. - # -@@ -70,8 +72,8 @@ - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -83,11 +85,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -99,7 +101,7 @@ - *local*) - # First pass through any local machine types. - echo $1 -- exit 0;; -+ exit ;; - - * ) - break ;; -@@ -118,7 +120,10 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ kopensolaris*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -@@ -144,7 +149,7 @@ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis) -+ -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; -@@ -169,6 +174,10 @@ - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -185,6 +194,10 @@ - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -224,51 +237,61 @@ - case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. --#### MozillaHack --# mips*el --#### End MozillaHack - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -- | clipper \ -+ | am33_2.0 \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -+ | bfin \ -+ | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | fr30 | frv \ -+ | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ -- | ip2k \ -- | m32r | m68000 | m68k | m88k | mcore \ -- | mips | mipsbe | mipseb | mips*el | mipsle \ -+ | ip2k | iq2000 \ -+ | lm32 \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | mcore | mep | metag \ -+ | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -+ | mips64octeon | mips64octeonel \ -+ | mips64orion | mips64orionel \ -+ | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ -- | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -+ | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ -+ | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -+ | moxie \ -+ | mt \ - | msp430 \ -+ | nios | nios2 \ - | ns16k | ns32k \ -- | openrisc | or32 \ -+ | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | score \ -+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ -- | strongarm \ -- | tahoe | thumb | tic80 | tron \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu | strongarm \ -+ | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ -- | x86 | xscale | xstormy16 | xtensa \ -- | z8k) -+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ -+ | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) -@@ -278,6 +301,9 @@ - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and -@@ -291,64 +317,74 @@ - exit 1 - ;; - # Recognize the basic CPU types with company name. --#### MozillaHack --# mips*el --#### End MozillaHack - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* \ -- | bs2000-* \ -+ | avr-* | avr32-* \ -+ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ -- | clipper-* | cydra-* \ -+ | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ -+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ -- | ip2k-* \ -- | m32r-* \ -+ | ip2k-* | iq2000-* \ -+ | lm32-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | mcore-* \ -- | mips-* | mipsbe-* | mipseb-* | mips*el-* | mipsle-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ -+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ -+ | mips64octeon-* | mips64octeonel-* \ -+ | mips64orion-* | mips64orionel-* \ -+ | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ -- | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -+ | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ -+ | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ -+ | mmix-* \ -+ | mt-* \ - | msp430-* \ -- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ -+ | nios-* | nios2-* \ -+ | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ -+ | sparclite-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ -- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ -- | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ -- | z8k-*) -+ | z8k-* | z80-*) - ;; -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown -+ ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) -@@ -365,6 +401,9 @@ - basic_machine=a29k-amd - os=-udi - ;; -+ abacus) -+ basic_machine=abacus-unknown -+ ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout -@@ -379,6 +418,12 @@ - basic_machine=a29k-none - os=-bsd - ;; -+ amd64) -+ basic_machine=x86_64-pc -+ ;; -+ amd64-*) -+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - amdahl) - basic_machine=580-amdahl - os=-sysv -@@ -402,6 +447,10 @@ - basic_machine=m68k-apollo - os=-bsd - ;; -+ aros) -+ basic_machine=i386-pc -+ os=-aros -+ ;; - aux) - basic_machine=m68k-apple - os=-aux -@@ -410,10 +459,22 @@ - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; -+ cegcc) -+ basic_machine=arm-unknown -+ os=-cegcc -+ ;; - convex-c1) - basic_machine=c1-convex - os=-bsd -@@ -438,12 +499,27 @@ - basic_machine=j90-cray - os=-unicos - ;; -+ craynv) -+ basic_machine=craynv-cray -+ os=-unicosmp -+ ;; -+ cr16) -+ basic_machine=cr16-unknown -+ os=-elf -+ ;; - crds | unos) - basic_machine=m68k-crds - ;; -+ crisv32 | crisv32-* | etraxfs*) -+ basic_machine=crisv32-axis -+ ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; -+ crx) -+ basic_machine=crx-unknown -+ os=-elf -+ ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; -@@ -466,6 +542,14 @@ - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ dicos) -+ basic_machine=i686-pc -+ os=-dicos -+ ;; -+ djgpp) -+ basic_machine=i586-pc -+ os=-msdosdjgpp -+ ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx -@@ -616,6 +700,14 @@ - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; -@@ -631,12 +723,10 @@ - basic_machine=i386-pc - os=-mingw32 - ;; --#### MozillaHack -- i386-msvc | msvc) -- basic_machine=i386-pc -- os=-msvc -+ mingw32ce) -+ basic_machine=arm-unknown -+ os=-mingw32ce - ;; --#### End MozillaHack - miniframe) - basic_machine=m68000-convergent - ;; -@@ -650,10 +740,6 @@ - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; -- mmix*) -- basic_machine=mmix-knuth -- os=-mmixware -- ;; - monitor) - basic_machine=m68k-rom68k - os=-coff -@@ -666,6 +752,9 @@ - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs -@@ -734,10 +823,6 @@ - np1) - basic_machine=np1-gould - ;; -- nv1) -- basic_machine=nv1-cray -- os=-unicosmp -- ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; -@@ -745,10 +830,13 @@ - basic_machine=hppa1.1-oki - os=-proelf - ;; -- or32 | or32-*) -+ openrisc | openrisc-*) - basic_machine=or32-unknown -- os=-coff - ;; -+ os400) -+ basic_machine=powerpc-ibm -+ os=-os400 -+ ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose -@@ -765,6 +853,14 @@ - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; -@@ -774,24 +870,36 @@ - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; -- pentiumii | pentium2) -+ pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; -+ pentium4) -+ basic_machine=i786-pc -+ ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -- pentiumii-* | pentium2-*) -+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -+ pentium4-*) -+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pn) - basic_machine=pn-gould - ;; -@@ -824,6 +932,10 @@ - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff -@@ -850,6 +962,14 @@ - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; -+ sde) -+ basic_machine=mipsisa32-sde -+ os=-elf -+ ;; -+ sei) -+ basic_machine=mips-sei -+ os=-seiux -+ ;; - sequent) - basic_machine=i386-sequent - ;; -@@ -857,6 +977,12 @@ - basic_machine=sh-hitachi - os=-hms - ;; -+ sh5el) -+ basic_machine=sh5le-unknown -+ ;; -+ sh64) -+ basic_machine=sh64-unknown -+ ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks -@@ -931,10 +1057,6 @@ - basic_machine=t90-cray - os=-unicos - ;; -- tic4x | c4x*) -- basic_machine=tic4x-unknown -- os=-coff -- ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff -@@ -947,6 +1069,10 @@ - basic_machine=tic6x-unknown - os=-coff - ;; -+ tile*) -+ basic_machine=tile-unknown -+ os=-linux-gnu -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; -@@ -960,6 +1086,10 @@ - tower | tower-32) - basic_machine=m68k-ncr - ;; -+ tpf) -+ basic_machine=s390x-ibm -+ os=-tpf -+ ;; - udi29k) - basic_machine=a29k-amd - os=-udi -@@ -1003,6 +1133,10 @@ - basic_machine=hppa1.1-winbond - os=-proelf - ;; -+ xbox) -+ basic_machine=i686-pc -+ os=-mingw32 -+ ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; -@@ -1014,6 +1148,10 @@ - basic_machine=z8k-unknown - os=-sim - ;; -+ z80-*-coff) -+ basic_machine=z80-unknown -+ os=-sim -+ ;; - none) - basic_machine=none-none - os=-none -@@ -1033,6 +1171,9 @@ - romp) - basic_machine=romp-ibm - ;; -+ mmix) -+ basic_machine=mmix-knuth -+ ;; - rs6000) - basic_machine=rs6000-ibm - ;; -@@ -1049,13 +1190,10 @@ - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparc | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) -@@ -1121,30 +1259,31 @@ - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. --#### MozillaHack --# msvc --#### End MozillaHack - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ -+ | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ -- | -aos* \ -+ | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ -- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -openbsd* | -solidbsd* \ -+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ -+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ -- | -chorusos* | -chorusrdb* \ -+ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ -- | -msvc* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -- | -powermax* | -dnix*) -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -@@ -1162,12 +1301,15 @@ - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; -+ -linux-dietlibc) -+ os=-linux-dietlibc -+ ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; -@@ -1180,6 +1322,9 @@ - -opened*) - os=-openedition - ;; -+ -os400*) -+ os=-os400 -+ ;; - -wince*) - os=-wince - ;; -@@ -1201,6 +1346,9 @@ - -atheos*) - os=-atheos - ;; -+ -syllable*) -+ os=-syllable -+ ;; - -386bsd) - os=-bsd - ;; -@@ -1223,6 +1371,9 @@ - -sinix*) - os=-sysv4 - ;; -+ -tpf*) -+ os=-tpf -+ ;; - -triton*) - os=-sysv3 - ;; -@@ -1259,6 +1410,12 @@ - -kaos*) - os=-kaos - ;; -+ -zvmoe) -+ os=-zvmoe -+ ;; -+ -dicos*) -+ os=-dicos -+ ;; - -none) - ;; - *) -@@ -1281,6 +1438,12 @@ - # system, and we'll never get to this point. - - case $basic_machine in -+ score-*) -+ os=-elf -+ ;; -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; -@@ -1290,6 +1453,9 @@ - arm*-semi) - os=-aout - ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 -@@ -1315,6 +1481,9 @@ - m68*-cisco) - os=-aout - ;; -+ mep-*) -+ os=-elf -+ ;; - mips*-cisco) - os=-elf - ;; -@@ -1333,9 +1502,15 @@ - *-be) - os=-beos - ;; -+ *-haiku) -+ os=-haiku -+ ;; - *-ibm) - os=-aix - ;; -+ *-knuth) -+ os=-mmixware -+ ;; - *-wec) - os=-proelf - ;; -@@ -1468,9 +1643,15 @@ - -mvs* | -opened*) - vendor=ibm - ;; -+ -os400*) -+ vendor=ibm -+ ;; - -ptx*) - vendor=sequent - ;; -+ -tpf*) -+ vendor=ibm -+ ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; -@@ -1495,7 +1676,7 @@ - esac - - echo $basic_machine$os --exit 0 -+exit - - # Local variables: - # eval: (add-hook 'write-file-hooks 'time-stamp) -Index: directory/c-sdk/config/autoconf/config.guess -=================================================================== ---- directory/c-sdk/config/autoconf/config.guess (revision 15) -+++ directory/c-sdk/config/autoconf/config.guess (working copy) -@@ -1,9 +1,10 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2009-04-27' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -17,13 +18,15 @@ - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Originally written by Per Bothner . - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. -@@ -53,8 +56,8 @@ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -66,11 +69,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -104,8 +107,9 @@ - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; -- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || -+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; - dummy=$tmp/dummy ; - tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -@@ -122,7 +126,7 @@ - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; --esac ;' -+esac ; set_cc_for_build= ;' - - # This is needed to find uname on a Pyramid OSx when run in the BSD universe. - # (ghazi@noc.rutgers.edu 1994-08-24) -@@ -157,6 +161,7 @@ - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; -+ sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched -@@ -195,50 +200,32 @@ - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" -- exit 0 ;; -- amiga:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- arc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- hp300:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mac68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- macppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme68k:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvme88k:OpenBSD:*:*) -- echo m88k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- mvmeppc:OpenBSD:*:*) -- echo powerpc-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- pmax:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sgi:OpenBSD:*:*) -- echo mipseb-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- sun3:OpenBSD:*:*) -- echo m68k-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -- wgrisc:OpenBSD:*:*) -- echo mipsel-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:OpenBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} -- exit 0 ;; -+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -+ exit ;; -+ *:ekkoBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} -+ exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; -+ macppc:MirBSD:*:*) -+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; -+ *:MirBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -+ exit ;; - alpha:OSF1:*:*) -- if test $UNAME_RELEASE = "V4.0"; then -+ case $UNAME_RELEASE in -+ *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` -- fi -+ ;; -+ *5.*) -+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` -+ ;; -+ esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU -@@ -276,39 +263,49 @@ - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac -+ # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. -- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -- exit 0 ;; -+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` -+ exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix -- exit 0 ;; -+ exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 -- exit 0 ;; -+ exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 -- exit 0;; -+ exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos -- exit 0 ;; -+ exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos -- exit 0 ;; -+ exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition -- exit 0 ;; -+ exit ;; -+ *:z/VM:*:*) -+ echo s390-ibm-zvmoe -+ exit ;; -+ *:OS400:*:*) -+ echo powerpc-ibm-os400 -+ exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} -- exit 0;; -+ exit ;; -+ arm:riscos:*:*|arm:RISCOS:*:*) -+ echo arm-unknown-riscos -+ exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp -- exit 0;; -+ exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then -@@ -316,29 +313,48 @@ - else - echo pyramid-pyramid-bsd - fi -- exit 0 ;; -+ exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 -- exit 0 ;; -- DRS?6000:UNIX_SV:4.2*:7*) -+ exit ;; -+ DRS?6000:unix:4.0:6*) -+ echo sparc-icl-nx6 -+ exit ;; -+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in -- sparc) echo sparc-icl-nx7 && exit 0 ;; -+ sparc) echo sparc-icl-nx7; exit ;; - esac ;; -+ s390x:SunOS:*:*) -+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -- i86pc:SunOS:5.*:*) -- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; -+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) -+ eval $set_cc_for_build -+ SUN_ARCH="i386" -+ # If there is a compiler, see if it is configured for 64-bit objects. -+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. -+ # This test works for both compilers. -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ SUN_ARCH="x86_64" -+ fi -+ fi -+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) -@@ -347,10 +363,10 @@ - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` -- exit 0 ;; -+ exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 -@@ -362,10 +378,10 @@ - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac -- exit 0 ;; -+ exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor -@@ -376,37 +392,40 @@ - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ m68k:machten:*:*) -+ echo m68k-apple-machten${UNAME_RELEASE} -+ exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 -- exit 0 ;; -+ exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -430,32 +449,33 @@ - exit (-1); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c \ -- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ -- && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && -+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && -+ SYSTEM_NAME=`$dummy $dummyarg` && -+ { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax -- exit 0 ;; -+ exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax -- exit 0 ;; -+ exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix -- exit 0 ;; -+ exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 -- exit 0 ;; -+ exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 -- exit 0 ;; -+ exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` -@@ -471,29 +491,29 @@ - else - echo i586-dg-dgux${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 -- exit 0 ;; -+ exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 -- exit 0 ;; -+ exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 -- exit 0 ;; -+ exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd -- exit 0 ;; -+ exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` -- exit 0 ;; -+ exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. -- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' -+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id -+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix -- exit 0 ;; -+ exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` -@@ -501,7 +521,7 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build -@@ -516,15 +536,19 @@ - exit(0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -- echo rs6000-ibm-aix3.2.5 -+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` -+ then -+ echo "$SYSTEM_NAME" -+ else -+ echo rs6000-ibm-aix3.2.5 -+ fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi -- exit 0 ;; -- *:AIX:*:[45]) -+ exit ;; -+ *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 -@@ -537,28 +561,28 @@ - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} -- exit 0 ;; -+ exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix -- exit 0 ;; -+ exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 -- exit 0 ;; -+ exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to -- exit 0 ;; # report: romp-ibm BSD 4.3 -+ exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx -- exit 0 ;; -+ exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 -- exit 0 ;; -+ exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd -- exit 0 ;; -+ exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 -- exit 0 ;; -+ exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in -@@ -620,9 +644,19 @@ - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then -- # avoid double evaluation of $set_cc_for_build -- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build -- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null -+ eval $set_cc_for_build -+ -+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating -+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler -+ # generating 64-bit code. GNU and HP use different nomenclature: -+ # -+ # $ CC_FOR_BUILD=cc ./config.guess -+ # => hppa2.0w-hp-hpux11.23 -+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess -+ # => hppa64-hp-hpux11.23 -+ -+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | -+ grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else -@@ -630,11 +664,11 @@ - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} -- exit 0 ;; -+ exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -662,153 +696,192 @@ - exit (0); - } - EOF -- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 -+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 -- exit 0 ;; -+ exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd -- exit 0 ;; -+ exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd -- exit 0 ;; -+ exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix -- exit 0 ;; -+ exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf -- exit 0 ;; -+ exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf -- exit 0 ;; -+ exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi -- exit 0 ;; -+ exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites -- exit 0 ;; -+ exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ exit ;; - *:UNICOS/mp:*:*) -- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -- exit 0 ;; -+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' -+ exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -- exit 0 ;; -+ exit ;; -+ 5000:UNIX_System_V:4.*:*) -+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` -+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` -+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" -+ exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:FreeBSD:*:*) -- # Determine whether the default compiler uses glibc. -- eval $set_cc_for_build -- sed 's/^ //' << EOF >$dummy.c -- #include -- #if __GLIBC__ >= 2 -- LIBC=gnu -- #else -- LIBC= -- #endif --EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} -- exit 0 ;; -+ case ${UNAME_MACHINE} in -+ pc98) -+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ esac -+ exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin -- exit 0 ;; -- i*:MINGW*:*) -+ exit ;; -+ *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 -- exit 0 ;; --#### MozillaHack --# Netscape's hacked uname -- xx:WINNT:* | xx:WIN95:*) -- echo i586-pc-msvc -- exit 0 ;; --### End MozillaHack -+ exit ;; -+ i*:windows32*:*) -+ # uname -m includes "-pc" on this system. -+ echo ${UNAME_MACHINE}-mingw32 -+ exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 -- exit 0 ;; -- x86:Interix*:3*) -- echo i586-pc-interix3 -- exit 0 ;; -+ exit ;; -+ *:Interix*:[3456]*) -+ case ${UNAME_MACHINE} in -+ x86) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ EM64T | authenticamd | genuineintel) -+ echo x86_64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks -- exit 0 ;; -+ exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix -- exit 0 ;; -+ exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin -- exit 0 ;; -+ exit ;; -+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) -+ echo x86_64-unknown-cygwin -+ exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin -- exit 0 ;; -+ exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -- exit 0 ;; -+ exit ;; - *:GNU:*:*) -+ # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` -- exit 0 ;; -+ exit ;; -+ *:GNU/*:*:*) -+ # other systems with GNU libc and userland -+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu -+ exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix -- exit 0 ;; -+ exit ;; - arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ fi -+ exit ;; -+ avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ cris:Linux:*:*) -+ echo cris-axis-linux-gnu -+ exit ;; -+ crisv32:Linux:*:*) -+ echo crisv32-axis-linux-gnu -+ exit ;; -+ frv:Linux:*:*) -+ echo frv-unknown-linux-gnu -+ exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ m32r*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -@@ -825,8 +898,12 @@ - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build -@@ -844,15 +921,22 @@ - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" -+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; -+ or32:Linux:*:*) -+ echo or32-unknown-linux-gnu -+ exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; -@@ -866,7 +950,10 @@ - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} -- exit 0 ;; -+ exit ;; -+ padre:Linux:*:*) -+ echo sparc-unknown-linux-gnu -+ exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -@@ -874,22 +961,31 @@ - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac -- exit 0 ;; -+ exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux -- exit 0 ;; -+ exit ;; -+ sh64*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu -- exit 0 ;; -+ exit ;; -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent -@@ -907,15 +1003,12 @@ - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" -- exit 0 ;; -- coff-i386) -- echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit 0 ;; -+ exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" -- exit 0 ;; -+ exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build -@@ -932,23 +1025,33 @@ - LIBC=gnulibc1 - # endif - #else -- #ifdef __INTEL_COMPILER -+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif -+ #ifdef __dietlibc__ -+ LIBC=dietlibc -+ #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 -- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^LIBC/{ -+ s: ::g -+ p -+ }'`" -+ test x"${LIBC}" != x && { -+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" -+ exit -+ } -+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 -- exit 0 ;; -+ exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... -@@ -956,24 +1059,27 @@ - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx -- exit 0 ;; -+ exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop -- exit 0 ;; -+ exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos -- exit 0 ;; -+ exit ;; -+ i*86:syllable:*:*) -+ echo ${UNAME_MACHINE}-pc-syllable -+ exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp -- exit 0 ;; -+ exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then -@@ -981,15 +1087,16 @@ - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi -- exit 0 ;; -- i*86:*:5:[78]*) -+ exit ;; -+ i*86:*:5:[678]*) -+ # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} -- exit 0 ;; -+ exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi -- exit 0 ;; -+ exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv -- exit 0 ;; -+ exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv -- exit 0 ;; -+ exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix -- exit 0 ;; -- M68*:*:R3V[567]*:*) -- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; -- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) -+ exit ;; -+ M68*:*:R3V[5678]*:*) -+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; -+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4.3${OS_REL} && exit 0 -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -- && echo i486-ncr-sysv4 && exit 0 ;; -+ && { echo i486-ncr-sysv4; exit; } ;; -+ NCR*:*:4.2:* | MPRAS*:*:4.2:*) -+ OS_REL='.3' -+ test -r /etc/.relid \ -+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` -+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 -- exit 0 ;; -+ exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 -- exit 0 ;; -+ exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` -@@ -1081,78 +1201,84 @@ - else - echo ns32k-sni-sysv - fi -- exit 0 ;; -+ exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 -- exit 0 ;; --#### MozillaHack -- *:*OpenVMS*:*:*) -- case "${UNAME_SYSTEM}" in -- POSIX_for_OpenVMS_AXP) echo alpha-dec-openvmsposix ;; -- POSIX_for_OpenVMS_VAX) echo vax-dec-openvmsposix ;; -- OpenVMS) echo alpha-dec-openvms ;; -- *) echo unknown-dec-openvms ;; -- esac -- exit 0 ;; --#### End MozillaHack -+ exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 -- exit 0 ;; -+ exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 -- exit 0 ;; -+ exit ;; -+ i*86:VOS:*:*) -+ # From Paul.Green@stratus.com. -+ echo ${UNAME_MACHINE}-stratus-vos -+ exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos -- exit 0 ;; -+ exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 -- exit 0 ;; -+ exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi -- exit 0 ;; -+ exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos -- exit 0 ;; -+ exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos -- exit 0 ;; -+ exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos -- exit 0 ;; -+ exit ;; -+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. -+ echo i586-pc-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; -+ SX-7:SUPER-UX:*:*) -+ echo sx7-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8:SUPER-UX:*:*) -+ echo sx8-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8R:SUPER-UX:*:*) -+ echo sx8r-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Darwin:*:*) -- case `uname -p` in -- *86) UNAME_PROCESSOR=i686 ;; -- powerpc) UNAME_PROCESSOR=powerpc ;; -+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown -+ case $UNAME_PROCESSOR in -+ unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then -@@ -1160,22 +1286,25 @@ - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:QNX:*:4*) - echo i386-pc-qnx -- exit 0 ;; -- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) -+ exit ;; -+ NSE-?:NONSTOP_KERNEL:*:*) -+ echo nse-tandem-nsk${UNAME_RELEASE} -+ exit ;; -+ NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux -- exit 0 ;; -+ exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv -- exit 0 ;; -+ exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} -- exit 0 ;; -+ exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 -@@ -1186,25 +1315,50 @@ - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 -- exit 0 ;; -+ exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 -- exit 0 ;; -+ exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex -- exit 0 ;; -+ exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 -- exit 0 ;; -+ exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 -- exit 0 ;; -+ exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 -- exit 0 ;; -+ exit ;; - *:ITS:*:*) - echo pdp10-unknown-its -- exit 0 ;; -+ exit ;; -+ SEI:*:*:SEIUX) -+ echo mips-sei-seiux${UNAME_RELEASE} -+ exit ;; -+ *:DragonFly:*:*) -+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ exit ;; -+ *:*VMS:*:*) -+ UNAME_MACHINE=`(uname -p) 2>/dev/null` -+ case "${UNAME_MACHINE}" in -+ A*) echo alpha-dec-vms ; exit ;; -+ I*) echo ia64-dec-vms ; exit ;; -+ V*) echo vax-dec-vms ; exit ;; -+ esac ;; -+ *:XENIX:*:SysV) -+ echo i386-pc-xenix -+ exit ;; -+ i*86:skyos:*:*) -+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' -+ exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; -+ i*86:AROS:*:*) -+ echo ${UNAME_MACHINE}-pc-aros -+ exit ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 -@@ -1236,7 +1390,7 @@ - #endif - - #if defined (__arm) && defined (__acorn) && defined (__unix) -- printf ("arm-acorn-riscix"); exit (0); -+ printf ("arm-acorn-riscix\n"); exit (0); - #endif - - #if defined (hp300) && !defined (hpux) -@@ -1325,11 +1479,12 @@ - } - EOF - --$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 -+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && -+ { echo "$SYSTEM_NAME"; exit; } - - # Apollos put the system type in the environment. - --test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } -+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - - # Convex versions that predate uname can use getsysinfo(1) - -@@ -1338,22 +1493,22 @@ - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd -- exit 0 ;; -+ exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi -- exit 0 ;; -+ exit ;; - c34*) - echo c34-convex-bsd -- exit 0 ;; -+ exit ;; - c38*) - echo c38-convex-bsd -- exit 0 ;; -+ exit ;; - c4*) - echo c4-convex-bsd -- exit 0 ;; -+ exit ;; - esac - fi - -@@ -1364,7 +1519,9 @@ - the operating system you are using. It is advised that you - download the most up to date version of the config scripts from - -- ftp://ftp.gnu.org/pub/gnu/config/ -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -+and -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - - If the version you run ($0) is already up to date, please - send the following data and any information you think might be -Index: directory/c-sdk/config/autoconf/config.sub -=================================================================== ---- directory/c-sdk/config/autoconf/config.sub (revision 15) -+++ directory/c-sdk/config/autoconf/config.sub (working copy) -@@ -1,9 +1,10 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2003-02-22' -+timestamp='2009-04-17' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -21,14 +22,15 @@ - # - # You should have received a copy of the GNU General Public License - # along with this program; if not, write to the Free Software --# Foundation, Inc., 59 Temple Place - Suite 330, --# Boston, MA 02111-1307, USA. -- -+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -+# 02110-1301, USA. -+# - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a - # configuration script generated by Autoconf, you may include it under - # the same distribution terms that you use for the rest of that program. - -+ - # Please send patches to . Submit a context - # diff and a properly formatted ChangeLog entry. - # -@@ -70,8 +72,8 @@ - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -83,11 +85,11 @@ - while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) -- echo "$timestamp" ; exit 0 ;; -+ echo "$timestamp" ; exit ;; - --version | -v ) -- echo "$version" ; exit 0 ;; -+ echo "$version" ; exit ;; - --help | --h* | -h ) -- echo "$usage"; exit 0 ;; -+ echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. -@@ -99,7 +101,7 @@ - *local*) - # First pass through any local machine types. - echo $1 -- exit 0;; -+ exit ;; - - * ) - break ;; -@@ -118,7 +120,10 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ kopensolaris*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -@@ -144,7 +149,7 @@ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis) -+ -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; -@@ -169,6 +174,10 @@ - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -185,6 +194,10 @@ - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -224,51 +237,61 @@ - case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. --#### MozillaHack --# mips*el --#### End MozillaHack - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -- | clipper \ -+ | am33_2.0 \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ -+ | bfin \ -+ | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | fr30 | frv \ -+ | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ -- | ip2k \ -- | m32r | m68000 | m68k | m88k | mcore \ -- | mips | mipsbe | mipseb | mips*el | mipsle \ -+ | ip2k | iq2000 \ -+ | lm32 \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | mcore | mep | metag \ -+ | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -+ | mips64octeon | mips64octeonel \ -+ | mips64orion | mips64orionel \ -+ | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ -- | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -+ | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ -+ | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -+ | moxie \ -+ | mt \ - | msp430 \ -+ | nios | nios2 \ - | ns16k | ns32k \ -- | openrisc | or32 \ -+ | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | score \ -+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ -- | strongarm \ -- | tahoe | thumb | tic80 | tron \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu | strongarm \ -+ | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ -- | x86 | xscale | xstormy16 | xtensa \ -- | z8k) -+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ -+ | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) -@@ -278,6 +301,9 @@ - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and -@@ -291,64 +317,74 @@ - exit 1 - ;; - # Recognize the basic CPU types with company name. --#### MozillaHack --# mips*el --#### End MozillaHack - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* \ -- | bs2000-* \ -+ | avr-* | avr32-* \ -+ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ -- | clipper-* | cydra-* \ -+ | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ -+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ -- | ip2k-* \ -- | m32r-* \ -+ | ip2k-* | iq2000-* \ -+ | lm32-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | mcore-* \ -- | mips-* | mipsbe-* | mipseb-* | mips*el-* | mipsle-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ -+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ -+ | mips64octeon-* | mips64octeonel-* \ -+ | mips64orion-* | mips64orionel-* \ -+ | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ -- | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -+ | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ -+ | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ -+ | mmix-* \ -+ | mt-* \ - | msp430-* \ -- | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ -+ | nios-* | nios2-* \ -+ | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ -- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ -+ | sparclite-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ -- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ -- | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ -- | z8k-*) -+ | z8k-* | z80-*) - ;; -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown -+ ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) -@@ -365,6 +401,9 @@ - basic_machine=a29k-amd - os=-udi - ;; -+ abacus) -+ basic_machine=abacus-unknown -+ ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout -@@ -379,6 +418,12 @@ - basic_machine=a29k-none - os=-bsd - ;; -+ amd64) -+ basic_machine=x86_64-pc -+ ;; -+ amd64-*) -+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - amdahl) - basic_machine=580-amdahl - os=-sysv -@@ -402,6 +447,10 @@ - basic_machine=m68k-apollo - os=-bsd - ;; -+ aros) -+ basic_machine=i386-pc -+ os=-aros -+ ;; - aux) - basic_machine=m68k-apple - os=-aux -@@ -410,10 +459,22 @@ - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; -+ cegcc) -+ basic_machine=arm-unknown -+ os=-cegcc -+ ;; - convex-c1) - basic_machine=c1-convex - os=-bsd -@@ -438,12 +499,27 @@ - basic_machine=j90-cray - os=-unicos - ;; -+ craynv) -+ basic_machine=craynv-cray -+ os=-unicosmp -+ ;; -+ cr16) -+ basic_machine=cr16-unknown -+ os=-elf -+ ;; - crds | unos) - basic_machine=m68k-crds - ;; -+ crisv32 | crisv32-* | etraxfs*) -+ basic_machine=crisv32-axis -+ ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; -+ crx) -+ basic_machine=crx-unknown -+ os=-elf -+ ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; -@@ -466,6 +542,14 @@ - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ dicos) -+ basic_machine=i686-pc -+ os=-dicos -+ ;; -+ djgpp) -+ basic_machine=i586-pc -+ os=-msdosdjgpp -+ ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx -@@ -616,6 +700,14 @@ - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; -@@ -631,12 +723,10 @@ - basic_machine=i386-pc - os=-mingw32 - ;; --#### MozillaHack -- i386-msvc | msvc) -- basic_machine=i386-pc -- os=-msvc -+ mingw32ce) -+ basic_machine=arm-unknown -+ os=-mingw32ce - ;; --#### End MozillaHack - miniframe) - basic_machine=m68000-convergent - ;; -@@ -650,10 +740,6 @@ - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; -- mmix*) -- basic_machine=mmix-knuth -- os=-mmixware -- ;; - monitor) - basic_machine=m68k-rom68k - os=-coff -@@ -666,6 +752,9 @@ - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs -@@ -734,10 +823,6 @@ - np1) - basic_machine=np1-gould - ;; -- nv1) -- basic_machine=nv1-cray -- os=-unicosmp -- ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; -@@ -745,10 +830,13 @@ - basic_machine=hppa1.1-oki - os=-proelf - ;; -- or32 | or32-*) -+ openrisc | openrisc-*) - basic_machine=or32-unknown -- os=-coff - ;; -+ os400) -+ basic_machine=powerpc-ibm -+ os=-os400 -+ ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose -@@ -765,6 +853,14 @@ - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; -@@ -774,24 +870,36 @@ - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; -- pentiumii | pentium2) -+ pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; -+ pentium4) -+ basic_machine=i786-pc -+ ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -- pentiumii-* | pentium2-*) -+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; -+ pentium4-*) -+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pn) - basic_machine=pn-gould - ;; -@@ -824,6 +932,10 @@ - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff -@@ -850,6 +962,14 @@ - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; -+ sde) -+ basic_machine=mipsisa32-sde -+ os=-elf -+ ;; -+ sei) -+ basic_machine=mips-sei -+ os=-seiux -+ ;; - sequent) - basic_machine=i386-sequent - ;; -@@ -857,6 +977,12 @@ - basic_machine=sh-hitachi - os=-hms - ;; -+ sh5el) -+ basic_machine=sh5le-unknown -+ ;; -+ sh64) -+ basic_machine=sh64-unknown -+ ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks -@@ -931,10 +1057,6 @@ - basic_machine=t90-cray - os=-unicos - ;; -- tic4x | c4x*) -- basic_machine=tic4x-unknown -- os=-coff -- ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff -@@ -947,6 +1069,10 @@ - basic_machine=tic6x-unknown - os=-coff - ;; -+ tile*) -+ basic_machine=tile-unknown -+ os=-linux-gnu -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; -@@ -960,6 +1086,10 @@ - tower | tower-32) - basic_machine=m68k-ncr - ;; -+ tpf) -+ basic_machine=s390x-ibm -+ os=-tpf -+ ;; - udi29k) - basic_machine=a29k-amd - os=-udi -@@ -1003,6 +1133,10 @@ - basic_machine=hppa1.1-winbond - os=-proelf - ;; -+ xbox) -+ basic_machine=i686-pc -+ os=-mingw32 -+ ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; -@@ -1014,6 +1148,10 @@ - basic_machine=z8k-unknown - os=-sim - ;; -+ z80-*-coff) -+ basic_machine=z80-unknown -+ os=-sim -+ ;; - none) - basic_machine=none-none - os=-none -@@ -1033,6 +1171,9 @@ - romp) - basic_machine=romp-ibm - ;; -+ mmix) -+ basic_machine=mmix-knuth -+ ;; - rs6000) - basic_machine=rs6000-ibm - ;; -@@ -1049,13 +1190,10 @@ - we32k) - basic_machine=we32k-att - ;; -- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sh64) -- basic_machine=sh64-unknown -- ;; -- sparc | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) -@@ -1121,30 +1259,31 @@ - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. --#### MozillaHack --# msvc --#### End MozillaHack - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ -+ | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ -- | -aos* \ -+ | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ -- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -openbsd* | -solidbsd* \ -+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ -+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ -- | -chorusos* | -chorusrdb* \ -+ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ -- | -msvc* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ -- | -powermax* | -dnix*) -+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -@@ -1162,12 +1301,15 @@ - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ -- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ -+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; -+ -linux-dietlibc) -+ os=-linux-dietlibc -+ ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; -@@ -1180,6 +1322,9 @@ - -opened*) - os=-openedition - ;; -+ -os400*) -+ os=-os400 -+ ;; - -wince*) - os=-wince - ;; -@@ -1201,6 +1346,9 @@ - -atheos*) - os=-atheos - ;; -+ -syllable*) -+ os=-syllable -+ ;; - -386bsd) - os=-bsd - ;; -@@ -1223,6 +1371,9 @@ - -sinix*) - os=-sysv4 - ;; -+ -tpf*) -+ os=-tpf -+ ;; - -triton*) - os=-sysv3 - ;; -@@ -1259,6 +1410,12 @@ - -kaos*) - os=-kaos - ;; -+ -zvmoe) -+ os=-zvmoe -+ ;; -+ -dicos*) -+ os=-dicos -+ ;; - -none) - ;; - *) -@@ -1281,6 +1438,12 @@ - # system, and we'll never get to this point. - - case $basic_machine in -+ score-*) -+ os=-elf -+ ;; -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; -@@ -1290,6 +1453,9 @@ - arm*-semi) - os=-aout - ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 -@@ -1315,6 +1481,9 @@ - m68*-cisco) - os=-aout - ;; -+ mep-*) -+ os=-elf -+ ;; - mips*-cisco) - os=-elf - ;; -@@ -1333,9 +1502,15 @@ - *-be) - os=-beos - ;; -+ *-haiku) -+ os=-haiku -+ ;; - *-ibm) - os=-aix - ;; -+ *-knuth) -+ os=-mmixware -+ ;; - *-wec) - os=-proelf - ;; -@@ -1468,9 +1643,15 @@ - -mvs* | -opened*) - vendor=ibm - ;; -+ -os400*) -+ vendor=ibm -+ ;; - -ptx*) - vendor=sequent - ;; -+ -tpf*) -+ vendor=ibm -+ ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; -@@ -1495,7 +1676,7 @@ - esac - - echo $basic_machine$os --exit 0 -+exit - - # Local variables: - # eval: (add-hook 'write-file-hooks 'time-stamp) -Index: nsprpub/build/autoconf/config.guess -=================================================================== ---- nsprpub/build/autoconf/config.guess (revision 15) -+++ nsprpub/build/autoconf/config.guess (working copy) -@@ -1,9 +1,10 @@ - #! /bin/sh - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2005-10-13' -+timestamp='2009-04-27' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -55,8 +56,8 @@ - GNU config.guess ($timestamp) - - Originally written by Per Bothner. --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -106,7 +107,7 @@ - trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; - trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; - : ${TMPDIR=/tmp} ; -- { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || -+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -@@ -160,6 +161,7 @@ - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; -+ sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched -@@ -206,8 +208,11 @@ - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; -+ *:SolidBSD:*:*) -+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} -+ exit ;; - macppc:MirBSD:*:*) -- echo powerppc-unknown-mirbsd${UNAME_RELEASE} -+ echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} -@@ -319,14 +324,30 @@ - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; -+ s390x:SunOS:*:*) -+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; -- i86pc:SunOS:5.*:*) -- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` -+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) -+ eval $set_cc_for_build -+ SUN_ARCH="i386" -+ # If there is a compiler, see if it is configured for 64-bit objects. -+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. -+ # This test works for both compilers. -+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then -+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ -+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ -+ grep IS_64BIT_ARCH >/dev/null -+ then -+ SUN_ARCH="x86_64" -+ fi -+ fi -+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize -@@ -527,7 +548,7 @@ - echo rs6000-ibm-aix3.2 - fi - exit ;; -- *:AIX:*:[45]) -+ *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 -@@ -764,20 +785,21 @@ - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) -- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` -+ case ${UNAME_MACHINE} in -+ pc98) -+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ amd64) -+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ *) -+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; -+ esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; -- i*:MINGW*:*) -+ *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; --#### MozillaHack --# Netscape's hacked uname -- xx:WINNT:* | xx:WIN95:*) -- echo i586-pc-msvc -- exit ;; --### End MozillaHack - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 -@@ -785,9 +807,18 @@ - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; -- x86:Interix*:[34]*) -- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' -- exit ;; -+ *:Interix*:[3456]*) -+ case ${UNAME_MACHINE} in -+ x86) -+ echo i586-pc-interix${UNAME_RELEASE} -+ exit ;; -+ EM64T | authenticamd | genuineintel) -+ echo x86_64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ IA64) -+ echo ia64-unknown-interix${UNAME_RELEASE} -+ exit ;; -+ esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; -@@ -821,6 +852,16 @@ - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) -+ eval $set_cc_for_build -+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ -+ | grep -q __ARM_EABI__ -+ then -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ else -+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi -+ fi -+ exit ;; -+ avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) -@@ -857,7 +898,11 @@ - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) -@@ -876,7 +921,11 @@ - #endif - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^CPU/{ -+ s: ::g -+ p -+ }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) -@@ -902,6 +951,9 @@ - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; -+ padre:Linux:*:*) -+ echo sparc-unknown-linux-gnu -+ exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in -@@ -925,9 +977,15 @@ - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; -+ vax:Linux:*:*) -+ echo ${UNAME_MACHINE}-dec-linux-gnu -+ exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; -+ xtensa*:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent -@@ -946,9 +1004,6 @@ - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; -- coff-i386) -- echo "${UNAME_MACHINE}-pc-linux-gnucoff" -- exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. -@@ -970,7 +1025,7 @@ - LIBC=gnulibc1 - # endif - #else -- #ifdef __INTEL_COMPILER -+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout -@@ -980,7 +1035,11 @@ - LIBC=dietlibc - #endif - EOF -- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` -+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' -+ /^LIBC/{ -+ s: ::g -+ p -+ }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit -@@ -1059,8 +1118,11 @@ - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about -- # the processor, so we play safe by assuming i386. -- echo i386-pc-msdosdjgpp -+ # the processor, so we play safe by assuming i586. -+ # Note: whatever this is, it MUST be the same as what config.sub -+ # prints for the "djgpp" host, or else GDB configury will decide that -+ # this is a cross-build. -+ echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 -@@ -1098,6 +1160,16 @@ - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; -+ NCR*:*:4.2:* | MPRAS*:*:4.2:*) -+ OS_REL='.3' -+ test -r /etc/.relid \ -+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` -+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ -+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } -+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ -+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; -@@ -1134,16 +1206,6 @@ - # says - echo i586-unisys-sysv4 - exit ;; --#### MozillaHack -- *:*OpenVMS*:*:*) -- case "${UNAME_SYSTEM}" in -- POSIX_for_OpenVMS_AXP) echo alpha-dec-openvmsposix ;; -- POSIX_for_OpenVMS_VAX) echo vax-dec-openvmsposix ;; -- OpenVMS) echo alpha-dec-openvms ;; -- *) echo unknown-dec-openvms ;; -- esac -- exit ;; --#### End MozillaHack - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm -@@ -1183,6 +1245,9 @@ - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; -+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. -+ echo i586-pc-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; -@@ -1192,6 +1257,15 @@ - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; -+ SX-7:SUPER-UX:*:*) -+ echo sx7-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8:SUPER-UX:*:*) -+ echo sx8-nec-superux${UNAME_RELEASE} -+ exit ;; -+ SX-8R:SUPER-UX:*:*) -+ echo sx8r-nec-superux${UNAME_RELEASE} -+ exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; -@@ -1279,6 +1353,12 @@ - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; -+ i*86:rdos:*:*) -+ echo ${UNAME_MACHINE}-pc-rdos -+ exit ;; -+ i*86:AROS:*:*) -+ echo ${UNAME_MACHINE}-pc-aros -+ exit ;; - esac - - #echo '(No uname command or uname output not recognized.)' 1>&2 -@@ -1439,9 +1519,9 @@ - the operating system you are using. It is advised that you - download the most up to date version of the config scripts from - -- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD - and -- http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub -+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - - If the version you run ($0) is already up to date, please - send the following data and any information you think might be -Index: nsprpub/build/autoconf/config.sub -=================================================================== ---- nsprpub/build/autoconf/config.sub (revision 15) -+++ nsprpub/build/autoconf/config.sub (working copy) -@@ -1,9 +1,10 @@ - #! /bin/sh - # Configuration validation subroutine script. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, --# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -+# Free Software Foundation, Inc. - --timestamp='2005-10-13' -+timestamp='2009-04-17' - - # This file is (in principle) common to ALL GNU software. - # The presence of a machine in this file suggests that SOME GNU software -@@ -71,8 +72,8 @@ - version="\ - GNU config.sub ($timestamp) - --Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 --Free Software Foundation, Inc. -+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -119,8 +120,10 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ -- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ -+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ -+ kopensolaris*-gnu* | \ -+ storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -@@ -171,6 +174,10 @@ - -hiux*) - os=-hiuxwe2 - ;; -+ -sco6) -+ os=-sco5v6 -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -187,6 +194,10 @@ - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -sco5v6*) -+ # Don't forget version if it is 3.2v4 or newer. -+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -+ ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` -@@ -226,28 +237,29 @@ - case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. --#### MozillaHack --# mips*el --#### End MozillaHack - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ -- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ -+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ -- | fr30 | frv \ -+ | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ -- | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ -- | mips | mipsbe | mipseb | mips*el | mipsle \ -+ | lm32 \ -+ | m32c | m32r | m32rle | m68000 | m68k | m88k \ -+ | maxq | mb | microblaze | mcore | mep | metag \ -+ | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -+ | mips64octeon | mips64octeonel \ -+ | mips64orion | mips64orionel \ -+ | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ -- | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ -@@ -260,28 +272,28 @@ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ -- | ms1 \ -+ | moxie \ -+ | mt \ - | msp430 \ -+ | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ -- | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ -+ | score \ -+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ -- | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ -- | sparcv8 | sparcv9 | sparcv9b \ -- | strongarm \ -+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ -+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ -+ | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ -- | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ -- | z8k) -+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ -+ | z8k | z80) - basic_machine=$basic_machine-unknown - ;; -- m32c) -- basic_machine=$basic_machine-unknown -- ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown -@@ -289,6 +301,9 @@ - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; -+ ms1) -+ basic_machine=mt-unknown -+ ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and -@@ -302,34 +317,34 @@ - exit 1 - ;; - # Recognize the basic CPU types with company name. --#### MozillaHack --# mips*el --#### End MozillaHack - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ -- | avr-* \ -+ | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ -- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ -+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ -- | m32r-* | m32rle-* \ -+ | lm32-* \ -+ | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | maxq-* | mcore-* \ -- | mips-* | mipsbe-* | mipseb-* | mips*el-* | mipsle-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ -+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ -+ | mips64octeon-* | mips64octeonel-* \ -+ | mips64orion-* | mips64orionel-* \ -+ | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ -- | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ -@@ -342,30 +357,33 @@ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ -- | ms1-* \ -+ | mt-* \ - | msp430-* \ -+ | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ -- | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ -+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ -- | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ -+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ -- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ -+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ -- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ -+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ -- | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ -- | xstormy16-* | xtensa-* \ -+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ -+ | xstormy16-* | xtensa*-* \ - | ymp-* \ -- | z8k-*) -+ | z8k-* | z80-*) - ;; -- m32c-*) -+ # Recognize the basic CPU types without company name, with glob match. -+ xtensa*) -+ basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. -@@ -429,6 +447,10 @@ - basic_machine=m68k-apollo - os=-bsd - ;; -+ aros) -+ basic_machine=i386-pc -+ os=-aros -+ ;; - aux) - basic_machine=m68k-apple - os=-aux -@@ -437,10 +459,22 @@ - basic_machine=ns32k-sequent - os=-dynix - ;; -+ blackfin) -+ basic_machine=bfin-unknown -+ os=-linux -+ ;; -+ blackfin-*) -+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; -+ cegcc) -+ basic_machine=arm-unknown -+ os=-cegcc -+ ;; - convex-c1) - basic_machine=c1-convex - os=-bsd -@@ -469,8 +503,8 @@ - basic_machine=craynv-cray - os=-unicosmp - ;; -- cr16c) -- basic_machine=cr16c-unknown -+ cr16) -+ basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) -@@ -508,6 +542,10 @@ - basic_machine=m88k-motorola - os=-sysv3 - ;; -+ dicos) -+ basic_machine=i686-pc -+ os=-dicos -+ ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp -@@ -662,6 +700,14 @@ - basic_machine=m68k-isi - os=-sysv - ;; -+ m68knommu) -+ basic_machine=m68k-unknown -+ os=-linux -+ ;; -+ m68knommu-*) -+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - m88k-omron*) - basic_machine=m88k-omron - ;; -@@ -677,12 +723,10 @@ - basic_machine=i386-pc - os=-mingw32 - ;; --#### MozillaHack -- i386-msvc | msvc) -- basic_machine=i386-pc -- os=-msvc -+ mingw32ce) -+ basic_machine=arm-unknown -+ os=-mingw32ce - ;; --#### End MozillaHack - miniframe) - basic_machine=m68000-convergent - ;; -@@ -708,6 +752,9 @@ - basic_machine=i386-pc - os=-msdos - ;; -+ ms1-*) -+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` -+ ;; - mvs) - basic_machine=i370-ibm - os=-mvs -@@ -806,6 +853,14 @@ - basic_machine=i860-intel - os=-osf - ;; -+ parisc) -+ basic_machine=hppa-unknown -+ os=-linux -+ ;; -+ parisc-*) -+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` -+ os=-linux -+ ;; - pbd) - basic_machine=sparc-tti - ;; -@@ -815,6 +870,12 @@ - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; -+ pc98) -+ basic_machine=i386-pc -+ ;; -+ pc98-*) -+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` -+ ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; -@@ -871,6 +932,10 @@ - basic_machine=i586-unknown - os=-pw32 - ;; -+ rdos) -+ basic_machine=i386-pc -+ os=-rdos -+ ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff -@@ -897,6 +962,10 @@ - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; -+ sde) -+ basic_machine=mipsisa32-sde -+ os=-elf -+ ;; - sei) - basic_machine=mips-sei - os=-seiux -@@ -908,6 +977,9 @@ - basic_machine=sh-hitachi - os=-hms - ;; -+ sh5el) -+ basic_machine=sh5le-unknown -+ ;; - sh64) - basic_machine=sh64-unknown - ;; -@@ -997,6 +1069,10 @@ - basic_machine=tic6x-unknown - os=-coff - ;; -+ tile*) -+ basic_machine=tile-unknown -+ os=-linux-gnu -+ ;; - tx39) - basic_machine=mipstx39-unknown - ;; -@@ -1072,6 +1148,10 @@ - basic_machine=z8k-unknown - os=-sim - ;; -+ z80-*-coff) -+ basic_machine=z80-unknown -+ os=-sim -+ ;; - none) - basic_machine=none-none - os=-none -@@ -1110,10 +1190,10 @@ - we32k) - basic_machine=we32k-att - ;; -- sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) -+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; -- sparc | sparcv8 | sparcv9 | sparcv9b) -+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) -@@ -1179,32 +1259,31 @@ - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. --#### MozillaHack --# msvc --#### End MozillaHack - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ -+ | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ -- | -aos* \ -+ | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ -- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ -+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -+ | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ -- | -chorusos* | -chorusrdb* \ -+ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ -- | -msvc* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ -- | -skyos* | -haiku*) -+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) -@@ -1334,6 +1413,9 @@ - -zvmoe) - os=-zvmoe - ;; -+ -dicos*) -+ os=-dicos -+ ;; - -none) - ;; - *) -@@ -1356,6 +1438,12 @@ - # system, and we'll never get to this point. - - case $basic_machine in -+ score-*) -+ os=-elf -+ ;; -+ spu-*) -+ os=-elf -+ ;; - *-acorn) - os=-riscix1.2 - ;; -@@ -1365,9 +1453,9 @@ - arm*-semi) - os=-aout - ;; -- c4x-* | tic4x-*) -- os=-coff -- ;; -+ c4x-* | tic4x-*) -+ os=-coff -+ ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 -@@ -1393,6 +1481,9 @@ - m68*-cisco) - os=-aout - ;; -+ mep-*) -+ os=-elf -+ ;; - mips*-cisco) - os=-elf - ;; diff --git a/www-client/mozilla_firefox/patches/2009-09-27/r02-configure-in-withGCC4andCrossCompile.patch b/www-client/mozilla_firefox/patches/2009-09-27/r02-configure-in-withGCC4andCrossCompile.patch deleted file mode 100644 index 9830771ab..000000000 --- a/www-client/mozilla_firefox/patches/2009-09-27/r02-configure-in-withGCC4andCrossCompile.patch +++ /dev/null @@ -1,362 +0,0 @@ -Index: configure.in -=================================================================== ---- configure.in (revision 7) -+++ configure.in (working copy) -@@ -880,11 +880,17 @@ - OS_RELEASE= - OS_TEST="${target_cpu}" - case "${target_os}" in -- linux*) OS_ARCH=Linux ;; -- solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;; -- mingw*) OS_ARCH=WINNT ;; -- wince*) OS_ARCH=WINCE ;; -- darwin*) OS_ARCH=Darwin OS_TARGET=Darwin ;; -+ linux*) OS_ARCH=Linux ;; -+ solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;; -+ mingw*) OS_ARCH=WINNT ;; -+ wince*) OS_ARCH=WINCE ;; -+ darwin*) OS_ARCH=Darwin OS_TARGET=Darwin ;; -+ beos* | haiku*) OS_ARCH=BeOS OS_TARGET=BeOS ;; -+dnl ------------------------------------------------------- -+dnl Cross-compiling-haiku - This should probably be -+dnl beos*) OS_ARCH=BeOS OS_TARGET=BeOS ;; -+dnl haiku*) OS_ARCH=Haiku OS_TARGET=Haiku ;; -+dnl ------------------------------------------------------- - esac - else - OS_TARGET=`uname -s` -@@ -1002,6 +1008,14 @@ - UnixWare) - HOST_OS_ARCH=UNIXWARE - ;; -+beos* | haiku*) -+ HOST_OS_ARCH=BeOS -+ ;; -+dnl ------------------------------------------------------- -+dnl This should probably be -+dnl beos*) HOST_OS_ARCH=BeOS ;; -+dnl haiku*) HOST_OS_ARCH=Haiku ;; -+dnl ------------------------------------------------------- - esac - - case "$OS_ARCH" in -@@ -1338,7 +1352,7 @@ - dnl System overrides of the defaults for host - dnl ======================================================== - case "$host" in --*-beos*) -+*-beos*|*-haiku*) - HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE -DNO_X11" - HOST_NSPR_MDCPUCFG='\"md/_beos.cfg\"' - HOST_OPTIMIZE_FLAGS="${HOST_OPTIMIZE_FLAGS=-O3}" -@@ -1482,17 +1496,35 @@ - AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) - ;; - --*-beos*) -+*-beos*|*-haiku*) - no_x=yes -- MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@' - _PLATFORM_DEFAULT_TOOLKIT="beos" -+ TARGET_NSPR_MDCPUCFG='\"md/_beos.cfg\"' -+ TARGET_MD_ARCH=beos -+ -+ DSO_PIC_CFLAGS=-fPIC - DSO_LDOPTS='-nostart' -+ MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@' -+ MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@' - TK_LIBS='-lbe -lroot' - LIBS="$LIBS -lbe" -+ -+ _HAIKU_BUILD=0 -+ - if test "$COMPILE_ENVIRONMENT"; then -+ AC_CHECK_LIB(network,main,_HAIKU_BUILD=1) -+ fi -+ if test "$_HAIKU_BUILD" = 1; then -+ LIBS="$LIBS -lnetwork" -+ AC_DEFINE(XP_HAIKU) -+ AC_DEFINE(__BEOS__) -+ AC_DEFINE(BONE_VERSION) -+ else - AC_CHECK_LIB(bind,main,LIBS="$LIBS -lbind") - AC_CHECK_LIB(zeta,main,LIBS="$LIBS -lzeta") -+ AC_DEFINE(BEOS_ADDON_WORKAROUND) - fi -+ - _WARNINGS_CFLAGS="${_WARNINGS_CFLAGS} -Wno-multichar" - _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wno-multichar" - _MOZ_USE_RTTI=1 -@@ -2692,8 +2724,10 @@ - ]) - if test "$ac_cv_have_visibility_builtin_bug" = "no" -a \ - "$ac_cv_have_visibility_class_bug" = "no"; then -- VISIBILITY_FLAGS='-I$(DIST)/include/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h' -- WRAP_SYSTEM_INCLUDES=1 -+ # HACK for Haiku GCC4 -- enforce '-fvisibility=hidden' -+ #VISIBILITY_FLAGS='-I$(DIST)/include/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h' -+ #WRAP_SYSTEM_INCLUDES=1 -+ VISIBILITY_FLAGS='-fvisibility=hidden' - else - VISIBILITY_FLAGS='-fvisibility=hidden' - fi # have visibility pragma bug -@@ -2761,6 +2795,8 @@ - case $target in - *-darwin*) - ;; -+*-beos*|*-haiku*) -+ ;; - *) - AC_CHECK_LIB(dl, dlopen, - AC_CHECK_HEADER(dlfcn.h, -@@ -3125,7 +3161,7 @@ - fi - - case $target_os in -- os2*|msvc*|mks*|cygwin*|mingw*|darwin*|wince*) -+ os2*|msvc*|mks*|cygwin*|mingw*|darwin*|wince*|beos*|haiku*) - ;; - *) - -@@ -5242,7 +5278,7 @@ - dnl Image decoders - dnl ======================================================== - case "$target_os" in --cygwin*|mingw*|msvc*|mks*|os2*|wince*|beos*) -+cygwin*|mingw*|msvc*|mks*|os2*|wince*|beos*|haiku*) - MOZ_IMG_DECODERS_DEFAULT="$MOZ_IMG_DECODERS_DEFAULT icon" - ;; - darwin*) -@@ -5689,7 +5725,7 @@ - - MOZ_DEBUG_ENABLE_DEFS="-DDEBUG -D_DEBUG" - case "${target_os}" in -- beos*) -+ beos*|haiku*) - MOZ_DEBUG_ENABLE_DEFS="$MOZ_DEBUG_ENABLE_DEFS -DDEBUG_${USER}" - ;; - msvc*|mks*|cygwin*|mingw*|os2*|wince*) -@@ -6725,7 +6761,7 @@ - os2*) - MOZ_LIBART_LIBS='-lmoz_art -lm' - ;; -- beos*) -+ beos*|haiku*) - MOZ_LIBART_LIBS='-lmoz_art_lgpl -lroot -lbe' - ;; - *) -@@ -7377,6 +7413,9 @@ - elif test "$OS_ARCH" = "BeOS"; then - AC_DEFINE(XP_BEOS) - MOZ_MOVEMAIL=1 -+elif test "$OS_ARCH" = "Haiku"; then -+ AC_DEFINE(XP_BEOS) -+ MOZ_MOVEMAIL=1 - elif test "$OS_ARCH" = "Darwin"; then - AC_DEFINE(XP_UNIX) - AC_DEFINE(UNIX_ASYNC_DNS) -Index: directory/c-sdk/configure.in -=================================================================== ---- directory/c-sdk/configure.in (revision 7) -+++ directory/c-sdk/configure.in (working copy) -@@ -360,7 +360,7 @@ - AC_DEFINE(DEBUG) - DEFINES="$DEFINES -UNDEBUG" - case "${target_os}" in -- beos*) -+ beos*|haiku*) - DEFINES="$DEFINES -DDEBUG_${USER}" - ;; - msvc*|mks*|cygwin*|mingw*|os2*) -@@ -563,10 +563,16 @@ - OS_RELEASE= - OS_TEST="${target_cpu}" - case "${target_os}" in -- linux*) OS_ARCH=Linux ;; -- solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;; -- mingw*) OS_ARCH=WINNT ;; -- darwin*) OS_ARCH=Darwin ;; -+ linux*) OS_ARCH=Linux ;; -+ solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;; -+ mingw*) OS_ARCH=WINNT ;; -+ darwin*) OS_ARCH=Darwin ;; -+ beos* | haiku*) OS_ARCH=BeOS OS_TARGET=BeOS ;; -+dnl ------------------------------------------------------- -+dnl Cross-compiling-haiku - This should probably be -+dnl beos*) OS_ARCH=BeOS OS_TARGET=BeOS ;; -+dnl haiku*) OS_ARCH=Haiku OS_TARGET=Haiku ;; -+dnl ------------------------------------------------------- - esac - else - OS_ARCH=`uname -s | sed -e 's|/|_|g'` -@@ -733,7 +739,7 @@ - fi - WIN_TOP_SRC=`cygpath -a -w $srcdir | sed -e 's|\\\\|/|g'` - ;; --*-beos*) -+*-beos*|*-haiku*) - HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE" - ;; - *os2*) -@@ -812,24 +818,40 @@ - RESOLVE_LINK_SYMBOLS=1 - ;; - --*-beos*) -+*-beos*|*-haiku*) - AC_DEFINE(XP_BEOS) - AC_DEFINE(BeOS) - AC_DEFINE(BEOS) - AC_DEFINE(_POSIX_SOURCE) -+ DSO_CFLAGS=-fPIC - DSO_LDOPTS=-nostart -+ - MDCPUCFG_H=_beos.cfg - USE_BTHREADS=1 - PR_MD_ARCH_DIR=beos - RESOLVE_LINK_SYMBOLS=1 -+ -+ _HAIKU_BUILD=0 -+ AC_CHECK_LIB(network,main,_HAIKU_BUILD=1) -+ if test "$_HAIKU_BUILD" = 1; then -+ OS_LIBS="$OS_LIBS -lnetwork" -+ AC_DEFINE(XP_HAIKU) -+ AC_DEFINE(BONE_VERSION) -+ else -+ AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"]) -+ fi -+ - case "${target_cpu}" in - i*86) -- _OPTIMIZE_FLAGS=-O2 -- _DEBUG_FLAGS='-gdwarf-2 -O0' -- MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@' -- AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"]) -+ AC_DEFINE(i586) -+ CPU_ARCH=i586 -+ _OPTIMIZE_FLAGS=-O3 -+ _DEBUG_FLAGS='-gdwarf-2 -O0 -fno-inline' -+ MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@' - ;; - powerpc) -+ AC_DEFINE(ppc) -+ CPU_ARCH=ppc - CC=mwcc - CCC=mwcc - LD=mwld -@@ -2095,7 +2117,7 @@ - fi]) - - case "$target" in --*-beos*) -+*-beos*|*-haiku*) - AC_ARG_WITH(bthreads, - [ --with-bthreads Use system bthreads library as thread subsystem (BeOS only)], - [ if test "$withval" = "yes"; then -Index: nsprpub/configure.in -=================================================================== ---- nsprpub/configure.in (revision 7) -+++ nsprpub/configure.in (working copy) -@@ -381,7 +381,7 @@ - DEFINES="$DEFINES -UNDEBUG" - - case "${target_os}" in -- beos*) -+ beos*|haiku*) - DEFINES="$DEFINES -DDEBUG_${USER}" - ;; - msvc*|mks*|cygwin*|mingw*|os2*) -@@ -652,6 +652,12 @@ - solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;; - mingw*) OS_ARCH=WINNT ;; - darwin*) OS_ARCH=Darwin ;; -+ beos*|haiku*) OS_ARCH=BeOS OS_TARGET=BeOS OS_RELEASE=R5 ;; -+dnl ------------------------------------------------------- -+dnl Cross-compiling-haiku - This should probably be -+dnl beos*) OS_ARCH=BeOS OS_TARGET=BeOS OS_RELEASE=R5 ;; -+dnl haiku*) OS_ARCH=Haiku OS_TARGET=Haiku OS_RELEASE=R1 ;; -+dnl ------------------------------------------------------- - esac - else - OS_ARCH=`uname -s | sed -e 's|/|_|g'` -@@ -823,7 +829,7 @@ - CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper' - fi - ;; --*-beos*) -+*-beos*|*-haiku*) - HOST_CFLAGS="$HOST_CFLAGS -DXP_BEOS -DBeOS -DBEOS -D_POSIX_SOURCE" - ;; - *os2*) -@@ -898,24 +904,40 @@ - RESOLVE_LINK_SYMBOLS=1 - ;; - --*-beos*) -+*-beos*|*-haiku*) - AC_DEFINE(XP_BEOS) - AC_DEFINE(BeOS) - AC_DEFINE(BEOS) - AC_DEFINE(_POSIX_SOURCE) -- DSO_LDOPTS=-nostart -+ DSO_CFLAGS=-fPIC -+ DSO_LDOPTS='-nostart' -+ - MDCPUCFG_H=_beos.cfg - USE_BTHREADS=1 - PR_MD_ARCH_DIR=beos - RESOLVE_LINK_SYMBOLS=1 -+ -+ _HAIKU_BUILD=0 -+ AC_CHECK_LIB(network,main,_HAIKU_BUILD=1) -+ if test "$_HAIKU_BUILD" = 1; then -+ OS_LIBS="$OS_LIBS -lnetwork" -+ AC_DEFINE(XP_HAIKU) -+ AC_DEFINE(BONE_VERSION) -+ else -+ AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"]) -+ fi -+ - case "${target_cpu}" in - i*86) -- _OPTIMIZE_FLAGS=-O2 -- _DEBUG_FLAGS='-gdwarf-2 -O0' -- MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@' -- AC_CHECK_LIB(bind, gethostbyaddr, [OS_LIBS="$OS_LIBS -lbind -lsocket"]) -+ AC_DEFINE(i586) -+ CPU_ARCH=i586 -+ _OPTIMIZE_FLAGS=-O3 -+ _DEBUG_FLAGS='-gdwarf-2 -O0 -fno-inline' -+ MKSHLIB='$(CXX) $(DSO_LDOPTS) -o $@' - ;; - powerpc) -+ AC_DEFINE(ppc) -+ CPU_ARCH=ppc - CC=mwcc - CCC=mwcc - LD=mwld -@@ -2245,11 +2267,13 @@ - - dnl We don't want anything to link with libdl even if it's present on OS X, - dnl since it's not used and not part of the default installation. --dnl The same goes for BeOS. -+dnl The same goes for BeOS and Haiku. - - case $target in --*-darwin*|*-beos*) -+*-darwin*) - ;; -+*-beos*|*-haiku*) -+ ;; - *) - AC_CHECK_LIB(dl, dlopen, - AC_CHECK_HEADER(dlfcn.h, -@@ -2438,7 +2462,7 @@ - fi]) - - case "$target" in --*-beos*) -+*-beos*|*-haiku*) - AC_ARG_WITH(bthreads, - [ --with-bthreads Use system bthreads library as thread subsystem - (BeOS only)], diff --git a/www-client/mozilla_firefox/patches/2009-09-27/r03a-makefile-in.patch b/www-client/mozilla_firefox/patches/2009-09-27/r03a-makefile-in.patch deleted file mode 100644 index 4c7d35333..000000000 --- a/www-client/mozilla_firefox/patches/2009-09-27/r03a-makefile-in.patch +++ /dev/null @@ -1,375 +0,0 @@ -Index: browser/app/Makefile.in -=================================================================== ---- browser/app/Makefile.in (revision 7) -+++ browser/app/Makefile.in (working copy) -@@ -151,7 +151,7 @@ - endif - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - BEOS_PROGRAM_RESOURCE = $(srcdir)/apprunner-beos.rsrc - ifdef BUILD_STATIC_LIBS - OS_LIBS += -ltracker -lgame -Index: browser/components/migration/src/Makefile.in -=================================================================== ---- browser/components/migration/src/Makefile.in (revision 7) -+++ browser/components/migration/src/Makefile.in (working copy) -@@ -78,7 +78,7 @@ - nsPhoenixProfileMigrator.cpp \ - $(NULL) - --ifneq ($(OS_ARCH),BeOS) -+ifneq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CPPSRCS += nsDogbertProfileMigrator.cpp - endif - -Index: calendar/libical/src/libical/Makefile.in -=================================================================== ---- calendar/libical/src/libical/Makefile.in (revision 7) -+++ calendar/libical/src/libical/Makefile.in (working copy) -@@ -89,7 +89,7 @@ - - DEFINES += -DHAVE_CONFIG_H - --ifneq (,$(filter BeOS Darwin OpenVMS NetBSD FreeBSD,$(OS_ARCH))) -+ifneq (,$(filter BeOS Haiku Darwin OpenVMS NetBSD FreeBSD,$(OS_ARCH))) - DEFINES += -D__USE_BSD=1 - endif - -Index: calendar/sunbird/app/Makefile.in -=================================================================== ---- calendar/sunbird/app/Makefile.in (revision 7) -+++ calendar/sunbird/app/Makefile.in (working copy) -@@ -194,7 +194,8 @@ - endif - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+BEOS_PROGRAM_RESOURCE = $(srcdir)/apprunner-beos.rsrc - ifdef BUILD_STATIC_LIBS - OS_LIBS += -ltracker -lgame - endif -Index: directory/c-sdk/ldap/libraries/libldap/Makefile.in -=================================================================== ---- directory/c-sdk/ldap/libraries/libldap/Makefile.in (revision 7) -+++ directory/c-sdk/ldap/libraries/libldap/Makefile.in (working copy) -@@ -237,7 +237,7 @@ - SHARED_LIBRARY_LIBS = $(dist_libdir)/lib$(LBER_LIBNAME).a - endif - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_LIBS = -L$(dist_libdir) -l$(LBER_LIBNAME) -lbe - endif - -@@ -302,7 +302,7 @@ - ifdef SO_FILES_TO_REMOVE - -$(RM) $(SO_FILES_TO_REMOVE) - endif --ifneq (,$(filter AIX Linux HP-UX Darwin BeOS QNX NetBSD OSF1 OpenBSD, $(OS_ARCH))) -+ifneq (,$(filter AIX Linux HP-UX Darwin BeOS Haiku QNX NetBSD OSF1 OpenBSD, $(OS_ARCH))) - $(LINK_LIB) ../liblber/$(OBJDIR_NAME)/*.a - else - ifeq ($(OS_ARCH),OS2) -Index: directory/c-sdk/ldap/libraries/libprldap/Makefile.in -=================================================================== ---- directory/c-sdk/ldap/libraries/libprldap/Makefile.in (revision 7) -+++ directory/c-sdk/ldap/libraries/libprldap/Makefile.in (working copy) -@@ -165,7 +165,7 @@ - EXTRA_LIBS += -L$(dist_libdir) $(DYNAMICNSPR) - endif - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_LIBNAME) - EXTRA_LIBS += -L$(dist_libdir) $(DYNAMICNSPR) - endif -Index: directory/c-sdk/ldap/libraries/libssldap/Makefile -=================================================================== ---- directory/c-sdk/ldap/libraries/libssldap/Makefile (revision 7) -+++ directory/c-sdk/ldap/libraries/libssldap/Makefile (working copy) -@@ -167,7 +167,7 @@ - EXTRA_LIBS += $(OS_LIBS) - endif - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_LIBNAME) -l$(PRLDAP_LIBNAME) - ifeq ($(NSS_DYNAMIC_SOFTOKN),1) - EXTRA_LIBS += -l$(SOFTOKN_LIBNAME) -Index: directory/c-sdk/ldap/libraries/libssldap/Makefile.in -=================================================================== ---- directory/c-sdk/ldap/libraries/libssldap/Makefile.in (revision 7) -+++ directory/c-sdk/ldap/libraries/libssldap/Makefile.in (working copy) -@@ -182,7 +182,7 @@ - EXTRA_LIBS += $(OS_LIBS) - endif - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_LIBS = -L$(dist_libdir) -l$(LDAP_LIBNAME) -l$(PRLDAP_LIBNAME) - ifeq ($(NSS_DYNAMIC_SOFTOKN),1) - EXTRA_LIBS += -l$(SOFTOKN_LIBNAME) -Index: embedding/componentlib/Makefile.in -=================================================================== ---- embedding/componentlib/Makefile.in (revision 7) -+++ embedding/componentlib/Makefile.in (working copy) -@@ -152,7 +152,7 @@ - OS_LIBS += ole32.lib shell32.lib - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - OS_LIBS += -ltracker - endif - -Index: intl/uconv/src/Makefile.in -=================================================================== ---- intl/uconv/src/Makefile.in (revision 7) -+++ intl/uconv/src/Makefile.in (working copy) -@@ -119,7 +119,7 @@ - CPPSRCS += nsMacCharset.cpp - EXPORT_RESOURCE += maccharset.properties - else --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CPPSRCS += nsBeOSCharset.cpp - else - CPPSRCS += nsUNIXCharset.cpp -Index: ipc/ipcd/client/src/Makefile.in -=================================================================== ---- ipc/ipcd/client/src/Makefile.in (revision 7) -+++ ipc/ipcd/client/src/Makefile.in (working copy) -@@ -64,7 +64,7 @@ - ifeq ($(OS_ARCH),WINNT) - CPPSRCS += ipcConnectionWin.cpp - else --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CPPSRCS += ipcConnectionStub.cpp - else - CPPSRCS += ipcConnectionUnix.cpp -Index: ipc/ipcd/daemon/src/Makefile.in -=================================================================== ---- ipc/ipcd/daemon/src/Makefile.in (revision 7) -+++ ipc/ipcd/daemon/src/Makefile.in (working copy) -@@ -59,7 +59,7 @@ - ifeq ($(OS_ARCH),WINNT) - CPPSRCS += ipcdWin.cpp - else --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CPPSRCS += ipcdStub.cpp - else - CPPSRCS += ipcdUnix.cpp -Index: js/src/Makefile.in -=================================================================== ---- js/src/Makefile.in (revision 7) -+++ js/src/Makefile.in (working copy) -@@ -246,7 +246,7 @@ - LDFLAGS += $(pathsubst -l%,$(NSPR_STATIC_PATH)/%.a,$(NSPR_LIBS)) - - # BeOS and HP-UX do not require the extra linking of "-lm" --ifeq (,$(filter BeOS HP-UX WINNT WINCE OpenVMS,$(OS_ARCH))) -+ifeq (,$(filter BeOS Haiku HP-UX WINNT WINCE OpenVMS,$(OS_ARCH))) - LDFLAGS += -lm - endif - -Index: mail/app/Makefile.in -=================================================================== ---- mail/app/Makefile.in (revision 7) -+++ mail/app/Makefile.in (working copy) -@@ -149,7 +149,7 @@ - endif - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - BEOS_PROGRAM_RESOURCE = $(srcdir)/apprunner-beos.rsrc - ifdef BUILD_STATIC_LIBS - OS_LIBS += -ltracker -lgame -Index: modules/libpr0n/decoders/Makefile.in -=================================================================== ---- modules/libpr0n/decoders/Makefile.in (revision 7) -+++ modules/libpr0n/decoders/Makefile.in (working copy) -@@ -52,7 +52,7 @@ - ifeq ($(OS_ARCH),OS2) - DIRS = icon/os2 icon - endif --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - DIRS = icon/beos icon - endif - ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) -Index: modules/libpr0n/decoders/icon/Makefile.in -=================================================================== ---- modules/libpr0n/decoders/icon/Makefile.in (revision 7) -+++ modules/libpr0n/decoders/icon/Makefile.in (working copy) -@@ -82,7 +82,7 @@ - PLATFORM = mac - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - PLATFORM = beos - endif - -@@ -102,7 +102,7 @@ - ifdef MOZ_ENABLE_GNOMEUI - USE_ICON_DECODER = 1 - endif --ifeq (,$(filter-out Darwin OS2 BeOS,$(OS_ARCH))) -+ifeq (,$(filter-out Darwin OS2 BeOS Haiku,$(OS_ARCH))) - USE_ICON_DECODER = 1 - endif - -Index: modules/plugin/base/src/Makefile.in -=================================================================== ---- modules/plugin/base/src/Makefile.in (revision 7) -+++ modules/plugin/base/src/Makefile.in (working copy) -@@ -96,7 +96,7 @@ - nsJSNPRuntime.cpp \ - $(NULL) - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CPPSRCS += nsPluginsDirBeOS.cpp - CPPSRCS += nsPluginNativeWindow.cpp - else -Index: modules/libreg/src/Makefile.in -=================================================================== ---- modules/libreg/src/Makefile.in (revision 7) -+++ modules/libreg/src/Makefile.in (working copy) -@@ -66,7 +66,7 @@ - - DEFINES += -DUSE_BUFFERED_REGISTRY_IO - # Memory mapped files are not supported under QNX, Neutrino, HP-UX and BeOS --#ifeq (,$(filter BeOS HP-UX QNX,$(OS_ARCH))) -+#ifeq (,$(filter BeOS Haiku HP-UX QNX,$(OS_ARCH))) - #CSRCS += mmapio.c - #DEFINES += -DUSE_MMAP_REGISTRY_IO - #endif -Index: nsprpub/lib/prstreams/Makefile.in -=================================================================== ---- nsprpub/lib/prstreams/Makefile.in (revision 7) -+++ nsprpub/lib/prstreams/Makefile.in (working copy) -@@ -69,7 +69,7 @@ - endif - endif - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - CFLAGS += -frtti -fexceptions - endif - -@@ -118,7 +118,7 @@ - endif - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - OS_LIBS = -lstdc++.r4 - endif - -Index: toolkit/library/Makefile.in -=================================================================== ---- toolkit/library/Makefile.in (revision 7) -+++ toolkit/library/Makefile.in (working copy) -@@ -364,7 +364,7 @@ - EXTRA_DSO_LDOPTS += $(MOZ_PANGO_LIBS) - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_DSO_LDOPTS += -lbe - endif - -Index: xpcom/build/Makefile.in -=================================================================== ---- xpcom/build/Makefile.in (revision 7) -+++ xpcom/build/Makefile.in (working copy) -@@ -173,7 +173,7 @@ - EXTRA_DSO_LDOPTS += $(TK_LIBS) - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_DSO_LDOPTS += -lbe - endif - -Index: xpcom/obsolete/Makefile.in -=================================================================== ---- xpcom/obsolete/Makefile.in (revision 7) -+++ xpcom/obsolete/Makefile.in (working copy) -@@ -120,7 +120,7 @@ - EXTRA_DSO_LDOPTS += $(TK_LIBS) - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_DSO_LDOPTS += -lbe - endif - -Index: xpcom/reflect/xptcall/src/md/unix/Makefile.in -=================================================================== ---- xpcom/reflect/xptcall/src/md/unix/Makefile.in (revision 7) -+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in (working copy) -@@ -95,9 +95,10 @@ - endif - endif - # --# BeOS/Intel (uses the same unixish_x86 code) -+# BeOS/Intel (uses the same as Linux, works well. Migrate others!) - # --ifeq ($(OS_ARCH)$(OS_TEST),BeOSBePC) -+#ifeq ($(OS_ARCH)$(OS_TEST),BeOSBePC) -+ifeq (,$(filter-out BeOSBePC HaikuBePC, $(OS_ARCH)$(OS_TEST))) - CPPSRCS := xptcinvoke_gcc_x86_unix.cpp xptcstubs_gcc_x86_unix.cpp - endif - # -Index: xpinstall/packager/Makefile.in -=================================================================== ---- xpinstall/packager/Makefile.in (revision 7) -+++ xpinstall/packager/Makefile.in (working copy) -@@ -48,7 +48,7 @@ - ifeq ($(OS_ARCH),IRIX) - STRIP_FLAGS = -f - endif --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - STRIP_FLAGS = -g - PLATFORM_EXCLUDE_LIST = ! -name "*.stub" ! -name "$(MOZ_PKG_APPNAME)-bin" - endif -Index: xulrunner/app/Makefile.in -=================================================================== ---- xulrunner/app/Makefile.in (revision 7) -+++ xulrunner/app/Makefile.in (working copy) -@@ -59,7 +59,7 @@ - ifeq ($(USE_SHORT_LIBNAME), 1) - PROGRAM = xulrunner$(BIN_SUFFIX) - else --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - PROGRAM = xulrunner$(BIN_SUFFIX) - else - PROGRAM = xulrunner-bin$(BIN_SUFFIX) -@@ -85,7 +85,7 @@ - ifeq ($(OS_ARCH),WINNT) - CPPSRCS += nsRegisterGREWin.cpp - else --ifneq (,$(filter OS2 Darwin,$(OS_ARCH))) -+ifneq (,$(filter OS2 Darwin BeOS Haiku,$(OS_ARCH))) - CPPSRCS += nsRegisterGREVoid.cpp - else - CPPSRCS += nsRegisterGREUnix.cpp -@@ -174,7 +174,7 @@ - endif - endif - --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - OS_LIBS += -ltracker - endif - diff --git a/www-client/mozilla_firefox/patches/2009-09-27/r03b-starmk.patch b/www-client/mozilla_firefox/patches/2009-09-27/r03b-starmk.patch deleted file mode 100644 index 93a823127..000000000 --- a/www-client/mozilla_firefox/patches/2009-09-27/r03b-starmk.patch +++ /dev/null @@ -1,115 +0,0 @@ -Index: config/config.mk -=================================================================== ---- config/config.mk (revision 7) -+++ config/config.mk (working copy) -@@ -110,9 +110,6 @@ - LD := $(CC) - endif - endif --ifeq ($(OS_ARCH),BeOS) --BEOS_ADDON_WORKAROUND = 1 --endif - - # - # Strip off the excessively long version numbers on these platforms, -Index: config/rules.mk -=================================================================== ---- config/rules.mk (revision 7) -+++ config/rules.mk (working copy) -@@ -517,7 +517,7 @@ - # - # BeOS: add -Bsymbolic flag for components - # --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter BeOS Haiku,$(OS_ARCH))) - ifdef IS_COMPONENT - EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic - endif -@@ -827,7 +827,7 @@ - ifdef MOZ_POST_PROGRAM_COMMAND - $(MOZ_POST_PROGRAM_COMMAND) $@ - endif --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - ifdef BEOS_PROGRAM_RESOURCE - xres -o $@ $(BEOS_PROGRAM_RESOURCE) - mimeset $@ -Index: directory/c-sdk/build.mk -=================================================================== ---- directory/c-sdk/build.mk (revision 7) -+++ directory/c-sdk/build.mk (working copy) -@@ -442,7 +442,7 @@ - SO_FILES_TO_REMOVE=so_locations - endif - --ifneq (,$(filter BeOS Darwin NetBSD,$(OS_ARCH))) -+ifneq (,$(filter BeOS Haiku Darwin NetBSD,$(OS_ARCH))) - LINK_DLL = $(MKSHLIB) $(OBJS) - endif - -Index: security/coreconf/config.mk -=================================================================== ---- security/coreconf/config.mk (revision 7) -+++ security/coreconf/config.mk (working copy) -@@ -68,8 +68,12 @@ - ifeq (,$(filter-out $(TARGET_OSES),$(OS_TARGET))) - include $(CORE_DEPTH)/coreconf/$(OS_TARGET).mk - else -+ifeq ($(OS_ARCH), Haiku) -+include $(CORE_DEPTH)/coreconf/BeOS.mk -+else - include $(CORE_DEPTH)/coreconf/$(OS_TARGET)$(OS_RELEASE).mk - endif -+endif - - ####################################################################### - # [4.0] Master "Core Components" source and release tags # -Index: security/nss/lib/ssl/config.mk -=================================================================== ---- security/nss/lib/ssl/config.mk (revision 7) -+++ security/nss/lib/ssl/config.mk (working copy) -@@ -111,7 +111,7 @@ - -lnspr4 \ - $(NULL) - --ifeq ($(OS_ARCH), BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - EXTRA_SHARED_LIBS += -lbe - endif - -Index: toolkit/mozapps/installer/package-name.mk -=================================================================== ---- toolkit/mozapps/installer/package-name.mk (revision 7) -+++ toolkit/mozapps/installer/package-name.mk (working copy) -@@ -59,6 +59,9 @@ - ifeq ($(OS_ARCH),OS2) - MOZ_PKG_PLATFORM := os2 - endif -+ifeq ($(OS_ARCH), Haiku) -+MOZ_PKG_PLATFORM := Haiku -+endif - ifeq ($(OS_ARCH), BeOS) - ifeq (,$(filter-out 6.%, $(OS_RELEASE))) - MOZ_PKG_PLATFORM := Zeta -Index: toolkit/mozapps/installer/packager.mk -=================================================================== ---- toolkit/mozapps/installer/packager.mk (revision 7) -+++ toolkit/mozapps/installer/packager.mk (working copy) -@@ -48,7 +48,7 @@ - ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) - MOZ_PKG_FORMAT = DMG - else --ifeq (,$(filter-out OS2 WINNT BeOS, $(OS_ARCH))) -+ifeq (,$(filter-out OS2 WINNT BeOS Haiku, $(OS_ARCH))) - MOZ_PKG_FORMAT = ZIP - ifeq ($(OS_ARCH),OS2) - INSTALLER_DIR = os2 -@@ -251,7 +251,7 @@ - ifeq ($(OS_ARCH),IRIX) - STRIP_FLAGS = -f - endif --ifeq ($(OS_ARCH),BeOS) -+ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) - STRIP_FLAGS = -g - PLATFORM_EXCLUDE_LIST = ! -name "*.stub" ! -name "$(MOZ_PKG_APPNAME)-bin" - endif diff --git a/www-client/mozilla_firefox/patches/2009-09-27/r04a-rdef-support-in-Makefile.patch b/www-client/mozilla_firefox/patches/2009-09-27/r04a-rdef-support-in-Makefile.patch deleted file mode 100644 index a751978a0..000000000 --- a/www-client/mozilla_firefox/patches/2009-09-27/r04a-rdef-support-in-Makefile.patch +++ /dev/null @@ -1,140 +0,0 @@ -Index: mozilla/browser/app/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/browser/app/Makefile.in,v -retrieving revision 1.85.2.12 -diff -u -8 -p -w -r1.85.2.12 Makefile.in ---- mozilla/browser/app/Makefile.in 12 May 2008 18:25:50 -0000 1.85.2.12 -+++ mozilla/browser/app/Makefile.in 8 Jul 2009 21:49:35 -0000 -@@ -146,17 +150,20 @@ endif - ifdef BUILD_STATIC_LIBS - RCFLAGS += -DMOZ_STATIC_BUILD - endif - ifdef DEBUG - RCFLAGS += -DDEBUG - endif - endif - - ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ifeq ($(OS_ARCH),Haiku) -+BEOS_PROGRAM_RDEF = $(srcdir)/apprunner-beos.rdef -+endif - BEOS_PROGRAM_RESOURCE = $(srcdir)/apprunner-beos.rsrc - ifdef BUILD_STATIC_LIBS - OS_LIBS += -ltracker -lgame - endif - endif - - ifeq ($(OS_ARCH),OS2) - RESFILE=splashos2.res -Index: mozilla/calendar/sunbird/app/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/calendar/sunbird/app/Makefile.in,v -retrieving revision 1.21.2.23 -diff -u -8 -p -w -r1.21.2.23 Makefile.in ---- mozilla/calendar/sunbird/app/Makefile.in 4 May 2008 01:32:07 -0000 1.21.2.23 -+++ mozilla/calendar/sunbird/app/Makefile.in 8 Jul 2009 21:50:01 -0000 -@@ -189,18 +193,21 @@ endif - ifdef BUILD_STATIC_LIBS - RCFLAGS += -DMOZ_STATIC_BUILD - endif - ifdef DEBUG - RCFLAGS += -DDEBUG - endif - endif - - ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ifeq ($(OS_ARCH),Haiku) -+BEOS_PROGRAM_RDEF = $(srcdir)/apprunner-beos.rdef -+endif - BEOS_PROGRAM_RESOURCE = $(srcdir)/apprunner-beos.rsrc - ifdef BUILD_STATIC_LIBS - OS_LIBS += -ltracker -lgame - endif - endif - - ifeq ($(OS_ARCH),OS2) - RESFILE=splashos2.res - RCFLAGS += -DMOZ_SUNBIRD -Index: mozilla/config/rules.mk -=================================================================== -RCS file: /cvsroot/mozilla/config/rules.mk,v -retrieving revision 3.487.2.9 -diff -u -8 -p -w -r3.487.2.9 rules.mk ---- mozilla/config/rules.mk 18 Dec 2007 21:33:08 -0000 3.487.2.9 -+++ mozilla/config/rules.mk 8 Jul 2009 21:50:19 -0000 -@@ -822,17 +826,20 @@ endif # OS2 - endif # WINCE - - ifdef ENABLE_STRIP - $(STRIP) $@ - endif - ifdef MOZ_POST_PROGRAM_COMMAND - $(MOZ_POST_PROGRAM_COMMAND) $@ - endif - ifneq (,$(filter BeOS Haiku,$(OS_ARCH))) -+ifdef BEOS_PROGRAM_RDEF -+ rc -o $(BEOS_PROGRAM_RESOURCE) $(BEOS_PROGRAM_RDEF) -+endif - ifdef BEOS_PROGRAM_RESOURCE - xres -o $@ $(BEOS_PROGRAM_RESOURCE) - mimeset $@ - endif - endif # BeOS - - $(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS_DEPS) $(HOST_EXTRA_DEPS) Makefile Makefile.in - ifeq ($(MOZ_OS2_TOOLS),VACPP) -Index: mozilla/mail/app/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/mail/app/Makefile.in,v -retrieving revision 1.46.2.10 -diff -u -8 -p -w -r1.46.2.10 Makefile.in ---- mozilla/mail/app/Makefile.in 22 Oct 2008 21:04:53 -0000 1.46.2.10 -+++ mozilla/mail/app/Makefile.in 8 Jul 2009 21:52:18 -0000 -@@ -142,17 +146,20 @@ RCFLAGS += -DMOZ_THUNDERBIRD -I$(srcdir) - else - RCFLAGS += -DMOZ_THUNDERBIRD --include-dir $(srcdir) - endif - ifdef BUILD_STATIC_LIBS - RCFLAGS += -DMOZ_STATIC_BUILD - endif - endif - - ifeq (,$(filter-out BeOS Haiku, $(OS_ARCH))) -+ifeq ($(OS_ARCH),Haiku) -+BEOS_PROGRAM_RDEF = $(srcdir)/apprunner-beos.rdef -+endif - BEOS_PROGRAM_RESOURCE = $(srcdir)/apprunner-beos.rsrc - ifdef BUILD_STATIC_LIBS - OS_LIBS += -ltracker -lgame - endif - endif - - ifeq ($(OS_ARCH),OS2) - RESFILE=splashos2.res -Index: mozilla/xpfe/bootstrap/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/xpfe/bootstrap/Attic/Makefile.in,v -retrieving revision 1.283.2.6 -diff -u -8 -p -w -r1.283.2.6 Makefile.in ---- mozilla/xpfe/bootstrap/Makefile.in 29 Sep 2007 20:15:11 -0000 1.283.2.6 -+++ mozilla/xpfe/bootstrap/Makefile.in 8 Jul 2009 21:54:55 -0000 -@@ -215,16 +219,19 @@ ifdef GC_LEAK_DETECTOR - LIBS += -lboehm - endif - - ifdef WRAP_SYSTEM_INCLUDES - DEFINES += -DWRAP_SYSTEM_INCLUDES - endif - - ifeq ($(MOZ_WIDGET_TOOLKIT),beos) -+ifeq ($(OS_ARCH),Haiku) -+BEOS_PROGRAM_RDEF = $(srcdir)/apprunner-beos.rdef -+endif - BEOS_PROGRAM_RESOURCE = $(srcdir)/apprunner-beos.rsrc - CPPSRCS += nsNativeAppSupportBeOS.cpp - CPPSRCS += nsNativeAppSupportBase.cpp - ifdef BUILD_STATIC_LIBS - OS_LIBS += -ltracker -lgame - endif - endif - diff --git a/www-client/mozilla_firefox/patches/2009-09-27/r04b-just-rdefs-no-Makefile.patch b/www-client/mozilla_firefox/patches/2009-09-27/r04b-just-rdefs-no-Makefile.patch deleted file mode 100644 index 3b7cba03b..000000000 --- a/www-client/mozilla_firefox/patches/2009-09-27/r04b-just-rdefs-no-Makefile.patch +++ /dev/null @@ -1,532 +0,0 @@ -Index: /generated/bezilla/mozilla/xpfe/apprunner-beos.rdef -=================================================================== ---- /generated/bezilla/mozilla/xpfe/apprunner-beos.rdef (revision 0) -+++ /generated/bezilla/mozilla/xpfe/apprunner-beos.rdef (revision 0) -@@ -0,0 +1,136 @@ -+/* -+ * BeZillaBrowser.rdef -+ */ -+ -+resource app_signature "application/x-vnd.Mozilla-SeaMonkey"; -+ -+resource app_flags B_SINGLE_LAUNCH; -+ -+resource app_version { -+ /* -+ * We are using the source code version number -+ * for our program version. -+ * TODO : implement something better. -+ */ -+ major = 1, -+ middle = 8, -+ minor = 1, -+ -+ /* 0 = development 1 = alpha 2 = beta -+ 3 = gamma 4 = golden master 5 = final */ -+ variety = 0, -+ -+ internal = 21, -+ -+ short_info = "BeZillaSuite", -+ long_info = "BeZillaSuite is based on Mozilla's source code" -+}; -+ -+resource file_types message { -+ "types" = "application/x-vnd.Be.URL.file", -+ "types" = "application/x-vnd.Be.URL.ftp", -+ "types" = "application/x-vnd.Be.URL.http", -+ "types" = "application/x-vnd.Be.URL.https", -+ "types" = "application/x-vnd.Be.URL.mailto", -+ "types" = "application/x-vnd.Be.URL.news", -+ "types" = "text/html" -+ /* -+ * Should BeZillaSuite include these additional filetypes? -+ * note: MailNews has them -+ "types" = "applicataion/x-person", -+ "types" = "message/rfc822", -+ "types" = "text/E-mail", -+ "types" = "text/x-email" -+ "types" = "text/x-vnd.Be-MailDraft" -+ */ -+}; -+ -+resource vector_icon { -+ $"6E636966210500020016029E8638A20EBA220EBA9E86384880254A18EA00FFFF" -+ $"8002001602BC9D88BB1F643B1F64BC9D884B716D48772700FFFF80020016023B" -+ $"F73A0000000000003BF73A49B5114976B000FFFF800200160237A0DDB61AF236" -+ $"1AF237A0DD497CAA48588100FFFF800200160238D81CB8152D38152D38D81C48" -+ $"420A499FB600FFFF8002001602397095000000000000397095486EDA49100600" -+ $"FFFF800200160231E5B2BA0EAF3A0EAF31E5B247DA3349779B00FFFF80020016" -+ $"0236BBEFB4543A34543A36BBEF495BDE469BC700FFFF6B0200160236E2E70000" -+ $"0000000036E2E74A2CD64670CD00FFFF800200160237AB1000000000000037AB" -+ $"104AE1D848449500FFFF5702001602375C10B74516374516375C1048B2B04AE9" -+ $"7200FFFF8002001602B07700B74912374912B077004898AD4AD99500FFFF8002" -+ $"00160232CFA5BA0B483A0B4832CFA54A3C584BA00E00FFFF8002001602368CB7" -+ $"000000000000368CB74B3D5E49752800FFFF4F0200160236A81C000000000000" -+ $"36A81C4B94C84A808500FFFF4002000602B738F7362603B62603B738F748BB3F" -+ $"4A241700A91212FFD7121202001602B04887376143B76143B0488748D36C44FB" -+ $"3100FFFF6B02001602B47620362BAAB62BAAB476204A0C144406C600FFFF8002" -+ $"001602B4CAE23409B3B409B3B4CAE24AD8D54611F100FFFF8002001602B328E4" -+ $"324E4AB24E4AB328E44B36A648859C00FFFF8002001602B22376311F03B11F03" -+ $"B223764B891349FFBC00FFFF80010079009803FF000004006002001602B4E6F3" -+ $"319259B19259B4E6F34B2F5D4AA2CA00FFFF0003FFFF0004FFD801FFFF669805" -+ $"000200060237889D389554BBFC4A3AB9D0491ADE4A422000FFF9BAFFFFC10402" -+ $"0006023882A6389353BB177D3B0378484ADD4AF27700C7E3FFFF392FFF020006" -+ $"0237A0CC393C5ABC1AC23A5C164A19B94AFE5400FF9797FFCE3232290633EEEB" -+ $"FFFFAAEAABDBAEBBBEAE2BC0CEB389C02424C074B415BFF0B478BFB4B450BFB7" -+ $"B455BFB6B455BF8CB436BF14B430BF55B42DBEF5B3FFBE82B33EBBDBB3F2BBCE" -+ $"B4D7BBD0B4BABBCBB4DABBC7B4DABBC7B4DABBC8B4DABB45B50ABB45B50ABB44" -+ $"B50ABB37B50DBB37B50DBAD6B534BA1EB58DBA78B560BA1EB58DBA12B593BA12" -+ $"B593BA0FB596B99BB5D6B99BB5D6B99AB5D6B975B5ECB975B5ECB974B5EDB918" -+ $"B626B918B626B917B626B8EDB642B893B681B887B689B86CB69CB7F22AB7B5B7" -+ $"2DB7A9B76EB73CB920B755B8C5B6B5B9A4B380BC3AB4F7BB4BB380BC3AB317BC" -+ $"7FB33E42B755C332B80EC320B7E7C323B7FBC3522CC3C54FBB03C7E8BAF4C7DB" -+ $"BAD1C898BA59CA44BC40CC83BAD4CBC3BDF3CD6FC0A0CDA4C760C888CA38C797" -+ $"C90DC879CB7BC6A2CC38C4DCCB9AC3A6CBB6C3DDCBA2C34CCBC2C1EBCA78BF62" -+ $"C954BF30C9ADBF3FC934BEE9C900BE83C91DBEC2C927BE17C999BCEAC857BA6B" -+ $"C720BABCC767BAABC73FBA2EC7C0B7EEC5B1B563C3F4B6DBC472B66FC405B613" -+ $"C427B41BC12CB2F006032FBAF5C05EBAF5C05EBAF7C05C34C05A34C05B34C05A" -+ $"34C05B0610EE7AAAAAC693C7B5C9E8C667C896C755CAB5C5D3CB14C47FC521B8" -+ $"CDC521B8CDC0B9B834BD7FBA63BC9BBC64B789BF00B92ABE82B789BF00C251BC" -+ $"E5C1CCBED1C0BCBE70C324BB51C5B0BB5AC71ABFC8C4E2C044C512C05CCC1E06" -+ $"04EEBD7FBA63C521B8CDC0B9B834C521B8CDBF40B50AB87FB7A5BC0CB4F7B87F" -+ $"B7A50604FEBD7FBA63C521B8CDC0B9B834C521B8CDBF40B50ABF40B50ABD2DB5" -+ $"21B87FB7A5BA8CB5E9B87FB7A50605BB02B3F7BCF4B5CD36B3F7BCF4B789BF00" -+ $"BA19BDD6B8DABE8835BD1EBC9BBC64B801B9930A04B87FB7A5BD7FBA63BC9BBC" -+ $"64B801B9930A04B3F7BCF4B413C012B789C251B789BF000A04BC7AB801BF99B6" -+ $"C0BE1BB43BBCAAB49E0A05BFE1B69AC187B3FFC341B4ABC30EB77BC204B6CF0A" -+ $"05C3E9B805C594B69AC6D3B825C637BAECC521B8CD0A06B967C223B8A5C3F1BB" -+ $"51C5B0BE70C323BED1C0BCBCE5C1CC0A04B8A5C548B8A5C3F1BB51C5B0BB5AC7" -+ $"1A0606BA0ABC41C6A5BB73C983BCF9CB79BBC8CAD5BE40CC23C05CCC1EC044C5" -+ $"12BFC8C4E20A04C6A1BBC1C7E5BB6BC8ABBCF7C80EBE920A04C9EA41C8C5BFF3" -+ $"CABBC3D4CAE3C2140A06BA90C206BA19C33CBADEC3EBBEA7C1C4BED1C0BCBCE5" -+ $"C1CC0A06BC7AB801BCAAB49EBE1BB43BBE33B460BCDAB4C7BCB1B7EC0A04BFE1" -+ $"B69AC021B6A1C1ADB40DC187B3FF0A04C3E9B805C594B69AC5B7B6C3C41AB825" -+ $"0A04C6A1BBC1C7E5BB6BC7F4BB8EC6B9BBEC0A04C8C5BFF3C9EA41CA07C060C8" -+ $"E5C02B0628AAAAAAAAAAAEEFAAA9BACAB4C3BFCAE3C214C9EA41C8C5BFF3C80F" -+ $"BE90C8ABBCF7C7F4BB8EC7E5BB6BC6A1BBC1C637BAECC6D3B826C5B7B6C3C594" -+ $"B69AC3E9B805C3F9B80FC30EB77BC341B4ABC1ADB40DC187B3FFC068B5C6BF40" -+ $"B50ABE9BB514BF03B507BE9BB514BE1BB43BBCAAB49EBC9EB57CBC9EB57CBB34" -+ $"B5E3B87FB7A5B9BC29B87FB7A5B801B993B3F7BCF4B5CD36B3F7BCF4B413C012" -+ $"B789C251B964C223B8A5C3F1C548BB5AC71ABFC8C4E2C044C512C05CCC1EC693" -+ $"C7B5C9B7C688C894C759CAD2C5BECB14C47F0A06BE4DC302BB334EB8F2C3E4B9" -+ $"9FC21DBCE5C1CCBEAEC0D1020ABFDBBBF7BFE1BBDFBFC9BC38BF63BC91BF9DBC" -+ $"71BEE7BCD8BE03BC31BE4BBCABBE03BC31BE00BC24BE0137BE10BC1ABE4BBC03" -+ $"BE30BC0EBE4BBC03BEE9BBBABEE9BBBABEE9BBBABF7BBB58BF7BBB58BF8FBB45" -+ $"BFBDBB29BFA9BB3440BB2DBFC3BB34BFC3BB34BFD9BB5BBFE7BBB2BFE7BB85BF" -+ $"E7BBC8020ABFD5BC12BFD9BC00BFC3BC4FBF67BC9CBF9CBC80BEFCBCDBBE32BC" -+ $"45BE70BCB4BE32BC45BE2BBC39BE30BC41BE3EBC32BE70BC1DBE58BC27BE70BC" -+ $"1DBEFEBBDDBEFEBBDDBEFEBBDDBF7EBB84BF7EBB84BF90BB77BFB7BB5CBFA7BB" -+ $"66BFBDBB5F40BB6640BB66BFD4BB87BFDCBBD4BFDCBBADBFDCBBEA0605BA02BC" -+ $"2BC6AFC155C3BAC269C139C245C1A9C25CC1A9C1A5C3EFBBF5C7310A04BC7AB8" -+ $"01BF99B6C0C125B79BBFB3B7FF0A03BFE1B69AC3A0B7D5C204B6CF0A05BCAAC6" -+ $"70BCB9C66BBE0FC73AC05BC70BBDF4C7890A04BC34C73FBDE5C88AC04EC88BBD" -+ $"C9C8D80A04BB81C817BD6CC9CFC072C973BD505A0A04BB60C971BD4FCB2BC054" -+ $"CACFBD33CB790A03C6D944C9E8C6DAC695540A03BD9FBC21BEE9BBBAC059BA77" -+ $"0204BF4DBBE8BF4DBC1ABF4DBBB7BF95BB8FBF6FBB8FBFBCBB8FBFD9BBE8BFD9" -+ $"BBB7BFD9BC1ABF95BC42BFBCBC42BF6FBC420A04BAD6C37ABBFAC2FDBAD1C336" -+ $"BA8CC2FD0606BA0ABC2BC6AF35C98ABCC1CB6BBB88CAC8BE00CC16C049CC29C0" -+ $"33C51CBFB5C4EA0A062C472C4E3251364E364730440A06265226592C5C305930" -+ $"522A4F0A0632533259385C3C593C5237C5D3290A000100000A010101000A0201" -+ $"02000A030103000A040104000A050105000A060106000A070107000A08010800" -+ $"0A090109000A0A010A000A0B010B000A0C010C000A0D010D000A0E010E000A0F" -+ $"010F000A100110000A110111000A120112000A130113000A140114000A150115" -+ $"000A1603161718000A170119000A18011A000A18011B000A18011C000A18011D" -+ $"000A18011E000A18011F000A180120000A190121000A180122000A1A0123000A" -+ $"1B0124000A1C0125000A1D032627283841B30C15FF01178400040A1D03262728" -+ $"3841B30C001501178600040A1E01262041B30C0A1F01272041B30C0A20012820" -+ $"41B30C" -+}; -+ -+ -Index: /generated/bezilla/mozilla/mail/app/apprunner-beos.rdef -=================================================================== ---- /generated/bezilla/mozilla/mail/app/apprunner-beos.rdef (revision 0) -+++ /generated/bezilla/mozilla/mail/app/apprunner-beos.rdef (revision 0) -@@ -0,0 +1,126 @@ -+/* -+ * BeZillaBrowser.rdef -+ */ -+ -+resource app_signature "application/x-vnd.Mozilla-Thunderbird"; -+ -+resource app_flags B_SINGLE_LAUNCH; -+ -+resource app_version { -+ /* -+ * We are using the source code version number -+ * for our program version. -+ * TODO : implement something better. -+ */ -+ major = 1, -+ middle = 8, -+ minor = 1, -+ -+ /* 0 = development 1 = alpha 2 = beta -+ 3 = gamma 4 = golden master 5 = final */ -+ variety = 0, -+ -+ internal = 21, -+ -+ short_info = "BeZillaMailNews", -+ long_info = "BeZillaMailNews is based on Mozilla's source code" -+}; -+ -+resource file_types message { -+ "types" = "application/x-vnd.Be.URL.mailto", -+ "types" = "application/x-vnd.Be.URL.news", -+ "types" = "applicataion/x-person", -+ "types" = "message/rfc822", -+ "types" = "text/E-mail", -+ "types" = "text/x-email", -+ "types" = "text/x-vnd.Be-MailDraft" -+}; -+ -+resource vector_icon { -+ $"6E636966200500020016029E8638A20EBA220EBA9E86384880254A18EA00FFFF" -+ $"8002001602BC9D88BB1F643B1F64BC9D884B716D48772700FFFF80020016023B" -+ $"F73A0000000000003BF73A49B5114976B000FFFF800200160237A0DDB61AF236" -+ $"1AF237A0DD497CAA48588100FFFF800200160238D81CB8152D38152D38D81C48" -+ $"420A499FB600FFFF8002001602397095000000000000397095486EDA49100600" -+ $"FFFF800200160231E5B2BA0EAF3A0EAF31E5B247DA3349779B00FFFF80020016" -+ $"0236BBEFB4543A34543A36BBEF495BDE469BC700FFFF6B0200160236E2E70000" -+ $"0000000036E2E74A2CD64670CD00FFFF800200160237AB1000000000000037AB" -+ $"104AE1D848449500FFFF5702001602375C10B74516374516375C1048B2B04AE9" -+ $"7200FFFF8002001602B07700B74912374912B077004898AD4AD99500FFFF8002" -+ $"00160232CFA5BA0B483A0B4832CFA54A3C584BA00E00FFFF8002001602368CB7" -+ $"000000000000368CB74B3D5E49752800FFFF4F0200160236A81C000000000000" -+ $"36A81C4B94C84A808500FFFF4002000602B738F7362603B62603B738F748BB3F" -+ $"4A241700A91212FFD7121202001602B04887376143B76143B0488748D36C44FB" -+ $"3100FFFF6B02001602B47620362BAAB62BAAB476204A0C144406C600FFFF8002" -+ $"001602B4CAE23409B3B409B3B4CAE24AD8D54611F100FFFF8002001602B328E4" -+ $"324E4AB24E4AB328E44B36A648859C00FFFF8002001602B22376311F03B11F03" -+ $"B223764B891349FFBC00FFFF80010079009803FF000004006002001602B4E6F3" -+ $"319259B19259B4E6F34B2F5D4AA2CA00FFFF0003FFFF0004FFD801FFFF669805" -+ $"0002000602389ECD3AF097BC491F3A09894954654ABDFA00FFFFFFFFD9D09303" -+ $"6B5222280633EEEBFFFFAAEAABDBAEBBBEAE2BC0CEB389C02424C074B415BFF0" -+ $"B478BFB4B450BFB7B455BFB6B455BF8CB436BF14B430BF55B42DBEF5B3FFBE82" -+ $"B33EBBDBB3F2BBCEB4D7BBD0B4BABBCBB4DABBC7B4DABBC7B4DABBC8B4DABB45" -+ $"B50ABB45B50ABB44B50ABB37B50DBB37B50DBAD6B534BA1EB58DBA78B560BA1E" -+ $"B58DBA12B593BA12B593BA0FB596B99BB5D6B99BB5D6B99AB5D6B975B5ECB975" -+ $"B5ECB974B5EDB918B626B918B626B917B626B8EDB642B893B681B887B689B86C" -+ $"B69CB7F22AB7B5B72DB7A9B76EB73CB920B755B8C5B6B5B9A4B380BC3AB4F7BB" -+ $"4BB380BC3AB317BC7FB33E42B755C332B80EC320B7E7C323B7FBC3522CC3C54F" -+ $"BB03C7E8BAF4C7DBBAD1C898BA59CA44BC40CC83BAD4CBC3BDF3CD6FC0A0CDA4" -+ $"C760C888CA38C797C90DC879CB7BC6A2CC38C4DCCB9AC3A6CBB6C3DDCBA2C34C" -+ $"CBC2C1EBCA78BF62C954BF30C9ADBF3FC934BEE9C900BE83C91DBEC2C927BE17" -+ $"C999BCEAC857BA6BC720BABCC767BAABC73FBA2EC7C0B7EEC5B1B563C3F4B6DB" -+ $"C472B66FC405B613C427B41BC12CB2F006032FBAF5C05EBAF5C05EBAF7C05C34" -+ $"C05A34C05B34C05A34C05B0610EE7AAAAAC693C7B5C9E8C667C896C755CAB5C5" -+ $"D3CB14C47FC521B8CDC521B8CDC0B9B834BD7FBA63BC9BBC64B789BF00B92ABE" -+ $"82B789BF00C251BCE5C1CCBED1C0BCBE70C324BB51C5B0BB5AC71ABFC8C4E2C0" -+ $"44C512C05CCC1E0604EEBD7FBA63C521B8CDC0B9B834C521B8CDBF40B50AB87F" -+ $"B7A5BC0CB4F7B87FB7A50604FEBD7FBA63C521B8CDC0B9B834C521B8CDBF40B5" -+ $"0ABF40B50ABD2DB521B87FB7A5BA8CB5E9B87FB7A50605BB02B3F7BCF4B5CD36" -+ $"B3F7BCF4B789BF00BA19BDD6B8DABE8835BD1EBC9BBC64B801B9930A04B87FB7" -+ $"A5BD7FBA63BC9BBC64B801B9930A04B3F7BCF4B413C012B789C251B789BF000A" -+ $"04BC7AB801BF99B6C0BE1BB43BBCAAB49E0A05BFE1B69AC187B3FFC341B4ABC3" -+ $"0EB77BC204B6CF0A05C3E9B805C594B69AC6D3B825C637BAECC521B8CD0A06B9" -+ $"67C223B8A5C3F1BB51C5B0BE70C323BED1C0BCBCE5C1CC0A04B8A5C548B8A5C3" -+ $"F1BB51C5B0BB5AC71A0606BA0ABC41C6A5BB73C983BCF9CB79BBC8CAD5BE40CC" -+ $"23C05CCC1EC044C512BFC8C4E20A04C6A1BBC1C7E5BB6BC8ABBCF7C80EBE920A" -+ $"04C9EA41C8C5BFF3CABBC3D4CAE3C2140A06BA90C206BA19C33CBADEC3EBBEA7" -+ $"C1C4BED1C0BCBCE5C1CC0A06BC7AB801BCAAB49EBE1BB43BBE33B460BCDAB4C7" -+ $"BCB1B7EC0A04BFE1B69AC021B6A1C1ADB40DC187B3FF0A04C3E9B805C594B69A" -+ $"C5B7B6C3C41AB8250A04C6A1BBC1C7E5BB6BC7F4BB8EC6B9BBEC0A04C8C5BFF3" -+ $"C9EA41CA07C060C8E5C02B0628AAAAAAAAAAAEEFAAA9BACAB4C3BFCAE3C214C9" -+ $"EA41C8C5BFF3C80FBE90C8ABBCF7C7F4BB8EC7E5BB6BC6A1BBC1C637BAECC6D3" -+ $"B826C5B7B6C3C594B69AC3E9B805C3F9B80FC30EB77BC341B4ABC1ADB40DC187" -+ $"B3FFC068B5C6BF40B50ABE9BB514BF03B507BE9BB514BE1BB43BBCAAB49EBC9E" -+ $"B57CBC9EB57CBB34B5E3B87FB7A5B9BC29B87FB7A5B801B993B3F7BCF4B5CD36" -+ $"B3F7BCF4B413C012B789C251B964C223B8A5C3F1C548BB5AC71ABFC8C4E2C044" -+ $"C512C05CCC1EC693C7B5C9B7C688C894C759CAD2C5BECB14C47F0A06BE4DC302" -+ $"BB334EB8F2C3E4B99FC21DBCE5C1CCBEAEC0D1020ABFDBBBF7BFE1BBDFBFC9BC" -+ $"38BF63BC91BF9DBC71BEE7BCD8BE03BC31BE4BBCABBE03BC31BE00BC24BE0137" -+ $"BE10BC1ABE4BBC03BE30BC0EBE4BBC03BEE9BBBABEE9BBBABEE9BBBABF7BBB58" -+ $"BF7BBB58BF8FBB45BFBDBB29BFA9BB3440BB2DBFC3BB34BFC3BB34BFD9BB5BBF" -+ $"E7BBB2BFE7BB85BFE7BBC8020ABFD5BC12BFD9BC00BFC3BC4FBF67BC9CBF9CBC" -+ $"80BEFCBCDBBE32BC45BE70BCB4BE32BC45BE2BBC39BE30BC41BE3EBC32BE70BC" -+ $"1DBE58BC27BE70BC1DBEFEBBDDBEFEBBDDBEFEBBDDBF7EBB84BF7EBB84BF90BB" -+ $"77BFB7BB5CBFA7BB66BFBDBB5F40BB6640BB66BFD4BB87BFDCBBD4BFDCBBADBF" -+ $"DCBBEA0605BA02BC2BC6AFC155C3BAC269C139C245C1A9C25CC1A9C1A5C3EFBB" -+ $"F5C7310A04BC7AB801BF99B6C0C125B79BBFB3B7FF0A03BFE1B69AC3A0B7D5C2" -+ $"04B6CF0A05BCAAC670BCB9C66BBE0FC73AC05BC70BBDF4C7890A04BC34C73FBD" -+ $"E5C88AC04EC88BBDC9C8D80A04BB81C817BD6CC9CFC072C973BD505A0A04BB60" -+ $"C971BD4FCB2BC054CACFBD33CB790A03C6D944C9E8C6DAC695540A03BD9FBC21" -+ $"BEE9BBBAC059BA770204BF4DBBE8BF4DBC1ABF4DBBB7BF95BB8FBF6FBB8FBFBC" -+ $"BB8FBFD9BBE8BFD9BBB7BFD9BC1ABF95BC42BFBCBC42BF6FBC420A04BAD6C37A" -+ $"BBFAC2FDBAD1C336BA8CC2FD0606BA0ABC2BC6AF35C98ABCC1CB6BBB88CAC8BE" -+ $"00CC16C049CC29C033C51CBFB5C4EA0A04244C245C3C5C3C4C060AEEFE0E244C" -+ $"30542E5432543C4CBB1454BCCAC670BB14543C5CBABCC808BABCC808BA0EC8AC" -+ $"3056B9A856B91756B801C808B8B1C8ACB801C808245CB7A954B7A954B5F4C670" -+ $"280A000100000A010101000A020102000A030103000A040104000A050105000A" -+ $"060106000A070107000A080108000A090109000A0A010A000A0B010B000A0C01" -+ $"0C000A0D010D000A0E010E000A0F010F000A100110000A110111000A12011200" -+ $"0A130113000A140114000A150115000A1603161718000A170119000A18011A00" -+ $"0A18011B000A18011C000A18011D000A18011E000A18011F000A180120000A19" -+ $"0121000A180122000A1A0123000A1B0124000A1C0125000A1D012638C018B358" -+ $"15FF01178400040A1D012638C018B358001501178600040A1E012620C018B358" -+ $"0A1F012720C018B358" -+}; -+ -+ -Index: /generated/bezilla/mozilla/calendar/sunbird/app/apprunner-beos.rdef -=================================================================== ---- /generated/bezilla/mozilla/calendar/sunbird/app/apprunner-beos.rdef (revision 0) -+++ /generated/bezilla/mozilla/calendar/sunbird/app/apprunner-beos.rdef (revision 0) -@@ -0,0 +1,125 @@ -+/* -+ * BeZillaBrowser.rdef -+ */ -+ -+resource app_signature "application/x-vnd.Mozilla-Sunbird"; -+ -+resource app_flags B_SINGLE_LAUNCH; -+ -+resource app_version { -+ /* -+ * We are using the source code version number -+ * for our program version. -+ * TODO : implement something better. -+ */ -+ major = 1, -+ middle = 8, -+ minor = 1, -+ -+ /* 0 = development 1 = alpha 2 = beta -+ 3 = gamma 4 = golden master 5 = final */ -+ variety = 0, -+ -+ internal = 21, -+ -+ short_info = "BeZillaCalendar", -+ long_info = "BeZillaCalendar is based on Mozilla's source code" -+}; -+ -+resource file_types message { -+ "types" = "text/csv", -+ "types" = "text/calendar" -+ /* -+ // TODO: -+ // .sdb is mimetype application/octet-stream -+ // is there a more elegant way to handle it? -+ types" = "application/octet-stream" -+ */ -+}; -+resource vector_icon { -+ $"6E636966200500020016029E8638A20EBA220EBA9E86384880254A18EA00FFFF" -+ $"8002001602BC9D88BB1F643B1F64BC9D884B716D48772700FFFF80020016023B" -+ $"F73A0000000000003BF73A49B5114976B000FFFF800200160237A0DDB61AF236" -+ $"1AF237A0DD497CAA48588100FFFF800200160238D81CB8152D38152D38D81C48" -+ $"420A499FB600FFFF8002001602397095000000000000397095486EDA49100600" -+ $"FFFF800200160231E5B2BA0EAF3A0EAF31E5B247DA3349779B00FFFF80020016" -+ $"0236BBEFB4543A34543A36BBEF495BDE469BC700FFFF6B0200160236E2E70000" -+ $"0000000036E2E74A2CD64670CD00FFFF800200160237AB1000000000000037AB" -+ $"104AE1D848449500FFFF5702001602375C10B74516374516375C1048B2B04AE9" -+ $"7200FFFF8002001602B07700B74912374912B077004898AD4AD99500FFFF8002" -+ $"00160232CFA5BA0B483A0B4832CFA54A3C584BA00E00FFFF8002001602368CB7" -+ $"000000000000368CB74B3D5E49752800FFFF4F0200160236A81C000000000000" -+ $"36A81C4B94C84A808500FFFF4002000602B738F7362603B62603B738F748BB3F" -+ $"4A241700A91212FFD7121202001602B04887376143B76143B0488748D36C44FB" -+ $"3100FFFF6B02001602B47620362BAAB62BAAB476204A0C144406C600FFFF8002" -+ $"001602B4CAE23409B3B409B3B4CAE24AD8D54611F100FFFF8002001602B328E4" -+ $"324E4AB24E4AB328E44B36A648859C00FFFF8002001602B22376311F03B11F03" -+ $"B223764B891349FFBC00FFFF80010079009803FF000004006002001602B4E6F3" -+ $"319259B19259B4E6F34B2F5D4AA2CA00FFFF0003FFFF0004FFD801FFFF669805" -+ $"000200060239CDA03A935CBC02343AF7494899864A8DDC00FFDB97FFFCAF2902" -+ $"0106033B471C0000000000003B36DB472800498C0000F2F2F2AB7D7A7AFFBCA1" -+ $"84280633EEEBFFFFAAEAABDBAEBBBEAE2BC0CEB389C02424C074B415BFF0B478" -+ $"BFB4B450BFB7B455BFB6B455BF8CB436BF14B430BF55B42DBEF5B3FFBE82B33E" -+ $"BBDBB3F2BBCEB4D7BBD0B4BABBCBB4DABBC7B4DABBC7B4DABBC8B4DABB45B50A" -+ $"BB45B50ABB44B50ABB37B50DBB37B50DBAD6B534BA1EB58DBA78B560BA1EB58D" -+ $"BA12B593BA12B593BA0FB596B99BB5D6B99BB5D6B99AB5D6B975B5ECB975B5EC" -+ $"B974B5EDB918B626B918B626B917B626B8EDB642B893B681B887B689B86CB69C" -+ $"B7F22AB7B5B72DB7A9B76EB73CB920B755B8C5B6B5B9A4B380BC3AB4F7BB4BB3" -+ $"80BC3AB317BC7FB33E42B755C332B80EC320B7E7C323B7FBC3522CC3C54FBB03" -+ $"C7E8BAF4C7DBBAD1C898BA59CA44BC40CC83BAD4CBC3BDF3CD6FC0A0CDA4C760" -+ $"C888CA38C797C90DC879CB7BC6A2CC38C4DCCB9AC3A6CBB6C3DDCBA2C34CCBC2" -+ $"C1EBCA78BF62C954BF30C9ADBF3FC934BEE9C900BE83C91DBEC2C927BE17C999" -+ $"BCEAC857BA6BC720BABCC767BAABC73FBA2EC7C0B7EEC5B1B563C3F4B6DBC472" -+ $"B66FC405B613C427B41BC12CB2F006032FBAF5C05EBAF5C05EBAF7C05C34C05A" -+ $"34C05B34C05A34C05B0610EE7AAAAAC693C7B5C9E8C667C896C755CAB5C5D3CB" -+ $"14C47FC521B8CDC521B8CDC0B9B834BD7FBA63BC9BBC64B789BF00B92ABE82B7" -+ $"89BF00C251BCE5C1CCBED1C0BCBE70C324BB51C5B0BB5AC71ABFC8C4E2C044C5" -+ $"12C05CCC1E0604EEBD7FBA63C521B8CDC0B9B834C521B8CDBF40B50AB87FB7A5" -+ $"BC0CB4F7B87FB7A50604FEBD7FBA63C521B8CDC0B9B834C521B8CDBF40B50ABF" -+ $"40B50ABD2DB521B87FB7A5BA8CB5E9B87FB7A50605BB02B3F7BCF4B5CD36B3F7" -+ $"BCF4B789BF00BA19BDD6B8DABE8835BD1EBC9BBC64B801B9930A04B87FB7A5BD" -+ $"7FBA63BC9BBC64B801B9930A04B3F7BCF4B413C012B789C251B789BF000A04BC" -+ $"7AB801BF99B6C0BE1BB43BBCAAB49E0A05BFE1B69AC187B3FFC341B4ABC30EB7" -+ $"7BC204B6CF0A05C3E9B805C594B69AC6D3B825C637BAECC521B8CD0A06B967C2" -+ $"23B8A5C3F1BB51C5B0BE70C323BED1C0BCBCE5C1CC0A04B8A5C548B8A5C3F1BB" -+ $"51C5B0BB5AC71A0606BA0ABC41C6A5BB73C983BCF9CB79BBC8CAD5BE40CC23C0" -+ $"5CCC1EC044C512BFC8C4E20A04C6A1BBC1C7E5BB6BC8ABBCF7C80EBE920A04C9" -+ $"EA41C8C5BFF3CABBC3D4CAE3C2140A06BA90C206BA19C33CBADEC3EBBEA7C1C4" -+ $"BED1C0BCBCE5C1CC0A06BC7AB801BCAAB49EBE1BB43BBE33B460BCDAB4C7BCB1" -+ $"B7EC0A04BFE1B69AC021B6A1C1ADB40DC187B3FF0A04C3E9B805C594B69AC5B7" -+ $"B6C3C41AB8250A04C6A1BBC1C7E5BB6BC7F4BB8EC6B9BBEC0A04C8C5BFF3C9EA" -+ $"41CA07C060C8E5C02B0628AAAAAAAAAAAEEFAAA9BACAB4C3BFCAE3C214C9EA41" -+ $"C8C5BFF3C80FBE90C8ABBCF7C7F4BB8EC7E5BB6BC6A1BBC1C637BAECC6D3B826" -+ $"C5B7B6C3C594B69AC3E9B805C3F9B80FC30EB77BC341B4ABC1ADB40DC187B3FF" -+ $"C068B5C6BF40B50ABE9BB514BF03B507BE9BB514BE1BB43BBCAAB49EBC9EB57C" -+ $"BC9EB57CBB34B5E3B87FB7A5B9BC29B87FB7A5B801B993B3F7BCF4B5CD36B3F7" -+ $"BCF4B413C012B789C251B964C223B8A5C3F1C548BB5AC71ABFC8C4E2C044C512" -+ $"C05CCC1EC693C7B5C9B7C688C894C759CAD2C5BECB14C47F0A06BE4DC302BB33" -+ $"4EB8F2C3E4B99FC21DBCE5C1CCBEAEC0D1020ABFDBBBF7BFE1BBDFBFC9BC38BF" -+ $"63BC91BF9DBC71BEE7BCD8BE03BC31BE4BBCABBE03BC31BE00BC24BE0137BE10" -+ $"BC1ABE4BBC03BE30BC0EBE4BBC03BEE9BBBABEE9BBBABEE9BBBABF7BBB58BF7B" -+ $"BB58BF8FBB45BFBDBB29BFA9BB3440BB2DBFC3BB34BFC3BB34BFD9BB5BBFE7BB" -+ $"B2BFE7BB85BFE7BBC8020ABFD5BC12BFD9BC00BFC3BC4FBF67BC9CBF9CBC80BE" -+ $"FCBCDBBE32BC45BE70BCB4BE32BC45BE2BBC39BE30BC41BE3EBC32BE70BC1DBE" -+ $"58BC27BE70BC1DBEFEBBDDBEFEBBDDBEFEBBDDBF7EBB84BF7EBB84BF90BB77BF" -+ $"B7BB5CBFA7BB66BFBDBB5F40BB6640BB66BFD4BB87BFDCBBD4BFDCBBADBFDCBB" -+ $"EA0605BA02BC2BC6AFC155C3BAC269C139C245C1A9C25CC1A9C1A5C3EFBBF5C7" -+ $"310A04BC7AB801BF99B6C0C125B79BBFB3B7FF0A03BFE1B69AC3A0B7D5C204B6" -+ $"CF0A05BCAAC670BCB9C66BBE0FC73AC05BC70BBDF4C7890A04BC34C73FBDE5C8" -+ $"8AC04EC88BBDC9C8D80A04BB81C817BD6CC9CFC072C973BD505A0A04BB60C971" -+ $"BD4FCB2BC054CACFBD33CB790A03C6D944C9E8C6DAC695540A03BD9FBC21BEE9" -+ $"BBBAC059BA770204BF4DBBE8BF4DBC1ABF4DBBB7BF95BB8FBF6FBB8FBFBCBB8F" -+ $"BFD9BBE8BFD9BBB7BFD9BC1ABF95BC42BFBCBC42BF6FBC420A04BAD6C37ABBFA" -+ $"C2FDBAD1C336BA8CC2FD0606BA0ABC2BC6AF35C98ABCC1CB6BBB88CAC8BE00CC" -+ $"16C049CC29C033C51CBFB5C4EA0A092844284E2A502A5A325A3250344E34442E" -+ $"4202042E3AB9753AB7B23A2A3E2ABE112ABFD52E42B7B242B97542323E32BFD5" -+ $"32BE11280A000100000A010101000A020102000A030103000A040104000A0501" -+ $"05000A060106000A070107000A080108000A090109000A0A010A000A0B010B00" -+ $"0A0C010C000A0D010D000A0E010E000A0F010F000A100110000A110111000A12" -+ $"0112000A130113000A140114000A150115000A1603161718000A170119000A18" -+ $"011A000A18011B000A18011C000A18011D000A18011E000A18011F000A180120" -+ $"000A190121000A180122000A1A0123000A1B0124000A1C0125000A1D012630C3" -+ $"89B47101178400040A1E012620C389B4710A1D012730C389B47101178400040A" -+ $"1F012720C389B471" -+}; -+ -Index: /generated/bezilla/mozilla/browser/app/apprunner-beos.rdef -=================================================================== ---- /generated/bezilla/mozilla/browser/app/apprunner-beos.rdef (revision 0) -+++ /generated/bezilla/mozilla/browser/app/apprunner-beos.rdef (revision 0) -@@ -0,0 +1,125 @@ -+/* -+ * BeZillaBrowser.rdef -+ */ -+ -+resource app_signature "application/x-vnd.Mozilla-Firefox"; -+ -+resource app_flags B_SINGLE_LAUNCH; -+ -+resource app_version { -+ /* -+ * We are using the source code version number -+ * for our program version. -+ * TODO : implement something better. -+ */ -+ major = 1, -+ middle = 8, -+ minor = 1, -+ -+ /* 0 = development 1 = alpha 2 = beta -+ 3 = gamma 4 = golden master 5 = final */ -+ variety = 0, -+ -+ internal = 21, -+ -+ short_info = "BeZillaBrowser", -+ long_info = "BeZillaBrowser is based on Mozilla's source code" -+}; -+ -+resource file_types message { -+ "types" = "application/x-vnd.Be.URL.file", -+ "types" = "application/x-vnd.Be.URL.ftp", -+ "types" = "application/x-vnd.Be.URL.http", -+ "types" = "application/x-vnd.Be.URL.https", -+ "types" = "text/html", -+ "types" = "image/gif", -+ "types" = "image/png" -+}; -+ -+resource vector_icon { -+ $"6E6369661F0500020016029E8638A20EBA220EBA9E86384880254A18EA00FFFF" -+ $"8002001602BC9D88BB1F643B1F64BC9D884B716D48772700FFFF80020016023B" -+ $"F73A0000000000003BF73A49B5114976B000FFFF800200160237A0DDB61AF236" -+ $"1AF237A0DD497CAA48588100FFFF800200160238D81CB8152D38152D38D81C48" -+ $"420A499FB600FFFF8002001602397095000000000000397095486EDA49100600" -+ $"FFFF800200160231E5B2BA0EAF3A0EAF31E5B247DA3349779B00FFFF80020016" -+ $"0236BBEFB4543A34543A36BBEF495BDE469BC700FFFF6B0200160236E2E70000" -+ $"0000000036E2E74A2CD64670CD00FFFF800200160237AB1000000000000037AB" -+ $"104AE1D848449500FFFF5702001602375C10B74516374516375C1048B2B04AE9" -+ $"7200FFFF8002001602B07700B74912374912B077004898AD4AD99500FFFF8002" -+ $"00160232CFA5BA0B483A0B4832CFA54A3C584BA00E00FFFF8002001602368CB7" -+ $"000000000000368CB74B3D5E49752800FFFF4F0200160236A81C000000000000" -+ $"36A81C4B94C84A808500FFFF4002000602B738F7362603B62603B738F748BB3F" -+ $"4A241700A91212FFD7121202001602B04887376143B76143B0488748D36C44FB" -+ $"3100FFFF6B02001602B47620362BAAB62BAAB476204A0C144406C600FFFF8002" -+ $"001602B4CAE23409B3B409B3B4CAE24AD8D54611F100FFFF8002001602B328E4" -+ $"324E4AB24E4AB328E44B36A648859C00FFFF8002001602B22376311F03B11F03" -+ $"B223764B891349FFBC00FFFF80010079009803FF000004006002001602B4E6F3" -+ $"319259B19259B4E6F34B2F5D4AA2CA00FFFF0003FFFF0004FFD801FFFF669805" -+ $"000201060238CC87BD083D3DCC623981954609924A996B00FFB11BFFFFF9C727" -+ $"0633EEEBFFFFAAEAABDBAEBBBEAE2BC0CEB389C02424C074B415BFF0B478BFB4" -+ $"B450BFB7B455BFB6B455BF8CB436BF14B430BF55B42DBEF5B3FFBE82B33EBBDB" -+ $"B3F2BBCEB4D7BBD0B4BABBCBB4DABBC7B4DABBC7B4DABBC8B4DABB45B50ABB45" -+ $"B50ABB44B50ABB37B50DBB37B50DBAD6B534BA1EB58DBA78B560BA1EB58DBA12" -+ $"B593BA12B593BA0FB596B99BB5D6B99BB5D6B99AB5D6B975B5ECB975B5ECB974" -+ $"B5EDB918B626B918B626B917B626B8EDB642B893B681B887B689B86CB69CB7F2" -+ $"2AB7B5B72DB7A9B76EB73CB920B755B8C5B6B5B9A4B380BC3AB4F7BB4BB380BC" -+ $"3AB317BC7FB33E42B755C332B80EC320B7E7C323B7FBC3522CC3C54FBB03C7E8" -+ $"BAF4C7DBBAD1C898BA59CA44BC40CC83BAD4CBC3BDF3CD6FC0A0CDA4C760C888" -+ $"CA38C797C90DC879CB7BC6A2CC38C4DCCB9AC3A6CBB6C3DDCBA2C34CCBC2C1EB" -+ $"CA78BF62C954BF30C9ADBF3FC934BEE9C900BE83C91DBEC2C927BE17C999BCEA" -+ $"C857BA6BC720BABCC767BAABC73FBA2EC7C0B7EEC5B1B563C3F4B6DBC472B66F" -+ $"C405B613C427B41BC12CB2F006032FBAF5C05EBAF5C05EBAF7C05C34C05A34C0" -+ $"5B34C05A34C05B0610EE7AAAAAC693C7B5C9E8C667C896C755CAB5C5D3CB14C4" -+ $"7FC521B8CDC521B8CDC0B9B834BD7FBA63BC9BBC64B789BF00B92ABE82B789BF" -+ $"00C251BCE5C1CCBED1C0BCBE70C324BB51C5B0BB5AC71ABFC8C4E2C044C512C0" -+ $"5CCC1E0604EEBD7FBA63C521B8CDC0B9B834C521B8CDBF40B50AB87FB7A5BC0C" -+ $"B4F7B87FB7A50604FEBD7FBA63C521B8CDC0B9B834C521B8CDBF40B50ABF40B5" -+ $"0ABD2DB521B87FB7A5BA8CB5E9B87FB7A50605BB02B3F7BCF4B5CD36B3F7BCF4" -+ $"B789BF00BA19BDD6B8DABE8835BD1EBC9BBC64B801B9930A04B87FB7A5BD7FBA" -+ $"63BC9BBC64B801B9930A04B3F7BCF4B413C012B789C251B789BF000A04BC7AB8" -+ $"01BF99B6C0BE1BB43BBCAAB49E0A05BFE1B69AC187B3FFC341B4ABC30EB77BC2" -+ $"04B6CF0A05C3E9B805C594B69AC6D3B825C637BAECC521B8CD0A06B967C223B8" -+ $"A5C3F1BB51C5B0BE70C323BED1C0BCBCE5C1CC0A04B8A5C548B8A5C3F1BB51C5" -+ $"B0BB5AC71A0606BA0ABC41C6A5BB73C983BCF9CB79BBC8CAD5BE40CC23C05CCC" -+ $"1EC044C512BFC8C4E20A04C6A1BBC1C7E5BB6BC8ABBCF7C80EBE920A04C9EA41" -+ $"C8C5BFF3CABBC3D4CAE3C2140A06BA90C206BA19C33CBADEC3EBBEA7C1C4BED1" -+ $"C0BCBCE5C1CC0A06BC7AB801BCAAB49EBE1BB43BBE33B460BCDAB4C7BCB1B7EC" -+ $"0A04BFE1B69AC021B6A1C1ADB40DC187B3FF0A04C3E9B805C594B69AC5B7B6C3" -+ $"C41AB8250A04C6A1BBC1C7E5BB6BC7F4BB8EC6B9BBEC0A04C8C5BFF3C9EA41CA" -+ $"07C060C8E5C02B0628AAAAAAAAAAAEEFAAA9BACAB4C3BFCAE3C214C9EA41C8C5" -+ $"BFF3C80FBE90C8ABBCF7C7F4BB8EC7E5BB6BC6A1BBC1C637BAECC6D3B826C5B7" -+ $"B6C3C594B69AC3E9B805C3F9B80FC30EB77BC341B4ABC1ADB40DC187B3FFC068" -+ $"B5C6BF40B50ABE9BB514BF03B507BE9BB514BE1BB43BBCAAB49EBC9EB57CBC9E" -+ $"B57CBB34B5E3B87FB7A5B9BC29B87FB7A5B801B993B3F7BCF4B5CD36B3F7BCF4" -+ $"B413C012B789C251B964C223B8A5C3F1C548BB5AC71ABFC8C4E2C044C512C05C" -+ $"CC1EC693C7B5C9B7C688C894C759CAD2C5BECB14C47F0A06BE4DC302BB334EB8" -+ $"F2C3E4B99FC21DBCE5C1CCBEAEC0D1020ABFDBBBF7BFE1BBDFBFC9BC38BF63BC" -+ $"91BF9DBC71BEE7BCD8BE03BC31BE4BBCABBE03BC31BE00BC24BE0137BE10BC1A" -+ $"BE4BBC03BE30BC0EBE4BBC03BEE9BBBABEE9BBBABEE9BBBABF7BBB58BF7BBB58" -+ $"BF8FBB45BFBDBB29BFA9BB3440BB2DBFC3BB34BFC3BB34BFD9BB5BBFE7BBB2BF" -+ $"E7BB85BFE7BBC8020ABFD5BC12BFD9BC00BFC3BC4FBF67BC9CBF9CBC80BEFCBC" -+ $"DBBE32BC45BE70BCB4BE32BC45BE2BBC39BE30BC41BE3EBC32BE70BC1DBE58BC" -+ $"27BE70BC1DBEFEBBDDBEFEBBDDBEFEBBDDBF7EBB84BF7EBB84BF90BB77BFB7BB" -+ $"5CBFA7BB66BFBDBB5F40BB6640BB66BFD4BB87BFDCBBD4BFDCBBADBFDCBBEA06" -+ $"05BA02BC2BC6AFC155C3BAC269C139C245C1A9C25CC1A9C1A5C3EFBBF5C7310A" -+ $"04BC7AB801BF99B6C0C125B79BBFB3B7FF0A03BFE1B69AC3A0B7D5C204B6CF0A" -+ $"05BCAAC670BCB9C66BBE0FC73AC05BC70BBDF4C7890A04BC34C73FBDE5C88AC0" -+ $"4EC88BBDC9C8D80A04BB81C817BD6CC9CFC072C973BD505A0A04BB60C971BD4F" -+ $"CB2BC054CACFBD33CB790A03C6D944C9E8C6DAC695540A03BD9FBC21BEE9BBBA" -+ $"C059BA770204BF4DBBE8BF4DBC1ABF4DBBB7BF95BB8FBF6FBB8FBFBCBB8FBFD9" -+ $"BBE8BFD9BBB7BFD9BC1ABF95BC42BFBCBC42BF6FBC420A04BAD6C37ABBFAC2FD" -+ $"BAD1C336BA8CC2FD0606BA0ABC2BC6AF35C98ABCC1CB6BBB88CAC8BE00CC16C0" -+ $"49CC29C033C51CBFB5C4EA060DEE1FBF032F442B4F2B48294B244A2953235029" -+ $"532354295423542E58265A2E585C3030583058385A3B543B543554355335533B" -+ $"503A4A334F354B3348270A000100000A010101000A020102000A030103000A04" -+ $"0104000A050105000A060106000A070107000A080108000A090109000A0A010A" -+ $"000A0B010B000A0C010C000A0D010D000A0E010E000A0F010F000A100110000A" -+ $"110111000A120112000A130113000A140114000A150115000A1603161718000A" -+ $"170119000A18011A000A18011B000A18011C000A18011D000A18011E000A1801" -+ $"1F000A180120000A190121000A180122000A1A0123000A1B0124000A1C012500" -+ $"0A1D012638BFB3B32615FF01178400040A1D012638BFB3B32600150117860004" -+ $"0A1E012620BFB3B326" -+}; -+ -+ diff --git a/www-client/mozilla_firefox/patches/2009-09-27/r05-fix-shlibsign.README b/www-client/mozilla_firefox/patches/2009-09-27/r05-fix-shlibsign.README deleted file mode 100644 index 65bfa2fbd..000000000 --- a/www-client/mozilla_firefox/patches/2009-09-27/r05-fix-shlibsign.README +++ /dev/null @@ -1,66 +0,0 @@ - does this look odd for gcc2 - #define NUM_ELEM(array) (sizeof(array)/sizeof(array[0])) CK_BBOOL true = CK_TRUE; CK_BBOOL false = CK_FALSE; static PRBool verbose = PR_FALSE; - #define NUM_ELEM(array) (sizeof(array)/sizeof(array[0])) - CK_BBOOL true = CK_TRUE; - CK_BBOOL false = CK_FALSE; - static PRBool verbose = PR_FALSE; - ignore the first line... bad paste :) - looks fine to me - here's the error http://haiku.pastebin.com/d3cf782e4 - and the full file http://haiku.pastebin.com/d4125cc53 - anyone wanna try ? - http://revolf.free.fr/beos/patches/oss-haiku-pci-reservation.diff - might have some macro issues there, it's using a ton of macro defines - mozilla-specific - any ideas what the error is indicating? - as I said, something's wrong with one of the macros, looking at the output of gcc -E for that line might be helpful - Disreali: does this uid/gid fix also fix the read-only files btw? - I think it was -E let me check - yep - -E with -o too ? - yes - it'll write the source after preprocessing to the output file - so you can see what all those macros actually evaluated to - unless that highlights something obvious you'd probably need to enlist tqh though, I know nothing about nspr - mmadia: it indicates that someone defines true/false to 1/0 - so it ends up doing CK_BBOOL 1 = CK_TRUE - which is a syntax error - ah oops - totally overlooked that - most likely you one of the Be/Haiku headers is indirectly included - BeBuild.h I think does define them - you could #undef true and #undef false before those lines to make sure - cpp/stl_config.h:# define true 1 - that should only be if __STL_NO_BOOL is defined though - and since it's a cpp header it shouldn't be used there right? - not seeing any others in the headers offhand - right - only other one I see is build/gcc-2.95.3/stdbool.h: #define true 1 - which definitely isn't involved - it's included from SupportDefs - /* Grandfathering */ - #ifndef __cplusplus - #include - #endif - yes but that's headers/build - also in headers/os - it's quite likely that you end up including SupportDefs.h one way or another - as it defines our native int types it's included indirectly by most Be/Haiku headers - hm, grep didn't find one in headers/os - at least not one doing that define - the #undef seems to have worked for now. - nah, it includes stdbool.h in haiku - that one presumably comes from the toolchain? - in beos it did define it at that place as far as I remember - stdbool.h that is - likely - it should be in the gcc headers - that explains that - not that I could find it off hand - ah, it's in the libgcc headers - - - - - - diff --git a/www-client/mozilla_firefox/patches/2009-09-27/r05-fix-shlibsign.patch b/www-client/mozilla_firefox/patches/2009-09-27/r05-fix-shlibsign.patch deleted file mode 100644 index c46cbbd9a..000000000 --- a/www-client/mozilla_firefox/patches/2009-09-27/r05-fix-shlibsign.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: security/nss/cmd/shlibsign/shlibsign.c -=================================================================== ---- security/nss/cmd/shlibsign/shlibsign.c (revision 7) -+++ security/nss/cmd/shlibsign/shlibsign.c (working copy) -@@ -83,6 +83,11 @@ - /* freebl headers */ - #include "shsign.h" - -+#ifdef XP_BEOS -+#undef true -+#undef false -+#endif -+ - #define NUM_ELEM(array) (sizeof(array)/sizeof(array[0])) - CK_BBOOL true = CK_TRUE; - CK_BBOOL false = CK_FALSE; diff --git a/www-client/mozilla_firefox/patches/2009-09-27/r06-nss-gcc4.patch b/www-client/mozilla_firefox/patches/2009-09-27/r06-nss-gcc4.patch deleted file mode 100644 index 2a0496429..000000000 --- a/www-client/mozilla_firefox/patches/2009-09-27/r06-nss-gcc4.patch +++ /dev/null @@ -1,55 +0,0 @@ -Index: security/nss/cmd/lib/secutil.h -=================================================================== ---- security/nss/cmd/lib/secutil.h (revision 7) -+++ security/nss/cmd/lib/secutil.h (working copy) -@@ -450,7 +450,7 @@ - - void printflags(char *trusts, unsigned int flags); - --#if !defined(XP_UNIX) && !defined(XP_OS2) -+#if !defined(XP_UNIX) && !defined(XP_OS2) && !defined(XP_BEOS) - extern int ffs(unsigned int i); - #endif - -Index: security/nss/lib/dev/ckhelper.c -=================================================================== ---- security/nss/lib/dev/ckhelper.c (revision 7) -+++ security/nss/lib/dev/ckhelper.c (working copy) -@@ -230,13 +230,13 @@ - PRStatus *rvStatus - ) - { -- CK_BBOOL bool; -+ CK_BBOOL boolval; - CK_ATTRIBUTE_PTR attr; - CK_ATTRIBUTE atemplate = { 0, NULL, 0 }; - CK_RV ckrv; - void *epv = nssSlot_GetCryptokiEPV(slot); - attr = &atemplate; -- NSS_CK_SET_ATTRIBUTE_VAR(attr, attribute, bool); -+ NSS_CK_SET_ATTRIBUTE_VAR(attr, attribute, boolval); - nssSession_EnterMonitor(session); - ckrv = CKAPI(epv)->C_GetAttributeValue(session->handle, object, - &atemplate, 1); -@@ -246,7 +246,7 @@ - return PR_FALSE; - } - *rvStatus = PR_SUCCESS; -- return (PRBool)(bool == CK_TRUE); -+ return (PRBool)(boolval == CK_TRUE); - } - - NSS_IMPLEMENT PRStatus -Index: security/nss/lib/freebl/unix_rand.c -=================================================================== ---- security/nss/lib/freebl/unix_rand.c (revision 7) -+++ security/nss/lib/freebl/unix_rand.c (working copy) -@@ -669,7 +669,7 @@ - #endif /* VMS */ - - #ifdef BEOS --#include -+#include - - static size_t - GetHighResClock(void *buf, size_t maxbytes) diff --git a/www-client/mozilla_firefox/patches/2009-09-27/r07-working-nspr-from-haikuports.patch b/www-client/mozilla_firefox/patches/2009-09-27/r07-working-nspr-from-haikuports.patch deleted file mode 100644 index 83868d3c9..000000000 --- a/www-client/mozilla_firefox/patches/2009-09-27/r07-working-nspr-from-haikuports.patch +++ /dev/null @@ -1,5411 +0,0 @@ -Index: nsprpub/pr/include/prtypes.h -=================================================================== ---- nsprpub/pr/include/prtypes.h (revision 7) -+++ nsprpub/pr/include/prtypes.h (working copy) -@@ -98,6 +98,24 @@ - - #elif defined(XP_BEOS) - -+/* GCC 3.3 and later support the visibility attribute. */ -+#if (__GNUC__ >= 4) || \ -+ (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) -+#define PR_VISIBILITY_DEFAULT __attribute__((visibility("default"))) -+#define PR_EXPORT(__type) extern PR_VISIBILITY_DEFAULT __type -+#define PR_EXPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type -+#define PR_IMPORT(__type) extern PR_VISIBILITY_DEFAULT __type -+#define PR_IMPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type -+ -+#define PR_EXTERN(__type) extern PR_VISIBILITY_DEFAULT __type -+#define PR_IMPLEMENT(__type) PR_VISIBILITY_DEFAULT __type -+#define PR_EXTERN_DATA(__type) extern PR_VISIBILITY_DEFAULT __type -+#define PR_IMPLEMENT_DATA(__type) PR_VISIBILITY_DEFAULT __type -+#define PR_CALLBACK -+#define PR_CALLBACK_DECL -+#define PR_STATIC_CALLBACK(__x) static __x -+ -+#else - #define PR_EXPORT(__type) extern __declspec(dllexport) __type - #define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type - #define PR_IMPORT(__type) extern __declspec(dllexport) __type -@@ -111,6 +129,7 @@ - #define PR_CALLBACK - #define PR_CALLBACK_DECL - #define PR_STATIC_CALLBACK(__x) static __x -+#endif - - #elif defined(WIN16) - -Index: nsprpub/pr/include/prio.h -=================================================================== ---- nsprpub/pr/include/prio.h (revision 7) -+++ nsprpub/pr/include/prio.h (working copy) -@@ -174,20 +174,20 @@ - union PRNetAddr { - struct { - PRUint16 family; /* address family (0x00ff maskable) */ --#ifdef XP_BEOS -- char data[10]; /* Be has a smaller structure */ -+#ifndef XP_BEOS -+ char data[14]; /* raw address data */ - #else -- char data[14]; /* raw address data */ -+ char data[30]; - #endif - } raw; - struct { - PRUint16 family; /* address family (AF_INET) */ - PRUint16 port; /* port number */ - PRUint32 ip; /* The actual 32 bits of address */ --#ifdef XP_BEOS -- char pad[4]; /* Be has a smaller structure */ -+#ifndef XP_BEOS -+ char pad[8]; - #else -- char pad[8]; -+ char pad[24]; - #endif - } inet; - struct { -@@ -196,6 +196,9 @@ - PRUint32 flowinfo; /* routing information */ - PRIPv6Addr ip; /* the actual 128 bits of address */ - PRUint32 scope_id; /* set of interfaces for a scope */ -+#ifdef XP_BEOS -+ char pad[4]; -+#endif - } ipv6; - #if defined(XP_UNIX) || defined(XP_OS2_EMX) - struct { /* Unix domain socket address */ -Index: nsprpub/pr/include/md/_beos.cfg -=================================================================== ---- nsprpub/pr/include/md/_beos.cfg (revision 7) -+++ nsprpub/pr/include/md/_beos.cfg (working copy) -@@ -20,6 +20,7 @@ - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): -+ * Fredrik Holmqvist - * - * 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 -@@ -40,7 +41,6 @@ - - #ifndef XP_BEOS - #define XP_BEOS --#undef XP_UNIX - #endif - - #ifndef BEOS -@@ -57,6 +57,12 @@ - #undef IS_BIG_ENDIAN - #endif - -+/* -+ * Fixme: Should be done according to arch -+ * Currently only x86/ia64. -+ */ -+#define PR_ALIGN_OF_WORD 4 -+ - #define PR_BYTES_PER_BYTE 1 - #define PR_BYTES_PER_SHORT 2 - #define PR_BYTES_PER_INT 4 -Index: nsprpub/pr/include/md/_beos.h -=================================================================== ---- nsprpub/pr/include/md/_beos.h (revision 7) -+++ nsprpub/pr/include/md/_beos.h (working copy) -@@ -20,6 +20,7 @@ - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): -+ * Fredrik Holmqvist - * - * 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 -@@ -38,19 +39,18 @@ - #ifndef nspr_beos_defs_h___ - #define nspr_beos_defs_h___ - --#include "prtypes.h" --#include "prio.h" --#include "prthread.h" --#include "prproces.h" --#include "prmem.h" --#include "obsolete/prsem.h" - #include -- --#include --#include - #include -+#include - - /* -+ * Hack for Cross compile -+ */ -+#define FD_SETSIZE 1024 -+ -+#undef bool -+ -+/* - * Internal configuration macros - */ - -@@ -67,37 +67,39 @@ - #endif - #define PR_DLL_SUFFIX ".so" - --#define _PR_VMBASE 0x30000000 --#define _PR_STACK_VMBASE 0x50000000 - #define _MD_DEFAULT_STACK_SIZE 65536L --#define _MD_MMAP_FLAGS MAP_PRIVATE - - #undef HAVE_STACK_GROWING_UP - #define HAVE_DLL --#define _PR_NO_CLOCK_TIMER - - /* - * The Atomic operations - */ - - #define _PR_HAVE_ATOMIC_OPS -+#ifdef __powerpc__ - #define _MD_INIT_ATOMIC _MD_AtomicInit -+#else -+#define _MD_INIT_ATOMIC() -+#endif - #define _MD_ATOMIC_INCREMENT _MD_AtomicIncrement - #define _MD_ATOMIC_ADD _MD_AtomicAdd - #define _MD_ATOMIC_DECREMENT _MD_AtomicDecrement - #define _MD_ATOMIC_SET _MD_AtomicSet - -+/* Makes sure to don't create cvar when creating sem */ - #define HAVE_CVAR_BUILT_ON_SEM -+ -+/* Not sure this is needed, but no harm. */ - #define _PR_GLOBAL_THREADS_ONLY -+ - #define _PR_BTHREADS --#define _PR_NEED_FAKE_POLL --#define _PR_HAVE_PEEK_BUFFER --#define _PR_PEEK_BUFFER_MAX (16 * 1024) --#define _PR_FD_NEED_EMULATE_MSG_PEEK(fd) 1 --#define _PR_CONNECT_DOES_NOT_BIND -+ - #define _PR_HAVE_O_APPEND - --/* Define threading functions and objects as native BeOS */ -+/* Define threading functions and objects as native BeOS -+ Used by bthreads. */ -+ - struct _MDThread { - thread_id tid; /* BeOS thread handle */ - sem_id joinSem; /* sems used to synchronzie joining */ -@@ -105,56 +107,16 @@ - join this thread */ - }; - --struct _MDThreadStack { -- PRInt8 notused; --}; -- - /* -- * Lock and Semaphore related definitions -- */ -- --struct _MDLock { -- sem_id semaphoreID; -- int32 benaphoreCount; --}; -- --struct _MDCVar { -- sem_id sem1; -- sem_id sem2; -- int16 count; --}; -- --struct _MDSemaphore { -- sem_id sid; --}; -- --/* --** CPU-related definitions --*/ --struct _MDCPU { -- int8 unused; --}; -- --/* - ** Process-related definitions - */ - struct _MDProcess { - pid_t pid; - }; - --struct _MDSegment { -- PRInt8 notused; --}; -- - /* - ** File- and directory-related definitions - */ -- --#ifndef BONE_VERSION --#define BE_SOCK_SHUTDOWN_READ 0x01 --#define BE_SOCK_SHUTDOWN_WRITE 0x02 --#endif -- - struct _MDFileDesc { - PRInt32 osfd; - PRInt32 sock_state; -@@ -178,27 +140,21 @@ - - #define GETTIMEOFDAY(tp) gettimeofday((tp), NULL) - --/* --- Memory-mapped files stuff --- not implemented on BeOS */ - --struct _MDFileMap { -- PRInt8 unused; --}; -- - /* - * Network related definitions. - */ - - #ifndef BONE_VERSION -+#define BE_SOCK_SHUTDOWN_READ 0x01 -+#define BE_SOCK_SHUTDOWN_WRITE 0x02 -+ - #define IPPROTO_IP 0 - #define AF_UNIX 2 - #define TCP_NODELAY SO_NONBLOCK - #define SO_LINGER -1 - #define SO_ERROR 4 --#endif - --#define _PR_INTERRUPT_CHECK_INTERVAL_SECS 5 -- --#ifndef BONE_VERSION - /* these aren't actually used. if they are, we're screwed */ - struct protoent { - char *p_name; /* official protocol name */ -@@ -210,169 +166,58 @@ - struct protoent* getprotobynumber(int number); - #endif - -+/* Used by bnet.c */ -+#define _PR_INTERRUPT_CHECK_INTERVAL_SECS 5 -+ - /* - * malloc() related definitions. -+ * Avoids prmalloc.c's and prmem's code - */ -- - #undef _PR_OVERRIDE_MALLOC - - /* Miscellaneous */ - - #define _MD_ERRNO() (errno) - --#define _MD_CLEANUP_BEFORE_EXIT _MD_cleanup_before_exit --#define _MD_EXIT _MD_exit -+#define _MD_CLEANUP_BEFORE_EXIT() -+#define _MD_EXIT exit - - #define _MD_GET_ENV getenv - #define _MD_PUT_ENV putenv - --#define _MD_EARLY_INIT _MD_early_init --#define _MD_FINAL_INIT _MD_final_init -+#define _MD_EARLY_INIT() -+#ifdef BONE_VERSION -+#define _MD_FINAL_INIT() -+#else -+#define _MD_FINAL_INIT _MD_final_init_netserver -+#endif - --/* CPU Stuff */ -- --#define _MD_INIT_CPUS _MD_init_cpus --#define _MD_WAKEUP_CPUS _MD_wakeup_cpus --#define _MD_START_INTERRUPTS _MD_start_interrupts --#define _MD_STOP_INTERRUPTS _MD_stop_interrupts --#define _MD_DISABLE_CLOCK_INTERRUPTS _MD_disable_clock_interrupts --#define _MD_BLOCK_CLOCK_INTERRUPTS _MD_block_clock_interrupts --#define _MD_UNBLOCK_CLOCK_INTERRUPTS _MD_unblock_clock_interrupts --#define _MD_CLOCK_INTERRUPT _MD_clock_interrupt --#define _MD_INIT_STACK _MD_init_stack --#define _MD_CLEAR_STACK _MD_clear_stack --// #define _MD_GET_INTSOFF _MD_get_intsoff --// #define _MD_SET_INTSOFF _MD_set_intsoff --#define _MD_CURRENT_CPU _MD_current_cpu --#define _MD_SET_CURRENT_CPU _MD_set_current_cpu --#define _MD_INIT_RUNNING_CPU _MD_init_running_cpu --#define _MD_PAUSE_CPU _MD_pause_cpu -- - /* Thread stuff */ - - #define _MD_CURRENT_THREAD() PR_GetCurrentThread() --// #define _MD_GET_ATTACHED_THREAD _MD_get_attached_thread --#define _MD_LAST_THREAD _MD_last_thread --#define _MD_SET_CURRENT_THREAD _MD_set_current_THREAD --#define _MD_SET_LAST_THREAD _MD_set_last_thread --#define _MD_INIT_THREAD _MD_init_thread --#define _MD_EXIT_THREAD _MD_exit_thread --#define _MD_INIT_ATTACHED_THREAD _MD_init_attached_thread - --#define _MD_SUSPEND_THREAD _MD_suspend_thread --#define _MD_RESUME_THREAD _MD_resume_thread --#define _MD_SUSPEND_CPU _MD_suspend_cpu --#define _MD_RESUME_CPU _MD_resume_cpu --#define _MD_BEGIN_SUSPEND_ALL _MD_begin_suspend_all --#define _MD_END_SUSPEND_ALL _MD_end_suspend_all --#define _MD_BEGIN_RESUME_ALL _MD_begin_resume_all --#define _MD_END_RESUME_ALL _MD_end_resume_all - --#define _MD_GET_SP _MD_get_sp -- --#define _MD_CLEAN_THREAD _MD_clean_thread --#define _MD_CREATE_PRIMORDIAL_USER_THREAD _MD_create_primordial_user_thread --#define _MD_CREATE_USER_THREAD _MD_create_user_thread --#define _MD_INIT_PRIMORDIAL_THREAD _MD_init_primordial_thread --#define _MD_CREATE_THREAD _MD_create_thread --#define _MD_YIELD _MD_yield --#define _MD_SET_PRIORITY _MD_set_priority -- --#define _MD_SUSPENDALL _MD_suspendall --#define _MD_RESUMEALL _MD_resumeall -- --#define _MD_SWITCH_CONTEXT _MD_switch_context --#define _MD_RESTORE_CONTEXT _MD_restore_context -- --#define _MD_WAIT _MD_wait --#define _MD_WAKEUP_WAITER _MD_wakeup_waiter -- --#define _MD_SETTHREADAFFINITYMASK _MD_setthreadaffinitymask --#define _MD_GETTHREADAFFINITYMASK _MD_getthreadaffinitymask -- --/* Thread Synchronization */ -- --#define _MD_INIT_LOCKS _MD_init_locks --#define _MD_NEW_LOCK _MD_new_lock --#define _MD_FREE_LOCK _MD_free_lock --#define _MD_LOCK _MD_lock --#define _MD_TEST_AND_LOCK _MD_test_and_lock --#define _MD_UNLOCK _MD_unlock --#define _MD_IOQ_LOCK _MD_ioq_lock --#define _MD_IOQ_UNLOCK _MD_ioq_unlock --#define _MD_NEW_SEM _MD_new_sem --#define _MD_DESTROY_SEM _MD_destroy_sem --#define _MD_TIMED_WAIT_SEM _MD_timed_wait_sem --#define _MD_WAIT_SEM _MD_wait_sem --#define _MD_POST_SEM _MD_post_sem --// #define _MD_NEW_CV _MD_new_cv --// #define _MD_FREE_CV _MD_free_cv --// #define _MD_WAIT_CV _MD_wait_cv --// #define _MD_NOTIFY_CV _MD_notify_cv --// #define _MD_NOTIFYALL_CV _MD_notifyall_cv -- - /* File I/O */ - --/* don't need any I/O initializations */ --#define _MD_INIT_IO() --#define _MD_INIT_FILEDESC(fd) -+#define _PR_MD_WRITE - --#define _MD_OPEN_DIR _MD_open_dir --#define _MD_READ_DIR _MD_read_dir --#define _MD_CLOSE_DIR _MD_close_dir --#define _MD_MAKE_NONBLOCK _MD_make_nonblock --#define _MD_SET_FD_INHERITABLE _MD_set_fd_inheritable --#define _MD_INIT_FD_INHERITABLE _MD_init_fd_inheritable --#define _MD_QUERY_FD_INHERITABLE _MD_query_fd_inheritable --#define _MD_OPEN _MD_open --#define _MD_OPEN_FILE _MD_open --#define _MD_CLOSE_FILE _MD_close_file --#define _MD_READ _MD_read --#define _MD_WRITE _MD_write --#define _MD_WRITEV _MD_writev -+/* -+These are defined in primpl.h so that they are avail for all, but we -+have no calls, and pthreads doesn't either. - #define _MD_LSEEK _MD_lseek - #define _MD_LSEEK64 _MD_lseek64 --#define _MD_FSYNC _MD_fsync --#define _MD_DELETE _MD_delete -+ - #define _MD_GETFILEINFO _MD_getfileinfo - #define _MD_GETFILEINFO64 _MD_getfileinfo64 - #define _MD_GETOPENFILEINFO _MD_getopenfileinfo - #define _MD_GETOPENFILEINFO64 _MD_getopenfileinfo64 --#define _MD_RENAME _MD_rename --#define _MD_ACCESS _MD_access --#define _MD_STAT stat --#define _MD_MKDIR _MD_mkdir --#define _MD_MAKE_DIR _MD_mkdir --#define _MD_RMDIR _MD_rmdir --#define _MD_PR_POLL _MD_pr_poll -+*/ - - /* Network I/O */ - --#define _MD_CLOSE_SOCKET _MD_close_socket --#define _MD_CONNECT _MD_connect --#define _MD_ACCEPT _MD_accept --#define _MD_BIND _MD_bind --#define _MD_LISTEN _MD_listen --#define _MD_SHUTDOWN _MD_shutdown --#define _MD_RECV _MD_recv --#define _MD_SEND _MD_send --#define _MD_ACCEPT_READ _MD_accept_read --#define _MD_GETSOCKNAME _MD_getsockname --#define _MD_GETPEERNAME _MD_getpeername --#define _MD_GETSOCKOPT _MD_getsockopt --#define _MD_SETSOCKOPT _MD_setsockopt --#define _MD_RECVFROM _MD_recvfrom --#define _MD_SENDTO _MD_sendto --#define _MD_SOCKETPAIR _MD_socketpair --#define _MD_SOCKET _MD_socket --#define _MD_SOCKETAVAILABLE _MD_socketavailable --#define _MD_PIPEAVAILABLE _MD_socketavailable -- - #define _MD_GET_SOCKET_ERROR() (errno) - #define _MD_GETHOSTNAME _MD_gethostname - --#define _MD_SELECT select -- - /* Process management */ - - #define _MD_CREATE_PROCESS _MD_create_process -@@ -380,19 +225,6 @@ - #define _MD_WAIT_PROCESS _MD_wait_process - #define _MD_KILL_PROCESS _MD_kill_process - --/* Atomic data operations */ -- --// #define _MD_INIT_ATOMIC _MD_init_atomic --// #define _MD_ATOMIC_INCREMENT _MD_atomic_increment --// #define _MD_ATOMIC_DECREMENT _MD_atomic_decrement --// #define _MD_ATOMIC_SET _MD_atomic_set -- --/* memory management */ -- --#define _MD_INIT_SEGS _MD_init_segs --#define _MD_ALLOC_SEGMENT _MD_alloc_segment --#define _MD_FREE_SEGMENT _MD_free_segment -- - /* Memory mapped file I/O */ - - #define _MD_CREATE_FILE_MAP _MD_create_file_map -@@ -403,8 +235,7 @@ - - /* Time related */ - --#define _MD_NOW _MD_now --#define _MD_INTERVAL_INIT _MD_interval_init -+#define _MD_INTERVAL_INIT() - #define _MD_GET_INTERVAL _MD_get_interval - #define _MD_INTERVAL_PER_SEC _MD_interval_per_sec - -@@ -414,200 +245,4 @@ - #define _MD_TLOCKFILE _MD_tlockfile - #define _MD_UNLOCKFILE _MD_unlockfile - --/** -- * Prototypes for machine dependent function implementations. (Too bad -- * NSPR's MD system blows so much that we have to reiterate every stinking -- * thing we implement here in our MD header file.) -- */ -- --/* Miscellaneous */ -- --NSPR_API(void) _MD_cleanup_before_exit(void); --NSPR_API(void) _MD_exit(PRIntn status); -- --NSPR_API(char*) _MD_get_env(const char *name); --NSPR_API(PRIntn) _MD_put_env(const char *name); -- --NSPR_API(void) _MD_early_init(void); --NSPR_API(void) _MD_final_init(void); -- --/* CPU Stuff */ -- --NSPR_API(void) _MD_init_cpus(); --NSPR_API(void) _MD_wakeup_cpus(); --NSPR_API(void) _MD_start_interrupts(void); --NSPR_API(void) _MD_stop_interrupts(void); --NSPR_API(void) _MD_disable_clock_interrupts(void); --NSPR_API(void) _MD_block_clock_interrupts(void); --NSPR_API(void) _MD_unblock_clock_interrupts(void); --NSPR_API(void) _MD_clock_interrupt(void); --// NSPR_API(void) _MD_init_stack(PRThreadStack *ts, PRIntn redzone); --// NSPR_API(void) _MD_clear_stack(PRThreadStack* ts); --// NSPR_API(PRInt32) _MD_get_intsoff(void); --// NSPR_API(void) _MD_set_intsoff(PRInt32 _val); --// NSPR_API(_PRCPU*) _MD_current_cpu(void); --// NSPR_API(void) _MD_set_current_cpu(_PRCPU *cpu); --// NSPR_API(void) _MD_init_running_cpu(_PRCPU *cpu); --NSPR_API(PRInt32) _MD_pause_cpu(PRIntervalTime timeout); -- --/* Thread stuff */ -- --// NSPR_API(PRThread*) _MD_current_thread(void); --NSPR_API(PRThread*) _MD_get_attached_thread(void); --NSPR_API(PRThread*) _MD_last_thread(void); --NSPR_API(void) _MD_set_current_thread(PRThread *thread); --NSPR_API(void) _MD_set_last_thread(PRThread *thread); --NSPR_API(PRStatus) _MD_init_thread(PRThread *thread); --NSPR_API(void) _MD_exit_thread(PRThread *thread); --NSPR_API(PRStatus) _MD_init_attached_thread(PRThread *thread); -- --NSPR_API(void) _MD_suspend_thread(PRThread *thread); --NSPR_API(void) _MD_resume_thread(PRThread *thread); --// NSPR_API(void) _MD_suspend_cpu(_PRCPU *cpu); --// NSPR_API(void) _MD_resume_cpu(_PRCPU *cpu); --NSPR_API(void) _MD_begin_suspend_all(void); --NSPR_API(void) _MD_end_suspend_all(void); --NSPR_API(void) _MD_begin_resume_all(void); --NSPR_API(void) _MD_end_resume_all(void); -- --NSPR_API(void *) _MD_get_sp(PRThread *thread); -- --NSPR_API(void) _MD_clean_thread(PRThread *thread); --NSPR_API(void) _MD_create_primordial_user_thread(PRThread *); --NSPR_API(PRThread*) _MD_create_user_thread(PRUint32 stacksize, void (*start)(void *), void *arg); --NSPR_API(void) _MD_init_primordial_thread(PRThread *thread); --NSPR_API(PRStatus) _MD_create_thread(PRThread *thread, void (*start)(void *), PRThreadPriority priority, PRThreadScope scope, PRThreadState state, PRUint32 stackSize); --NSPR_API(void) _MD_yield(void); --NSPR_API(void) _MD_set_priority(struct _MDThread *md, PRThreadPriority newPri); -- --NSPR_API(void) _MD_suspendall(void); --NSPR_API(void) _MD_resumeall(void); -- --NSPR_API(void) _MD_init_context(PRThread *thread, char *top, void (*start) (void), PRBool *status); --NSPR_API(void) _MD_switch_context(PRThread *thread); --NSPR_API(void) _MD_restore_context(PRThread *thread); -- --NSPR_API(PRStatus) _MD_wait(PRThread *, PRIntervalTime timeout); --NSPR_API(PRStatus) _MD_wakeup_waiter(PRThread *); -- --NSPR_API(PRInt32) _MD_setthreadaffinitymask(PRThread *thread, PRUint32 mask ); --NSPR_API(PRInt32) _MD_getthreadaffinitymask(PRThread *thread, PRUint32 *mask); -- --/* Thread Synchronization */ -- --NSPR_API(void) _MD_init_locks(void); --NSPR_API(PRStatus) _MD_new_lock(struct _MDLock *md); --NSPR_API(void) _MD_free_lock(struct _MDLock *md); --NSPR_API(void) _MD_lock(struct _MDLock *md); --NSPR_API(PRIntn) _MD_test_and_lock(struct _MDLock *md); --NSPR_API(void) _MD_unlock(struct _MDLock *md); --NSPR_API(void) _MD_ioq_lock(void); --NSPR_API(void) _MD_ioq_unlock(void); --NSPR_API(void) _MD_new_sem(struct _MDSemaphore *md, PRUintn value); --NSPR_API(void) _MD_destroy_sem(struct _MDSemaphore *md); --NSPR_API(PRStatus) _MD_timed_wait_sem(struct _MDSemaphore *md, PRIntervalTime timeout); --NSPR_API(PRStatus) _MD_wait_sem(struct _MDSemaphore *md); --NSPR_API(void) _MD_post_sem(struct _MDSemaphore *md); --// NSPR_API(PRInt32) _MD_new_cv(struct _MDCVar *md); --// NSPR_API(void) _MD_free_cv(struct _MDCVar *md); --// NSPR_API(void) _MD_wait_cv(struct _MDCVar *mdCVar, struct _MDLock *mdLock, PRIntervalTime timeout); --// NSPR_API(void) _MD_notify_cv(struct _MDCVar *md, struct _MDLock *lock); --// NSPR_API(void) _MD_notifyall_cv(struct _MDCVar *md, struct _MDLock *lock); -- --/* File I/O */ -- --// NSPR_API(void) _MD_init_io(void); --NSPR_API(PRStatus) _MD_open_dir(struct _MDDir *md,const char *name); --NSPR_API(char *) _MD_read_dir(struct _MDDir *md, PRIntn flags); --NSPR_API(PRInt32) _MD_close_dir(struct _MDDir *md); --NSPR_API(void) _MD_make_nonblock(PRFileDesc *fd); --NSPR_API(void) _MD_init_fd_inheritable(PRFileDesc *fd, PRBool imported); --NSPR_API(void) _MD_query_fd_inheritable(PRFileDesc *fd); --NSPR_API(PRInt32) _MD_open(const char *name, PRIntn osflags, PRIntn mode); --NSPR_API(PRInt32) _MD_close_file(PRInt32 osfd); --NSPR_API(PRInt32) _MD_read(PRFileDesc *fd, void *buf, PRInt32 amount); --NSPR_API(PRInt32) _MD_write(PRFileDesc *fd, const void *buf, PRInt32 amount); --NSPR_API(PRInt32) _MD_writev(PRFileDesc *fd, const PRIOVec *iov, PRInt32 iov_size, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_lseek(PRFileDesc *fd, PRInt32 offset, int whence); --NSPR_API(PRInt64) _MD_lseek64(PRFileDesc *fd, PRInt64 offset, int whence); --NSPR_API(PRInt32) _MD_fsync(PRFileDesc *fd); --NSPR_API(PRInt32) _MD_delete(const char *name); --NSPR_API(PRInt32) _MD_getfileinfo(const char *fn, PRFileInfo *info); --NSPR_API(PRInt32) _MD_getfileinfo64(const char *fn, PRFileInfo64 *info); --NSPR_API(PRInt32) _MD_getopenfileinfo(const PRFileDesc *fd, PRFileInfo *info); --NSPR_API(PRInt32) _MD_getopenfileinfo64(const PRFileDesc *fd, PRFileInfo64 *info); --NSPR_API(PRInt32) _MD_rename(const char *from, const char *to); --NSPR_API(PRInt32) _MD_access(const char *name, PRIntn how); --NSPR_API(PRInt32) _MD_stat(const char *name, struct stat *buf); --NSPR_API(PRInt32) _MD_mkdir(const char *name, PRIntn mode); --NSPR_API(PRInt32) _MD_rmdir(const char *name); --NSPR_API(PRInt32) _MD_pr_poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout); -- --/* Network I/O */ --NSPR_API(PRInt32) _MD_close_socket(PRInt32 osfd); --NSPR_API(PRInt32) _MD_connect(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_bind(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen); --NSPR_API(PRInt32) _MD_listen(PRFileDesc *fd, PRIntn backlog); --NSPR_API(PRInt32) _MD_shutdown(PRFileDesc *fd, PRIntn how); --NSPR_API(PRInt32) _MD_recv(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_send(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_accept_read(PRFileDesc *sd, PRInt32 *newSock, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout); --// NSPR_API(PRInt32) _MD_fast_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout, PRBool fast, _PR_AcceptTimeoutCallback callback, void *callbackArg); --// NSPR_API(PRInt32) _MD_fast_accept_read(PRFileDesc *sd, PRInt32 *newSock, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout, PRBool fast, _PR_AcceptTimeoutCallback callback, void *callbackArg); --// NSPR_API(void) _MD_update_accept_context(PRInt32 s, PRInt32 ls); --NSPR_API(PRStatus) _MD_getsockname(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen); --NSPR_API(PRStatus) _MD_getpeername(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen); --NSPR_API(PRStatus) _MD_getsockopt(PRFileDesc *fd, PRInt32 level, PRInt32 optname, char* optval, PRInt32* optlen); --NSPR_API(PRStatus) _MD_setsockopt(PRFileDesc *fd, PRInt32 level, PRInt32 optname, const char* optval, PRInt32 optlen); --NSPR_API(PRInt32) _MD_recvfrom(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_sendto(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags, const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout); --NSPR_API(PRInt32) _MD_socketpair(int af, int type, int flags, PRInt32 *osfd); --NSPR_API(PRInt32) _MD_socket(int af, int type, int flags); --NSPR_API(PRInt32) _MD_socketavailable(PRFileDesc *fd); -- --// NSPR_API(PRInt32) _MD_get_socket_error(void); --NSPR_API(PRStatus) _MD_gethostname(char *name, PRUint32 namelen); -- --/* Process management */ -- --NSPR_API(PRProcess *) _MD_create_process(const char *path, char *const *argv, char *const *envp, const PRProcessAttr *attr); --NSPR_API(PRStatus) _MD_detach_process(PRProcess *process); --NSPR_API(PRStatus) _MD_wait_process(PRProcess *process, PRInt32 *exitCode); --NSPR_API(PRStatus) _MD_kill_process(PRProcess *process); -- --/* Atomic data operations */ -- --// NSPR_API(void) _MD_init_atomic(void); --// NSPR_API(PRInt32) _MD_atomic_increment(PRInt32 *); --// NSPR_API(PRInt32) _MD_atomic_decrement(PRInt32 *); --// NSPR_API(PRInt32) _MD_atomic_set(PRInt32 *, PRInt32); -- --/* Memory management */ -- --NSPR_API(void) _MD_init_segs(void); --NSPR_API(PRStatus) _MD_alloc_segment(PRSegment *seg, PRUint32 size, void *vaddr); --NSPR_API(void) _MD_free_segment(PRSegment *seg); -- --/* Memory mapped file I/O */ -- --NSPR_API(PRStatus) _MD_create_file_map(PRFileMap *fmap, PRInt64 size); --NSPR_API(PRInt32) _MD_get_mem_map_alignment(void); --NSPR_API(void *) _MD_mem_map(PRFileMap *fmap, PRInt64 offset, PRUint32 len); --NSPR_API(PRStatus) _MD_mem_unmap(void *addr, PRUint32 size); --NSPR_API(PRStatus) _MD_close_file_map(PRFileMap *fmap); -- --/* Time related */ -- --NSPR_API(PRTime) _MD_now(void); --NSPR_API(void) _MD_interval_init(void); --NSPR_API(PRIntervalTime) _MD_get_interval(void); --NSPR_API(PRIntervalTime) _MD_interval_per_sec(void); -- --/* File locking */ -- --NSPR_API(PRStatus) _MD_lockfile(PRInt32 osfd); --NSPR_API(PRStatus) _MD_tlockfile(PRInt32 osfd); --NSPR_API(PRStatus) _MD_unlockfile(PRInt32 osfd); -- - #endif /* _nspr_beos_defs_h___*/ -Index: nsprpub/pr/include/private/primpl.h -=================================================================== ---- nsprpub/pr/include/private/primpl.h (revision 7) -+++ nsprpub/pr/include/private/primpl.h (working copy) -@@ -50,10 +50,6 @@ - #include - #endif - --#if defined(_PR_BTHREADS) --#include --#endif -- - #ifdef WINNT - /* Need to force service-pack 3 extensions to be defined by - ** setting _WIN32_WINNT to NT 4.0 for winsock.h, winbase.h, winnt.h. -@@ -228,6 +224,20 @@ - - #else /* defined(_PR_PTHREADS) */ - -+#ifdef _PR_BTHREADS -+#define _MD_GET_ATTACHED_THREAD() (_PR_MD_CURRENT_THREAD()) -+ -+#define _PR_IS_NATIVE_THREAD(thread) 1 -+#define _PR_IS_NATIVE_THREAD_SUPPORTED() 1 -+/* -+extern PRInt32 _PR_MD_WRITE(PRFileDesc *fd, const void *buf, PRInt32 amount); -+#define _PR_MD_WRITE _MD_WRITE -+*/ -+NSPR_API(PRThread*) _PR_MD_CURRENT_THREAD(void); -+#define _PR_MD_CURRENT_THREAD _MD_CURRENT_THREAD -+ -+#else /* defined(_PR_BTHREADS) */ -+ - NSPR_API(void) PT_FPrintStats(PRFileDesc *fd, const char *msg); - - /* -@@ -1301,6 +1311,7 @@ - extern void *_PR_MD_GET_SP(PRThread *thread); - #define _PR_MD_GET_SP _MD_GET_SP - -+#endif /* defined(_PR_BTHREADS) */ - #endif /* defined(_PR_PTHREADS) */ - - /************************************************************************/ -@@ -1555,7 +1566,10 @@ - - #if defined(_PR_PTHREADS) - #else /* defined(_PR_PTHREADS) */ -+#if defined(_PR_BTHREADS) -+#else /* defined(_PR_BTHREADS) */ - _MDThreadStack md; -+#endif /* defined(_PR_BTHREADS) */ - #endif /* defined(_PR_PTHREADS) */ - }; - -@@ -1608,9 +1622,6 @@ - #elif defined(_PR_BTHREADS) - PRUint32 flags; - _MDThread md; -- PRBool io_pending; -- PRInt32 io_fd; -- PRBool io_suspended; - #else /* not pthreads or Be threads */ - _MDLock threadLock; /* Lock to protect thread state variables. - * Protects the following fields: -@@ -1694,7 +1705,9 @@ - struct PRFileMap { - PRFileDesc *fd; - PRFileMapProtect prot; -+#if !defined(XP_BEOS) - _MDFileMap md; -+#endif /* !defined(XP_BEOS) */ - }; - - /************************************************************************/ -@@ -1777,8 +1790,10 @@ - #endif /* MOZ_UNICODE */ - - extern void _PR_InitSegs(void); -+#if !defined(_PR_BTHREADS) - extern void _PR_InitStacks(void); - extern void _PR_InitTPD(void); -+#endif /* !defined(_PR_BTHREADS) */ - extern void _PR_InitMem(void); - extern void _PR_InitEnv(void); - extern void _PR_InitCMon(void); -@@ -1830,7 +1845,10 @@ - PRUintn flags; - #if defined(_PR_PTHREADS) - #else /* defined(_PR_PTHREADS) */ -+#if defined(_PR_BTHREADS) -+#else /* defined(_PR_BTHREADS) */ - _MDSegment md; -+#endif /* defined(_PR_BTHREADS) */ - #endif /* defined(_PR_PTHREADS) */ - }; - -@@ -2127,7 +2145,7 @@ - - /* end PR_GetRandomNoise() related */ - --#ifdef XP_BEOS -+#if defined(XP_BEOS) && !defined(BONE_VERSION) - - extern PRLock *_connectLock; - -@@ -2142,7 +2160,7 @@ - - extern PRUint32 connectCount; - --#endif /* XP_BEOS */ -+#endif /* XP_BEOS && !BONE_VERSION */ - - PR_END_EXTERN_C - -Index: nsprpub/pr/src/Makefile.in -=================================================================== ---- nsprpub/pr/src/Makefile.in (revision 7) -+++ nsprpub/pr/src/Makefile.in (working copy) -@@ -281,15 +281,13 @@ - pthreads/$(OBJDIR)/ptthread.$(OBJ_SUFFIX) \ - pthreads/$(OBJDIR)/ptmisc.$(OBJ_SUFFIX) - else -+ifndef USE_BTHREADS - OBJS += \ - io/$(OBJDIR)/prdir.$(OBJ_SUFFIX) \ - io/$(OBJDIR)/prfile.$(OBJ_SUFFIX) \ - io/$(OBJDIR)/prio.$(OBJ_SUFFIX) \ - io/$(OBJDIR)/prsocket.$(OBJ_SUFFIX) \ -- misc/$(OBJDIR)/pripcsem.$(OBJ_SUFFIX) -- --ifndef USE_BTHREADS --OBJS += \ -+ misc/$(OBJDIR)/pripcsem.$(OBJ_SUFFIX) \ - threads/$(OBJDIR)/prcthr.$(OBJ_SUFFIX) \ - threads/$(OBJDIR)/prdump.$(OBJ_SUFFIX) \ - threads/$(OBJDIR)/prmon.$(OBJ_SUFFIX) \ -@@ -300,7 +298,6 @@ - threads/combined/$(OBJDIR)/prustack.$(OBJ_SUFFIX) \ - threads/combined/$(OBJDIR)/pruthr.$(OBJ_SUFFIX) - endif -- - endif - - ifeq ($(USE_CPLUS), 1) -Index: nsprpub/pr/src/misc/Makefile.in -=================================================================== ---- nsprpub/pr/src/misc/Makefile.in (revision 7) -+++ nsprpub/pr/src/misc/Makefile.in (working copy) -@@ -71,10 +71,12 @@ - $(NULL) - - ifndef USE_PTHREADS -+ifndef USE_BTHREADS - CSRCS += \ - pripcsem.c \ - $(NULL) - endif -+endif - - TARGETS = $(OBJS) - -Index: nsprpub/pr/src/misc/prinit.c -=================================================================== ---- nsprpub/pr/src/misc/prinit.c (revision 7) -+++ nsprpub/pr/src/misc/prinit.c (working copy) -@@ -196,8 +196,10 @@ - _PR_InitLocks(); - _PR_InitAtomic(); - _PR_InitSegs(); -+#if !defined(_PR_BTHREADS) - _PR_InitStacks(); - _PR_InitTPD(); -+#endif /*!defined(_PR_BTHREADS) */ - _PR_InitEnv(); - _PR_InitLayerCache(); - _PR_InitClock(); -Index: nsprpub/pr/src/misc/pripcsem.c -=================================================================== ---- nsprpub/pr/src/misc/pripcsem.c (revision 7) -+++ nsprpub/pr/src/misc/pripcsem.c (working copy) -@@ -46,9 +46,9 @@ - - #include "primpl.h" - --#ifdef _PR_PTHREADS -+#if defined(_PR_PTHREADS) || defined(_PR_BTHREADS) - --#error "This file should not be compiled for the pthreads version" -+#error "This file should not be compiled for the pthreads or bthreads version" - - #else - -@@ -127,4 +127,4 @@ - return _PR_MD_DELETE_SEMAPHORE(osname); - } - --#endif /* _PR_PTHREADS */ -+#endif /* _PR_PTHREADS || _PR_BTHREADS */ -Index: nsprpub/pr/src/linking/prlink.c -=================================================================== ---- nsprpub/pr/src/linking/prlink.c (revision 7) -+++ nsprpub/pr/src/linking/prlink.c (working copy) -@@ -199,8 +199,10 @@ - - #ifdef XP_BEOS - void* dlh; -+#ifndef XP_HAIKU - void* stub_dlh; - #endif -+#endif - }; - - static PRLibrary *pr_loadmap; -@@ -863,6 +865,19 @@ - result = pr_UnlockedFindLibrary(name); - #endif - -+#ifdef XP_BEOS -+ /* Havn't seen this happen so far, but it doesn't slow anything -+ down so let's keep it */ -+ for (result = pr_loadmap; result != NULL; result = result->next) { -+ /* hopefully, our caller will always use the same string -+ to refer to the same library */ -+ if (strcmp(name, result->name) == 0) { -+ result->refCount++; -+ break; -+ } -+ } -+#endif -+ - if (result != NULL) goto unlock; - - lm = PR_NEWZAP(PRLibrary); -@@ -1020,29 +1035,14 @@ - #endif /* HAVE_DLL */ - #endif /* XP_UNIX */ - -- lm->refCount = 1; -- - #ifdef XP_BEOS -- { -- image_info info; -- int32 cookie = 0; -+ { /* Code block to allow variable inits. :/ */ -+ /* it appears the library isn't yet loaded - load it now */ -+#ifdef XP_HAIKU -+ image_id imageid = load_add_on(name); -+#else - image_id imageid = B_ERROR; - image_id stubid = B_ERROR; -- PRLibrary *p; -- -- for (p = pr_loadmap; p != NULL; p = p->next) { -- /* hopefully, our caller will always use the same string -- to refer to the same library */ -- if (strcmp(name, p->name) == 0) { -- /* we've already loaded this library */ -- imageid = info.id; -- lm->refCount++; -- break; -- } -- } -- -- if(imageid == B_ERROR) { -- /* it appears the library isn't yet loaded - load it now */ - char stubName [B_PATH_NAME_LENGTH + 1]; - - /* the following is a work-around to a "bug" in the beos - -@@ -1069,36 +1069,37 @@ - /* first, attempt to load the stub (thereby loading the - component as a shared library */ - if ((stubid = load_add_on(stubName)) > B_ERROR) { -+ -+ const char *endOfPassedName = strrchr(name, '/'); -+ image_info info; -+ int32 cookie = 0; -+ - /* the stub was loaded successfully. */ - imageid = B_FILE_NOT_FOUND; -+ if( 0 == endOfPassedName ) -+ endOfPassedName = name; -+ else -+ endOfPassedName++; - -- cookie = 0; - while (get_next_image_info(0, &cookie, &info) == B_OK) { - const char *endOfSystemName = strrchr(info.name, '/'); -- const char *endOfPassedName = strrchr(name, '/'); - if( 0 == endOfSystemName ) - endOfSystemName = info.name; - else - endOfSystemName++; -- if( 0 == endOfPassedName ) -- endOfPassedName = name; -- else -- endOfPassedName++; - if (strcmp(endOfSystemName, endOfPassedName) == 0) { - /* this is the actual component - remember it */ - imageid = info.id; - break; - } - } -- - } else { - /* we failed to load the "stub" - try to load the - component directly as an add-on */ - stubid = B_ERROR; - imageid = load_add_on(name); - } -- } -- -+#endif /* XP_HAIKU */ - if (imageid <= B_ERROR) { - oserr = imageid; - PR_DELETE( lm ); -@@ -1106,12 +1107,15 @@ - } - lm->name = strdup(name); - lm->dlh = (void*)imageid; -+#ifndef XP_HAIKU - lm->stub_dlh = (void*)stubid; -+#endif - lm->next = pr_loadmap; - pr_loadmap = lm; - } --#endif -+#endif /* XP_BEOS */ - -+ lm->refCount = 1; - result = lm; /* success */ - PR_LOG(_pr_linker_lm, PR_LOG_MIN, ("Loaded library %s (load lib)", lm->name)); - -@@ -1272,11 +1276,15 @@ - } - - #ifdef XP_BEOS -+#ifdef XP_HAIKU -+ unload_add_on( (image_id) lib->dlh ); -+#else - if(((image_id)lib->stub_dlh) == B_ERROR) - unload_add_on( (image_id) lib->dlh ); - else - unload_add_on( (image_id) lib->stub_dlh); --#endif -+#endif /* XP_HAIKU */ -+#endif /* XP_BEOS */ - - #ifdef XP_UNIX - #ifdef HAVE_DLL -Index: nsprpub/pr/src/bthreads/bsrcs.mk -=================================================================== ---- nsprpub/pr/src/bthreads/bsrcs.mk (revision 7) -+++ nsprpub/pr/src/bthreads/bsrcs.mk (working copy) -@@ -20,6 +20,7 @@ - # the Initial Developer. All Rights Reserved. - # - # Contributor(s): -+# Fredrik Holmqvist - # - # 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 -@@ -46,4 +47,6 @@ - btmon.c \ - btsem.c \ - btmisc.c \ -+ btfile.c \ -+ btio.c \ - $(NULL) -Index: nsprpub/pr/src/bthreads/btcvar.c -=================================================================== ---- nsprpub/pr/src/bthreads/btcvar.c (revision 7) -+++ nsprpub/pr/src/bthreads/btcvar.c (working copy) -@@ -20,6 +20,7 @@ - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): -+ * Fredrik Holmqvist - * - * 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 -@@ -35,8 +36,6 @@ - * - * ***** END LICENSE BLOCK ***** */ - --#include -- - #include "primpl.h" - - /* -@@ -130,16 +129,16 @@ - return PR_SUCCESS; - } - -- if( atomic_add( &cvar->signalBenCount, 1 ) > 0 ) -+ if( _MD_ATOMIC_INCREMENT( &cvar->signalBenCount ) > 1 ) - { - if (acquire_sem(cvar->signalSem) == B_INTERRUPTED) - { -- atomic_add( &cvar->signalBenCount, -1 ); -+ _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ); - return PR_FAILURE; - } - } - cvar->nw += 1; -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } -@@ -154,7 +153,7 @@ - err = acquire_sem_etc(cvar->sem, 1, B_RELATIVE_TIMEOUT, PR_IntervalToMicroseconds(timeout) ); - } - -- if( atomic_add( &cvar->signalBenCount, 1 ) > 0 ) -+ if( _MD_ATOMIC_INCREMENT( &cvar->signalBenCount ) > 1 ) - { - while (acquire_sem(cvar->signalSem) == B_INTERRUPTED); - } -@@ -165,18 +164,18 @@ - cvar->ns -= 1; - } - cvar->nw -= 1; -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } - - PR_Lock( cvar->lock ); -- if(err!=B_NO_ERROR) -+ if(err==B_NO_ERROR || (err == B_TIMED_OUT && timeout!=PR_INTERVAL_NO_TIMEOUT)) - { -- return PR_FAILURE; -- } - return PR_SUCCESS; - } -+ return PR_FAILURE; -+} - - /* - ** Notify ONE thread that is currently waiting on 'cvar'. Which thread is -@@ -195,11 +194,11 @@ - PR_NotifyCondVar (PRCondVar *cvar) - { - status_t err ; -- if( atomic_add( &cvar->signalBenCount, 1 ) > 0 ) -+ if( _MD_ATOMIC_INCREMENT( &cvar->signalBenCount) > 1 ) - { - if (acquire_sem(cvar->signalSem) == B_INTERRUPTED) - { -- atomic_add( &cvar->signalBenCount, -1 ); -+ _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ); - return PR_FAILURE; - } - } -@@ -207,7 +206,7 @@ - { - cvar->ns += 1; - release_sem_etc(cvar->sem, 1, B_DO_NOT_RESCHEDULE); -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } -@@ -219,7 +218,7 @@ - } - else - { -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } -@@ -241,11 +240,11 @@ - int32 handshakes; - status_t err = B_OK; - -- if( atomic_add( &cvar->signalBenCount, 1 ) > 0 ) -+ if( _MD_ATOMIC_INCREMENT( &cvar->signalBenCount) > 1 ) - { - if (acquire_sem(cvar->signalSem) == B_INTERRUPTED) - { -- atomic_add( &cvar->signalBenCount, -1 ); -+ _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ); - return PR_FAILURE; - } - } -@@ -255,7 +254,7 @@ - handshakes = cvar->nw - cvar->ns; - cvar->ns = cvar->nw; - release_sem_etc(cvar->sem, handshakes, B_DO_NOT_RESCHEDULE); -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } -@@ -267,7 +266,7 @@ - } - else - { -- if( atomic_add( &cvar->signalBenCount, -1 ) > 1 ) -+ if( _MD_ATOMIC_DECREMENT( &cvar->signalBenCount ) > 0 ) - { - release_sem_etc(cvar->signalSem, 1, B_DO_NOT_RESCHEDULE); - } -Index: nsprpub/pr/src/bthreads/btlocks.c -=================================================================== ---- nsprpub/pr/src/bthreads/btlocks.c (revision 7) -+++ nsprpub/pr/src/bthreads/btlocks.c (working copy) -@@ -43,9 +43,6 @@ - - #include "primpl.h" - --#include --#include -- - void - _PR_InitLocks (void) - { -@@ -61,16 +58,13 @@ - - lock = PR_NEWZAP(PRLock); - if (lock != NULL) { -- - lock->benaphoreCount = 0; - lock->semaphoreID = create_sem( 0, "nsprLockSem" ); - if( lock->semaphoreID < B_NO_ERROR ) { -- - PR_DELETE( lock ); - lock = NULL; - } - } -- - return lock; - } - -@@ -88,17 +82,18 @@ - PR_IMPLEMENT(void) - PR_Lock (PRLock* lock) - { -+ status_t result; -+ - PR_ASSERT(lock != NULL); - -- if( atomic_add( &lock->benaphoreCount, 1 ) > 0 ) { -- -- if( acquire_sem(lock->semaphoreID ) != B_NO_ERROR ) { -- -- atomic_add( &lock->benaphoreCount, -1 ); -+ if( _MD_ATOMIC_INCREMENT( &lock->benaphoreCount) > 1 ) { -+ result = acquire_sem(lock->semaphoreID ); -+ PR_ASSERT(result == B_NO_ERROR); -+ if( result != B_NO_ERROR ) { -+ _MD_ATOMIC_DECREMENT( &lock->benaphoreCount); - return; - } - } -- - lock->owner = find_thread( NULL ); - } - -@@ -107,8 +102,7 @@ - { - PR_ASSERT(lock != NULL); - lock->owner = NULL; -- if( atomic_add( &lock->benaphoreCount, -1 ) > 1 ) { -- -+ if( _MD_ATOMIC_DECREMENT( &lock->benaphoreCount ) > 0 ) { - release_sem_etc( lock->semaphoreID, 1, B_DO_NOT_RESCHEDULE ); - } - -Index: nsprpub/pr/src/bthreads/btmisc.c -=================================================================== ---- nsprpub/pr/src/bthreads/btmisc.c (revision 7) -+++ nsprpub/pr/src/bthreads/btmisc.c (working copy) -@@ -20,6 +20,7 @@ - * the Initial Developer. All Rights Reserved. - * - * Contributor(s): -+ * Fredrik Holmqvist - * - * 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 -@@ -38,11 +39,11 @@ - #include "primpl.h" - #include - --// void _PR_InitCPUs(void) {PT_LOG("_PR_InitCPUs")} --// void _MD_StartInterrupts(void) {PT_LOG("_MD_StartInterrupts")} -- --/* this is a total hack.. */ -- -+/* this is a total hack.. -+ * It's needed for netserver to compile. -+ * See nsprpub/pr/include/prnetdb.h -+ */ -+#ifndef BONE_VERSION - struct protoent* getprotobyname(const char* name) - { - return 0; -@@ -52,51 +53,17 @@ - { - return 0; - } -+#endif - --/* this is needed by prinit for some reason */ --void --_PR_InitStacks (void) --{ --} -- --/* this is needed by prinit for some reason */ --void --_PR_InitTPD (void) --{ --} -- - /* --** Create extra virtual processor threads. Generally used with MP systems. --*/ --PR_IMPLEMENT(void) -- PR_SetConcurrency (PRUintn numCPUs) --{ --} -- --/* --** Set thread recycle mode to on (1) or off (0) --*/ --PR_IMPLEMENT(void) -- PR_SetThreadRecycleMode (PRUint32 flag) --{ --} -- --/* - ** Get context registers, return with error for now. - */ -- - PR_IMPLEMENT(PRWord *) - _MD_HomeGCRegisters( PRThread *t, int isCurrent, int *np ) - { - return 0; - } - --PR_IMPLEMENT(void *) --PR_GetSP( PRThread *t ) --{ -- return 0; --} -- - PR_IMPLEMENT(PRStatus) - PR_EnumerateThreads( PREnumerator func, void *arg ) - { -Index: nsprpub/pr/src/bthreads/btfile.c -=================================================================== ---- nsprpub/pr/src/bthreads/btfile.c (revision 0) -+++ nsprpub/pr/src/bthreads/btfile.c (revision 0) -@@ -0,0 +1,994 @@ -+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -+/* ***** 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 the Netscape Portable Runtime (NSPR). -+ * -+ * The Initial Developer of the Original Code is -+ * Netscape Communications Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 1998-2000 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * Roy Yokoyama -+ * -+ * 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 ***** */ -+ -+#include "primpl.h" -+ -+static PRLock *_pr_flock_lock; /* For PR_LockFile() etc. */ -+static PRCondVar *_pr_flock_cv; /* For PR_LockFile() etc. */ -+ -+PRErrorCode -+map_default_error(int err) -+{ -+ switch (err) { -+ case EACCES: -+ return PR_NO_ACCESS_RIGHTS_ERROR; -+ case EADDRINUSE: -+ return PR_ADDRESS_IN_USE_ERROR; -+ case EADDRNOTAVAIL: -+ return PR_ADDRESS_NOT_AVAILABLE_ERROR; -+ case EAFNOSUPPORT: -+ return PR_ADDRESS_NOT_SUPPORTED_ERROR; -+ /*Same as EWOULDBLOCK*/ -+ case EAGAIN: -+ return PR_WOULD_BLOCK_ERROR; -+#if EALREADY != EBUSY -+ case EALREADY: -+ return PR_ALREADY_INITIATED_ERROR; -+#endif -+ case EBADF: -+ return PR_BAD_DESCRIPTOR_ERROR; -+ case EBUSY: -+ return PR_FILESYSTEM_MOUNTED_ERROR; -+ case ECONNABORTED: -+ return PR_CONNECT_ABORTED_ERROR; -+ case ECONNREFUSED: -+ return PR_CONNECT_REFUSED_ERROR; -+ case EDEADLK: -+ return PR_DEADLOCK_ERROR; -+ case EEXIST: -+ return PR_FILE_EXISTS_ERROR; -+ case EFAULT: -+ return PR_ACCESS_FAULT_ERROR; -+ case EFBIG: -+ return PR_FILE_TOO_BIG_ERROR; -+ case EHOSTUNREACH: -+ return PR_HOST_UNREACHABLE_ERROR; -+ case EINPROGRESS: -+ return PR_IN_PROGRESS_ERROR; -+ case EINTR: -+ return PR_PENDING_INTERRUPT_ERROR; -+ case EINVAL: -+ return PR_INVALID_ARGUMENT_ERROR; -+ case EIO: -+ return PR_IO_ERROR; -+ case EISCONN: -+ return PR_IS_CONNECTED_ERROR; -+ case EISDIR: -+ return PR_IS_DIRECTORY_ERROR; -+ case ELOOP: -+ return PR_LOOP_ERROR; -+ case EMFILE: -+ return PR_PROC_DESC_TABLE_FULL_ERROR; -+ case EMLINK: -+ return PR_MAX_DIRECTORY_ENTRIES_ERROR; -+ case EMSGSIZE: -+ return PR_INVALID_ARGUMENT_ERROR; -+ case ENAMETOOLONG: -+ return PR_NAME_TOO_LONG_ERROR; -+ case ENETUNREACH: -+ return PR_NETWORK_UNREACHABLE_ERROR; -+ case ENFILE: -+ return PR_SYS_DESC_TABLE_FULL_ERROR; -+ case ENOBUFS: -+ return PR_INSUFFICIENT_RESOURCES_ERROR; -+ case ENODEV: -+ case ENOENT: -+ return PR_FILE_NOT_FOUND_ERROR; -+ case ENOLCK: -+ return PR_FILE_IS_LOCKED_ERROR; -+#if 0 -+ case ENOLINK: -+ return PR_REMOTE_FILE_ERROR; -+#endif -+ case ENOMEM: -+ return PR_OUT_OF_MEMORY_ERROR; -+ case ENOPROTOOPT: -+ return PR_INVALID_ARGUMENT_ERROR; -+ case ENOSPC: -+ return PR_NO_DEVICE_SPACE_ERROR; -+ case ENOTCONN: -+ return PR_NOT_CONNECTED_ERROR; -+ case ENOTDIR: -+ return PR_NOT_DIRECTORY_ERROR; -+ case ENOTSOCK: -+ return PR_NOT_SOCKET_ERROR; -+ case ENXIO: -+ return PR_FILE_NOT_FOUND_ERROR; -+ case EOPNOTSUPP: -+ return PR_NOT_TCP_SOCKET_ERROR; -+ case EOVERFLOW: -+ return PR_BUFFER_OVERFLOW_ERROR; -+ case EPERM: -+ return PR_NO_ACCESS_RIGHTS_ERROR; -+ case EPIPE: -+ return PR_CONNECT_RESET_ERROR; -+ case EPROTONOSUPPORT: -+ return PR_PROTOCOL_NOT_SUPPORTED_ERROR; -+ case EPROTOTYPE: -+ return PR_ADDRESS_NOT_SUPPORTED_ERROR; -+ case ERANGE: -+ return PR_INVALID_METHOD_ERROR; -+ case EROFS: -+ return PR_READ_ONLY_FILESYSTEM_ERROR; -+ case ESPIPE: -+ return PR_INVALID_METHOD_ERROR; -+ case ETIMEDOUT: -+ return PR_IO_TIMEOUT_ERROR; -+ case EXDEV: -+ return PR_NOT_SAME_DEVICE_ERROR; -+ default: -+ return PR_UNKNOWN_ERROR; -+ } -+} -+ -+ -+inline void -+set_open_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EAGAIN: -+ case ENOMEM: -+ prError = PR_INSUFFICIENT_RESOURCES_ERROR; -+ break; -+ case EBUSY: -+ prError = PR_IO_ERROR; -+ break; -+ case ENODEV: -+ prError = PR_FILE_NOT_FOUND_ERROR; -+ break; -+ case EOVERFLOW: -+ prError = PR_FILE_TOO_BIG_ERROR; -+ break; -+ case ETIMEDOUT: -+ prError = PR_REMOTE_FILE_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_rename_error(int err) -+{ -+ PR_SetError(err == EEXIST ? PR_DIRECTORY_NOT_EMPTY_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_unlink_error(int err) -+{ -+ PR_SetError(err == EPERM ? PR_IS_DIRECTORY_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_opendir_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_closedir_error(int err) -+{ -+ PR_SetError( err == EINVAL ? PR_BAD_DESCRIPTOR_ERROR : map_default_error(err), err); -+} -+ -+inline void -+set_readdir_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case 0: -+ case ENOENT: -+ prError = PR_NO_MORE_FILES_ERROR; -+ break; -+ case EOVERFLOW: -+ case EINVAL: -+ case ENXIO: -+ prError = PR_IO_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_mkdir_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+ -+inline void -+set_rmdir_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case ENOTEMPTY: -+ case EEXIST: -+ case EINVAL: -+ prError = PR_DIRECTORY_NOT_EMPTY_ERROR; -+ break; -+ case ETIMEDOUT: -+ prError = PR_REMOTE_FILE_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_close_error(int err) -+{ -+ PR_SetError( err == ETIMEDOUT ? PR_REMOTE_FILE_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_read_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_INVALID_METHOD_ERROR; -+ break; -+ case ENXIO: -+ prError = PR_INVALID_ARGUMENT_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_write_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_INVALID_METHOD_ERROR; -+ break; -+ case ENXIO: -+ prError = PR_INVALID_ARGUMENT_ERROR; -+ break; -+ case ETIMEDOUT: -+ prError = PR_REMOTE_FILE_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_lseek_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+ -+inline void -+set_fsync_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_INVALID_METHOD_ERROR; -+ break; -+ case ETIMEDOUT: -+ prError = PR_REMOTE_FILE_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_fstat_error(int err) -+{ -+ PR_SetError(err == ETIMEDOUT ? PR_REMOTE_FILE_ERROR : map_default_error(err), err); -+} -+ -+/* TODO: using uint8 instead of bool due to code that uses bool as var name in hard to change places -+ therefore we had to undef it. Or we need to change Haiku's headers around so we can include -+ everything we need except the bool decl. */ -+PRFileDesc * bt_CreateFileDesc(PRIntn osfd, const PRIOMethods * methods, _PRTriStateBool inheritable, uint8 nonblocking) { -+ const int blocking = 1; -+ PRFileDesc *fd = _PR_Getfd(); -+ if (fd == NULL) -+ { -+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ return NULL; -+ } -+ fd->secret->md.osfd = osfd; -+ fd->secret->state = _PR_FILEDESC_OPEN; -+ fd->secret->inheritable = inheritable; -+ fd->methods = methods; -+ if (nonblocking) -+ setsockopt(osfd, SOL_SOCKET, SO_NONBLOCK, &blocking, sizeof(blocking)); -+ return fd; -+} -+ -+ -+PR_IMPLEMENT(PRFileDesc*) PR_GetSpecialFD(PRSpecialFD osfd) -+{ -+ PR_ASSERT(osfd >= PR_StandardInput && osfd <= PR_StandardError); -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ -+ switch (osfd) -+ { -+ case PR_StandardInput: return _pr_stdin; -+ case PR_StandardOutput: return _pr_stdout; -+ case PR_StandardError: return _pr_stderr; -+ default: -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ } -+ return NULL; -+} /* PR_GetSpecialFD */ -+ -+ -+PR_IMPLEMENT(PRFileDesc*) PR_Open(const char *name, PRIntn flags, PRIntn mode) -+{ -+ return PR_OpenFile(name, flags, mode); -+} /* PR_Open */ -+ -+PR_IMPLEMENT(PRFileDesc*) PR_OpenFile(const char *name, PRIntn flags, PRIntn mode) -+{ -+ PRFileDesc *fd = NULL; -+ PRInt32 osflags; -+ PRInt32 osfd, err; -+ -+ if (flags & PR_RDWR) { -+ osflags = O_RDWR; -+ } else if (flags & PR_WRONLY) { -+ osflags = O_WRONLY; -+ } else { -+ osflags = O_RDONLY; -+ } -+ -+ if (flags & PR_EXCL) -+ osflags |= O_EXCL; -+ if (flags & PR_APPEND) -+ osflags |= O_APPEND; -+ if (flags & PR_TRUNCATE) -+ osflags |= O_TRUNC; -+ if (flags & PR_SYNC) { -+/* Ummmm. BeOS doesn't appear to -+ support sync in any way shape or -+ form. */ -+ return PR_NOT_IMPLEMENTED_ERROR; -+ } -+ -+ if (flags & PR_CREATE_FILE) -+ { -+ osflags |= O_CREAT; -+ } -+ -+ osfd = open(name, osflags, mode); -+ if (osfd < 0) { -+ err = _MD_ERRNO(); -+ set_open_error(err); -+ } -+ -+ if(osfd>=0) { -+ fd = bt_CreateFileDesc(osfd, PR_GetFileMethods(), _PR_TRI_TRUE, false); -+ if (fd == NULL) close(osfd); /* $$$ whoops! this is bad $$$ */ -+ } -+ return fd; -+} /* PR_OpenFile */ -+ -+/* -+** Import an existing OS file to NSPR -+*/ -+PR_IMPLEMENT(PRFileDesc*) PR_ImportFile(PRInt32 osfd) -+{ -+ PRFileDesc *fd = NULL; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ -+ fd = bt_CreateFileDesc(osfd, PR_GetFileMethods(), _PR_TRI_UNKNOWN, false); -+ if (NULL == fd) close(osfd); -+ return fd; -+} -+ -+/* -+** Import an existing OS pipe to NSPR -+*/ -+PR_IMPLEMENT(PRFileDesc*) PR_ImportPipe(PRInt32 osfd) -+{ -+ PRFileDesc *fd = NULL; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ fd = bt_CreateFileDesc(osfd, PR_GetPipeMethods(), _PR_TRI_UNKNOWN, true); -+ -+ if (NULL == fd) close(osfd); -+ return fd; -+} -+ -+ -+PR_IMPLEMENT(PRStatus) PR_Rename(const char *from, const char *to) -+{ -+ PRInt32 rv = -1, err; -+ -+ if (0 == access(to, F_OK)) -+ PR_SetError(PR_FILE_EXISTS_ERROR, 0); -+ else -+ { -+ rv = rename(from, to); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_rename_error(err); -+ } -+ } -+ if (rv < 0) { -+ return PR_FAILURE; -+ } else { -+ return PR_SUCCESS; -+ } -+} -+ -+PR_IMPLEMENT(PRStatus) PR_Delete(const char *name) -+{ -+ PRInt32 rv, err; -+ -+ rv = unlink(name); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_unlink_error(err); -+ return PR_FAILURE; -+ } else -+ return PR_SUCCESS; -+} -+ -+ -+PR_IMPLEMENT(PRDir*) PR_OpenDir(const char *name) -+{ -+ PRDir *dir; -+ PRInt32 err; -+ -+ dir = PR_NEW(PRDir); -+ if (dir) { -+ dir->md.d = opendir(name); -+ if (NULL == dir->md.d) { -+ err = _MD_ERRNO(); -+ set_opendir_error(err); -+ PR_DELETE(dir); -+ return NULL; -+ } -+ } else { -+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ } -+ return dir; -+} -+ -+PR_IMPLEMENT(PRDirEntry*) PR_ReadDir(PRDir *dir, PRDirFlags flags) -+{ -+ PRInt32 err; -+ struct dirent *de; -+ for (;;) { -+ /* -+ * XXX: readdir() is not MT-safe -+ */ -+ _MD_ERRNO() = 0; -+ de = readdir(dir->md.d); -+ -+ if (!de) { -+ err = _MD_ERRNO(); -+ set_readdir_error(err); -+ return 0; -+ } -+ -+ if ((flags & PR_SKIP_DOT) && -+ (de->d_name[0] == '.') && (de->d_name[1] == 0)) -+ continue; -+ -+ if ((flags & PR_SKIP_DOT_DOT) && -+ (de->d_name[0] == '.') && (de->d_name[1] == '.') && -+ (de->d_name[2] == 0)) -+ continue; -+ -+ if ((flags & PR_SKIP_HIDDEN) && (de->d_name[1] == '.')) -+ continue; -+ -+ break; -+ } -+ -+ dir->d.name = de->d_name; -+ return de->d_name ? &dir->d : NULL; -+} -+ -+PR_IMPLEMENT(PRStatus) PR_CloseDir(PRDir *dir) -+{ -+ PRInt32 rv, err; -+ -+ if (dir && dir->md.d) { -+ rv = closedir(dir->md.d); -+ PR_DELETE(dir); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_closedir_error(err); -+ return PR_FAILURE; -+ } -+ } -+ return PR_SUCCESS; -+} -+ -+PR_IMPLEMENT(PRStatus) PR_MkDir(const char *name, PRIntn mode) -+{ -+ status_t rv; -+ int err; -+ -+ rv = mkdir(name, mode); -+ -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_mkdir_error(err); -+ return PR_FAILURE; -+ } -+ return PR_SUCCESS; -+} -+ -+PR_IMPLEMENT(PRStatus) PR_MakeDir(const char *name, PRIntn mode) -+{ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ return PR_MkDir(name, mode); -+} -+ -+PR_IMPLEMENT(PRStatus) PR_RmDir(const char *name) -+{ -+ PRInt32 rv, err; -+ -+ rv = rmdir(name); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_rmdir_error(err); -+ return PR_FAILURE; -+ } else -+ return PR_SUCCESS; -+} -+ -+PR_IMPLEMENT(PRInt32) -+PR_FileDesc2NativeHandle(PRFileDesc *fd) -+{ -+ if (fd) { -+ fd = PR_GetIdentitiesLayer(fd, PR_NSPR_IO_LAYER); -+ } -+ if (!fd) { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return -1; -+ } -+ -+ return fd->secret->md.osfd; -+} -+ -+#ifdef MOZ_UNICODE -+/* -+ * UTF16 Interface -+ */ -+PR_IMPLEMENT(PRDirUTF16*) PR_OpenDirUTF16(const PRUnichar *name) -+{ -+ PRDirUTF16 *dir; -+ PRStatus sts; -+ -+ dir = PR_NEW(PRDirUTF16); -+ if (dir) { -+ sts = _PR_MD_OPEN_DIR_UTF16(&dir->md,name); -+ if (sts != PR_SUCCESS) { -+ PR_DELETE(dir); -+ return NULL; -+ } -+ } else { -+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ } -+ return dir; -+} -+ -+PR_IMPLEMENT(PRDirEntryUTF16*) PR_ReadDirUTF16(PRDirUTF16 *dir, PRDirFlags flags) -+{ -+ /* -+ * _MD_READ_DIR_UTF16 return a PRUnichar* to the name; allocation in -+ * machine-dependent code -+ */ -+ PRUnichar* name = _PR_MD_READ_DIR_UTF16(&dir->md, flags); -+ dir->d.name = name; -+ return name ? &dir->d : NULL; -+} -+ -+PR_IMPLEMENT(PRStatus) PR_CloseDirUTF16(PRDirUTF16 *dir) -+{ -+ PRInt32 rv; -+ -+ if (dir) { -+ rv = _PR_MD_CLOSE_DIR_UTF16(&dir->md); -+ PR_DELETE(dir); -+ if (rv < 0) -+ return PR_FAILURE; -+ else -+ return PR_SUCCESS; -+ } -+ return PR_SUCCESS; -+} -+ -+#endif /* MOZ_UNICODE */ -+ -+ -+static PRStatus PR_CALLBACK FileClose(PRFileDesc *fd) -+{ -+ PRInt32 err; -+ if (!fd || !fd->secret -+ || (fd->secret->state != _PR_FILEDESC_OPEN -+ && fd->secret->state != _PR_FILEDESC_CLOSED)) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ if (fd->secret->state == _PR_FILEDESC_OPEN) { -+ if (close(fd->secret->md.osfd) < 0) { -+ err = _MD_ERRNO(); -+ set_close_error(err); -+ return PR_FAILURE; -+ } -+ fd->secret->state = _PR_FILEDESC_CLOSED; -+ } -+ PR_ASSERT(fd); -+ _PR_Putfd(fd); -+ return PR_SUCCESS; -+} -+ -+static PRInt32 PR_CALLBACK FileRead(PRFileDesc *fd, void *buf, PRInt32 amount) -+{ -+ PRInt32 rv,err = 0; -+ -+ rv = read(fd->secret->md.osfd, buf, amount); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_read_error(err); -+ PR_ASSERT(rv == -1); -+ } -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("read -> %d", rv)); -+ return rv; -+} -+ -+static PRInt32 PR_CALLBACK FileWrite(PRFileDesc *fd, const void *buf, PRInt32 amount) -+{ -+ PRInt32 rv,err = 0; -+ PRInt32 temp, count; -+ -+ count = 0; -+ while (amount > 0) { -+ temp = write(fd->secret->md.osfd, buf, amount); -+ if (temp < 0) { -+ err = _MD_ERRNO(); -+ set_write_error(err); -+ count = -1; -+ break; -+ } -+ count += temp; -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ buf = (const void*) ((const char*)buf + temp); -+ amount -= temp; -+ } -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("write -> %d", count)); -+ return count; -+} -+ -+static PRInt32 PR_CALLBACK FileAvailable(PRFileDesc *fd) -+{ -+ PRInt32 result, cur, end, err; -+ -+ cur = lseek(fd->secret->md.osfd, 0, PR_SEEK_CUR); -+ -+ if (cur >= 0) -+ end = lseek(fd->secret->md.osfd, 0, PR_SEEK_END); -+ -+ if ((cur < 0) || (end < 0)) { -+ err = _MD_ERRNO(); -+ set_lseek_error(err); -+ return -1; -+ } -+ -+ result = end - cur; -+ lseek(fd->secret->md.osfd, cur, PR_SEEK_SET); -+ -+ return result; -+} -+ -+static PRInt64 PR_CALLBACK FileAvailable64(PRFileDesc *fd) -+{ -+ PRInt64 result, cur, end; -+ PRInt64 minus_one; -+ PRInt32 err; -+ -+ cur = lseek(fd->secret->md.osfd, LL_ZERO, PR_SEEK_CUR); -+ -+ if (LL_GE_ZERO(cur)) -+ end = lseek(fd->secret->md.osfd, LL_ZERO, PR_SEEK_END); -+ -+ if (!LL_GE_ZERO(cur) || !LL_GE_ZERO(end)) { -+ LL_I2L(minus_one, -1); -+ err = _MD_ERRNO(); -+ set_lseek_error(err); -+ return minus_one; -+ } -+ LL_SUB(result, end, cur); -+ lseek(fd->secret->md.osfd, cur, PR_SEEK_SET); -+ return result; -+} -+ -+static PRStatus PR_CALLBACK FileSync(PRFileDesc *fd) -+{ -+ PRInt32 result, err; -+ result = fsync(fd->secret->md.osfd); -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_fsync_error(err); -+ return PR_FAILURE; -+ } -+ return PR_SUCCESS; -+} -+ -+static PROffset32 PR_CALLBACK FileSeek(PRFileDesc *fd, PROffset32 offset, PRSeekWhence whence) -+{ -+ PROffset32 result; -+ PRInt32 err; -+ result = lseek(fd->secret->md.osfd, offset, whence); -+ if(result<0) { -+ err = _MD_ERRNO(); -+ set_lseek_error(err); -+ } -+ return result; -+} -+ -+static PROffset64 PR_CALLBACK FileSeek64(PRFileDesc *fd, PROffset64 offset, PRSeekWhence whence) -+{ -+ PROffset64 result; -+ PRInt32 err; -+ -+ result = lseek(fd->secret->md.osfd, offset, whence); -+ if(!LL_GE_ZERO(result)) { -+ err = _MD_ERRNO(); -+ set_lseek_error(err); -+ } -+ return result; -+} -+ -+static PRStatus PR_CALLBACK FileGetInfo(PRFileDesc *fd, PRFileInfo *info) -+{ -+ struct stat sb; -+ PRInt64 s, s2us; -+ PRInt32 rv, err; -+ -+ rv = fstat(fd->secret->md.osfd, &sb); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_fstat_error(err); -+ return PR_FAILURE; -+ } -+ if(info) { -+ if (S_IFREG & sb.st_mode) -+ info->type = PR_FILE_FILE ; -+ else if (S_IFDIR & sb.st_mode) -+ info->type = PR_FILE_DIRECTORY; -+ else -+ info->type = PR_FILE_OTHER; -+ /* Use lower 32 bits of file size */ -+ info->size = ( sb.st_size & 0xffffffff); -+ LL_I2L(s, sb.st_mtime); -+ LL_I2L(s2us, PR_USEC_PER_SEC); -+ LL_MUL(s, s, s2us); -+ info->modifyTime = s; -+ LL_I2L(s, sb.st_ctime); -+ LL_MUL(s, s, s2us); -+ info->creationTime = s; -+ } -+ return PR_SUCCESS; -+} -+ -+static PRStatus PR_CALLBACK FileGetInfo64(PRFileDesc *fd, PRFileInfo64 *info) -+{ -+ struct stat sb; -+ PRInt64 s, s2us; -+ PRInt32 rv, err; -+ -+ rv = fstat(fd->secret->md.osfd, &sb); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_fstat_error(err); -+ return PR_FAILURE; -+ } -+ if(info) { -+ if (S_IFREG & sb.st_mode) -+ info->type = PR_FILE_FILE ; -+ else if (S_IFDIR & sb.st_mode) -+ info->type = PR_FILE_DIRECTORY; -+ else -+ info->type = PR_FILE_OTHER; -+ info->size = sb.st_size; -+ LL_I2L(s, sb.st_mtime); -+ LL_I2L(s2us, PR_USEC_PER_SEC); -+ LL_MUL(s, s, s2us); -+ info->modifyTime = s; -+ LL_I2L(s, sb.st_ctime); -+ LL_MUL(s, s, s2us); -+ info->creationTime = s; -+ } -+ return PR_SUCCESS; -+} -+ -+static PRInt16 PR_CALLBACK FilePoll( -+ PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags) -+{ -+ *out_flags = 0; -+ return in_flags; -+} /* FilePoll */ -+ -+ -+static PRIOMethods _pr_fileMethods = { -+ PR_DESC_FILE, -+ FileClose, -+ FileRead, -+ FileWrite, -+ FileAvailable, -+ FileAvailable64, -+ FileSync, -+ FileSeek, -+ FileSeek64, -+ FileGetInfo, -+ FileGetInfo64, -+ (PRWritevFN)_PR_InvalidInt, -+ (PRConnectFN)_PR_InvalidStatus, -+ (PRAcceptFN)_PR_InvalidDesc, -+ (PRBindFN)_PR_InvalidStatus, -+ (PRListenFN)_PR_InvalidStatus, -+ (PRShutdownFN)_PR_InvalidStatus, -+ (PRRecvFN)_PR_InvalidInt, -+ (PRSendFN)_PR_InvalidInt, -+ (PRRecvfromFN)_PR_InvalidInt, -+ (PRSendtoFN)_PR_InvalidInt, -+ FilePoll, -+ (PRAcceptreadFN)_PR_InvalidInt, -+ (PRTransmitfileFN)_PR_InvalidInt, -+ (PRGetsocknameFN)_PR_InvalidStatus, -+ (PRGetpeernameFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRGetsocketoptionFN)_PR_InvalidStatus, -+ (PRSetsocketoptionFN)_PR_InvalidStatus, -+ (PRSendfileFN)_PR_InvalidInt, -+ (PRConnectcontinueFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+PR_IMPLEMENT(const PRIOMethods*) PR_GetFileMethods(void) -+{ -+ return &_pr_fileMethods; -+} -+ -+ -+static PRInt32 PR_CALLBACK PipeAvailable(PRFileDesc *fd) -+{ -+ PRInt32 rv; -+ rv = _bt_socketavailable(fd); -+ return rv; -+} -+ -+static PRInt64 PR_CALLBACK PipeAvailable64(PRFileDesc *fd) -+{ -+ PRInt64 rv; -+ LL_I2L(rv, _bt_socketavailable(fd)); -+ return rv; -+} -+ -+static PRStatus PR_CALLBACK PipeSync(PRFileDesc *fd) -+{ -+ return PR_SUCCESS; -+} -+ -+ -+static PRIOMethods _pr_pipeMethods = { -+ PR_DESC_PIPE, -+ FileClose, -+ FileRead, -+ FileWrite, -+ PipeAvailable, -+ PipeAvailable64, -+ PipeSync, -+ (PRSeekFN)_PR_InvalidInt, -+ (PRSeek64FN)_PR_InvalidInt64, -+ (PRFileInfoFN)_PR_InvalidStatus, -+ (PRFileInfo64FN)_PR_InvalidStatus, -+ (PRWritevFN)_PR_InvalidInt, -+ (PRConnectFN)_PR_InvalidStatus, -+ (PRAcceptFN)_PR_InvalidDesc, -+ (PRBindFN)_PR_InvalidStatus, -+ (PRListenFN)_PR_InvalidStatus, -+ (PRShutdownFN)_PR_InvalidStatus, -+ (PRRecvFN)_PR_InvalidInt, -+ (PRSendFN)_PR_InvalidInt, -+ (PRRecvfromFN)_PR_InvalidInt, -+ (PRSendtoFN)_PR_InvalidInt, -+ FilePoll, -+ (PRAcceptreadFN)_PR_InvalidInt, -+ (PRTransmitfileFN)_PR_InvalidInt, -+ (PRGetsocknameFN)_PR_InvalidStatus, -+ (PRGetpeernameFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRGetsocketoptionFN)_PR_InvalidStatus, -+ (PRSetsocketoptionFN)_PR_InvalidStatus, -+ (PRSendfileFN)_PR_InvalidInt, -+ (PRConnectcontinueFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+PR_IMPLEMENT(const PRIOMethods*) PR_GetPipeMethods(void) -+{ -+ return &_pr_pipeMethods; -+} -+ -+void _PR_InitIO(void) { -+ const PRIOMethods *methods = PR_GetFileMethods(); -+ _PR_InitFdCache(); -+ _pr_flock_lock = PR_NewLock(); -+ _pr_flock_cv = PR_NewCondVar(_pr_flock_lock); -+ _pr_stdin = bt_CreateFileDesc(0, PR_GetFileMethods(), _PR_TRI_UNKNOWN, false); -+ _pr_stdout = bt_CreateFileDesc(1, PR_GetFileMethods(), _PR_TRI_UNKNOWN, false); -+ _pr_stderr = bt_CreateFileDesc(2, PR_GetFileMethods(), _PR_TRI_UNKNOWN, false); -+} -+ -Index: nsprpub/pr/src/bthreads/btsem.c -=================================================================== ---- nsprpub/pr/src/bthreads/btsem.c (revision 7) -+++ nsprpub/pr/src/bthreads/btsem.c (working copy) -@@ -38,6 +38,7 @@ - #include - - #include "primpl.h" -+#include "obsolete/prsem.h" - - /* - ** Create a new semaphore object. -Index: nsprpub/pr/src/bthreads/btio.c -=================================================================== ---- nsprpub/pr/src/bthreads/btio.c (revision 0) -+++ nsprpub/pr/src/bthreads/btio.c (revision 0) -@@ -0,0 +1,2424 @@ -+/* -*- Mode: C++; c-basic-offset: 4 -*- */ -+/* ***** 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 the Netscape Portable Runtime (NSPR). -+ * -+ * The Initial Developer of the Original Code is -+ * Netscape Communications Corporation. -+ * Portions created by the Initial Developer are Copyright (C) 1998-2000 -+ * the Initial Developer. All Rights Reserved. -+ * -+ * Contributor(s): -+ * -+ * 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 ***** */ -+ -+#include "primpl.h" -+#include -+#include -+#include -+ -+#define READ_FD 1 -+#define WRITE_FD 2 -+ -+#ifdef BONE_VERSION -+inline int closesocket(int socket) { -+ return close(socket); -+} -+#endif -+ -+ -+inline void -+set_stat_error(int err) -+{ -+ PR_SetError(err == ETIMEDOUT ? PR_REMOTE_FILE_ERROR : map_default_error(err), err); -+} -+ -+inline void -+set_access_error(int err) -+{ -+ PR_SetError(err == ETIMEDOUT ? PR_REMOTE_FILE_ERROR : map_default_error(err), err); -+} -+ -+inline void -+set_select_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_writev_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_connect_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EACCES: -+ case ELOOP: -+ case ENOENT: -+ prError = PR_ADDRESS_NOT_SUPPORTED_ERROR; -+ break; -+ case ENXIO: -+ prError = PR_IO_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+ -+} -+ -+inline void -+set_accept_error(int err) -+{ -+ PR_SetError(err == ENODEV ? PR_NOT_TCP_SOCKET_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_bind_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_SOCKET_ADDRESS_IS_BOUND_ERROR; -+ break; -+ case EIO: -+ case EISDIR: -+ case ELOOP: -+ case ENOENT: -+ case ENOTDIR: -+ case EROFS: -+ prError = PR_ADDRESS_NOT_SUPPORTED_ERROR; -+ break; -+ case ENXIO: -+ prError = PR_IO_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+inline void -+set_listen_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_shutdown_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_socketpair_error(int err) -+{ -+ PR_SetError(err == ENOMEM ? PR_INSUFFICIENT_RESOURCES_ERROR : map_default_error(err), err); -+} -+ -+inline void -+set_recv_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_recvfrom_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+ -+inline void -+set_send_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_sendto_error(int err) -+{ -+ PR_SetError(map_default_error(err), err); -+} -+ -+inline void -+set_getsockname_error(int err) -+{ -+ PR_SetError(err == ENOMEM ? PR_INSUFFICIENT_RESOURCES_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_getpeername_error(int err) -+{ -+ PR_SetError(err == ENOMEM ? PR_INSUFFICIENT_RESOURCES_ERROR : map_default_error(err), err); -+} -+ -+ -+inline void -+set_getsockopt_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_BUFFER_OVERFLOW_ERROR; -+ break; -+ case ENOMEM: -+ prError = PR_INSUFFICIENT_RESOURCES_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+inline void -+set_setsockopt_error(int err) -+{ -+ PRErrorCode prError; -+ switch (err) { -+ case EINVAL: -+ prError = PR_BUFFER_OVERFLOW_ERROR; -+ break; -+ case ENOMEM: -+ prError = PR_INSUFFICIENT_RESOURCES_ERROR; -+ break; -+ default: -+ prError = map_default_error(err); -+ } -+ PR_SetError(prError, err); -+} -+ -+ -+inline void -+set_socket_error(int err) -+{ -+ PR_SetError( err == ENOMEM ? PR_INSUFFICIENT_RESOURCES_ERROR : map_default_error(err), err); -+} -+ -+ -+PR_IMPLEMENT(PRStatus) PR_GetFileInfo(const char *fn, PRFileInfo *info) -+{ -+ struct stat sb; -+ PRInt32 rv, err; -+ PRInt64 s, s2us; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ rv = stat(fn, &sb); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_stat_error(err); -+ return PR_FAILURE; -+ } -+ if (info) { -+ if (S_IFREG & sb.st_mode) -+ info->type = PR_FILE_FILE; -+ else if (S_IFDIR & sb.st_mode) -+ info->type = PR_FILE_DIRECTORY; -+ else -+ info->type = PR_FILE_OTHER; -+ -+ /* Use lower 32 bits of file size */ -+ info->size = sb.st_size & 0xffffffff; -+ LL_I2L(s, sb.st_mtime); -+ LL_I2L(s2us, PR_USEC_PER_SEC); -+ LL_MUL(s, s, s2us); -+ info->modifyTime = s; -+ LL_I2L(s, sb.st_ctime); -+ LL_MUL(s, s, s2us); -+ info->creationTime = s; -+ } -+ -+ return PR_SUCCESS; -+} -+ -+ -+PR_IMPLEMENT(PRStatus) PR_GetFileInfo64(const char *fn, PRFileInfo64 *info) -+{ -+ struct stat sb; -+ PRInt32 rv, err; -+ PRInt64 s, s2us; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ rv = stat(fn, &sb); -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_stat_error(err); -+ return PR_FAILURE; -+ } -+ if (info) { -+ if (S_IFREG & sb.st_mode) -+ info->type = PR_FILE_FILE; -+ else if (S_IFDIR & sb.st_mode) -+ info->type = PR_FILE_DIRECTORY; -+ else -+ info->type = PR_FILE_OTHER; -+ -+ /* For the 64 bit version we can use -+ * the native st_size without modification -+ */ -+ info->size = sb.st_size; -+ LL_I2L(s, sb.st_mtime); -+ LL_I2L(s2us, PR_USEC_PER_SEC); -+ LL_MUL(s, s, s2us); -+ info->modifyTime = s; -+ LL_I2L(s, sb.st_ctime); -+ LL_MUL(s, s, s2us); -+ info->creationTime = s; -+ } -+ -+ return PR_SUCCESS; -+} -+ -+PR_IMPLEMENT(PRStatus) PR_Access(const char *name, PRAccessHow how) -+{ -+ PRInt32 rv, err; -+ int checkFlags; -+ struct stat buf; -+ -+ switch (how) { -+ case PR_ACCESS_WRITE_OK: -+ checkFlags = S_IWUSR | S_IWGRP | S_IWOTH; -+ break; -+ -+ case PR_ACCESS_READ_OK: -+ checkFlags = S_IRUSR | S_IRGRP | S_IROTH; -+ break; -+ -+ case PR_ACCESS_EXISTS: -+ /* we don't need to examine st_mode. */ -+ break; -+ -+ default: { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return PR_FAILURE; -+ } -+ } -+ -+ rv = stat(name, &buf); -+ if (rv == 0 && how != PR_ACCESS_EXISTS && (!(buf.st_mode & checkFlags))) { -+ PR_SetError(PR_NO_ACCESS_RIGHTS_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ if (rv < 0) { -+ err = _MD_ERRNO(); -+ set_access_error(err); -+ return PR_FAILURE; -+ } else -+ return PR_SUCCESS; -+} -+ -+ -+PRInt32 -+_bt_socketavailable (PRFileDesc *fd) -+{ -+#ifdef BONE_VERSION -+ PRInt32 result; -+ -+ if (ioctl(fd->secret->md.osfd, FIONREAD, &result) < 0) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, _MD_ERRNO()); -+ return -1; -+ } -+ return result; -+#else -+ return PR_NOT_IMPLEMENTED_ERROR; -+#endif -+} -+ -+ -+#if defined(DEBUG) -+ -+PRBool IsValidNetAddr(const PRNetAddr *addr) -+{ -+ if ((addr != NULL) -+ && (addr->raw.family != PR_AF_INET6) -+ && (addr->raw.family != PR_AF_INET)) { -+ return PR_FALSE; -+ } -+ return PR_TRUE; -+} -+ -+static PRBool IsValidNetAddrLen(const PRNetAddr *addr, PRInt32 addr_len) -+{ -+ /* -+ * The definition of the length of a Unix domain socket address -+ * is not uniform, so we don't check it. -+ */ -+ if ((addr != NULL) -+ && (PR_NETADDR_SIZE(addr) != addr_len)) { -+ return PR_FALSE; -+ } -+ return PR_TRUE; -+} -+ -+#endif /* DEBUG */ -+ -+static PRInt32 socket_io_wait(PRInt32 osfd, PRInt32 fd_type, -+ PRIntervalTime timeout) -+{ -+ PRInt32 rv = -1; -+ struct timeval tv; -+ PRIntervalTime epoch, now, elapsed, remaining; -+ PRBool wait_for_remaining; -+ PRInt32 syserror; -+ fd_set rd_wr; -+ -+ switch (timeout) { -+ case PR_INTERVAL_NO_WAIT: -+ PR_SetError(PR_IO_TIMEOUT_ERROR, 0); -+ break; -+ case PR_INTERVAL_NO_TIMEOUT: -+ /* -+ * This is a special case of the 'default' case below. -+ * Please see the comments there. -+ */ -+ tv.tv_sec = _PR_INTERRUPT_CHECK_INTERVAL_SECS; -+ tv.tv_usec = 0; -+ FD_ZERO(&rd_wr); -+ do { -+ FD_SET(osfd, &rd_wr); -+ if (fd_type == READ_FD) -+ rv = select(osfd + 1, &rd_wr, NULL, NULL, &tv); -+ else -+ rv = select(osfd + 1, NULL, &rd_wr, NULL, &tv); -+ if (rv == -1 && (syserror = _MD_ERRNO()) != EINTR) { -+#ifdef BONE_VERSION -+ set_select_error(syserror); -+#else -+ if (syserror == EBADF) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, EBADF); -+ } else { -+ PR_SetError(PR_UNKNOWN_ERROR, syserror); -+ } -+#endif -+ break; -+ } -+ } while (rv == 0 || (rv == -1 && syserror == EINTR)); -+ break; -+ default: -+ now = epoch = PR_IntervalNow(); -+ remaining = timeout; -+ FD_ZERO(&rd_wr); -+ do { -+ /* -+ * We block in select for at most -+ * _PR_INTERRUPT_CHECK_INTERVAL_SECS seconds, -+ * so that there is an upper limit on the delay -+ * before the interrupt bit is checked. -+ */ -+ wait_for_remaining = PR_TRUE; -+ tv.tv_sec = PR_IntervalToSeconds(remaining); -+ if (tv.tv_sec > _PR_INTERRUPT_CHECK_INTERVAL_SECS) { -+ wait_for_remaining = PR_FALSE; -+ tv.tv_sec = _PR_INTERRUPT_CHECK_INTERVAL_SECS; -+ tv.tv_usec = 0; -+ } else { -+ tv.tv_usec = PR_IntervalToMicroseconds( -+ remaining - -+ PR_SecondsToInterval(tv.tv_sec)); -+ } -+ FD_SET(osfd, &rd_wr); -+ if (fd_type == READ_FD) -+ rv = select(osfd + 1, &rd_wr, NULL, NULL, &tv); -+ else -+ rv = select(osfd + 1, NULL, &rd_wr, NULL, &tv); -+ /* -+ * we don't consider EINTR a real error -+ */ -+ if (rv == -1 && (syserror = _MD_ERRNO()) != EINTR) { -+#ifdef BONE_VERSION -+ set_select_error(syserror); -+#else -+ if (syserror == EBADF) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, EBADF); -+ } else { -+ PR_SetError(PR_UNKNOWN_ERROR, syserror); -+ } -+#endif -+ break; -+ } -+ /* -+ * We loop again if select timed out or got interrupted -+ * by a signal, and the timeout deadline has not passed yet. -+ */ -+ if (rv == 0 || (rv == -1 && syserror == EINTR)) { -+ /* -+ * If select timed out, we know how much time -+ * we spent in blocking, so we can avoid a -+ * PR_IntervalNow() call. -+ */ -+ if (rv == 0) { -+ if (wait_for_remaining) { -+ now += remaining; -+ } else { -+ now += PR_SecondsToInterval(tv.tv_sec) -+ + PR_MicrosecondsToInterval(tv.tv_usec); -+ } -+ } else { -+ now = PR_IntervalNow(); -+ } -+ elapsed = (PRIntervalTime) (now - epoch); -+ if (elapsed >= timeout) { -+ PR_SetError(PR_IO_TIMEOUT_ERROR, 0); -+ rv = -1; -+ break; -+ } else { -+ remaining = timeout - elapsed; -+ } -+ } -+ } while (rv == 0 || (rv == -1 && syserror == EINTR)); -+ break; -+ } -+ return(rv); -+} -+ -+ -+static PRInt32 PR_CALLBACK SocketWritev(PRFileDesc *fd, const PRIOVec *iov, -+PRInt32 iov_size, PRIntervalTime timeout) -+{ -+#ifdef BONE_VERSION -+ int w, err = 0; -+ const PRIOVec *tmp_iov; -+#define LOCAL_MAXIOV 8 -+ PRIOVec local_iov[LOCAL_MAXIOV]; -+ PRIOVec *iov_copy = NULL; -+ int tmp_out; -+ int index, iov_cnt; -+ int count=0, sz = 0; /* 'count' is the return value. */ -+ int i, amount = 0; -+ -+ /* -+ * Assume the first writev will succeed. Copy iov's only on -+ * failure. -+ */ -+ tmp_iov = iov; -+ for (index = 0; index < iov_size; index++) -+ sz += iov[index].iov_len; -+ -+ iov_cnt = iov_size; -+ -+ while (sz > 0) { -+/* -+ /* -+ * Calculate the total number of bytes to be sent; needed for -+ * optimization later. -+ * We could avoid this if this number was passed in; but it is -+ * probably not a big deal because iov_size is usually small (less than -+ * 3) -+ */ -+ if (!fd->secret->nonblocking) { -+ for (i=0; isecret->md.osfd, (const struct iovec*)tmp_iov, iov_size)) == -1) { -+ err = _MD_ERRNO(); -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ if ((w = socket_io_wait(fd->secret->md.osfd, WRITE_FD, timeout))<0) -+ goto done; -+ -+ } else if (err == EINTR) { -+ continue; -+ } else { -+ break; -+ } -+ } -+ /* -+ * optimization; if bytes sent is less than "amount" call -+ * select before returning. This is because it is likely that -+ * the next writev() call will return EWOULDBLOCK. -+ */ -+ if ((!fd->secret->nonblocking) && (w > 0) && (w < amount) -+ && (timeout != PR_INTERVAL_NO_WAIT)) { -+ if (socket_io_wait(fd->secret->md.osfd, WRITE_FD, timeout) < 0) { -+ w = -1; -+ goto done; -+ } -+ } -+ -+ if (w < 0) { -+ set_writev_error(err); -+ } -+done: -+ -+ -+ if (w < 0) { -+ count = -1; -+ break; -+ } -+ count += w; -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ sz -= w; -+ -+ if (sz > 0) { -+ /* find the next unwritten vector */ -+ for ( index = 0, tmp_out = count; -+ tmp_out >= iov[index].iov_len; -+ tmp_out -= iov[index].iov_len, index++){;} /* nothing to execute */ -+ -+ if (tmp_iov == iov) { -+ /* -+ * The first writev failed so we -+ * must copy iov's around. -+ * Avoid calloc/free if there -+ * are few enough iov's. -+ */ -+ if (iov_size - index <= LOCAL_MAXIOV) -+ iov_copy = local_iov; -+ else if ((iov_copy = (PRIOVec *) PR_CALLOC((iov_size - index) * -+ sizeof *iov_copy)) == NULL) { -+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ return -1; -+ } -+ tmp_iov = iov_copy; -+ } -+ -+ PR_ASSERT(tmp_iov == iov_copy); -+ -+ /* fill in the first partial read */ -+ iov_copy[0].iov_base = &(((char *)iov[index].iov_base)[tmp_out]); -+ iov_copy[0].iov_len = iov[index].iov_len - tmp_out; -+ index++; -+ -+ /* copy the remaining vectors */ -+ for (iov_cnt=1; indexsecret->md.osfd; -+ -+#ifndef BONE_VERSION -+ fd->secret->md.connectValueValid = PR_FALSE; -+#endif -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ PRNetAddr addrCopy; -+ -+ addrCopy = *addr; -+ ((struct sockaddr *) &addrCopy)->sa_len = addrlen; -+ ((struct sockaddr *) &addrCopy)->sa_family = addr->raw.family; -+#endif -+ -+ /* (Copied from unix.c) -+ * We initiate the connection setup by making a nonblocking connect() -+ * call. If the connect() call fails, there are two cases we handle -+ * specially: -+ * 1. The connect() call was interrupted by a signal. In this case -+ * we simply retry connect(). -+ * 2. The NSPR socket is nonblocking and connect() fails with -+ * EINPROGRESS. We first wait until the socket becomes writable. -+ * Then we try to find out whether the connection setup succeeded -+ * or failed. -+ */ -+ -+retry: -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ if ((rv = connect(osfd, (struct sockaddr *)&addrCopy, addrlen)) == -1) { -+#else -+ if ((rv = connect(osfd, (struct sockaddr *)addr, addrlen)) == -1) { -+#endif -+ err = _MD_ERRNO(); -+#ifndef BONE_VERSION -+ fd->secret->md.connectReturnValue = rv; -+ fd->secret->md.connectReturnError = err; -+ fd->secret->md.connectValueValid = PR_TRUE; -+#endif -+ if( err == EINTR ) { -+#ifndef BONE_VERSION -+ snooze( 100000L ); -+#endif -+ goto retry; -+ } -+ -+#ifndef BONE_VERSION -+ if(!fd->secret->nonblocking && ((err == EINPROGRESS) || (err==EAGAIN) || (err==EALREADY))) { -+ -+ /* -+ ** There's no timeout on this connect, but that's not -+ ** a big deal, since the connect times out anyways -+ ** after 30 seconds. Just sleep for 1/10th of a second -+ ** and retry until we go through or die. -+ */ -+ goto retry; -+ } -+ -+ if( fd->secret->nonblocking && ((err == EAGAIN) || (err == EINPROGRESS))) { -+ PR_Lock(_connectLock); -+ if (connectCount < sizeof(connectList)/sizeof(connectList[0])) { -+ connectList[connectCount].osfd = osfd; -+ memcpy(&connectList[connectCount].addr, addr, addrlen); -+ connectList[connectCount].addrlen = addrlen; -+ connectList[connectCount].timeout = timeout; -+ connectCount++; -+ PR_Unlock(_connectLock); -+ set_connect_error(err); -+ } else { -+ PR_Unlock(_connectLock); -+ PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, 0); -+ } -+ return rv; -+ } -+#else /* BONE_VERSION */ -+ if(!fd->secret->nonblocking && (err == EINTR)) { -+ -+ rv = socket_io_wait(osfd, WRITE_FD, timeout); -+ if (rv == -1) { -+ return -1; -+ } -+ -+ PR_ASSERT(rv == 1); -+/* _MD_beos_get_nonblocking_connect_error always return PR_NOT_IMPLEMENTED.. -+ err = _MD_beos_get_nonblocking_connect_error(osfd); -+ if (err != 0) { -+ set_connect_error(err); -+ return -1; -+ } -+*/ -+ return 0; -+ } -+#endif -+ -+ set_connect_error(err); -+ } -+ -+ return rv; -+} -+ -+ -+static PRStatus PR_CALLBACK SocketConnect( -+ PRFileDesc *fd, const PRNetAddr *addr, PRIntervalTime timeout) -+{ -+ PRInt32 rv; /* Return value of _PR_MD_CONNECT */ -+ const PRNetAddr *addrp = addr; -+#if defined(_PR_INET6) -+ PRNetAddr addrCopy; -+ if (addr->raw.family == PR_AF_INET6) { -+ addrCopy = *addr; -+ addrCopy.raw.family = AF_INET6; -+ addrp = &addrCopy; -+ } -+#endif -+ -+ rv = _bt_CONNECT(fd, addrp, PR_NETADDR_SIZE(addr), timeout); -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("connect -> %d", rv)); -+ if (rv == 0) -+ return PR_SUCCESS; -+ else -+ return PR_FAILURE; -+} -+ -+static PRStatus PR_CALLBACK SocketConnectContinue( -+ PRFileDesc *fd, PRInt16 out_flags) -+{ -+ PRInt32 osfd; -+ int err; -+ int rv; -+ -+ if (out_flags & PR_POLL_NVAL) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); -+ return PR_FAILURE; -+ } -+ if ((out_flags & (PR_POLL_WRITE | PR_POLL_EXCEPT | PR_POLL_ERR)) == 0) { -+ PR_ASSERT(out_flags == 0); -+ PR_SetError(PR_IN_PROGRESS_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ osfd = fd->secret->md.osfd; -+ -+ -+#ifdef BONE_VERSION /* bug 122364 */ -+ /* temporary workaround until getsockopt(SO_ERROR) works in BONE */ -+ if (out_flags & PR_POLL_EXCEPT) { -+ PR_SetError(PR_CONNECT_REFUSED_ERROR, 0); -+ return PR_FAILURE; -+ } -+ PR_ASSERT(out_flags & PR_POLL_WRITE); -+ return PR_SUCCESS; -+#else -+ rv = recv(fd->secret->md.osfd, NULL, 0, 0); -+ PR_ASSERT(-1 == rv || 0 == rv); -+ -+ if (-1 == rv && 0 != errno && errno != EAGAIN && errno != EWOULDBLOCK ) { -+ set_connect_error(errno); -+ return PR_FAILURE; -+ } -+ else -+ return PR_SUCCESS; -+#endif -+} -+ -+PRInt32 -+_bt_accept (PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, -+ PRIntervalTime timeout) -+{ -+ PRInt32 osfd = fd->secret->md.osfd; -+ PRInt32 rv, err; -+ -+ while ((rv = accept(osfd, (struct sockaddr *) addr, -+ (int *)addrlen)) == -1) { -+ err = _MD_ERRNO(); -+ -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ /* If it's SUPPOSED to be a blocking thread, wait -+ * a while to see if the triggering condition gets -+ * satisfied. -+ */ -+ /* Assume that we're always using a native thread */ -+ if ((rv = socket_io_wait(osfd, READ_FD, timeout)) < 0) -+ goto done; -+ } else if (err == EINTR) { -+ continue; -+ } else { -+ break; -+ } -+ } -+ if (rv < 0) { -+ set_accept_error(err); -+ } else if (addr != NULL) { -+ /* bug 134099 */ -+ err = getpeername(rv, (struct sockaddr *) addr, (int *)addrlen); -+ } -+done: -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ if (rv != -1) { -+ /* Mask off the first byte of struct sockaddr (the length field) */ -+ if (addr) { -+ addr->raw.family = ((struct sockaddr *) addr)->sa_family; -+ } -+ } -+#endif /* _PR_HAVE_SOCKADDR_LEN */ -+ return(rv); -+} -+ -+ -+ -+static PRFileDesc* PR_CALLBACK SocketAccept(PRFileDesc *fd, PRNetAddr *addr, -+PRIntervalTime timeout) -+{ -+ PRInt32 osfd; -+ PRFileDesc *fd2; -+ PRUint32 al; -+ -+ al = sizeof(PRNetAddr); -+ osfd = _bt_accept(fd, addr, &al, timeout); -+ if (osfd == -1) -+ return 0; -+ fd2 = bt_CreateFileDesc(osfd, PR_GetTCPMethods(), _PR_TRI_TRUE, true); -+ if (!fd2) { -+ closesocket(osfd); -+ -+ return NULL; -+ } -+ -+ fd2->secret->nonblocking = fd->secret->nonblocking; -+ fd2->secret->inheritable = fd->secret->inheritable; -+ -+#ifdef _PR_INET6 -+ if (addr && (AF_INET6 == addr->raw.family)) -+ addr->raw.family = PR_AF_INET6; -+#endif -+ PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE); -+ PR_ASSERT(IsValidNetAddrLen(addr, al) == PR_TRUE); -+ -+ return fd2; -+} -+ -+ -+static PRStatus PR_CALLBACK SocketBind(PRFileDesc *fd, const PRNetAddr *addr) -+{ -+ PRInt32 result, err; -+ const PRNetAddr *addrp = addr; -+#if defined(_PR_INET6) || defined(_PR_HAVE_SOCKADDR_LEN) -+ PRNetAddr addrCopy; -+#endif -+ -+ PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE); -+#if defined(_PR_INET6) -+ if (addr->raw.family == PR_AF_INET6) { -+ addrCopy = *addr; -+ addrCopy.raw.family = AF_INET6; -+ addrp = &addrCopy; -+ } -+#endif -+ -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ addrCopy = *addrp; -+ ((struct sockaddr *) &addrCopy)->sa_len = PR_NETADDR_SIZE(addrp); -+ ((struct sockaddr *) &addrCopy)->sa_family = addr->raw.family; -+ result = bind(fd->secret->md.osfd, (struct sockaddr *) &addrCopy, PR_NETADDR_SIZE(addrp)); -+#else -+ result = bind(fd->secret->md.osfd, (struct sockaddr *) addrp, PR_NETADDR_SIZE(addrp)); -+#endif -+ -+ -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_bind_error(err); -+ return PR_FAILURE; -+ } -+ return PR_SUCCESS; -+} -+ -+static PRStatus PR_CALLBACK SocketListen(PRFileDesc *fd, PRIntn backlog) -+{ -+ PRInt32 result,err; -+#ifndef BONE_VERSION -+ /* Bug workaround! Setting listen to 0 on Be accepts no connections. -+ ** On most UN*Xes this sets the default. -+ */ -+ -+ if( backlog == 0 ) backlog = 5; -+#endif -+ result = listen(fd->secret->md.osfd, backlog); -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_listen_error(err); -+ return PR_FAILURE; -+ } -+ return PR_SUCCESS; -+} -+ -+static PRStatus PR_CALLBACK SocketShutdown(PRFileDesc *fd, PRIntn how) -+{ -+ PRInt32 result,err; -+#ifndef BONE_VERSION -+ if (how == PR_SHUTDOWN_SEND) -+ fd->secret->md.sock_state = BE_SOCK_SHUTDOWN_WRITE; -+ else if (how == PR_SHUTDOWN_RCV) -+ fd->secret->md.sock_state = BE_SOCK_SHUTDOWN_READ; -+ else if (how == PR_SHUTDOWN_BOTH) { -+ fd->secret->md.sock_state = (BE_SOCK_SHUTDOWN_WRITE | BE_SOCK_SHUTDOWN_READ); -+ } -+#else /* BONE_VERSION */ -+ result = shutdown(fd->secret->md.osfd, how); -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_shutdown_error(err); -+ return PR_FAILURE; -+ } -+#endif -+ return PR_SUCCESS; -+} -+ -+PRInt32 -+_bt_recv (PRFileDesc *fd, void *buf, PRInt32 amount, PRInt32 flags, -+ PRIntervalTime timeout) -+{ -+ PRInt32 osfd = fd->secret->md.osfd; -+ PRInt32 rv, err; -+ -+#ifndef BONE_VERSION -+ if (fd->secret->md.sock_state & BE_SOCK_SHUTDOWN_READ) { -+ set_recv_error(EPIPE); -+ return -1; -+ } -+#endif -+ -+#ifdef BONE_VERSION -+ /* -+ ** Gah, stupid hack. If reading a zero amount, instantly return success. -+ ** BONE beta 6 returns EINVAL for reads of zero bytes, which parts of -+ ** mozilla use to check for socket availability. -+ */ -+ -+ if( 0 == amount ) return(0); -+#endif -+ -+ while ((rv = recv(osfd, buf, amount, flags)) == -1) { -+ err = _MD_ERRNO(); -+ -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ /* If socket was supposed to be blocking, -+ wait a while for the condition to be -+ satisfied. */ -+ if ((rv = socket_io_wait(osfd, READ_FD, timeout)) < 0) -+ goto done; -+ } else if (err == EINTR) { -+ continue; -+ } else -+ break; -+ } -+ -+ if (rv < 0) { -+ set_recv_error(err); -+ } -+ -+done: -+ return(rv); -+} -+ -+static PRInt32 PR_CALLBACK SocketRecv(PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, -+PRIntervalTime timeout) -+{ -+ PRInt32 rv; -+ -+ if ((flags != 0) && (flags != PR_MSG_PEEK)) { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return -1; -+ } -+ -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("recv: fd=%p osfd=%d buf=%p amount=%d flags=%d", -+ fd, fd->secret->md.osfd, buf, amount, flags)); -+ -+ -+ rv = _bt_recv(fd, buf, amount, flags, timeout); -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("recv -> %d, error = %d, os error = %d", -+ rv, PR_GetError(), PR_GetOSError())); -+ -+ return rv; -+} -+ -+static PRInt32 PR_CALLBACK SocketRead(PRFileDesc *fd, void *buf, PRInt32 amount) -+{ -+ return SocketRecv(fd, buf, amount, 0, PR_INTERVAL_NO_TIMEOUT); -+} -+ -+PRInt32 -+_bt_send (PRFileDesc *fd, const void *buf, PRInt32 amount, PRInt32 flags, -+ PRIntervalTime timeout) -+{ -+ PRInt32 osfd = fd->secret->md.osfd; -+ PRInt32 rv, err; -+ -+#ifndef BONE_VERSION -+ if (fd->secret->md.sock_state & BE_SOCK_SHUTDOWN_WRITE) -+ { -+ set_send_error(EPIPE); -+ return -1; -+ } -+#endif -+ -+ while ((rv = send(osfd, buf, amount, flags)) == -1) { -+ err = _MD_ERRNO(); -+ -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ -+#ifndef BONE_VERSION -+ -+ /* in UNIX implementations, you could do a socket_io_wait here. -+ * but since BeOS doesn't yet support WRITE notification in select, -+ * you're spanked. -+ */ -+ snooze( 10000L ); -+ continue; -+#else /* BONE_VERSION */ -+ if ((rv = socket_io_wait(osfd, WRITE_FD, timeout))< 0) -+ goto done; -+#endif -+ -+ } else if (err == EINTR) { -+ continue; -+ } else { -+ break; -+ } -+ } -+ -+#ifdef BONE_VERSION -+ /* -+ * optimization; if bytes sent is less than "amount" call -+ * select before returning. This is because it is likely that -+ * the next writev() call will return EWOULDBLOCK. -+ */ -+ if ((!fd->secret->nonblocking) && (rv > 0) && (rv < amount) -+ && (timeout != PR_INTERVAL_NO_WAIT)) { -+ if (socket_io_wait(osfd, WRITE_FD, timeout) < 0) { -+ rv = -1; -+ goto done; -+ } -+ } -+#endif /* BONE_VERSION */ -+ -+ if (rv < 0) { -+ set_send_error(err); -+ } -+ -+#ifdef BONE_VERSION -+done: -+#endif -+ return(rv); -+} -+ -+ -+static PRInt32 PR_CALLBACK SocketSend(PRFileDesc *fd, const void *buf, PRInt32 amount, -+PRIntn flags, PRIntervalTime timeout) -+{ -+ PRInt32 temp, count; -+ -+ count = 0; -+ while (amount > 0) { -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, -+ ("send: fd=%p osfd=%d buf=%p amount=%d", -+ fd, fd->secret->md.osfd, buf, amount)); -+ temp = _bt_send(fd, buf, amount, flags, timeout); -+ if (temp < 0) { -+ count = -1; -+ break; -+ } -+ -+ count += temp; -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ buf = (const void*) ((const char*)buf + temp); -+ -+ amount -= temp; -+ } -+ PR_LOG(_pr_io_lm, PR_LOG_MAX, ("send -> %d", count)); -+ return count; -+} -+ -+static PRInt32 PR_CALLBACK SocketWrite(PRFileDesc *fd, const void *buf, PRInt32 amount) -+{ -+ return SocketSend(fd, buf, amount, 0, PR_INTERVAL_NO_TIMEOUT); -+} -+ -+static PRStatus PR_CALLBACK SocketClose(PRFileDesc *fd) -+{ -+ if (!fd || !fd->secret -+ || (fd->secret->state != _PR_FILEDESC_OPEN -+ && fd->secret->state != _PR_FILEDESC_CLOSED)) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ if (fd->secret->state == _PR_FILEDESC_OPEN) { -+ if (closesocket(fd->secret->md.osfd) < 0) { -+ return PR_FAILURE; -+ } -+ -+ fd->secret->state = _PR_FILEDESC_CLOSED; -+ } -+ -+ PR_ASSERT(fd); -+ _PR_Putfd(fd); -+ return PR_SUCCESS; -+} -+ -+static PRInt32 PR_CALLBACK SocketAvailable(PRFileDesc *fd) -+{ -+ PRInt32 rv; -+ rv = _bt_socketavailable(fd); -+ return rv; -+} -+ -+static PRInt64 PR_CALLBACK SocketAvailable64(PRFileDesc *fd) -+{ -+ PRInt64 rv; -+ LL_I2L(rv, _bt_socketavailable(fd)); -+ return rv; -+} -+ -+static PRStatus PR_CALLBACK SocketSync(PRFileDesc *fd) -+{ -+ return PR_SUCCESS; -+} -+ -+PRInt32 -+_bt_sendto (PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags, -+ const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout) -+{ -+ PRInt32 osfd = fd->secret->md.osfd; -+ PRInt32 rv, err; -+ -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ PRNetAddr addrCopy; -+ -+ addrCopy = *addr; -+ ((struct sockaddr *) &addrCopy)->sa_len = addrlen; -+ ((struct sockaddr *) &addrCopy)->sa_family = addr->raw.family; -+ -+ while ((rv = sendto(osfd, buf, amount, flags, -+ (struct sockaddr *) &addrCopy, addrlen)) == -1) { -+#else -+ while ((rv = sendto(osfd, buf, amount, flags, -+ (struct sockaddr *) addr, addrlen)) == -1) { -+#endif -+ err = _MD_ERRNO(); -+ -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ -+#ifdef BONE_VERSION -+ if ((rv = socket_io_wait(osfd, WRITE_FD, timeout))< 0) -+ goto done; -+#endif -+ } else if (err == EINTR) { -+ continue; -+ -+ } else { -+ break; -+ } -+ } -+ -+ if (rv < 0) { -+ set_sendto_error(err); -+ } -+ -+#ifdef BONE_VERSION -+done: -+#endif -+ return(rv); -+} -+ -+ -+static PRInt32 PR_CALLBACK SocketSendTo( -+ PRFileDesc *fd, const void *buf, PRInt32 amount, -+ PRIntn flags, const PRNetAddr *addr, PRIntervalTime timeout) -+{ -+ PRInt32 temp, count; -+ const PRNetAddr *addrp = addr; -+#if defined(_PR_INET6) -+ PRNetAddr addrCopy; -+#endif -+ -+ PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE); -+#if defined(_PR_INET6) -+ if (addr->raw.family == PR_AF_INET6) { -+ addrCopy = *addr; -+ addrCopy.raw.family = AF_INET6; -+ addrp = &addrCopy; -+ } -+#endif -+ -+ count = 0; -+ while (amount > 0) { -+ temp = _bt_sendto(fd, buf, amount, flags, -+ addrp, PR_NETADDR_SIZE(addr), timeout); -+ if (temp < 0) { -+ count = -1; -+ break; -+ } -+ count += temp; -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ buf = (const void*) ((const char*)buf + temp); -+ amount -= temp; -+ } -+ return count; -+} -+ -+PRInt32 -+_bt_recvfrom (PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags, -+ PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout) -+{ -+ PRInt32 osfd = fd->secret->md.osfd; -+ PRInt32 rv, err; -+ -+ while ((*addrlen = PR_NETADDR_SIZE(addr)), -+ ((rv = recvfrom(osfd, buf, amount, flags, -+ (struct sockaddr *) addr, -+ (int *)addrlen)) == -1)) { -+ err = _MD_ERRNO(); -+ -+ if ((err == EAGAIN) || (err == EWOULDBLOCK)) { -+ if (fd->secret->nonblocking) { -+ break; -+ } -+ if ((rv = socket_io_wait(osfd, READ_FD, timeout)) < 0) -+ goto done; -+ -+ } else if (err == EINTR) { -+ continue; -+ } else { -+ break; -+ } -+ } -+ -+ if (rv < 0) { -+ set_recvfrom_error(err); -+ } -+ -+done: -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ if (rv != -1) { -+ /* ignore the sa_len field of struct sockaddr */ -+ if (addr) { -+ addr->raw.family = ((struct sockaddr *) addr)->sa_family; -+ } -+ } -+#endif /* _PR_HAVE_SOCKADDR_LEN */ -+ return(rv); -+} -+ -+ -+ -+static PRInt32 PR_CALLBACK SocketRecvFrom(PRFileDesc *fd, void *buf, PRInt32 amount, -+PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout) -+{ -+ PRInt32 rv; -+ PRUint32 al; -+ -+ al = sizeof(PRNetAddr); -+ rv = _bt_recvfrom(fd, buf, amount, flags, addr, &al, timeout); -+#ifdef _PR_INET6 -+ if (addr && (AF_INET6 == addr->raw.family)) -+ addr->raw.family = PR_AF_INET6; -+#endif -+ return rv; -+} -+ -+static PRInt32 PR_CALLBACK SocketAcceptRead(PRFileDesc *sd, PRFileDesc **nd, -+PRNetAddr **raddr, void *buf, PRInt32 amount, -+PRIntervalTime timeout) -+{ -+ /* The socket must be in blocking mode. */ -+ if (sd->secret->nonblocking) { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return -1; -+ } -+ *nd = NULL; -+ -+ return PR_EmulateAcceptRead(sd, nd, raddr, buf, amount, timeout); -+} -+ -+ -+static PRInt32 PR_CALLBACK SocketSendFile( -+ PRFileDesc *sd, PRSendFileData *sfd, -+ PRTransmitFileFlags flags, PRIntervalTime timeout) -+{ -+ /* The socket must be in blocking mode. */ -+ if (sd->secret->nonblocking) { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return -1; -+ } -+ return PR_EmulateSendFile(sd, sfd, flags, timeout); -+} -+ -+static PRInt32 PR_CALLBACK SocketTransmitFile(PRFileDesc *sd, PRFileDesc *fd, -+const void *headers, PRInt32 hlen, PRTransmitFileFlags flags, -+PRIntervalTime timeout) -+{ -+ PRSendFileData sfd; -+ -+ sfd.fd = fd; -+ sfd.file_offset = 0; -+ sfd.file_nbytes = 0; -+ sfd.header = headers; -+ sfd.hlen = hlen; -+ sfd.trailer = NULL; -+ sfd.tlen = 0; -+ -+ return(SocketSendFile(sd, &sfd, flags, timeout)); -+} -+ -+static PRStatus PR_CALLBACK SocketGetName(PRFileDesc *fd, PRNetAddr *addr) -+{ -+ PRInt32 result, err; -+ PRUint32 addrlen; -+ -+ addrlen = sizeof(PRNetAddr); -+ result = getsockname(fd->secret->md.osfd, (struct sockaddr *) addr, &addrlen); -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_getsockname_error(err); -+ return PR_FAILURE; -+ } -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ if (result == 0) { -+ /* ignore the sa_len field of struct sockaddr */ -+ if (addr) { -+ addr->raw.family = ((struct sockaddr *) addr)->sa_family; -+ } -+ } -+#endif /* _PR_HAVE_SOCKADDR_LEN */ -+ -+#ifdef _PR_INET6 -+ if (AF_INET6 == addr->raw.family) -+ addr->raw.family = PR_AF_INET6; -+#endif -+ PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE); -+ PR_ASSERT(IsValidNetAddrLen(addr, addrlen) == PR_TRUE); -+ return PR_SUCCESS; -+} -+ -+static PRStatus PR_CALLBACK SocketGetPeerName(PRFileDesc *fd, PRNetAddr *addr) -+{ -+ PRInt32 result, err; -+ PRUint32 addrlen; -+ -+ addrlen = sizeof(PRNetAddr); -+ result = getpeername(fd->secret->md.osfd, (struct sockaddr *) addr, &addrlen); -+ if (result < 0) { -+ err = _MD_ERRNO(); -+ set_getpeername_error(err); -+ return PR_FAILURE; -+ } -+#ifdef _PR_HAVE_SOCKADDR_LEN -+ if (result == 0) { -+ /* ignore the sa_len field of struct sockaddr */ -+ if (addr) { -+ addr->raw.family = ((struct sockaddr *) addr)->sa_family; -+ } -+ } -+#endif /* _PR_HAVE_SOCKADDR_LEN */ -+ -+#ifdef _PR_INET6 -+ if (AF_INET6 == addr->raw.family) -+ addr->raw.family = PR_AF_INET6; -+#endif -+ PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE); -+ PR_ASSERT(IsValidNetAddrLen(addr, addrlen) == PR_TRUE); -+ return PR_SUCCESS; -+} -+ -+static PRInt16 PR_CALLBACK SocketPoll( -+ PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags) -+{ -+ *out_flags = 0; -+ return in_flags; -+} /* SocketPoll */ -+ -+ -+PRStatus PR_CALLBACK SocketGetOption(PRFileDesc *fd, PRSocketOptionData *data) -+{ -+ PRStatus rv; -+ PRInt32 level, name, length, err; -+ -+ /* -+ * PR_SockOpt_Nonblocking is a special case that does not -+ * translate to a getsockopt() call -+ */ -+ if (PR_SockOpt_Nonblocking == data->option) -+ { -+ data->value.non_blocking = fd->secret->nonblocking; -+ return PR_SUCCESS; -+ } -+ -+ rv = _PR_MapOptionName(data->option, &level, &name); -+ if (PR_SUCCESS != rv) return rv; -+ -+ switch (data->option) -+ { -+ case PR_SockOpt_Linger: -+ { -+#ifdef BONE_VERSION -+ struct linger linger; -+ length = sizeof(linger); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char *) &linger, &length)) -+ { -+ PR_ASSERT(sizeof(linger) == length); -+ data->value.linger.polarity = -+ (linger.l_onoff) ? PR_TRUE : PR_FALSE; -+ data->value.linger.linger = -+ PR_SecondsToInterval(linger.l_linger); -+ return PR_SUCCESS; -+ } -+ break; -+#else -+ PR_SetError( PR_NOT_IMPLEMENTED_ERROR, 0 ); -+ return PR_FAILURE; -+#endif -+ } -+ case PR_SockOpt_Reuseaddr: -+ case PR_SockOpt_Keepalive: -+ case PR_SockOpt_NoDelay: -+ case PR_SockOpt_Broadcast: -+ { -+ PRIntn value; -+ length = sizeof(value); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char *) &value, &length)) -+ { -+ data->value.reuse_addr = (0 == value) ? PR_FALSE : PR_TRUE; -+ return PR_SUCCESS; -+ } -+ break; -+ } -+ case PR_SockOpt_McastLoopback: -+ { -+ PRUint8 bool; -+ length = sizeof(bool); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char*)&bool, &length)) -+ { -+ data->value.mcast_loopback = (0 == bool) ? PR_FALSE : PR_TRUE; -+ return PR_SUCCESS; -+ } -+ break; -+ } -+ case PR_SockOpt_RecvBufferSize: -+ case PR_SockOpt_SendBufferSize: -+ case PR_SockOpt_MaxSegment: -+ { -+ PRIntn value; -+ length = sizeof(value); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char*)&value, &length)) -+ { -+ data->value.recv_buffer_size = value; -+ return PR_SUCCESS; -+ } -+ break; -+ } -+ case PR_SockOpt_IpTimeToLive: -+ case PR_SockOpt_IpTypeOfService: -+ { -+ /* These options should really be an int (or PRIntn). */ -+ length = sizeof(PRUintn); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char*)&data->value.ip_ttl, &length)) -+ return PR_SUCCESS; -+ break; -+ } -+ case PR_SockOpt_McastTimeToLive: -+ { -+ PRUint8 ttl; -+ length = sizeof(ttl); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char*)&ttl, &length)) -+ { -+ data->value.mcast_ttl = ttl; -+ return PR_SUCCESS; -+ } -+ break; -+ } -+#ifdef IP_ADD_MEMBERSHIP -+ case PR_SockOpt_AddMember: -+ case PR_SockOpt_DropMember: -+ { -+ struct ip_mreq mreq; -+ length = sizeof(mreq); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, (char*)&mreq, &length)) -+ { -+ data->value.add_member.mcaddr.inet.ip = -+ mreq.imr_multiaddr.s_addr; -+ data->value.add_member.ifaddr.inet.ip = -+ mreq.imr_interface.s_addr; -+ return PR_SUCCESS; -+ } -+ break; -+ } -+#endif /* IP_ADD_MEMBERSHIP */ -+ case PR_SockOpt_McastInterface: -+ { -+ /* This option is a struct in_addr. */ -+ length = sizeof(data->value.mcast_if.inet.ip); -+ if (0 == getsockopt( -+ fd->secret->md.osfd, level, name, -+ (char*)&data->value.mcast_if.inet.ip, &length)) -+ return PR_SUCCESS; -+ break; -+ } -+ default: -+ PR_NOT_REACHED("Unknown socket option"); -+ break; -+ } -+ err = _MD_ERRNO(); -+ set_getsockopt_error(err); -+ return PR_FAILURE; -+} /* SocketGetOption */ -+ -+PRStatus PR_CALLBACK SocketSetOption(PRFileDesc *fd, const PRSocketOptionData *data) -+{ -+ PRStatus rv; -+ PRInt32 level, name, result, err; -+ -+ /* -+ * PR_SockOpt_Nonblocking is a special case that does not -+ * translate to a setsockopt call. -+ */ -+ if (PR_SockOpt_Nonblocking == data->option) -+ { -+ fd->secret->nonblocking = data->value.non_blocking; -+ return PR_SUCCESS; -+ } -+ -+ rv = _PR_MapOptionName(data->option, &level, &name); -+ if (PR_SUCCESS != rv) return rv; -+ -+ switch (data->option) -+ { -+ case PR_SockOpt_Linger: -+ { -+#ifdef BONE_VERSION -+ struct linger linger; -+ linger.l_onoff = data->value.linger.polarity; -+ linger.l_linger = PR_IntervalToSeconds(data->value.linger.linger); -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&linger, sizeof(linger)); -+ break; -+#else -+ PR_SetError( PR_NOT_IMPLEMENTED_ERROR, 0 ); -+ return PR_FAILURE; -+#endif -+ } -+ case PR_SockOpt_Reuseaddr: -+ case PR_SockOpt_Keepalive: -+ case PR_SockOpt_NoDelay: -+ case PR_SockOpt_Broadcast: -+ { -+ PRIntn value; -+ value = (data->value.reuse_addr) ? 1 : 0; -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&value, sizeof(value)); -+ break; -+ } -+ case PR_SockOpt_McastLoopback: -+ { -+ PRUint8 bool; -+ bool = data->value.mcast_loopback ? 1 : 0; -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&bool, sizeof(bool)); -+ break; -+ } -+ case PR_SockOpt_RecvBufferSize: -+ case PR_SockOpt_SendBufferSize: -+ case PR_SockOpt_MaxSegment: -+ { -+ PRIntn value = data->value.recv_buffer_size; -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&value, sizeof(value)); -+ break; -+ } -+ case PR_SockOpt_IpTimeToLive: -+ case PR_SockOpt_IpTypeOfService: -+ { -+ /* These options should really be an int (or PRIntn). */ -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&data->value.ip_ttl, sizeof(PRUintn)); -+ break; -+ } -+ case PR_SockOpt_McastTimeToLive: -+ { -+ PRUint8 ttl; -+ ttl = data->value.mcast_ttl; -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&ttl, sizeof(ttl)); -+ break; -+ } -+#ifdef IP_ADD_MEMBERSHIP -+ case PR_SockOpt_AddMember: -+ case PR_SockOpt_DropMember: -+ { -+ struct ip_mreq mreq; -+ mreq.imr_multiaddr.s_addr = -+ data->value.add_member.mcaddr.inet.ip; -+ mreq.imr_interface.s_addr = -+ data->value.add_member.ifaddr.inet.ip; -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&mreq, sizeof(mreq)); -+ break; -+ } -+#endif /* IP_ADD_MEMBERSHIP */ -+ case PR_SockOpt_McastInterface: -+ { -+ /* This option is a struct in_addr. */ -+ result = setsockopt( -+ fd->secret->md.osfd, level, name, (char*)&data->value.mcast_if.inet.ip, -+ sizeof(data->value.mcast_if.inet.ip)); -+ break; -+ } -+ default: -+ PR_NOT_REACHED("Unknown socket option"); -+ break; -+ } -+ if (0 == result) -+ return PR_SUCCESS; -+ err = _MD_ERRNO(); -+ set_setsockopt_error(err); -+ return PR_FAILURE; -+} /* SocketSetOption */ -+ -+ -+ -+static PRIOMethods tcpMethods = { -+ PR_DESC_SOCKET_TCP, -+ SocketClose, -+ SocketRead, -+ SocketWrite, -+ SocketAvailable, -+ SocketAvailable64, -+ SocketSync, -+ (PRSeekFN)_PR_InvalidInt, -+ (PRSeek64FN)_PR_InvalidInt64, -+ (PRFileInfoFN)_PR_InvalidStatus, -+ (PRFileInfo64FN)_PR_InvalidStatus, -+ SocketWritev, -+ SocketConnect, -+ SocketAccept, -+ SocketBind, -+ SocketListen, -+ SocketShutdown, -+ SocketRecv, -+ SocketSend, -+ (PRRecvfromFN)_PR_InvalidInt, -+ (PRSendtoFN)_PR_InvalidInt, -+ SocketPoll, -+ SocketAcceptRead, -+ SocketTransmitFile, -+ SocketGetName, -+ SocketGetPeerName, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ SocketGetOption, -+ SocketSetOption, -+ SocketSendFile, -+ SocketConnectContinue, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+static PRIOMethods udpMethods = { -+ PR_DESC_SOCKET_UDP, -+ SocketClose, -+ SocketRead, -+ SocketWrite, -+ SocketAvailable, -+ SocketAvailable64, -+ SocketSync, -+ (PRSeekFN)_PR_InvalidInt, -+ (PRSeek64FN)_PR_InvalidInt64, -+ (PRFileInfoFN)_PR_InvalidStatus, -+ (PRFileInfo64FN)_PR_InvalidStatus, -+ SocketWritev, -+ SocketConnect, -+ (PRAcceptFN)_PR_InvalidDesc, -+ SocketBind, -+ SocketListen, -+ SocketShutdown, -+ SocketRecv, -+ SocketSend, -+ SocketRecvFrom, -+ SocketSendTo, -+ SocketPoll, -+ (PRAcceptreadFN)_PR_InvalidInt, -+ (PRTransmitfileFN)_PR_InvalidInt, -+ SocketGetName, -+ SocketGetPeerName, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ SocketGetOption, -+ SocketSetOption, -+ (PRSendfileFN)_PR_InvalidInt, -+ (PRConnectcontinueFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+ -+static PRIOMethods socketpollfdMethods = { -+ (PRDescType) 0, -+ (PRCloseFN)_PR_InvalidStatus, -+ (PRReadFN)_PR_InvalidInt, -+ (PRWriteFN)_PR_InvalidInt, -+ (PRAvailableFN)_PR_InvalidInt, -+ (PRAvailable64FN)_PR_InvalidInt64, -+ (PRFsyncFN)_PR_InvalidStatus, -+ (PRSeekFN)_PR_InvalidInt, -+ (PRSeek64FN)_PR_InvalidInt64, -+ (PRFileInfoFN)_PR_InvalidStatus, -+ (PRFileInfo64FN)_PR_InvalidStatus, -+ (PRWritevFN)_PR_InvalidInt, -+ (PRConnectFN)_PR_InvalidStatus, -+ (PRAcceptFN)_PR_InvalidDesc, -+ (PRBindFN)_PR_InvalidStatus, -+ (PRListenFN)_PR_InvalidStatus, -+ (PRShutdownFN)_PR_InvalidStatus, -+ (PRRecvFN)_PR_InvalidInt, -+ (PRSendFN)_PR_InvalidInt, -+ (PRRecvfromFN)_PR_InvalidInt, -+ (PRSendtoFN)_PR_InvalidInt, -+ SocketPoll, -+ (PRAcceptreadFN)_PR_InvalidInt, -+ (PRTransmitfileFN)_PR_InvalidInt, -+ (PRGetsocknameFN)_PR_InvalidStatus, -+ (PRGetpeernameFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRGetsocketoptionFN)_PR_InvalidStatus, -+ (PRSetsocketoptionFN)_PR_InvalidStatus, -+ (PRSendfileFN)_PR_InvalidInt, -+ (PRConnectcontinueFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+static PRIOMethods _pr_socketpollfd_methods = { -+ (PRDescType) 0, -+ (PRCloseFN)_PR_InvalidStatus, -+ (PRReadFN)_PR_InvalidInt, -+ (PRWriteFN)_PR_InvalidInt, -+ (PRAvailableFN)_PR_InvalidInt, -+ (PRAvailable64FN)_PR_InvalidInt64, -+ (PRFsyncFN)_PR_InvalidStatus, -+ (PRSeekFN)_PR_InvalidInt, -+ (PRSeek64FN)_PR_InvalidInt64, -+ (PRFileInfoFN)_PR_InvalidStatus, -+ (PRFileInfo64FN)_PR_InvalidStatus, -+ (PRWritevFN)_PR_InvalidInt, -+ (PRConnectFN)_PR_InvalidStatus, -+ (PRAcceptFN)_PR_InvalidDesc, -+ (PRBindFN)_PR_InvalidStatus, -+ (PRListenFN)_PR_InvalidStatus, -+ (PRShutdownFN)_PR_InvalidStatus, -+ (PRRecvFN)_PR_InvalidInt, -+ (PRSendFN)_PR_InvalidInt, -+ (PRRecvfromFN)_PR_InvalidInt, -+ (PRSendtoFN)_PR_InvalidInt, -+ SocketPoll, -+ (PRAcceptreadFN)_PR_InvalidInt, -+ (PRTransmitfileFN)_PR_InvalidInt, -+ (PRGetsocknameFN)_PR_InvalidStatus, -+ (PRGetpeernameFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRGetsocketoptionFN)_PR_InvalidStatus, -+ (PRSetsocketoptionFN)_PR_InvalidStatus, -+ (PRSendfileFN)_PR_InvalidInt, -+ (PRConnectcontinueFN)_PR_InvalidStatus, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt, -+ (PRReservedFN)_PR_InvalidInt -+}; -+ -+PR_IMPLEMENT(const PRIOMethods*) PR_GetTCPMethods() -+{ -+ return &tcpMethods; -+} -+ -+PR_IMPLEMENT(const PRIOMethods*) PR_GetUDPMethods() -+{ -+ return &udpMethods; -+} -+ -+static const PRIOMethods* PR_GetSocketPollFdMethods(void) -+{ -+ return &_pr_socketpollfd_methods; -+} /* PR_GetSocketPollFdMethods */ -+ -+PR_IMPLEMENT(PRInt32) PR_Poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout) -+{ -+ PRInt32 rv = 0; -+ /* -+ * This code is almost a duplicate of w32poll.c's _PR_MD_PR_POLL(). -+ */ -+ fd_set rd, wt, ex; -+ PRFileDesc *bottom; -+ PRPollDesc *pd, *epd; -+ PRInt32 maxfd = -1, ready, err; -+ PRIntervalTime remaining, elapsed, start; -+ -+ struct timeval tv, *tvp = NULL; -+ -+ if (0 == npds) { -+ PR_Sleep(timeout); -+ return rv; -+ } -+ -+ FD_ZERO(&rd); -+ FD_ZERO(&wt); -+ FD_ZERO(&ex); -+ -+ ready = 0; -+ for (pd = pds, epd = pd + npds; pd < epd; pd++) -+ { -+ PRInt16 in_flags_read = 0, in_flags_write = 0; -+ PRInt16 out_flags_read = 0, out_flags_write = 0; -+ -+ if ((NULL != pd->fd) && (0 != pd->in_flags)) -+ { -+ if (pd->in_flags & PR_POLL_READ) -+ { -+ in_flags_read = (pd->fd->methods->poll)(pd->fd, pd->in_flags & ~PR_POLL_WRITE, &out_flags_read); -+ } -+ if (pd->in_flags & PR_POLL_WRITE) -+ { -+ in_flags_write = (pd->fd->methods->poll)(pd->fd, pd->in_flags & ~PR_POLL_READ, &out_flags_write); -+ } -+ if ((0 != (in_flags_read & out_flags_read)) -+ || (0 != (in_flags_write & out_flags_write))) -+ { -+ /* this one's ready right now */ -+ if (0 == ready) -+ { -+ /* -+ * We will have to return without calling the -+ * system poll/select function. So zero the -+ * out_flags fields of all the poll descriptors -+ * before this one. -+ */ -+ PRPollDesc *prev; -+ for (prev = pds; prev < pd; prev++) -+ { -+ prev->out_flags = 0; -+ } -+ } -+ ready += 1; -+ pd->out_flags = out_flags_read | out_flags_write; -+ } -+ else -+ { -+ pd->out_flags = 0; /* pre-condition */ -+ -+ /* make sure this is an NSPR supported stack */ -+ bottom = PR_GetIdentitiesLayer(pd->fd, PR_NSPR_IO_LAYER); -+ PR_ASSERT(NULL != bottom); /* what to do about that? */ -+ if ((NULL != bottom) -+ && (_PR_FILEDESC_OPEN == bottom->secret->state)) -+ { -+ if (0 == ready) -+ { -+ PRInt32 osfd = bottom->secret->md.osfd; -+ if (osfd > maxfd) maxfd = osfd; -+ if (in_flags_read & PR_POLL_READ) -+ { -+ pd->out_flags |= _PR_POLL_READ_SYS_READ; -+ FD_SET(osfd, &rd); -+ } -+ if (in_flags_read & PR_POLL_WRITE) -+ { -+ pd->out_flags |= _PR_POLL_READ_SYS_WRITE; -+ FD_SET(osfd, &wt); -+ } -+ if (in_flags_write & PR_POLL_READ) -+ { -+ pd->out_flags |= _PR_POLL_WRITE_SYS_READ; -+ FD_SET(osfd, &rd); -+ } -+ if (in_flags_write & PR_POLL_WRITE) -+ { -+ pd->out_flags |= _PR_POLL_WRITE_SYS_WRITE; -+ FD_SET(osfd, &wt); -+ } -+ if (pd->in_flags & PR_POLL_EXCEPT) FD_SET(osfd, &ex); -+ } -+ } -+ else -+ { -+ if (0 == ready) -+ { -+ PRPollDesc *prev; -+ for (prev = pds; prev < pd; prev++) -+ { -+ prev->out_flags = 0; -+ } -+ } -+ ready += 1; /* this will cause an abrupt return */ -+ pd->out_flags = PR_POLL_NVAL; /* bogii */ -+ } -+ } -+ } -+ else -+ { -+ pd->out_flags = 0; -+ } -+ } -+ -+ if (0 != ready) return ready; /* no need to block */ -+ -+ remaining = timeout; -+ start = PR_IntervalNow(); -+ -+ retry: -+ if (timeout != PR_INTERVAL_NO_TIMEOUT) -+ { -+ PRInt32 ticksPerSecond = PR_TicksPerSecond(); -+ tv.tv_sec = remaining / ticksPerSecond; -+ tv.tv_usec = PR_IntervalToMicroseconds( remaining % ticksPerSecond ); -+ tvp = &tv; -+ } -+ -+ ready = select(maxfd + 1, &rd, &wt, &ex, tvp); -+ -+ if (ready == -1 && errno == EINTR) -+ { -+ if (timeout == PR_INTERVAL_NO_TIMEOUT) goto retry; -+ else -+ { -+ elapsed = (PRIntervalTime) (PR_IntervalNow() - start); -+ if (elapsed > timeout) ready = 0; /* timed out */ -+ else -+ { -+ remaining = timeout - elapsed; -+ goto retry; -+ } -+ } -+ } -+ -+ /* -+ ** Now to unravel the select sets back into the client's poll -+ ** descriptor list. Is this possibly an area for pissing away -+ ** a few cycles or what? -+ */ -+ if (ready > 0) -+ { -+ ready = 0; -+ for (pd = pds, epd = pd + npds; pd < epd; pd++) -+ { -+ PRInt16 out_flags = 0; -+ if ((NULL != pd->fd) && (0 != pd->in_flags)) -+ { -+ PRInt32 osfd; -+ bottom = PR_GetIdentitiesLayer(pd->fd, PR_NSPR_IO_LAYER); -+ PR_ASSERT(NULL != bottom); -+ -+ osfd = bottom->secret->md.osfd; -+ -+ if (FD_ISSET(osfd, &rd)) -+ { -+ if (pd->out_flags & _PR_POLL_READ_SYS_READ) -+ out_flags |= PR_POLL_READ; -+ if (pd->out_flags & _PR_POLL_WRITE_SYS_READ) -+ out_flags |= PR_POLL_WRITE; -+ } -+ if (FD_ISSET(osfd, &wt)) -+ { -+ if (pd->out_flags & _PR_POLL_READ_SYS_WRITE) -+ out_flags |= PR_POLL_READ; -+ if (pd->out_flags & _PR_POLL_WRITE_SYS_WRITE) -+ out_flags |= PR_POLL_WRITE; -+ } -+ if (FD_ISSET(osfd, &ex)) out_flags |= PR_POLL_EXCEPT; -+ -+/* Workaround for nonblocking connects under net_server */ -+#ifndef BONE_VERSION -+ if (out_flags) -+ { -+ /* check if it is a pending connect */ -+ int i = 0, j = 0; -+ PR_Lock( _connectLock ); -+ for( i = 0; i < connectCount; i++ ) -+ { -+ if(connectList[i].osfd == osfd) -+ { -+ int connectError; -+ int connectResult; -+ -+ connectResult = connect(connectList[i].osfd, -+ &connectList[i].addr, -+ connectList[i].addrlen); -+ connectError = errno; -+ -+ if(connectResult < 0 ) -+ { -+ if(connectError == EINTR || connectError == EWOULDBLOCK || -+ connectError == EINPROGRESS || connectError == EALREADY) -+ { -+ break; -+ } -+ } -+ -+ if(i == (connectCount - 1)) -+ { -+ connectList[i].osfd = -1; -+ } else { -+ for(j = i; j < connectCount; j++ ) -+ { -+ memcpy( &connectList[j], &connectList[j+1], -+ sizeof(connectList[j])); -+ } -+ } -+ connectCount--; -+ -+ bottom->secret->md.connectReturnValue = connectResult; -+ bottom->secret->md.connectReturnError = connectError; -+ bottom->secret->md.connectValueValid = PR_TRUE; -+ break; -+ } -+ } -+ PR_Unlock( _connectLock ); -+ } -+#endif -+ } -+ pd->out_flags = out_flags; -+ if (out_flags) ready++; -+ } -+ PR_ASSERT(ready > 0); -+ } -+ else if (ready < 0) -+ { -+ err = _MD_ERRNO(); -+ if (err == EBADF) -+ { -+ /* Find the bad fds */ -+ ready = 0; -+ for (pd = pds, epd = pd + npds; pd < epd; pd++) -+ { -+ pd->out_flags = 0; -+ if ((NULL != pd->fd) && (0 != pd->in_flags)) -+ { -+ bottom = PR_GetIdentitiesLayer(pd->fd, PR_NSPR_IO_LAYER); -+ if (fcntl(bottom->secret->md.osfd, F_GETFL, 0) == -1) -+ { -+ pd->out_flags = PR_POLL_NVAL; -+ ready++; -+ } -+ } -+ } -+ PR_ASSERT(ready > 0); -+ } -+ else set_select_error(err); -+ } -+ -+ return ready; -+} /* PR_POLL */ -+ -+PR_IMPLEMENT(PRFileDesc*) PR_CreateSocketPollFd(PRInt32 osfd) -+{ -+ PRFileDesc *fd; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ -+ fd = _PR_Getfd(); -+ -+ if (fd == NULL) PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0); -+ else -+ { -+ fd->secret->md.osfd = osfd; -+ fd->secret->inheritable = _PR_TRI_FALSE; -+ fd->secret->state = _PR_FILEDESC_OPEN; -+ fd->methods = PR_GetSocketPollFdMethods(); -+ } -+ -+ return fd; -+} /* PR_CreateSocketPollFD */ -+ -+PR_IMPLEMENT(PRStatus) PR_DestroySocketPollFd(PRFileDesc *fd) -+{ -+ if (NULL == fd) -+ { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); -+ return PR_FAILURE; -+ } -+ fd->secret->state = _PR_FILEDESC_CLOSED; -+ _PR_Putfd(fd); -+ return PR_SUCCESS; -+} /* PR_DestroySocketPollFd */ -+ -+ -+PR_IMPLEMENT(PRFileDesc *) PR_ImportTCPSocket(PRInt32 osfd) -+{ -+ PRFileDesc *fd; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ fd = bt_CreateFileDesc(osfd, PR_GetTCPMethods(), _PR_TRI_UNKNOWN, true); -+ if (fd == NULL) -+ closesocket(osfd); -+ return(fd); -+} -+ -+PR_IMPLEMENT(PRFileDesc *) PR_ImportUDPSocket(PRInt32 osfd) -+{ -+ PRFileDesc *fd; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ fd = bt_CreateFileDesc(osfd, PR_GetUDPMethods(), _PR_TRI_UNKNOWN, true); -+ if (fd == NULL) -+ closesocket(osfd); -+ return(fd); -+} -+ -+ -+#ifndef XP_HAIKU -+int socketpair (int family, int type, int protocol, int sv[2]) -+{ -+ int insock, outsock, acceptedsock; -+ struct sockaddr_in addrs[2]; -+ int alen; -+ /* that's really only so we can build... */ -+ /*fprintf(stderr, "socketpair(%d, %d, %d)\n", family, type, protocol);*/ -+ if (family != AF_INET) { -+ /*fatal*/fprintf(stderr, "socketpair(%d, %d, %d): family not supported\n", family, type, protocol); -+ errno = EPFNOSUPPORT; -+ return -1; -+ } -+ if (type != SOCK_DGRAM && type != SOCK_STREAM) { -+ errno = EPROTONOSUPPORT; -+ return -1; -+ } -+ addrs[0].sin_family = AF_INET; -+ addrs[0].sin_port = 0; -+ addrs[0].sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+ addrs[1].sin_family = AF_INET; -+ addrs[1].sin_port = 0; -+ addrs[1].sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+ alen = sizeof(struct sockaddr_in); -+ -+ insock = socket(family, type, protocol); -+ if (insock < 0) -+ goto err1; -+ if (bind(insock, (struct sockaddr *)&addrs[0], alen) < 0) -+ goto err2; -+ if (getsockname(insock, (struct sockaddr *)&addrs[0], &alen) < 0) -+ goto err2; -+ if (type == SOCK_STREAM) -+ listen(insock, 2); -+ -+ outsock = socket(family, type, protocol); -+ if (outsock < 0) -+ goto err2; -+ alen = sizeof(struct sockaddr_in); -+ if (bind(outsock, (struct sockaddr *)&addrs[1], alen) < 0) -+ goto err2; -+ if (getsockname(outsock, (struct sockaddr *)&addrs[1], &alen) < 0) -+ goto err3; -+ addrs[0].sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+ addrs[1].sin_addr.s_addr = htonl(INADDR_LOOPBACK); -+ /*fprintf(stderr, "socketpair: %08lx:%d <-> %08lx:%d\n", -+ ((struct sockaddr_in *)&addrs[0])->sin_addr.s_addr, -+ ((struct sockaddr_in *)&addrs[0])->sin_port, -+ ((struct sockaddr_in *)&addrs[1])->sin_addr.s_addr, -+ ((struct sockaddr_in *)&addrs[1])->sin_port);*/ -+ -+ if (connect(outsock, (struct sockaddr *)&addrs[0], alen) < 0) -+ goto err3; -+ if (type == SOCK_DGRAM) { -+ if (connect(insock, (struct sockaddr *)&addrs[1], alen) < 0) -+ goto err3; -+ sv[0] = insock; -+ } else { -+ acceptedsock = accept(insock, (struct sockaddr *)&addrs[1], &alen); -+ if (acceptedsock < 0) -+ goto err3; -+ closesocket(insock); -+ sv[0] = acceptedsock; -+ } -+ sv[1] = outsock; -+ return 0; -+err3: -+ closesocket(outsock); -+err2: -+ closesocket(insock); -+err1: -+ fprintf(stderr,"socketpair: error 0x%08x\n", errno); -+ return -1; -+} -+#endif -+ -+PR_IMPLEMENT(PRStatus) PR_NewTCPSocketPair(PRFileDesc *f[]) -+{ -+ PRInt32 rv, osfd[2]; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+#ifdef XP_HAIKU -+ rv = socketpair(AF_UNIX, SOCK_STREAM, 0, osfd); -+#else -+ rv = socketpair(AF_INET, SOCK_STREAM, 0, osfd); -+#endif -+ if (rv == -1) { -+ return PR_FAILURE; -+ } -+ f[0] = bt_CreateFileDesc(osfd[0], PR_GetTCPMethods(), _PR_TRI_TRUE, true); -+ if (NULL == f[0]) { -+ closesocket(osfd[0]); -+ closesocket(osfd[1]); -+ /* PR_AllocFileDesc() has invoked PR_SetError(). */ -+ return PR_FAILURE; -+ } -+ f[1] = bt_CreateFileDesc(osfd[1], PR_GetTCPMethods(), _PR_TRI_TRUE, true); -+ if (NULL == f[1]) { -+ PR_Close(f[0]); -+ closesocket(osfd[1]); -+ /* PR_AllocFileDesc() has invoked PR_SetError(). */ -+ return PR_FAILURE; -+ } -+ return PR_SUCCESS; -+} -+ -+ -+PR_IMPLEMENT(PRStatus) PR_GetConnectStatus(const PRPollDesc *pd) { -+ PRInt32 osfd; -+#ifndef BONE_VERSION -+ int rv; -+#endif -+ PRFileDesc *bottom; -+ -+ if (pd->out_flags & PR_POLL_NVAL) { -+ PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ if ((pd->out_flags & (PR_POLL_WRITE | PR_POLL_EXCEPT | PR_POLL_ERR)) == 0) { -+ PR_ASSERT(pd->out_flags == 0); -+ PR_SetError(PR_IN_PROGRESS_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ -+ /* Find the NSPR layer and invoke its connectcontinue method */ -+ bottom = PR_GetIdentitiesLayer(pd->fd, PR_NSPR_IO_LAYER); -+ if (NULL == bottom) -+ { -+ PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -+ return PR_FAILURE; -+ } -+ -+ osfd = bottom->secret->md.osfd; -+#ifdef BONE_VERSION /* bug 122364 */ -+ /* temporary workaround until getsockopt(SO_ERROR) works in BONE */ -+ if (pd->out_flags & PR_POLL_EXCEPT) { -+ PR_SetError(PR_CONNECT_REFUSED_ERROR, 0); -+ return PR_FAILURE; -+ } -+ PR_ASSERT(pd->out_flags & PR_POLL_WRITE); -+ return PR_SUCCESS; -+#else -+ rv = recv(bottom->secret->md.osfd, NULL, 0, 0); -+ PR_ASSERT(-1 == rv || 0 == rv); -+ -+ if (-1 == rv && 0 != errno && errno != EAGAIN && errno != EWOULDBLOCK ) { -+ set_connect_error(errno); -+ return PR_FAILURE; -+ } -+ else -+ return PR_SUCCESS; -+#endif /* BONE_VERSION */ -+} -+ -+PR_IMPLEMENT(PRFileDesc*) PR_Socket(PRInt32 domain, PRInt32 type, PRInt32 proto) -+{ -+ PRInt32 osfd, err; -+ PRFileDesc *fd; -+ PRInt32 tmp_domain = domain; -+ -+ if (!_pr_initialized) _PR_ImplicitInitialization(); -+ if (PR_AF_INET != domain -+ && PR_AF_INET6 != domain -+ ) { -+ PR_SetError(PR_ADDRESS_NOT_SUPPORTED_ERROR, 0); -+ return NULL; -+ } -+ if( type != SOCK_STREAM && type != SOCK_DGRAM ) -+ { -+ PR_SetError(PR_ADDRESS_NOT_SUPPORTED_ERROR, 0); -+ return NULL; -+ } -+ -+#if defined(_PR_INET6_PROBE) -+ if (PR_AF_INET6 == domain) { -+ if (_pr_ipv6_is_present == PR_FALSE) -+ domain = AF_INET; -+ else -+ domain = AF_INET6; -+ } -+#elif defined(_PR_INET6) -+ if (PR_AF_INET6 == domain) -+ domain = AF_INET6; -+#else -+ if (PR_AF_INET6 == domain) -+ domain = AF_INET; -+#endif /* _PR_INET6 */ -+#ifndef BONE_VERSION -+ osfd = socket(domain, type, 0); -+#else -+ osfd = socket(domain, type, proto); -+#endif -+ if (osfd == -1) { -+ err = _MD_ERRNO(); -+ set_socket_error(err); -+ return 0; -+ } -+ fd = bt_CreateFileDesc(osfd, SOCK_STREAM == type?PR_GetTCPMethods() : PR_GetUDPMethods(), _PR_TRI_TRUE, true); -+ -+ if (fd != NULL) { -+#if defined(_PR_INET6_PROBE) || !defined(_PR_INET6) -+ /* -+ * For platforms with no support for IPv6 -+ * create layered socket for IPv4-mapped IPv6 addresses -+ */ -+ if (PR_AF_INET6 == tmp_domain && PR_AF_INET == domain) { -+ if (PR_FAILURE == _pr_push_ipv6toipv4_layer(fd)) { -+ PR_Close(fd); -+ fd = NULL; -+ } -+ } -+#endif -+ } else -+ closesocket(osfd); -+ -+ return fd; -+} -+ -+ -+PR_IMPLEMENT(PRFileDesc *) PR_NewTCPSocket(void) -+{ -+ return PR_Socket(AF_INET, SOCK_STREAM, 0); -+} -+ -+PR_IMPLEMENT(PRFileDesc*) PR_NewUDPSocket(void) -+{ -+ return PR_Socket(AF_INET, SOCK_DGRAM, 0); -+} -+ -+PR_IMPLEMENT(PRFileDesc *) PR_OpenTCPSocket(PRIntn af) -+{ -+ return PR_Socket(af, SOCK_STREAM, 0); -+} -+ -+PR_IMPLEMENT(PRFileDesc*) PR_OpenUDPSocket(PRIntn af) -+{ -+ return PR_Socket(af, SOCK_DGRAM, 0); -+} -+ -Index: nsprpub/pr/src/bthreads/btthread.c -=================================================================== ---- nsprpub/pr/src/bthreads/btthread.c (revision 7) -+++ nsprpub/pr/src/bthreads/btthread.c (working copy) -@@ -120,12 +120,9 @@ - */ - - beThreadPriority = _bt_MapNSPRToNativePriority( priority ); -- - set_thread_priority( find_thread( NULL ), beThreadPriority ); -- - primordialThread->priority = priority; - -- - /* set the thread's state - note that the thread is not joinable */ - primordialThread->state |= BT_THREAD_PRIMORD; - if (type == PR_SYSTEM_THREAD) -@@ -219,9 +216,7 @@ - allocated a joinSem for us) - let them know we're - ready */ - delete_sem(me->md.joinSem); -- - PR_Unlock(joinSemLock); -- - } - else - { -@@ -229,10 +224,8 @@ - is our responsibility to allocate the joinSem - and block on it */ - me->md.joinSem = create_sem(0, "join sem"); -- - /* we're done accessing our joinSem */ - PR_Unlock(joinSemLock); -- - /* wait for someone to join us */ - while (acquire_sem(me->md.joinSem) == B_INTERRUPTED); - } -@@ -243,10 +236,8 @@ - { - /* synchronize access to bt_book */ - PR_Lock( bt_book.ml ); -- - /* decrement the number of currently-alive user threads */ - bt_book.threadCount--; -- - if (bt_book.threadCount == 0 && bt_book.cleanUpSem != B_ERROR) { - /* we are the last user thread, and the primordial thread is - blocked in PR_Cleanup() waiting for us to finish - notify -@@ -277,9 +268,7 @@ - - /* save our PRThread object into our TLS */ - tls_set(tls_prThreadSlot, thred); -- - thred->startFunc(thred->arg); /* run the dang thing */ -- - /* clean up */ - _bt_CleanupThread(NULL); - -@@ -292,7 +281,6 @@ - PRThreadState state, PRUint32 stackSize) - { - PRUint32 bePriority; -- - PRThread* thred; - - if (!_pr_initialized) _PR_ImplicitInitialization(); -@@ -305,7 +293,6 @@ - } - - thred->md.joinSem = B_ERROR; -- - thred->arg = arg; - thred->startFunc = start; - thred->priority = priority; -@@ -316,7 +303,6 @@ - } - - /* keep some books */ -- - PR_Lock( bt_book.ml ); - - if (type == PR_USER_THREAD) -@@ -325,9 +311,7 @@ - } - - PR_Unlock( bt_book.ml ); -- - bePriority = _bt_MapNSPRToNativePriority( priority ); -- - thred->md.tid = spawn_thread((thread_func)_bt_root, "moz-thread", - bePriority, thred); - if (thred->md.tid < B_OK) { -@@ -433,6 +417,13 @@ - return thred; - } - -+PR_IMPLEMENT(void*)PR_GetSP(PRThread *thred) -+{ -+ thread_info tInfo; -+ get_thread_info(thred->md.tid, &tInfo); -+ return tInfo.stack_base; /* or should it be _end? */ -+} -+ - PR_IMPLEMENT(PRThreadScope) - PR_GetThreadScope (const PRThread* thred) - { -Index: nsprpub/pr/src/io/prmapopt.c -=================================================================== ---- nsprpub/pr/src/io/prmapopt.c (revision 7) -+++ nsprpub/pr/src/io/prmapopt.c (working copy) -@@ -74,7 +74,7 @@ - #include /* TCP_NODELAY, TCP_MAXSEG */ - #endif - --#ifndef _PR_PTHREADS -+#if !defined(_PR_PTHREADS) && !defined(_PR_BTHREADS) - - PRStatus PR_CALLBACK _PR_SocketGetSocketOption(PRFileDesc *fd, PRSocketOptionData *data) - { -@@ -99,7 +99,6 @@ - { - case PR_SockOpt_Linger: - { --#if !defined(XP_BEOS) || defined(BONE_VERSION) - struct linger linger; - length = sizeof(linger); - rv = _PR_MD_GETSOCKOPT( -@@ -113,10 +112,6 @@ - PR_SecondsToInterval(linger.l_linger); - } - break; --#else -- PR_SetError( PR_NOT_IMPLEMENTED_ERROR, 0 ); -- return PR_FAILURE; --#endif - } - case PR_SockOpt_Reuseaddr: - case PR_SockOpt_Keepalive: -@@ -257,17 +252,12 @@ - { - case PR_SockOpt_Linger: - { --#if !defined(XP_BEOS) || defined(BONE_VERSION) - struct linger linger; - linger.l_onoff = data->value.linger.polarity; - linger.l_linger = PR_IntervalToSeconds(data->value.linger.linger); - rv = _PR_MD_SETSOCKOPT( - fd, level, name, (char*)&linger, sizeof(linger)); - break; --#else -- PR_SetError( PR_NOT_IMPLEMENTED_ERROR, 0 ); -- return PR_FAILURE; --#endif - } - case PR_SockOpt_Reuseaddr: - case PR_SockOpt_Keepalive: -@@ -355,7 +345,7 @@ - return rv; - } /* _PR_SocketSetSocketOption */ - --#endif /* ! _PR_PTHREADS */ -+#endif /* ! _PR_PTHREADS && ! _PR_BTHREADS */ - - /* - ********************************************************************* -Index: nsprpub/pr/src/md/beos/bsrcs.mk -=================================================================== ---- nsprpub/pr/src/md/beos/bsrcs.mk (revision 7) -+++ nsprpub/pr/src/md/beos/bsrcs.mk (working copy) -@@ -20,6 +20,7 @@ - # the Initial Developer. All Rights Reserved. - # - # Contributor(s): -+# Fredrik Holmqvist - # - # 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 -@@ -42,13 +43,6 @@ - - MDCSRCS = \ - beos.c \ -- beos_errors.c \ -- bfile.c \ -- bmisc.c \ -- bnet.c \ - bproc.c \ -- brng.c \ -- bseg.c \ -- btime.c \ - bmmap.c \ - $(NULL) -Index: nsprpub/pr/src/md/beos/bproc.c -=================================================================== ---- nsprpub/pr/src/md/beos/bproc.c (revision 7) -+++ nsprpub/pr/src/md/beos/bproc.c (working copy) -@@ -36,8 +36,10 @@ - * ***** END LICENSE BLOCK ***** */ - - #include "primpl.h" -+#include -+#include - #include --#include -+#include - - #define _PR_SIGNALED_EXITSTATUS 256 - -Index: nsprpub/pr/src/md/beos/beos.c -=================================================================== ---- nsprpub/pr/src/md/beos/beos.c (revision 7) -+++ nsprpub/pr/src/md/beos/beos.c (working copy) -@@ -37,58 +37,87 @@ - - #include "primpl.h" - --#include --#include --#include --#include --#include --#include - #include --#include --#include -- - /* - * Make sure _PRSockLen_t is 32-bit, because we will cast a PRUint32* or - * PRInt32* pointer to a _PRSockLen_t* pointer. - */ - #define _PRSockLen_t int - --/* --** Global lock variable used to bracket calls into rusty libraries that --** aren't thread safe (like libc, libX, etc). --*/ --static PRLock *_pr_rename_lock = NULL; --static PRMonitor *_pr_Xfe_mon = NULL; - -+#ifndef BONE_VERSION -+PRLock *_connectLock = NULL; -+ -+/* Workaround for nonblocking connects under net_server */ -+PRUint32 connectCount = 0; -+ConnectListNode connectList[64]; -+ -+void -+_MD_final_init_netserver(void) -+{ -+ _connectLock = PR_NewLock(); -+ PR_ASSERT(NULL != _connectLock); -+ /* Workaround for nonblocking connects under net_server */ -+ connectCount = 0; -+} -+#endif /* !BONE_VERSION */ -+ -+ -+#ifdef __powerpc__ -+static PRLock *monitor = NULL; -+ -+void -+_MD_AtomicInit(void) -+{ -+ if (monitor == NULL) { -+ monitor = PR_NewLock(); -+ } -+} -+#endif /* __powerpc__ */ -+ - /* -- * Variables used by the GC code, initialized in _MD_InitSegs(). -- * _pr_zero_fd should be a static variable. Unfortunately, there is -- * still some Unix-specific code left in function PR_GrowSegment() -- * in file memory/prseg.c that references it, so it needs -- * to be a global variable for now. -+** This is exceedingly messy. atomic_add returns the last value, NSPR -+** expects the new value. We just add or subtract 1 from the result. -+** The actual memory update is atomic. - */ --PRInt32 _pr_zero_fd = -1; --static PRLock *_pr_md_lock = NULL; - --sigset_t timer_set; -+PRInt32 -+_MD_AtomicAdd( PRInt32 *ptr, PRInt32 val ) -+{ -+ return atomic_add( (long *)ptr, val ) + val; -+} - --void _PR_UnixInit() -+PRInt32 -+_MD_AtomicIncrement( PRInt32 *val ) - { -- struct sigaction sigact; -- int rv; -+ return atomic_add( (long *)val, 1 ) + 1; -+} - -- sigemptyset(&timer_set); -+PRInt32 -+_MD_AtomicDecrement( PRInt32 *val ) -+{ -+ return atomic_add( (long *)val, -1 ) - 1; -+} - -- sigact.sa_handler = SIG_IGN; -- sigemptyset(&sigact.sa_mask); -- sigact.sa_flags = 0; -- rv = sigaction(SIGPIPE, &sigact, 0); -- PR_ASSERT(0 == rv); -+PRInt32 -+_MD_AtomicSet( PRInt32 *val, PRInt32 newval ) -+{ -+ PRInt32 result; -+#ifdef __powerpc__ -+ if (!_pr_initialized) { -+ _PR_ImplicitInitialization(); -+ } -+ PR_Lock(monitor); -+ result = *val; -+ *val = newval; -+ PR_Unlock(monitor); -+#else -+ asm volatile ("xchgl %0, %1" -+ : "=r"(result), "=m"(*val) -+ : "0"(newval), "m"(*val)); - -- _pr_rename_lock = PR_NewLock(); -- PR_ASSERT(NULL != _pr_rename_lock); -- _pr_Xfe_mon = PR_NewMonitor(); -- PR_ASSERT(NULL != _pr_Xfe_mon); -+#endif /* __powerpc__ */ -+ return result; - } - - /* -@@ -98,9 +127,7 @@ - * - * Returns the current time in microseconds since the epoch. - * The epoch is midnight January 1, 1970 GMT. -- * The implementation is machine dependent. This is the Unix -- * implementation. -- * Cf. time_t time(time_t *tp) -+ * The implementation is machine dependent. - * - *----------------------------------------------------------------------- - */ -@@ -108,157 +135,75 @@ - PR_IMPLEMENT(PRTime) - PR_Now(void) - { -- struct timeval tv; -- PRInt64 s, us, s2us; -- -- GETTIMEOFDAY(&tv); -- LL_I2L(s2us, PR_USEC_PER_SEC); -- LL_I2L(s, tv.tv_sec); -- LL_I2L(us, tv.tv_usec); -- LL_MUL(s, s, s2us); -- LL_ADD(s, s, us); -- return s; -+ return (PRTime) real_time_clock_usecs(); - } - - PRIntervalTime --_PR_UNIX_GetInterval() -+_MD_get_interval(void) - { -- struct timeval time; -- PRIntervalTime ticks; -- -- (void)GETTIMEOFDAY(&time); /* fallicy of course */ -- ticks = (PRUint32)time.tv_sec * PR_MSEC_PER_SEC; /* that's in milliseconds */ -- ticks += (PRUint32)time.tv_usec / PR_USEC_PER_MSEC; /* so's that */ -- return ticks; --} /* _PR_SUNOS_GetInterval */ -- --PRIntervalTime _PR_UNIX_TicksPerSecond() --{ -- return 1000; /* this needs some work :) */ -+ return (PRIntervalTime) real_time_clock_usecs() / 10; - } - --/************************************************************************/ -- --/* --** Special hacks for xlib. Xlib/Xt/Xm is not re-entrant nor is it thread --** safe. Unfortunately, neither is mozilla. To make these programs work --** in a pre-emptive threaded environment, we need to use a lock. --*/ -- --void PR_XLock() -+PRIntervalTime -+_MD_interval_per_sec(void) - { -- PR_EnterMonitor(_pr_Xfe_mon); -+ return 100000L; - } - --void PR_XUnlock() -+PRSize -+_PR_MD_GetRandomNoise( void *buf, PRSize size ) - { -- PR_ExitMonitor(_pr_Xfe_mon); --} -+ struct timeval tv; -+ int n = 0; -+ int s; - --PRBool PR_XIsLocked() --{ -- return (PR_InMonitor(_pr_Xfe_mon)) ? PR_TRUE : PR_FALSE; --} -+ GETTIMEOFDAY(&tv); - --void PR_XWait(int ms) --{ -- PR_Wait(_pr_Xfe_mon, PR_MillisecondsToInterval(ms)); -+ if ( size >= 0 ) { -+ s = _pr_CopyLowBits((char*)buf+n, size, &tv.tv_usec, sizeof(tv.tv_usec)); -+ size -= s; -+ n += s; - } -- --void PR_XNotify(void) --{ -- PR_Notify(_pr_Xfe_mon); -+ if ( size >= 0 ) { -+ s = _pr_CopyLowBits((char*)buf+n, size, &tv.tv_sec, sizeof(tv.tv_sec)); -+ size -= s; -+ n += s; - } -+ return n; -+} /* end _PR_MD_GetRandomNoise() */ - --void PR_XNotifyAll(void) --{ -- PR_NotifyAll(_pr_Xfe_mon); --} - --#if !defined(BEOS) --#ifdef HAVE_BSD_FLOCK -- --#include -- --PR_IMPLEMENT(PRStatus) --_MD_LOCKFILE (PRInt32 f) -+/* Needed by prinit.c:612 */ -+void -+_PR_MD_QUERY_FD_INHERITABLE(PRFileDesc *fd) - { -- PRInt32 rv; -- rv = flock(f, LOCK_EX); -- if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_FLOCK_ERROR(_MD_ERRNO()); -- return PR_FAILURE; --} -+ int flags; - --PR_IMPLEMENT(PRStatus) --_MD_TLOCKFILE (PRInt32 f) --{ -- PRInt32 rv; -- rv = flock(f, LOCK_EX|LOCK_NB); -- if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_FLOCK_ERROR(_MD_ERRNO()); -- return PR_FAILURE; -+ PR_ASSERT(_PR_TRI_UNKNOWN == fd->secret->inheritable); -+ flags = fcntl(fd->secret->md.osfd, F_GETFD, 0); -+ PR_ASSERT(-1 != flags); -+ fd->secret->inheritable = (flags & FD_CLOEXEC) ? -+ _PR_TRI_FALSE : _PR_TRI_TRUE; - } - --PR_IMPLEMENT(PRStatus) --_MD_UNLOCKFILE (PRInt32 f) -+PRStatus -+_MD_gethostname(char *name, PRUint32 namelen) - { -- PRInt32 rv; -- rv = flock(f, LOCK_UN); -- if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_FLOCK_ERROR(_MD_ERRNO()); -- return PR_FAILURE; --} --#else -+ PRInt32 rv, err; - --PR_IMPLEMENT(PRStatus) --_MD_LOCKFILE (PRInt32 f) --{ -- PRInt32 rv; -- rv = lockf(f, F_LOCK, 0); -+ rv = gethostname(name, namelen); - if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_LOCKF_ERROR(_MD_ERRNO()); -- return PR_FAILURE; --} -- --PR_IMPLEMENT(PRStatus) --_MD_TLOCKFILE (PRInt32 f) - { -- PRInt32 rv; -- rv = lockf(f, F_TLOCK, 0); -- if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_LOCKF_ERROR(_MD_ERRNO()); -- return PR_FAILURE; -+ err = _MD_ERRNO(); -+ switch (err) { -+ case EFAULT: -+ PR_SetError(PR_ACCESS_FAULT_ERROR, err); -+ break; -+ default: -+ PR_SetError(PR_UNKNOWN_ERROR, err); -+ break; - } -- --PR_IMPLEMENT(PRStatus) --_MD_UNLOCKFILE (PRInt32 f) --{ -- PRInt32 rv; -- rv = lockf(f, F_ULOCK, 0); -- if (rv == 0) -- return PR_SUCCESS; -- _PR_MD_MAP_LOCKF_ERROR(_MD_ERRNO()); - return PR_FAILURE; - } --#endif -- --PR_IMPLEMENT(PRStatus) -- _MD_GETHOSTNAME (char *name, PRUint32 namelen) --{ -- PRIntn rv; -- -- rv = gethostname(name, namelen); -- if (0 == rv) { - return PR_SUCCESS; - } -- _PR_MD_MAP_GETHOSTNAME_ERROR(_MD_ERRNO()); -- return PR_FAILURE; --} -- --#endif -Index: nsprpub/pr/src/io/Makefile.in -=================================================================== ---- nsprpub/pr/src/io/Makefile.in (revision 7) -+++ nsprpub/pr/src/io/Makefile.in (working copy) -@@ -69,6 +69,7 @@ - $(NULL) - - ifndef USE_PTHREADS -+ifndef USE_BTHREADS - CSRCS += \ - prdir.c \ - prfile.c \ -@@ -76,6 +77,7 @@ - prsocket.c \ - $(NULL) - endif -+endif - - TARGETS = $(OBJS) - -Index: nsprpub/pr/src/io/prsocket.c -=================================================================== ---- nsprpub/pr/src/io/prsocket.c (revision 7) -+++ nsprpub/pr/src/io/prsocket.c (working copy) -@@ -64,7 +64,7 @@ - * is not uniform, so we don't check it. - */ - if ((addr != NULL) --#if defined(XP_UNIX) || defined(XP_OS2_EMX) -+#if defined(XP_UNIX) || defined(XP_OS2_EMX) || defined(XP_BEOS) - && (addr->raw.family != AF_UNIX) - #endif - && (PR_NETADDR_SIZE(addr) != addr_len)) { -Index: nsprpub/pr/src/memory/prseg.c -=================================================================== ---- nsprpub/pr/src/memory/prseg.c (revision 7) -+++ nsprpub/pr/src/memory/prseg.c (working copy) -@@ -37,7 +37,7 @@ - - #include "primpl.h" - --#if defined(_PR_PTHREADS) -+#if defined(_PR_PTHREADS) || defined(_PR_BTHREADS) - - /* - ** The pthreads version doesn't use these functions. -@@ -46,7 +46,7 @@ - { - } - --#else /* _PR_PTHREADS */ -+#else /* _PR_PTHREADS || defined(_PR_BTHREADS) */ - - void _PR_InitSegs(void) - { -@@ -90,4 +90,4 @@ - PR_DELETE(seg); - } - --#endif /* _PR_PTHREADS */ -+#endif /* _PR_PTHREADS || defined(_PR_BTHREADS) */ diff --git a/www-client/mozilla_firefox/patches/2009-09-27/r08-misc.patch b/www-client/mozilla_firefox/patches/2009-09-27/r08-misc.patch deleted file mode 100644 index 76ebbd3f4..000000000 --- a/www-client/mozilla_firefox/patches/2009-09-27/r08-misc.patch +++ /dev/null @@ -1,410 +0,0 @@ -Index: gfx/src/beos/nsFontMetricsBeOS.cpp -=================================================================== ---- gfx/src/beos/nsFontMetricsBeOS.cpp (revision 7) -+++ gfx/src/beos/nsFontMetricsBeOS.cpp (working copy) -@@ -128,12 +128,12 @@ - if (!isgeneric) - { - // non-generic font -- if (count_font_styles((font_family)family.get()) <= 0) -+ if (count_font_styles((char *) family.get()) <= 0) - { - // the specified font does not exist on this computer. - continue; - } -- mFontHandle.SetFamilyAndStyle( (font_family)family.get(), NULL ); -+ mFontHandle.SetFamilyAndStyle( (char *)family.get(), NULL ); - fontfound = PR_TRUE; - break; - } -@@ -158,9 +158,9 @@ - prefs->GetBranch("font.name.", getter_AddRefs(branch)); - branch->GetCharPref(prop, getter_Copies(real_family)); - -- if (!real_family.IsEmpty() && real_family.Length() <= B_FONT_FAMILY_LENGTH && count_font_styles((font_family)real_family.get()) > 0) -+ if (!real_family.IsEmpty() && real_family.Length() <= B_FONT_FAMILY_LENGTH && count_font_styles((char *)real_family.get()) > 0) - { -- mFontHandle.SetFamilyAndStyle( (font_family)real_family.get(), NULL ); -+ mFontHandle.SetFamilyAndStyle( (char *)real_family.get(), NULL ); - fontfound = PR_TRUE; - break; - } -@@ -414,8 +414,8 @@ - nsFontMetricsBeOS::FamilyExists(const nsString& aName) - { - NS_ConvertUTF16toUTF8 family(aName); -- printf("exists? %s", (font_family)family.get()); -- return (count_font_styles((font_family)family.get()) > 0) ? NS_OK : NS_ERROR_FAILURE; -+ printf("exists? %s", (char *)family.get()); -+ return (count_font_styles((char *)family.get()) > 0) ? NS_OK : NS_ERROR_FAILURE; - } - - // useful UTF-8 utility -Index: gfx/src/beos/nsRenderingContextBeOS.cpp -=================================================================== ---- gfx/src/beos/nsRenderingContextBeOS.cpp (revision 7) -+++ gfx/src/beos/nsRenderingContextBeOS.cpp (working copy) -@@ -351,8 +351,11 @@ - if (mCurrentBFont == nsnull) - { - if (mFontMetrics) -- mFontMetrics->GetFontHandle((nsFontHandle)mCurrentBFont); -- -+ { -+ nsFontHandle fontHandle; -+ mFontMetrics->GetFontHandle(fontHandle); -+ mCurrentBFont = (BFont *) fontHandle; -+ } - if (mCurrentBFont) - mView->SetFont(mCurrentBFont); - else -@@ -1127,7 +1130,7 @@ - NS_IMETHODIMP nsRenderingContextBeOS::GetTextDimensions(const PRUnichar* aString, - PRInt32 aLength, PRInt32 aAvailWidth, PRInt32* aBreaks, PRInt32 aNumBreaks, - nsTextDimensions& aDimensions, PRInt32& aNumCharsFit, nsTextDimensions& aLastWordDimensions, -- PRInt32* aFontID = nsnull) -+ PRInt32* aFontID) - { - nsresult ret_code = NS_ERROR_FAILURE; - uint8 utf8buf[1024]; -@@ -1160,7 +1163,7 @@ - - NS_IMETHODIMP nsRenderingContextBeOS::GetTextDimensions(const char* aString, PRInt32 aLength, - PRInt32 aAvailWidth,PRInt32* aBreaks, PRInt32 aNumBreaks, nsTextDimensions& aDimensions, -- PRInt32& aNumCharsFit, nsTextDimensions& aLastWordDimensions, PRInt32* aFontID = nsnull) -+ PRInt32& aNumCharsFit, nsTextDimensions& aLastWordDimensions, PRInt32* aFontID) - { - // Code is borrowed from win32 implementation including comments. - // Minor changes are introduced due multibyte/utf-8 nature of char* strings handling in BeOS. -Index: toolkit/xre/nsAppRunner.cpp -=================================================================== ---- toolkit/xre/nsAppRunner.cpp (revision 7) -+++ toolkit/xre/nsAppRunner.cpp (working copy) -@@ -1361,9 +1361,10 @@ - #elif defined(XP_BEOS) - int32 cookie = 0; - image_info info; -- -+ do { - if(get_next_image_info(0, &cookie, &info) != B_OK) - return NS_ERROR_FAILURE; -+ } while(info.type != B_APP_IMAGE); - - rv = NS_NewNativeLocalFile(nsDependentCString(info.name), PR_TRUE, - getter_AddRefs(lf)); -Index: toolkit/xre/nsXREDirProvider.cpp -=================================================================== ---- toolkit/xre/nsXREDirProvider.cpp (revision 7) -+++ toolkit/xre/nsXREDirProvider.cpp (working copy) -@@ -76,7 +76,7 @@ - #include "nsILocalFileMac.h" - #endif - #ifdef XP_BEOS --#include -+#include - #include - #endif - #ifdef XP_UNIX -Index: widget/src/beos/nsAppShell.cpp -=================================================================== ---- widget/src/beos/nsAppShell.cpp (revision 7) -+++ widget/src/beos/nsAppShell.cpp (working copy) -@@ -118,10 +118,28 @@ - // NOTE: this needs to be run from within the main application thread - char portname[64]; - char semname[64]; -+ int32 cookie = 0; -+ image_info iinfo; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &cookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ PR_snprintf(portname, sizeof(portname), "event%lx", -+ (long unsigned) find_thread(leaf)); -+ PR_snprintf(semname, sizeof(semname), "sync%lx", -+ (long unsigned) find_thread(leaf)); -+ } -+ else -+ { - PR_snprintf(portname, sizeof(portname), "event%lx", -- (long unsigned) PR_GetCurrentThread()); -+ (long unsigned) find_thread(0)); - PR_snprintf(semname, sizeof(semname), "sync%lx", -- (long unsigned) PR_GetCurrentThread()); -+ (long unsigned) find_thread(0)); -+ } -+ } while(iinfo.type != B_APP_IMAGE); - - #ifdef DEBUG - printf("nsAppShell::Create portname: %s, semname: %s\n", portname, semname); -@@ -342,8 +360,22 @@ - { - // should we check for eventport initialization ? - char portname[64]; -+ int32 cookie = 0; -+ image_info iinfo; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &cookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ PR_snprintf(portname, sizeof(portname), "event%lx", -+ (long unsigned) find_thread(leaf)); -+ } -+ else - PR_snprintf(portname, sizeof(portname), "event%lx", -- (long unsigned) PR_GetCurrentThread()); -+ (long unsigned) find_thread(0)/*PR_GetCurrentThread()*/); -+ } while(iinfo.type != B_APP_IMAGE); - - if((eventport = find_port(portname)) < 0) - { -Index: widget/src/beos/nsDragService.cpp -=================================================================== ---- widget/src/beos/nsDragService.cpp (revision 7) -+++ widget/src/beos/nsDragService.cpp (working copy) -@@ -255,7 +255,7 @@ - bool noBitmap = true; - - //This is the code for image-dragging, currently disabled. See comments in beginning of file. --# ifdef 0 -+#if 0 - do - { - PRUint32 dataSize; -Index: widget/src/beos/nsToolkit.cpp -=================================================================== ---- widget/src/beos/nsToolkit.cpp (revision 7) -+++ widget/src/beos/nsToolkit.cpp (working copy) -@@ -42,6 +42,7 @@ - #include "nsSwitchToUIThread.h" - #include "plevent.h" - #include "prprf.h" -+#include - - // - // Static thread local storage index of the Toolkit -@@ -89,10 +90,26 @@ - delete info; - - // system wide unique names -+ int32 cookie = 0; -+ image_info iinfo; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &cookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ PR_snprintf(portname, sizeof(portname), "event%lx", -+ (long unsigned) find_thread(leaf)); -+ } -+ else -+ { - PR_snprintf(portname, sizeof(portname), "event%lx", -- (long unsigned) PR_GetCurrentThread()); -+ (long unsigned) find_thread(0)); -+ } -+ } while(iinfo.type != B_APP_IMAGE); - -- port_id event = create_port(100, portname); -+ port_id event = create_port(200, portname); - - while(read_port(event, &code, &id, sizeof(id)) >= 0) - { -@@ -130,6 +147,7 @@ - { - localthread = false; - mGuiThread = NULL; -+ mGUIThreadID = 0; - } - - -@@ -188,6 +206,22 @@ - } - } - -+ image_info iinfo; -+ int32 cookie = 0; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &cookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ mGUIThreadID = find_thread(leaf); -+ } -+ else -+ { -+ mGUIThreadID = find_thread(0); -+ } -+ } while(iinfo.type != B_APP_IMAGE); - // at this point the thread is running - PR_ExitMonitor(monitor); - PR_DestroyMonitor(monitor); -@@ -218,7 +252,22 @@ - } - - cached = false; -- -+ image_info iinfo; -+ int32 cookie = 0; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &cookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ mGUIThreadID = find_thread(leaf); -+ } -+ else -+ { -+ mGUIThreadID = find_thread(0); -+ } -+ } while(iinfo.type != B_APP_IMAGE); - return NS_OK; - } - -@@ -227,9 +276,8 @@ - if(! cached) - { - char portname[64]; -- - PR_snprintf(portname, sizeof(portname), "event%lx", -- (long unsigned) mGuiThread); -+ (long unsigned) mGUIThreadID); - - eventport = find_port(portname); - -Index: widget/src/beos/nsToolkit.h -=================================================================== ---- widget/src/beos/nsToolkit.h (revision 7) -+++ widget/src/beos/nsToolkit.h (working copy) -@@ -71,6 +71,7 @@ - protected: - // Thread Id of the "main" Gui thread. - PRThread *mGuiThread; -+ thread_id mGUIThreadID; - static void RunPump(void* arg); - void GetInterface(); - bool cached; -Index: xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h -=================================================================== ---- xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h (revision 7) -+++ xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h (working copy) -@@ -138,8 +138,13 @@ - #endif - - #elif defined(__BEOS__) -+#if (__GNUC__ == 2) - #define CFRONT_STYLE_THIS_ADJUST -+#else -+#define THUNK_BASED_THIS_ADJUST -+#endif - -+ - #elif defined(__sun__) || defined(__sun) - #if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ - #define THUNK_BASED_THIS_ADJUST -Index: xpcom/threads/plevent.c -=================================================================== ---- xpcom/threads/plevent.c (revision 7) -+++ xpcom/threads/plevent.c (working copy) -@@ -66,6 +66,8 @@ - - #if defined(XP_BEOS) - #include -+#include -+#include - #endif - - #if defined(XP_MACOSX) -@@ -908,10 +910,39 @@ - - char portname[64]; - char semname[64]; -+ -+struct _MDThread -+{ -+ thread_id tid; -+ sem_id joinSem; -+ PRBool is_joining; -+}; -+ struct _MDThread md; -+ -+ -+//#include "private/primpl.h" -+ image_info iinfo; -+ int32 icookie = 0; -+ char *leaf = NULL; -+ do { -+ if (get_next_image_info(0, &icookie, &iinfo) == B_OK && -+ strlen(iinfo.name) > 0 && -+ (leaf = strrchr(iinfo.name, '/')) != NULL) -+ { -+ leaf++; -+ PR_snprintf(portname, sizeof(portname), "event%lx", -+ (long unsigned) find_thread(leaf)); -+ PR_snprintf(semname, sizeof(semname), "sync%lx", -+ (long unsigned) find_thread(leaf)); -+ } -+ else -+ { - PR_snprintf(portname, sizeof(portname), "event%lx", -- (long unsigned) self->handlerThread); -+ (long unsigned) find_thread(0)); - PR_snprintf(semname, sizeof(semname), "sync%lx", -- (long unsigned) self->handlerThread); -+ (long unsigned) find_thread(0)); -+ } -+ } while(iinfo.type != B_APP_IMAGE); - - self->eventport = find_port(portname); - while(get_next_sem_info(0, &cookie, &info) == B_OK) -@@ -931,7 +962,7 @@ - { - delete_port( self->eventport ); - } -- self->eventport = create_port(200, portname); -+ self->eventport = create_port(512, portname); - /* We don't use the sem, but it has to be there - */ - create_sem(0, semname); -@@ -1264,6 +1295,7 @@ - thread_id waitingThread; - }; - -+ - static PRStatus - _pl_NativeNotify(PLEventQueue* self) - { -@@ -1274,6 +1306,7 @@ - - return PR_SUCCESS; /* Is this correct? */ - } -+ - #endif /* XP_BEOS */ - - #if defined(XP_MACOSX) -Index: xpfe/bootstrap/nsSigHandlers.cpp -=================================================================== ---- xpfe/bootstrap/nsSigHandlers.cpp (revision 7) -+++ xpfe/bootstrap/nsSigHandlers.cpp (working copy) -@@ -60,7 +60,8 @@ - #endif - - #ifdef XP_BEOS --#include -+#include -+#include - #include - #include "nsCOMPtr.h" - #include "nsIServiceManager.h" diff --git a/www-client/mozilla_firefox/patches/2009-09-27/r09-sunbird-options-fix.patch b/www-client/mozilla_firefox/patches/2009-09-27/r09-sunbird-options-fix.patch deleted file mode 100644 index 2c91e2aa3..000000000 --- a/www-client/mozilla_firefox/patches/2009-09-27/r09-sunbird-options-fix.patch +++ /dev/null @@ -1,18 +0,0 @@ -Index: calendar/base/content/preferences/preferences.xul -=================================================================== ---- calendar/base/content/preferences/preferences.xul (revision 7) -+++ calendar/base/content/preferences/preferences.xul (working copy) -@@ -71,8 +71,13 @@ - style="&prefWindow.styleGNOME;"> - #endif - #endif -+#ifdef XP_BEOS -+ title="&prefWindow.titleGNOME;" -+ style="&prefWindow.styleGNOME;"> - #endif -+#endif - -+ -

Bookmarks Toolbar Folder

-
Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar -

--

Getting Started --
Latest Headlines -+
Haiku WebSite -+
Nightly Builds -

-


--

Mozilla Firefox

-+

BeZilla Browser

-

--

Help and Tutorials --
Customize Firefox --
Get Involved --
About Us -+
BeZilla Blog -+
Report an Issue -+
View Known Issues -

-+

Haiku Bookmarks

-+

-+

Nightly Builds -+
Optional Packages -+
Bug Tracker -+
Haiku User Guide -+
BeBook -+
Welcome -+

-+

Software for Haiku

-+

-+

OSDrawer.net -+
HaikuWare -+
Zeta-Games -+
BeBits -+

-+

Haiku WebSite -+ -

-Index: profile/defaults/bookmarks.html -=================================================================== ---- profile/defaults/bookmarks.html (revision 7) -+++ profile/defaults/bookmarks.html (working copy) -@@ -7,35 +7,34 @@ -

Bookmarks

- -

--

Personal Toolbar Folder

--

--

mozilla.org --
mozillaZine --
mozdev.org -+
Get Bookmark Add-ons -+
-+

Bookmarks Toolbar Folder

-+
Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar -+

-+

Haiku WebSite -+
Nightly Builds -

--

Mozilla Project

-+
-+

BeZilla Browser

-

--

mozilla.org

--

--

The Mozilla Organization --
SeaMonkey Project --
Mozilla Products --
Feedback --

--

Community & Support

--

--

mozillaZine --
SeaMonkey Support (mozillaZine) --
mozdev.org --
Mozilla Plug-in Information (mozdev) --
Mozilla Extensions (mozdev) --

-+

BeZilla Blog -+
Report an Issue -+
View Known Issues -

--

Search the Web

-+

Haiku Bookmarks

-

--

Google --
Google Groups --
Google News -+
Nightly Builds -+
Optional Packages -+
Bug Tracker -+

-+

Software for Haiku

-+

-+

OSDrawer.net -+
HaikuWare -+
Zeta-Games -+
BeBits -

--


-+
Haiku WebSite -+ -

-Index: browser/base/content/dynamic-bebook-v1.html -=================================================================== ---- browser/base/content/dynamic-bebook-v1.html (revision 0) -+++ browser/base/content/dynamic-bebook-v1.html (revision 0) -@@ -0,0 +1,32 @@ -+ -+ -+ Opening the welcome page... -+ -+ -+ -+ Opening the welcome page... -+ -+ -Index: browser/base/content/dynamic-bebook-v2.html -=================================================================== ---- browser/base/content/dynamic-bebook-v2.html (revision 0) -+++ browser/base/content/dynamic-bebook-v2.html (revision 0) -@@ -0,0 +1,56 @@ -+ -+ -+ -+ -+ -+ -+Welcome to Haiku! -+ -+ -+ -+ -+ -+ -+ -Index: browser/base/content/dynamic-userguide-v1.html -=================================================================== ---- browser/base/content/dynamic-userguide-v1.html (revision 0) -+++ browser/base/content/dynamic-userguide-v1.html (revision 0) -@@ -0,0 +1,32 @@ -+ -+ -+ Opening the welcome page... -+ -+ -+ -+ Opening the welcome page... -+ -+ -Index: browser/base/content/dynamic-userguide-v2.html -=================================================================== ---- browser/base/content/dynamic-userguide-v2.html (revision 0) -+++ browser/base/content/dynamic-userguide-v2.html (revision 0) -@@ -0,0 +1,56 @@ -+ -+ -+ -+ -+ -+ -+Welcome to Haiku! -+ -+ -+ -+ -+ -+ -+ -Index: browser/base/content/dynamic-welcome-v1.html -=================================================================== ---- browser/base/content/dynamic-welcome-v1.html (revision 0) -+++ browser/base/content/dynamic-welcome-v1.html (revision 0) -@@ -0,0 +1,32 @@ -+ -+ -+ Opening the welcome page... -+ -+ -+ -+ Opening the welcome page... -+ -+ -Index: browser/base/content/dynamic-welcome-v2.html -=================================================================== ---- browser/base/content/dynamic-welcome-v2.html (revision 0) -+++ browser/base/content/dynamic-welcome-v2.html (revision 0) -@@ -0,0 +1,56 @@ -+ -+ -+ -+ -+ -+ -+Welcome to Haiku! -+ -+ -+ -+ -+ -+ -+ diff --git a/www-client/mozilla_firefox/patches/2009-09-27/r12-releasenotes.patch b/www-client/mozilla_firefox/patches/2009-09-27/r12-releasenotes.patch deleted file mode 100644 index 500251404..000000000 --- a/www-client/mozilla_firefox/patches/2009-09-27/r12-releasenotes.patch +++ /dev/null @@ -1,19 +0,0 @@ -Index: browser/app/firefox-branding.js -=================================================================== ---- browser/app/firefox-branding.js (revision 7) -+++ browser/app/firefox-branding.js (working copy) -@@ -1,5 +1,4 @@ - pref("startup.homepage_override_url","http://www.mozilla.org/projects/%APP%/%VERSION%/whatsnew/"); --pref("startup.homepage_welcome_url","http://www.mozilla.org/projects/%APP%/%VERSION%/firstrun/"); - // URL user can browse to manually if for some reason all update installation - // attempts fail. - pref("app.update.url.manual", "http://www.mozilla.org/products/%APP%/"); -@@ -8,7 +7,7 @@ - pref("app.update.url.details", "http://www.mozilla.org/projects/%APP%/"); - - // Release notes URL --pref("app.releaseNotesURL", "http://www.mozilla.org/projects/%APP%/%VERSION%/releasenotes/"); -+pref("app.releaseNotesURL", "about:buildconfig"); - - // Search codes belong only in builds with official branding - pref("browser.search.param.yahoo-fr", ""); diff --git a/www-client/mozilla_firefox/persdict.dat b/www-client/mozilla_firefox/persdict.dat deleted file mode 100644 index abc3037a0..000000000 --- a/www-client/mozilla_firefox/persdict.dat +++ /dev/null @@ -1,65 +0,0 @@ -ActivityMonitor -AddFilesToHaikuImage -AddGroupToHaikuImage -AddOptionalHaikuImagePackages -AddSourceDirectoryToHaikuImage -AddSymlinkToHaikuImage -AddTargetVariableToScript -AddUserToHaikuImage -AddVariableToScript -AppendToConfigVar -BeHappy -BeOS -BePDF -BeZilla -BeZillaBrowser -Berlios -CDPlayer -CodyCam -CopyDirectoryToHaikuImage -DeferredSubInclude -DefineBuildProfile -DeskCalc -Deskbar -DiskProbe -DiskUsage -DriveSetup -DriveUsage -GParted -Jamfile -LaunchBox -MediaPlayer -MidiPlayer -MidiPlayerSettings -NetPenguin -NetSurf -NetworkStatus -OpenSSH -OpenSSL -OptionalPackages -PackageInstaller -ProcessController -Qemu -Screenshot -SetConfigVar -ShowImage -SoundRecorder -StyledEdit -TextSearch -UnzipArchiveToHaikuImage -UserBuildConfig -UserBuildConfigRulePostBuildTargets -UserBuildConfigRulePostImage -UserBuildConfigRulePreImage -UserShutdownScript -VLC -VMWare -VideoLAN -VirtualBox -Vmware -WonderBrush -bootman -makebootable -preflet -replicant -zbeos diff --git a/www-client/mozilla_firefox/select-a-mozconfig/browser-debug.mozconfig b/www-client/mozilla_firefox/select-a-mozconfig/browser-debug.mozconfig deleted file mode 100644 index 821711fd9..000000000 --- a/www-client/mozilla_firefox/select-a-mozconfig/browser-debug.mozconfig +++ /dev/null @@ -1,70 +0,0 @@ -# ------------------ -# Browser, DEBUG -# ------------------ - -### Tags for packaged-filename -export MOZ_PKG_SPECIAL=DEBUG -mk_add_options MOZ_PKG_SPECIAL=DEBUG - -. $topsrcdir/browser/config/mozconfig -mk_add_options MOZ_CO_PROJECT=browser - -# Required to download the right version of the source code -mk_add_options MOZ_CO_TAG=MOZILLA_1_8_BRANCH - -export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot -mk_add_options CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot - -# ----------------------------------------------------- -# --- EDIT THESE VALUES TO REFLECT YOUR LOCAL BUILD --- -export GLIB_CONFIG=/boot/common/bin/glib-config -mk_add_options GLIB_CONFIG=/boot/common/bin/glib-config - -export LIBIDL_CONFIG=/boot/common/bin/libIDL-config -mk_add_options LIBIDL_CONFIG=/boot/common/bin/libIDL-config - -# --- Set the outputdir for the build --- -mk_add_options MOZ_OBJDIR=/moz_obj/debug-browser - -# autoconf 2.13 was built by -#./configure --prefix=/boot/common/autoconf-2.13 --program-suffix=-2.13 --bindir=/boot/common/bin/ -# make && make install -export AUTOCONF='/boot/common/bin/autoconf-2.13 -m /boot/common/autoconf-2.13/share/autoconf' -# ----------------------------------------------------- - -# Automatic updates not currently supported on BeOS. Delete this when we add this feature. -ac_add_options --disable-updater - -# We don't have Java for BeOS yet. While this builds fine, it is not useful. -ac_add_options --disable-oji - -# Build without Cairo -ac_add_options --disable-svg -ac_add_options --disable-canvas - -# Utilize Haiku's default shared libraries -ac_add_options --with-system-jpeg -ac_add_options --with-system-png -ac_add_options --with-system-zlib - -# Reduce build size and time by omitting IPv6 support (not needed on BeOS) -ac_add_options --disable-ipv6 - -# Required configure options -ac_add_options --enable-cpp-rtti - -# Eliminate lots of relatively useless warnings during build -ac_add_options --disable-cpp-exceptions - -# Optional optimizations -ac_add_options --enable-debug -ac_add_options --disable-optimize -ac_add_options --disable-reorder -ac_add_options --disable-strip -ac_add_options --disable-static -ac_add_options --enable-shared -#ac_add_options --enable-tests - -#--disable-logging #--disable-logging Disable logging facilities - -ac_add_options --enable-nspr-threads diff --git a/www-client/mozilla_firefox/select-a-mozconfig/browser.mozconfig b/www-client/mozilla_firefox/select-a-mozconfig/browser.mozconfig deleted file mode 100644 index 1950001c5..000000000 --- a/www-client/mozilla_firefox/select-a-mozconfig/browser.mozconfig +++ /dev/null @@ -1,80 +0,0 @@ -# ------------------ -# Browser, Optimized -# ------------------ - -. $topsrcdir/browser/config/mozconfig -mk_add_options MOZ_CO_PROJECT=browser - -# Required to download the right version of the source code -mk_add_options MOZ_CO_TAG=MOZILLA_1_8_BRANCH - -export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot -mk_add_options CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot - -# ----------------------------------------------------- -# --- EDIT THESE VALUES TO REFLECT YOUR LOCAL BUILD --- -export GLIB_CONFIG=/boot/common/bin/glib-config -mk_add_options GLIB_CONFIG=/boot/common/bin/glib-config - -export LIBIDL_CONFIG=/boot/common/bin/libIDL-config -mk_add_options LIBIDL_CONFIG=/boot/common/bin/libIDL-config - -# --- Set the outputdir for the build --- -mk_add_options MOZ_OBJDIR=/moz_obj/browser - -# autoconf 2.13 was built by -#./configure --prefix=/boot/common/autoconf-2.13 --program-suffix=-2.13 --bindir=/boot/common/bin/ -# make && make install -export AUTOCONF='/boot/common/bin/autoconf-2.13 -m /boot/common/autoconf-2.13/share/autoconf' -# ----------------------------------------------------- - -# Automatic updates not currently supported on BeOS. Delete this when we add this feature. -ac_add_options --disable-updater - -# We don't have Java for BeOS yet. While this builds fine, it is not useful. -ac_add_options --disable-oji - -# Build without Cairo -ac_add_options --disable-svg -ac_add_options --disable-canvas - -# Utilize Haiku's default shared libraries -ac_add_options --with-system-jpeg -ac_add_options --with-system-png -ac_add_options --with-system-zlib - -ac_add_options --enable-nspr-threads - -# Reduce build size and time by omitting test suite and IPv6 support (not needed on BeOS) -ac_add_options --disable-tests -ac_add_options --disable-ipv6 - -# Required configure options -ac_add_options --enable-cpp-rtti - -# Eliminate lots of relatively useless warnings during build -ac_add_options --disable-cpp-exceptions - -# Optional optimizations -export BUILD_OPT=1 -mk_add_options BUILD_OPT=1 -ac_add_options --enable-static --disable-shared -ac_add_options --enable-strip -ac_add_options --enable-reorder -#ac_add_options --enable-js-static-build - -# ---------------------------------------------------------------------------- -# GCC Specific Optimiztions. -# ---------------------------- -# -# Uncomment the first line for GCC 2, the second line for GCC 4. -# -# --- GCC2 --- -ac_add_options '--enable-optimize=-O3 -march=pentium -mcpu=pentiumpro -fthread-jumps -fforce-addr -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimizations -malign-functions=4 -malign-jumps=4' -# -# --- GCC4 --- -#ac_add_options '--enable-optimize=-O1 -march=i586 -mtune=generic' -# -# ---------------------------------------------------------------------------- - - diff --git a/www-client/mozilla_firefox/select-a-mozconfig/calendar.mozconfig b/www-client/mozilla_firefox/select-a-mozconfig/calendar.mozconfig deleted file mode 100644 index c733a36c5..000000000 --- a/www-client/mozilla_firefox/select-a-mozconfig/calendar.mozconfig +++ /dev/null @@ -1,81 +0,0 @@ -# ------------------ -# Calendar, Optimized -# ------------------ - -. $topsrcdir/calendar/sunbird/config/mozconfig -mk_add_options MOZ_CO_PROJECT=calendar - -# Required to download the right version of the source code -mk_add_options MOZ_CO_TAG=MOZILLA_1_8_BRANCH - -export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot -mk_add_options CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot - -# ----------------------------------------------------- -# --- EDIT THESE VALUES TO REFLECT YOUR LOCAL BUILD --- -export GLIB_CONFIG=/boot/common/bin/glib-config -mk_add_options GLIB_CONFIG=/boot/common/bin/glib-config - -export LIBIDL_CONFIG=/boot/common/bin/libIDL-config -mk_add_options LIBIDL_CONFIG=/boot/common/bin/libIDL-config - -# --- Set the outputdir for the build --- -mk_add_options MOZ_OBJDIR=/moz_obj/calendar - -# autoconf 2.13 was built by -#./configure --prefix=/boot/common/autoconf-2.13 --program-suffix=-2.13 --bindir=/boot/common/bin/ -# make && make install -export AUTOCONF='/boot/common/bin/autoconf-2.13 -m /boot/common/autoconf-2.13/share/autoconf' -# ----------------------------------------------------- - -# Automatic updates not currently supported on BeOS. Delete this when we add this feature. -ac_add_options --disable-updater - -# We don't have Java for BeOS yet. While this builds fine, it is not useful. -ac_add_options --disable-oji - -# Build without Cairo -ac_add_options --disable-svg -ac_add_options --disable-canvas - -# Utilize Haiku's default shared libraries -ac_add_options --with-system-jpeg -ac_add_options --with-system-png -ac_add_options --with-system-zlib - -ac_add_options --enable-nspr-threads - -# Reduce build size and time by omitting test suite and IPv6 support (not needed on BeOS) -ac_add_options --disable-tests -ac_add_options --disable-ipv6 - -# Required configure options -ac_add_options --enable-cpp-rtti - -# Eliminate lots of relatively useless warnings during build -ac_add_options --disable-cpp-exceptions - -# Optional optimizations -export BUILD_OPT=1 -mk_add_options BUILD_OPT=1 -ac_add_options --enable-static --disable-shared -ac_add_options --enable-strip -ac_add_options --enable-reorder -#ac_add_options --enable-js-static-build - -# ---------------------------------------------------------------------------- -# GCC Specific Optimiztions. -# ---------------------------- -# -# Uncomment the first line for GCC 2, the second line for GCC 4. -# -# --- GCC2 --- -ac_add_options '--enable-optimize=-O3 -march=pentium -mcpu=pentiumpro -fthread-jumps -fforce-addr -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimizations -malign-functions=4 -malign-jumps=4' -# -# --- GCC4 --- -#aac_add_options '--enable-optimize=-O1 -march=i586 -mtune=generic' -# -# ---------------------------------------------------------------------------- - - - diff --git a/www-client/mozilla_firefox/select-a-mozconfig/mailnews.mozconfig b/www-client/mozilla_firefox/select-a-mozconfig/mailnews.mozconfig deleted file mode 100644 index 03fc3b54c..000000000 --- a/www-client/mozilla_firefox/select-a-mozconfig/mailnews.mozconfig +++ /dev/null @@ -1,81 +0,0 @@ -# ------------------ -# MailNews, Optimized -# ------------------ - -. $topsrcdir/mail/config/mozconfig -mk_add_options MOZ_CO_PROJECT=mail - -# Required to download the right version of the source code -mk_add_options MOZ_CO_TAG=MOZILLA_1_8_BRANCH - -export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot -mk_add_options CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot - -# ----------------------------------------------------- -# --- EDIT THESE VALUES TO REFLECT YOUR LOCAL BUILD --- -export GLIB_CONFIG=/boot/common/bin/glib-config -mk_add_options GLIB_CONFIG=/boot/common/bin/glib-config - -export LIBIDL_CONFIG=/boot/common/bin/libIDL-config -mk_add_options LIBIDL_CONFIG=/boot/common/bin/libIDL-config - -# --- Set the outputdir for the build --- -mk_add_options MOZ_OBJDIR=/moz_obj/mailnews - -# autoconf 2.13 was built by -#./configure --prefix=/boot/common/autoconf-2.13 --program-suffix=-2.13 --bindir=/boot/common/bin/ -# make && make install -export AUTOCONF='/boot/common/bin/autoconf-2.13 -m /boot/common/autoconf-2.13/share/autoconf' -# ----------------------------------------------------- - -# Automatic updates not currently supported on BeOS. Delete this when we add this feature. -ac_add_options --disable-updater - -# We don't have Java for BeOS yet. While this builds fine, it is not useful. -ac_add_options --disable-oji - -# Build without Cairo -ac_add_options --disable-svg -ac_add_options --disable-canvas - -# Utilize Haiku's default shared libraries -ac_add_options --with-system-jpeg -ac_add_options --with-system-png -ac_add_options --with-system-zlib - -ac_add_options --enable-nspr-threads - -# Reduce build size and time by omitting test suite and IPv6 support (not needed on BeOS) -ac_add_options --disable-tests -ac_add_options --disable-ipv6 - -# Required configure options -ac_add_options --enable-cpp-rtti - -# Eliminate lots of relatively useless warnings during build -ac_add_options --disable-cpp-exceptions - -# Optional optimizations -export BUILD_OPT=1 -mk_add_options BUILD_OPT=1 -ac_add_options --enable-static --disable-shared -ac_add_options --enable-strip -ac_add_options --enable-reorder -#ac_add_options --enable-js-static-build - -# ---------------------------------------------------------------------------- -# GCC Specific Optimiztions. -# ---------------------------- -# -# Uncomment the first line for GCC 2, the second line for GCC 4. -# -# --- GCC2 --- -ac_add_options '--enable-optimize=-O3 -march=pentium -mcpu=pentiumpro -fthread-jumps -fforce-addr -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimizations -malign-functions=4 -malign-jumps=4' -# -# --- GCC4 --- -#ac_add_options '--enable-optimize=-O1 -march=i586 -mtune=generic' -# -# ---------------------------------------------------------------------------- - - - diff --git a/www-client/mozilla_firefox/select-a-mozconfig/suite-debug.mozconfig b/www-client/mozilla_firefox/select-a-mozconfig/suite-debug.mozconfig deleted file mode 100644 index a88145d2d..000000000 --- a/www-client/mozilla_firefox/select-a-mozconfig/suite-debug.mozconfig +++ /dev/null @@ -1,70 +0,0 @@ -# ------------------ -# suite, DEBUG -# ------------------ - -### Tags for packaged-filename -export MOZ_PKG_SPECIAL=DEBUG -mk_add_options MOZ_PKG_SPECIAL=DEBUG - -mk_add_options MOZ_CO_PROJECT=suite -ac_add_options --enable-application=suite - -# Required to download the right version of the source code -mk_add_options MOZ_CO_TAG=MOZILLA_1_8_BRANCH - -export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot -mk_add_options CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot - -# ----------------------------------------------------- -# --- EDIT THESE VALUES TO REFLECT YOUR LOCAL BUILD --- -export GLIB_CONFIG=/boot/common/bin/glib-config -mk_add_options GLIB_CONFIG=/boot/common/bin/glib-config - -export LIBIDL_CONFIG=/boot/common/bin/libIDL-config -mk_add_options LIBIDL_CONFIG=/boot/common/bin/libIDL-config - -# --- Set the outputdir for the build --- -mk_add_options MOZ_OBJDIR=/moz_obj/debug-suite - -# autoconf 2.13 was built by -#./configure --prefix=/boot/common/autoconf-2.13 --program-suffix=-2.13 --bindir=/boot/common/bin/ -# make && make install -export AUTOCONF='/boot/common/bin/autoconf-2.13 -m /boot/common/autoconf-2.13/share/autoconf' -# ----------------------------------------------------- - -# Automatic updates not currently supported on BeOS. Delete this when we add this feature. -ac_add_options --disable-updater - -# We don't have Java for BeOS yet. While this builds fine, it is not useful. -ac_add_options --disable-oji - -# Build without Cairo -ac_add_options --disable-svg -ac_add_options --disable-canvas - -# Utilize Haiku's default shared libraries -ac_add_options --with-system-jpeg -ac_add_options --with-system-png -ac_add_options --with-system-zlib - -# Reduce build size and time by omitting IPv6 support (not needed on BeOS) -ac_add_options --disable-ipv6 - -# Required configure options -ac_add_options --enable-cpp-rtti - -# Eliminate lots of relatively useless warnings during build -ac_add_options --disable-cpp-exceptions - -# Optional optimizations -ac_add_options --enable-debug -ac_add_options --disable-optimize -ac_add_options --disable-reorder -ac_add_options --disable-strip -ac_add_options --disable-static -ac_add_options --enable-shared -#ac_add_options --enable-tests - -#--disable-logging #--disable-logging Disable logging facilities - -ac_add_options --enable-nspr-threads diff --git a/www-client/mozilla_firefox/select-a-mozconfig/suite-just-browser.mozconfig b/www-client/mozilla_firefox/select-a-mozconfig/suite-just-browser.mozconfig deleted file mode 100644 index 96059216a..000000000 --- a/www-client/mozilla_firefox/select-a-mozconfig/suite-just-browser.mozconfig +++ /dev/null @@ -1,89 +0,0 @@ -# ------------------ -# Suite Just Browser, Optimized -# ------------------ - -mk_add_options MOZ_CO_PROJECT=suite -ac_add_options --enable-application=suite - -export MOZ_PKG_SPECIAL=JustBrowser -mk_add_options MOZ_PKG_SPECIAL=JustBrowser - -# Required to download the right version of the source code -mk_add_options MOZ_CO_TAG=MOZILLA_1_8_BRANCH - -export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot -mk_add_options CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot - -# ----------------------------------------------------- -# --- EDIT THESE VALUES TO REFLECT YOUR LOCAL BUILD --- -export GLIB_CONFIG=/boot/common/bin/glib-config -mk_add_options GLIB_CONFIG=/boot/common/bin/glib-config - -export LIBIDL_CONFIG=/boot/common/bin/libIDL-config -mk_add_options LIBIDL_CONFIG=/boot/common/bin/libIDL-config - -# --- Set the outputdir for the build --- -mk_add_options MOZ_OBJDIR=/moz_obj/suite-JustBrowser - -# autoconf 2.13 was built by -#./configure --prefix=/boot/common/autoconf-2.13 --program-suffix=-2.13 --bindir=/boot/common/bin/ -# make && make install -export AUTOCONF='/boot/common/bin/autoconf-2.13 -m /boot/common/autoconf-2.13/share/autoconf' -# ----------------------------------------------------- - -# Options for JustBrowser -ac_add_options --disable-mailnews -ac_add_options --disable-composer -#ac_add_options --enable-plaintext-editor-only -#ac_add_options --disable-irc - -# Automatic updates not currently supported on BeOS. Delete this when we add this feature. -ac_add_options --disable-updater - -# We don't have Java for BeOS yet. While this builds fine, it is not useful. -ac_add_options --disable-oji - -# Build without Cairo -ac_add_options --disable-svg -ac_add_options --disable-canvas - -# Utilize Haiku's default shared libraries -ac_add_options --with-system-jpeg -ac_add_options --with-system-png -ac_add_options --with-system-zlib - -ac_add_options --enable-nspr-threads - -# Reduce build size and time by omitting test suite and IPv6 support (not needed on BeOS) -ac_add_options --disable-tests -ac_add_options --disable-ipv6 - -# Required configure options -ac_add_options --enable-cpp-rtti - -# Eliminate lots of relatively useless warnings during build -ac_add_options --disable-cpp-exceptions - -# Optional optimizations -export BUILD_OPT=1 -mk_add_options BUILD_OPT=1 -ac_add_options --enable-static --disable-shared -ac_add_options --enable-strip -ac_add_options --enable-reorder -#ac_add_options --enable-js-static-build - -# ---------------------------------------------------------------------------- -# GCC Specific Optimiztions. -# ---------------------------- -# -# Uncomment the first line for GCC 2, the second line for GCC 4. -# -# --- GCC2 --- -ac_add_options '--enable-optimize=-O3 -march=pentium -mcpu=pentiumpro -fthread-jumps -fforce-addr -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimizations -malign-functions=4 -malign-jumps=4' -# -# --- GCC4 --- -#ac_add_options '--enable-optimize=-O1 -march=i586 -mtune=generic' -# -# ---------------------------------------------------------------------------- - - diff --git a/www-client/mozilla_firefox/select-a-mozconfig/suite.mozconfig b/www-client/mozilla_firefox/select-a-mozconfig/suite.mozconfig deleted file mode 100644 index f2e2fbbec..000000000 --- a/www-client/mozilla_firefox/select-a-mozconfig/suite.mozconfig +++ /dev/null @@ -1,80 +0,0 @@ -# ------------------ -# Suite, Optimized -# ------------------ - -mk_add_options MOZ_CO_PROJECT=suite -ac_add_options --enable-application=suite - -# Required to download the right version of the source code -mk_add_options MOZ_CO_TAG=MOZILLA_1_8_BRANCH - -export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot -mk_add_options CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot - -# ----------------------------------------------------- -# --- EDIT THESE VALUES TO REFLECT YOUR LOCAL BUILD --- -export GLIB_CONFIG=/boot/common/bin/glib-config -mk_add_options GLIB_CONFIG=/boot/common/bin/glib-config - -export LIBIDL_CONFIG=/boot/common/bin/libIDL-config -mk_add_options LIBIDL_CONFIG=/boot/common/bin/libIDL-config - -# --- Set the outputdir for the build --- -mk_add_options MOZ_OBJDIR=/moz_obj/suite - -# autoconf 2.13 was built by -#./configure --prefix=/boot/common/autoconf-2.13 --program-suffix=-2.13 --bindir=/boot/common/bin/ -# make && make install -export AUTOCONF='/boot/common/bin/autoconf-2.13 -m /boot/common/autoconf-2.13/share/autoconf' -# ----------------------------------------------------- - -# Automatic updates not currently supported on BeOS. Delete this when we add this feature. -ac_add_options --disable-updater - -# We don't have Java for BeOS yet. While this builds fine, it is not useful. -ac_add_options --disable-oji - -# Build without Cairo -ac_add_options --disable-svg -ac_add_options --disable-canvas - -# Utilize Haiku's default shared libraries -ac_add_options --with-system-jpeg -ac_add_options --with-system-png -ac_add_options --with-system-zlib - -ac_add_options --enable-nspr-threads - -# Reduce build size and time by omitting test suite and IPv6 support (not needed on BeOS) -ac_add_options --disable-tests -ac_add_options --disable-ipv6 - -# Required configure options -ac_add_options --enable-cpp-rtti - -# Eliminate lots of relatively useless warnings during build -ac_add_options --disable-cpp-exceptions - -# Optional optimizations -export BUILD_OPT=1 -mk_add_options BUILD_OPT=1 -ac_add_options --enable-static --disable-shared -ac_add_options --enable-strip -ac_add_options --enable-reorder -#ac_add_options --enable-js-static-build - -# ---------------------------------------------------------------------------- -# GCC Specific Optimiztions. -# ---------------------------- -# -# Uncomment the first line for GCC 2, the second line for GCC 4. -# -# --- GCC2 --- -ac_add_options '--enable-optimize=-O3 -march=pentium -mcpu=pentiumpro -fthread-jumps -fforce-addr -frerun-cse-after-loop -frerun-loop-opt -fexpensive-optimizations -malign-functions=4 -malign-jumps=4' -# --- GCC4 --- -#ac_add_options '--enable-optimize=-O1 -march=i586 -mtune=generic' -# -# ---------------------------------------------------------------------------- - - -