summaryrefslogtreecommitdiff
path: root/src/libs/xpcom18a4
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/xpcom18a4')
-rw-r--r--src/libs/xpcom18a4/Config.kmk49
-rw-r--r--src/libs/xpcom18a4/Makefile.kmk285
-rw-r--r--src/libs/xpcom18a4/ipc/ipcd/client/Makefile.kup0
-rw-r--r--src/libs/xpcom18a4/ipc/ipcd/client/src/Makefile.kup0
-rw-r--r--src/libs/xpcom18a4/ipc/ipcd/client/src/ipcdclient.cpp75
-rw-r--r--src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp111
-rw-r--r--src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcLog.cpp26
-rw-r--r--src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcLog.h29
-rw-r--r--src/libs/xpcom18a4/java/Makefile.kmk1
-rw-r--r--src/libs/xpcom18a4/java/src/nsJavaInterfaces.cpp14
-rw-r--r--src/libs/xpcom18a4/java/src/nsJavaWrapper.cpp7
-rw-r--r--src/libs/xpcom18a4/java/src/nsThreadUtils.h4
-rw-r--r--src/libs/xpcom18a4/java/src/org/mozilla/xpcom/XPCOMException.java2
-rw-r--r--src/libs/xpcom18a4/java/tools/genjifaces.xsl77
-rw-r--r--src/libs/xpcom18a4/nsprpub/pr/include/md/_iprt_atomic.h2
-rw-r--r--src/libs/xpcom18a4/nsprpub/pr/include/md/_l4v2.cfg661
-rw-r--r--src/libs/xpcom18a4/nsprpub/pr/include/md/_l4v2.h838
-rw-r--r--src/libs/xpcom18a4/nsprpub/pr/include/md/_unixos.h2
-rw-r--r--src/libs/xpcom18a4/nsprpub/pr/include/md/prosdep.h3
-rw-r--r--src/libs/xpcom18a4/nsprpub/pr/src/io/prlog.c4
-rw-r--r--src/libs/xpcom18a4/nsprpub/pr/src/md/l4env/locks.c84
-rw-r--r--src/libs/xpcom18a4/nsprpub/pr/src/md/l4env/prnetdb.c217
-rw-r--r--src/libs/xpcom18a4/nsprpub/pr/src/md/l4env/threads.c267
-rw-r--r--src/libs/xpcom18a4/nsprpub/pr/src/md/unix/l4env.c123
-rw-r--r--src/libs/xpcom18a4/nsprpub/pr/src/md/unix/unix.c3
-rw-r--r--src/libs/xpcom18a4/nsprpub/pr/src/md/unix/uxrng.c2
-rw-r--r--src/libs/xpcom18a4/nsprpub/pr/src/misc/prinit.c2
-rw-r--r--src/libs/xpcom18a4/nsprpub/pr/src/misc/prnetdb.c2
-rw-r--r--src/libs/xpcom18a4/python/Makefile.kmk77
-rwxr-xr-xsrc/libs/xpcom18a4/python/gen_python_deps.py23
-rw-r--r--src/libs/xpcom18a4/python/server/loader.py14
-rw-r--r--src/libs/xpcom18a4/python/src/PyGBase.cpp3
-rw-r--r--src/libs/xpcom18a4/python/src/PyIID.cpp2
-rw-r--r--src/libs/xpcom18a4/python/src/PyISupports.cpp4
-rw-r--r--src/libs/xpcom18a4/python/src/VariantUtils.cpp2
-rw-r--r--src/libs/xpcom18a4/python/src/module/_xpcom.cpp66
-rwxr-xr-xsrc/libs/xpcom18a4/python/vboxxpcom.py61
-rw-r--r--src/libs/xpcom18a4/xpcom-namespace-cleanup.map2
-rw-r--r--src/libs/xpcom18a4/xpcom-private.h6
-rw-r--r--src/libs/xpcom18a4/xpcom/components/nsComponentManager.cpp15
-rw-r--r--src/libs/xpcom18a4/xpcom/components/nsNativeComponentLoader.cpp48
-rw-r--r--src/libs/xpcom18a4/xpcom/io/nsAppFileLocationProvider.cpp4
-rw-r--r--src/libs/xpcom18a4/xpcom/io/nsDirectoryService.cpp170
-rw-r--r--src/libs/xpcom18a4/xpcom/io/nsLocalFile.h3
-rw-r--r--src/libs/xpcom18a4/xpcom/io/nsLocalFileL4.cpp549
-rw-r--r--src/libs/xpcom18a4/xpcom/io/nsLocalFileL4.h94
-rw-r--r--src/libs/xpcom18a4/xpcom/io/nsNativeCharsetUtils.cpp10
-rw-r--r--src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h3
48 files changed, 767 insertions, 3279 deletions
diff --git a/src/libs/xpcom18a4/Config.kmk b/src/libs/xpcom18a4/Config.kmk
index fb9c1afe..71acf9c8 100644
--- a/src/libs/xpcom18a4/Config.kmk
+++ b/src/libs/xpcom18a4/Config.kmk
@@ -4,7 +4,7 @@
#
#
-# Copyright (C) 2006-2010 Oracle Corporation
+# Copyright (C) 2006-2013 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
@@ -25,6 +25,7 @@ endif
#
VBOX_PATH_XPCOM_SRC := $(PATH_ROOT)/src/libs/xpcom18a4
+
#
# Template for building the XPCOM libraries (shared).
#
@@ -46,7 +47,6 @@ TEMPLATE_XPCOM_CXXFLAGS.release = -O
TEMPLATE_XPCOM_CXXFLAGS.profile = -O
TEMPLATE_XPCOM_CXXFLAGS.darwin = -fpascal-strings -fshort-wchar -fno-common -fno-rtti $(VBOX_DARWIN_DEF_SDK_CXXFLAGS)
TEMPLATE_XPCOM_CXXFLAGS.freebsd = -pthread
-TEMPLATE_XPCOM_CXXFLAGS.l4 = -fno-exceptions -nostdinc
TEMPLATE_XPCOM_CXXFLAGS.linux = -pthread
TEMPLATE_XPCOM_CXXFLAGS.solaris = -fno-omit-frame-pointer # for now anyway.
TEMPLATE_XPCOM_CFLAGS = -g -pipe -Wall -Wno-unused -Wno-parentheses -Wno-uninitialized $(VBOX_GCC_fvisibility-hidden) \
@@ -56,7 +56,6 @@ TEMPLATE_XPCOM_CFLAGS.amd64 = -m64
TEMPLATE_XPCOM_CFLAGS.release = -O
TEMPLATE_XPCOM_CFLAGS.profile = -O
TEMPLATE_XPCOM_CFLAGS.freebsd = -pthread
-TEMPLATE_XPCOM_CFLAGS.l4 = -nostdinc
TEMPLATE_XPCOM_CFLAGS.linux = -pthread -ansi
TEMPLATE_XPCOM_CFLAGS.solaris = -fno-omit-frame-pointer # for now anyway.
TEMPLATE_XPCOM_DEFS = \
@@ -76,7 +75,6 @@ TEMPLATE_XPCOM_DEFS.darwin = OSTYPE=\"Darwin8.8.1\" OSARCH=\"Darwin\" XP
TEMPLATE_XPCOM_DEFS.darwin.amd64 = VBOX_MACOSX_FOLLOWS_UNIX_IO
TEMPLATE_XPCOM_DEFS.freebsd = OSTYPE=\"FreeBSD5+\" OSARCH=\"FreeBSD\" XP_UNIX=1 FREEBSD=1 HAVE_VISIBILITY_ATTRIBUTE=1
TEMPLATE_XPCOM_DEFS.linux = OSTYPE=\"Linux2.6\" OSARCH=\"Linux\" XP_UNIX=1 _GNU_SOURCE HAVE_VISIBILITY_ATTRIBUTE=1 ## @todo LINUX=1
-TEMPLATE_XPCOM_DEFS.l4 = OSTYPE=\"L4ENV\" OSARCH=\"L4\" XP_UNIX=1 L4ENV HAVE_VISIBILITY_ATTRIBUTE=1
# Don't define BSD_SELECT because bsdselect() from kLIBC <= 0.6.3 has problems on SMP
TEMPLATE_XPCOM_DEFS.os2 = OSTYPE=\"OS/2_4.5\" OSARCH=\"OS/2\" XP_OS2 XP_PC OS2=4
TEMPLATE_XPCOM_DEFS.solaris = OSTYPE=\"Solaris10\" OSARCH=\"Solaris\" XP_UNIX=1 XP_SOLARIS=1 HAVE_LIBDL=1 HAVE_SENDFILEV=1 SOLARIS=1 _REENTRANT
@@ -125,11 +123,6 @@ TEMPLATE_XPCOM_INCS = $(VBOX_PATH_XPCOM_SRC)/xpcom/build \
$(VBOX_PATH_SDK)/bindings/xpcom/include/ipcd \
.
TEMPLATE_XPCOM_INCS.darwin = $(VBOX_PATH_MACOSX_SDK)/Developer/Headers/FlatCarbon
-TEMPLATE_XPCOM_INCS.l4 = $(L4_INCDIR) $(VBOX_L4_GCC3_INCS)
-TEMPLATE_XPCOM_LDFLAGS.l4 = $(L4_DIR)/lib/x86_586/crt0.o \
- -T$(L4_DIR)/lib/x86_586/main_rel.ld -nostdlib \
- # -Wl,--whole-archive,--no-allow-shlib-undefined
-TEMPLATE_XPCOM_LIBS.l4 = $(VBOX_GCC_LIBGCC)
TEMPLATE_XPCOM_LIBS.solaris = sendfile
TEMPLATE_XPCOM_ORDERDEPS = $(foreach hdrinst, $(filter %-HEADERS, $(INSTALLS)), $($(hdrinst)_1_TARGET)) \
$(PATH_TARGET)/VBox-xpcom-idl-timestamp
@@ -167,14 +160,7 @@ TEMPLATE_XPCOMEXE_LIBS = \
$(TEMPLATE_XPCOM_LIBS)
TEMPLATE_XPCOMEXE_LIBS.freebsd = $(LIB_PTHREAD)
TEMPLATE_XPCOMEXE_LIBS.linux = dl $(LIB_PTHREAD)
-TEMPLATE_XPCOMEXE_LIBS.l4 = $(LIB_RUNTIME) $(VBOX_GCC_LIBGCC)
TEMPLATE_XPCOMEXE_LDFLAGS.darwin = -bind_at_load $(filter-out -current_version -compatibility_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD),$(TEMPLATE_XPCOM_LDFLAGS.darwin))
-TEMPLATE_XPCOMEXE_LDFLAGS.l4 = $(L4_DIR)/lib/x86_586/crt0.o \
- -T$(L4_DIR)/lib/x86_586/main_dyn.ld -nostdlib -lgcc \
- -Wl,--export-dynamic,--dynamic-linker=libld-l4.s.so \
- -Wl,--rpath-link,$(L4_LIBDIR) \
- # -Wl,--whole-archive,--no-allow-shlib-undefined
-# -Wno-format
#
@@ -184,6 +170,15 @@ TEMPLATE_XPCOMTSTEXE = XPCOM executable files (testcases)
TEMPLATE_XPCOMTSTEXE_EXTENDS = XPCOMEXE
TEMPLATE_XPCOMTSTEXE_CXXFLAGS = $(TEMPLATE_XPCOMEXE_CXXFLAGS) -Wno-format
TEMPLATE_XPCOMTSTEXE_CFLAGS = $(TEMPLATE_XPCOMEXE_CFLAGS) -Wno-format
+TEMPLATE_XPCOMTSTEXE_INST = $(INST_TESTCASE)
+ifdef VBOX_WITH_RUNPATH
+ TEMPLATE_XPCOMTSTEXE_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RUNPATH)' $(TEMPLATE_XPCOMEXE_LDFLAGS)
+else ifdef VBOX_WITH_RELATIVE_RUNPATH
+ TEMPLATE_XPCOMTSTEXE_LDFLAGS = '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..' $(TEMPLATE_XPCOMEXE_LDFLAGS)
+endif
+if "$(KBUILD_TARGET)" == "win" && defined(VBOX_SIGNING_MODE)
+ TEMPLATE_XPCOMTSTEXE_POST_CMDS =
+endif
#
@@ -267,6 +262,28 @@ TEMPLATE_XPCOMOSX107_INCS.darwin = $(VBOX_PATH_MACOSX_SDK_10_7)/Developer
#
+# Creates a x86 target for an XPCOM target if so desired.
+# The target is specified as the first argument: $(evalcall VBOX_XPCOM_X86,target).
+#
+ifdef VBOX_WITH_32_ON_64_MAIN_API
+ define VBOX_XPCOM_X86
+ $(1)-x86_TEMPLATE := $(strip $($(1)_TEMPLATE))-x86
+ $(1)-x86_EXTENDS := $(1)
+ endef
+else
+ define VBOX_XPCOM_X86
+ endef
+endif
+
+# Corresponding 32-bit template(s).
+TEMPLATE_XPCOM-x86 = 32-bit XPCOM libraries (shared)
+TEMPLATE_XPCOM-x86_EXTENDS = XPCOM
+TEMPLATE_XPCOM-x86_BLD_TRG_ARCH = x86
+TEMPLATE_XPCOM-x86_DEFS = $(TEMPLATE_XPCOM_DEFS) VBOX_IN_32_ON_64_MAIN_API
+TEMPLATE_XPCOM-x86_LIBS = $(subst $(LIB_RUNTIME),$(VBOX_LIB_RUNTIME_X86),$(TEMPLATE_XPCOM_LIBS))
+
+
+#
# The list of XPCOM's IDL files.
# This is used by the java bindings as well as the XPCOM build.
#
diff --git a/src/libs/xpcom18a4/Makefile.kmk b/src/libs/xpcom18a4/Makefile.kmk
index ce0079fc..6b7d8fb7 100644
--- a/src/libs/xpcom18a4/Makefile.kmk
+++ b/src/libs/xpcom18a4/Makefile.kmk
@@ -4,7 +4,7 @@
#
#
-# Copyright (C) 2006-2012 Oracle Corporation
+# Copyright (C) 2006-2013 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
@@ -74,7 +74,7 @@ BLDDIRS += \
#
ifndef VBOX_ONLY_SDK
-LIBRARIES += \
+VBOX_XPCOM_LIBRARIES := \
VBox-xpcom-nspr \
VBox-xpcom-typelib \
VBox-xpcom-string \
@@ -86,26 +86,27 @@ LIBRARIES += \
VBox-xpcom-xptinfo \
VBox-xpcom-xptcall \
VBox-xpcom-proxy \
- VBoxXPCOMGlue_s \
- VBoxXPCOMGlue \
- VBox-xpcom-ipcutils \
VBox-xpcom-ipcshared \
- VBox-xpcom-ipcdlock \
- VBox-xpcom-ipctransmgr \
- VBox-xpcom-ipctmgrcom
+ VBoxXPCOMGlue_s \
+ $(if $(VBOX_WITH_XPCOM_GLUE_WHICH_IS_UNUSED),VBoxXPCOMGlue,)
+LIBRARIES += $(VBOX_XPCOM_LIBRARIES)
-DLLS += \
- VBoxXPCOM \
+VBOX_XPCOM_DLLS := \
+ VBoxXPCOM \
VBoxXPCOMIPCC
+DLLS += $(VBOX_XPCOM_DLLS)
+
+ ifdef VBOX_WITH_32_ON_64_MAIN_API
+LIBRARIES += $(addsuffix -x86,$(VBOX_XPCOM_LIBRARIES))
+DLLS += $(addsuffix -x86,$(VBOX_XPCOM_DLLS))
+ endif
+
ifdef VBOX_WITH_TESTCASES
PROGRAMS += \
- tstnsIFileEnumerator \
tstnsIFileTest \
tstTestArray \
- tstTestAtoms \
tstTestAutoLock \
- tstTestCallTemplates \
tstTestCOMPtr \
tstTestCOMPtrEq \
tstTestCRT \
@@ -114,7 +115,6 @@ PROGRAMS += \
tstTestID \
tstTestObserverService \
tstTestPipes \
- tstTestServMgr \
tstTestThreads \
tstTestXPIDLString \
tstTestDeque \
@@ -122,10 +122,14 @@ PROGRAMS += \
tstTestMinStringAPI \
tstTestStrings \
tstPrimitiveTest \
- tstSimpleTypeLib \
- tstXptDump \
- tstXptLink
-# tstTestPermanentAtoms
+# tstnsIFileEnumerator
+# tstTestAtoms
+# tstTestServMgr
+# tstTestCallTemplates
+# tstTestPermanentAtoms
+# tstSimpleTypeLib
+# tstXptDump
+# tstXptLink
endif # VBOX_WITH_TESTCASES
PROGRAMS += VBoxXPCOMIPCD
@@ -200,7 +204,6 @@ NSPRPUB-MD-HEADERS_SOURCES = \
nsprpub/pr/include/md/_iprt_atomic.h \
nsprpub/pr/include/md/_darwin.h \
nsprpub/pr/include/md/_freebsd.h \
- nsprpub/pr/include/md/_l4v2.h \
nsprpub/pr/include/md/_linux.h \
nsprpub/pr/include/md/_macos.h \
nsprpub/pr/include/md/_netbsd.h \
@@ -222,7 +225,6 @@ NSPRPUB-MD-HEADERS_SOURCES = \
nsprpub/pr/include/md/_os2.cfg \
nsprpub/pr/include/md/_solaris32.cfg \
nsprpub/pr/include/md/_solaris64.cfg \
- nsprpub/pr/include/md/_l4v2.cfg
NSPRPUB-OBS-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/nsprpub/obsolete/
NSPRPUB-OBS-HEADERS_IFFLAGS = -m 644
@@ -528,15 +530,6 @@ VBox-xpcom-nspr_DEFS.linux = \
HAVE_CVAR_BUILT_ON_SEM \
_PR_PTHREADS
# _BSD_SOURCE is here to keep the Glibc header files happy and make them include the right things
-# FIXME: L4 should be defined by _linux.cfg
-VBox-xpcom-nspr_DEFS.l4 = \
- L4=1 \
- _REENTRANT=1 \
- _LARGEFILE64_SOURCE=1 \
- _POSIX_SOURCE=1 \
- _BSD_SOURCE=1 \
- HAVE_FCNTL_FILE_LOCKING=1 \
- HAVE_CVAR_BUILT_ON_SEM
VBox-xpcom-nspr_DEFS.netbsd = \
_PR_PTHREADS
VBox-xpcom-nspr_DEFS.openbsd = \
@@ -630,30 +623,6 @@ VBox-xpcom-nspr_SOURCES.darwin.x86 = nsprpub/pr/src/md/unix/os_Darwin_x86.s
VBox-xpcom-nspr_SOURCES.freebsd = nsprpub/pr/src/md/unix/freebsd.c
-VBox-xpcom-nspr_SOURCES.l4 = \
- nsprpub/pr/src/io/prfile.c /* why not for Linux? */ \
- nsprpub/pr/src/io/prio.c /* "" "" "" "" */ \
- nsprpub/pr/src/io/prsocket.c \
- nsprpub/pr/src/md/unix/unix.c \
- nsprpub/pr/src/md/unix/unix_errors.c \
- nsprpub/pr/src/md/unix/uxpoll.c \
- nsprpub/pr/src/md/unix/uxproces.c \
- nsprpub/pr/src/md/unix/uxrng.c \
- nsprpub/pr/src/md/unix/uxshm.c \
- nsprpub/pr/src/md/unix/uxwrap.c \
- nsprpub/pr/src/md/unix/l4env.c \
- nsprpub/pr/src/threads/prcthr.c \
- nsprpub/pr/src/threads/prmon.c \
- nsprpub/pr/src/threads/combined/prucpu.c \
- nsprpub/pr/src/threads/combined/prucv.c \
- nsprpub/pr/src/threads/combined/prulock.c \
- nsprpub/pr/src/threads/combined/prustack.c \
- nsprpub/pr/src/threads/combined/pruthr.c
-# nsprpub/pr/src/md/l4env/prnetdb.c \
-# nsprpub/pr/src/md/l4env/threads.c
-VBox-xpcom-nspr_SOURCES.l4.x86 = nsprpub/pr/src/md/unix/os_Linux_x86.s
-VBox-xpcom-nspr_SOURCES.l4.amd64 = nsprpub/pr/src/md/unix/os_Linux_x86_64.s
-
VBox-xpcom-nspr_SOURCES.linux = nsprpub/pr/src/md/unix/linux.c
VBox-xpcom-nspr_SOURCES.linux.x86 = nsprpub/pr/src/md/unix/os_Linux_x86.s
VBox-xpcom-nspr_SOURCES.linux.amd64 = nsprpub/pr/src/md/unix/os_Linux_x86_64.s
@@ -710,6 +679,8 @@ $$(VBox-xpcom-nspr_0_OUTDIR)/_pl_bld.h: | $$(VBox-xpcom-nspr_0_OUTDIR)/
$(call MSG_GENERATE,,$@)
$(QUIET)$(APPEND) -t $@ '#define _BUILD_STRING "$(date +%Y-%m-%d %T)"'
+$(evalcall2 VBOX_XPCOM_X86,VBox-xpcom-nspr)
+
VBox-xpcom-typelib_TEMPLATE = XPCOM
VBox-xpcom-typelib_INSTTYPE = none
@@ -717,6 +688,7 @@ VBox-xpcom-typelib_SOURCES = \
xpcom/typelib/xpt/src/xpt_arena.c \
xpcom/typelib/xpt/src/xpt_struct.c \
xpcom/typelib/xpt/src/xpt_xdr.c
+$(evalcall VBOX_XPCOM_X86,VBox-xpcom-typelib)
VBox-xpcom-string_TEMPLATE = XPCOM
VBox-xpcom-string_INSTTYPE = none
@@ -732,6 +704,7 @@ VBox-xpcom-string_SOURCES = \
xpcom/string/src/nsString.cpp \
xpcom/string/src/nsStringComparator.cpp \
xpcom/string/src/nsStringObsolete.cpp
+$(evalcall VBOX_XPCOM_X86,VBox-xpcom-string)
VBox-xpcom-base_TEMPLATE = XPCOM
VBox-xpcom-base_INSTTYPE = none
@@ -747,6 +720,7 @@ VBox-xpcom-base_SOURCES = \
xpcom/base/nsMemoryImpl.cpp \
xpcom/base/nsTraceRefcntImpl.cpp \
xpcom/base/nsStackFrameUnix.cpp
+$(evalcall VBOX_XPCOM_X86,VBox-xpcom-base)
VBox-xpcom-ds_TEMPLATE = XPCOM
VBox-xpcom-ds_INSTTYPE = none
@@ -786,11 +760,15 @@ VBox-xpcom-ds_SOURCES = \
xpcom/ds/nsArray.cpp \
xpcom/ds/nsArrayEnumerator.cpp
# xpcom/ds/nsHashPropertyBag.cpp
+$(evalcall VBOX_XPCOM_X86,VBox-xpcom-ds)
# @todo what about MOZ_USER_DIR?
VBox-xpcom-io_TEMPLATE = XPCOM
VBox-xpcom-io_INSTTYPE = none
VBox-xpcom-io_DEFS = _IMPL_NS_COM MOZ_USER_DIR=\".mozilla\"
+if defined(VBOX_WITH_HARDENING) && defined(VBOX_PATH_APP_PRIVATE_ARCH)
+ VBox-xpcom-io_DEFS += MOZ_DEFAULT_VBOX_XPCOM_HOME=\"$(VBOX_PATH_APP_PRIVATE_ARCH)\"
+endif
VBox-xpcom-io_INCS.darwin = \
xpcom/MoreFiles
VBox-xpcom-io_SOURCES = \
@@ -818,14 +796,13 @@ VBox-xpcom-io_SOURCES.darwin.x86 = \
xpcom/io/nsLocalFileOSX.cpp \
xpcom/MoreFiles/FSCopyObject.c \
xpcom/MoreFiles/MoreFilesX.c
-VBox-xpcom-io_SOURCES.l4 = \
- xpcom/io/nsLocalFileL4.cpp
if1of ($(KBUILD_TARGET) $(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), freebsd linux netbsd openbsd solaris darwin.amd64)
VBox-xpcom-io_SOURCES += \
xpcom/io/nsLocalFileUnix.cpp
endif
VBox-xpcom-io_SOURCES.os2 = \
xpcom/io/nsLocalFileOS2.cpp
+$(evalcall VBOX_XPCOM_X86,VBox-xpcom-io)
VBox-xpcom-components_TEMPLATE = XPCOM
VBox-xpcom-components_INSTTYPE = none
@@ -838,6 +815,7 @@ VBox-xpcom-components_SOURCES = \
xpcom/components/nsServiceManagerObsolete.cpp \
xpcom/components/xcDll.cpp \
xpcom/components/nsStaticComponentLoader.cpp
+$(evalcall VBOX_XPCOM_X86,VBox-xpcom-components)
VBox-xpcom-threads_TEMPLATE = XPCOM
VBox-xpcom-threads_INSTTYPE = none
@@ -852,6 +830,7 @@ VBox-xpcom-threads_SOURCES = \
xpcom/threads/nsTimerImpl.cpp \
xpcom/threads/nsProcessCommon.cpp \
xpcom/threads/TimerThread.cpp
+$(evalcall VBOX_XPCOM_X86,VBox-xpcom-threads)
VBox-xpcom-xptinfo_TEMPLATE = XPCOM
VBox-xpcom-xptinfo_INSTTYPE = none
@@ -866,13 +845,13 @@ VBox-xpcom-xptinfo_SOURCES = \
xpcom/reflect/xptinfo/src/xptiWorkingSet.cpp \
xpcom/reflect/xptinfo/src/xptiZipItem.cpp \
xpcom/reflect/xptinfo/src/xptiZipLoader.cpp
+$(evalcall VBOX_XPCOM_X86,VBox-xpcom-xptinfo)
VBox-xpcom-xptcall_TEMPLATE = XPCOM
VBox-xpcom-xptcall_INSTTYPE = none
VBox-xpcom-xptcall_DEFS = _IMPL_NS_COM _IMPL_NS_BASE EXPORT_XPTC_API
VBox-xpcom-xptcall_DEFS.darwin = KEEP_STACK_16_BYTE_ALIGNED
-VBox-xpcom-xptcall_DEFS.l4 = L4
VBox-xpcom-xptcall_DEFS.os2 = MOZ_NEED_LEADING_UNDERSCORE
VBox-xpcom-xptcall_INCS.os2 = xpcom/reflect/xptcall/src/md/unix
VBox-xpcom-xptcall_SOURCES = xpcom/reflect/xptcall/src/xptcall.cpp
@@ -901,39 +880,44 @@ else
xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_linux.cpp \
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_64_linux.cpp
endif
-
xpcom/reflect/xptcall/src/md/unix/xptcstubs_x86_solaris.cpp_CXXFLAGS = -O0
# -O0 works fine, while -O1 doesn't. The gcc man page can't be listing all the -f*
# stuff that -O1 enables, because when using the options without -O1, it's -fomit-frame-pointer
# that triggers is, while -O1 -fno-omit-frame-pointer does not work. Anyway, it's probably a gcc/mozila
# bug and it's not worth investigating as I'm not the maintainger of the solaris gcc port. [bird, 2007-09-17]
+$(evalcall VBOX_XPCOM_X86,VBox-xpcom-xptcall)
+
VBox-xpcom-proxy_TEMPLATE = XPCOM
VBox-xpcom-proxy_INSTTYPE = none
VBox-xpcom-proxy_DEFS = _IMPL_NS_COM EXPORT_XPTC_API EXPORT_XPTI_API
-VBox-xpcom-proxy_SOURCES = xpcom/proxy/src/nsProxyEvent.cpp \
- xpcom/proxy/src/nsProxyEventClass.cpp \
- xpcom/proxy/src/nsProxyEventObject.cpp \
- xpcom/proxy/src/nsProxyObjectManager.cpp \
- xpcom/proxy/src/nsProxyRelease.cpp
+VBox-xpcom-proxy_SOURCES = \
+ xpcom/proxy/src/nsProxyEvent.cpp \
+ xpcom/proxy/src/nsProxyEventClass.cpp \
+ xpcom/proxy/src/nsProxyEventObject.cpp \
+ xpcom/proxy/src/nsProxyObjectManager.cpp \
+ xpcom/proxy/src/nsProxyRelease.cpp
+$(evalcall VBOX_XPCOM_X86,VBox-xpcom-proxy)
#
# The VBoxXPCOM Glue static libraries.
#
-# See http://developer.mozilla.org/en/docs/XPCOM_Glue for details about the
-# original XPCOM glue library purpose and usage.
-#
-# We don't really use the glue library in the described way because we don't
-# provide frozen APIs (yet), so all VBox XPCOM client applications are
-# dependent on the given version of both the VBox XPCOM runtime (binary
-# dependency) and VirtualBox component library (COM interface dependency). For
-# this reason, VBox client applications link to the VBox XPCOM shared library
-# directly (instead of linking to the standalone XPCOM glue library that would
-# dynamically search for and load the installed XPCOM runtime). For the same
-# reason, we link all parts of XPCOM into a single shared XPCOM library below
-# (as opposed to the original XPCOM where e.g. NSPR lives in a separate DLL).
+# This isn't the normal XPCOM glue (see the places in XPCOM where XPCOM_GLUE is
+# checked), VirtualBox has its own glue library and this means this isn't used
+# much (one reason is that we don't provide frozen APIs yet). All VBox XPCOM
+# client applications are dependent on the given version of both the VBox XPCOM
+# runtime (binary dependency) and VirtualBox component library (COM interface
+# dependency). For this reason, VBox client applications link to the VBox XPCOM
+# shared library directly (instead of linking to the standalone XPCOM glue
+# library that would dynamically search for and load the installed XPCOM
+# runtime). For the same reason, we link all parts of XPCOM into a single
+# shared XPCOM library below (as opposed to the original XPCOM where e.g. NSPR
+# lives in a separate DLL). Additionally there is VBox specific glue code to
+# make both the client and server side code build with both XPCOM and COM,
+# which should be made part of the SDK eventually, but this is a higher level
+# of abstraction than this XPCOM specific glue code.
#
VBoxXPCOMGlue_COMMON_SOURCES = \
xpcom/glue/nsCOMPtr.cpp \
@@ -950,18 +934,14 @@ VBoxXPCOMGlue_s_TEMPLATE = XPCOM
VBoxXPCOMGlue_s_INSTTYPE = none
VBoxXPCOMGlue_s_DEFS = _IMPL_NS_COM
VBoxXPCOMGlue_s_SOURCES = $(VBoxXPCOMGlue_COMMON_SOURCES)
+$(evalcall VBOX_XPCOM_X86,VBoxXPCOMGlue_s)
-# standalone glue library which all third-party client apps (if any) will link with
-# (currently not used anywhere (see above) but still built to make sure
-# the code inside #ifdef XPCOM_GLUE compiles)
+# standalone glue library which all third-party client apps (if any) will
+# link with (currently completely unused and nit built, to be part of the SDK)
VBoxXPCOMGlue_TEMPLATE = XPCOM
-VBoxXPCOMGlue_DEFS = XPCOM_GLUE
-VBoxXPCOMGlue_SOURCES = $(VBoxXPCOMGlue_COMMON_SOURCES) \
- xpcom/glue/standalone/nsXPCOMGlue.cpp \
- xpcom/glue/standalone/nsGREDirServiceProvider.cpp
-VBoxXPCOMGlue_SOURCES += \
- $(VBox-xpcom-string_1_TARGET)
+VBoxXPCOMGlue_SOURCES = $(VBoxXPCOMGlue_COMMON_SOURCES)
#VBoxXPCOMGlue_INST = lib/ $(INST_SDK)lib/
+$(evalcall VBOX_XPCOM_X86,VBoxXPCOMGlue)
#
@@ -1001,7 +981,7 @@ VBoxXPCOM_LIBS = \
VBoxXPCOM_LIBS.linux = \
pthread dl
-ifeq ($(filter-out freebsd l4 linux netbsd openbsd,$(KBUILD_TARGET)),) # gnu ld.
+ifeq ($(filter-out freebsd linux netbsd openbsd,$(KBUILD_TARGET)),) # gnu ld.
VBoxXPCOM_LDFLAGS = -Wl,--whole-archive \
$(VBox-xpcom-typelib_1_TARGET) \
$(VBox-xpcom-string_1_TARGET) \
@@ -1033,13 +1013,67 @@ VBoxXPCOM_LDFLAGS.solaris += -Wl,-z,allextract \
$(VBoxXPCOMGlue_s_1_TARGET) \
-Wl,-z,defaultextract
-#VBoxXPCOM_LIBS.l4 = $(L4_LIBDIR)/libxpcomstubs.a $(L4_LIBDIR)/../libuc_c++.a \
-# $(VBOX_PATH_L4_GCC3_INSTALL)/libsupc++.a $(VBOX_PATH_L4_GCC3_INSTALL)/libgcc_eh.a
# EF heap
#VBoxXPCOM_LIBS += $(LIB_RUNTIME_EF)
#VBoxXPCOM_LDFLAGS = -Wl,--whole-archive $(VBoxXPCOM_LIBS) -Wl,--no-whole-archive $(LIB_RUNTIME)
VBoxXPCOM_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxXPCOM.dylib
+#
+# The 32-bit VBoxXPCOM Shared Object, assembling all lib files.
+#
+VBoxXPCOM-x86_TEMPLATE = XPCOM-x86
+VBoxXPCOM-x86_EXTENDS = VBoxXPCOM
+VBoxXPCOM-x86_NAME = VBoxXPCOM-x86
+VBoxXPCOM-x86_LIBS = \
+ $(VBox-xpcom-typelib-x86_1_TARGET) \
+ $(VBox-xpcom-string-x86_1_TARGET) \
+ $(VBox-xpcom-base-x86_1_TARGET) \
+ $(VBox-xpcom-ds-x86_1_TARGET) \
+ $(VBox-xpcom-io-x86_1_TARGET) \
+ $(VBox-xpcom-components-x86_1_TARGET) \
+ $(VBox-xpcom-threads-x86_1_TARGET) \
+ $(VBox-xpcom-xptinfo-x86_1_TARGET) \
+ $(VBox-xpcom-xptcall-x86_1_TARGET) \
+ $(VBox-xpcom-proxy-x86_1_TARGET) \
+ $(VBox-xpcom-nspr-x86_1_TARGET) \
+ $(VBoxXPCOMGlue_s-x86_1_TARGET)
+
+ifeq ($(filter-out freebsd linux netbsd openbsd,$(KBUILD_TARGET)),) # gnu ld.
+VBoxXPCOM-x86_LDFLAGS = -Wl,--whole-archive \
+ $(VBox-xpcom-typelib-x86_1_TARGET) \
+ $(VBox-xpcom-string-x86_1_TARGET) \
+ $(VBox-xpcom-base-x86_1_TARGET) \
+ $(VBox-xpcom-ds-x86_1_TARGET) \
+ $(VBox-xpcom-io-x86_1_TARGET) \
+ $(VBox-xpcom-components-x86_1_TARGET) \
+ $(VBox-xpcom-threads-x86_1_TARGET) \
+ $(VBox-xpcom-xptinfo-x86_1_TARGET) \
+ $(VBox-xpcom-xptcall-x86_1_TARGET) \
+ $(VBox-xpcom-proxy-x86_1_TARGET) \
+ $(VBox-xpcom-nspr-x86_1_TARGET) \
+ $(VBoxXPCOMGlue_s-x86_1_TARGET) \
+ -Wl,--no-whole-archive
+endif
+
+VBoxXPCOM-x86_LDFLAGS.solaris += -Wl,-z,allextract \
+ $(VBox-xpcom-typelib-x86_1_TARGET) \
+ $(VBox-xpcom-string-x86_1_TARGET) \
+ $(VBox-xpcom-base-x86_1_TARGET) \
+ $(VBox-xpcom-ds-x86_1_TARGET) \
+ $(VBox-xpcom-io-x86_1_TARGET) \
+ $(VBox-xpcom-components-x86_1_TARGET) \
+ $(VBox-xpcom-threads-x86_1_TARGET) \
+ $(VBox-xpcom-xptinfo-x86_1_TARGET) \
+ $(VBox-xpcom-xptcall-x86_1_TARGET) \
+ $(VBox-xpcom-proxy-x86_1_TARGET) \
+ $(VBox-xpcom-nspr-x86_1_TARGET) \
+ $(VBoxXPCOMGlue_s-x86_1_TARGET) \
+ -Wl,-z,defaultextract
+
+
+#
+# IPC templates.
+#
ifdef VBOX_IPC_RELEASE_LOG
IPC_LOGGING = 1
else ifneq ($(KBUILD_TYPE),release)
@@ -1054,8 +1088,24 @@ TEMPLATE_XPCOMIPC_DEFS = \
ifdef IPC_LOGGING
TEMPLATE_XPCOMIPC_DEFS += IPC_LOGGING
endif
-
TEMPLATE_XPCOMIPC_LIBS = $(VBoxXPCOM_1_TARGET) $(TEMPLATE_XPCOM_LIBS)
+ifneq ($(KBUILD_TARGET),win)
+ ifeq ($(filter-out solaris.x86 %.amd64 %.sparc32 %.sparc64,$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)),) ## TODO: cleanup!
+ if defined(VBOX_WITH_RELATIVE_RUNPATH) && !defined(VBOX_WITH_HARDENING)
+ TEMPLATE_XPCOMIPC_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%',$(TEMPLATE_XPCOM_LDFLAGS)) '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..'
+ endif
+ else ifndef VBOX_WITH_HARDENING
+ ifdef VBOX_WITH_RELATIVE_RUNPATH
+ TEMPLATE_XPCOMIPC_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%',$(TEMPLATE_XPCOM_LDFLAGS)) '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)/..'
+ endif
+ endif
+endif
+
+TEMPLATE_XPCOMIPC-x86 = 32-bit XPCOM IPC libraries
+TEMPLATE_XPCOMIPC-x86_EXTENDS = XPCOMIPC
+TEMPLATE_XPCOMIPC-x86_BLD_TRG_ARCH = x86
+TEMPLATE_XPCOMIPC-x86_LIBS = $(VBoxXPCOM-x86_1_TARGET) $(TEMPLATE_XPCOM-x86_LIBS)
+
TEMPLATE_XPCOMIPCEXE = XPCOM IPC executables
TEMPLATE_XPCOMIPCEXE_EXTENDS = XPCOMEXE
@@ -1064,12 +1114,9 @@ ifdef IPC_LOGGING
TEMPLATE_XPCOMIPCEXE_DEFS += IPC_LOGGING
endif
-VBox-xpcom-ipcutils_TEMPLATE = XPCOMIPC
-VBox-xpcom-ipcutils_INSTTYPE = none
-VBox-xpcom-ipcutils_SOURCES = \
- ipc/ipcd/util/src/ipcMessageReader.cpp \
- ipc/ipcd/util/src/ipcMessageWriter.cpp
-
+#
+# Shared IPC code. Used by the IPC component as well as the executables.
+#
VBox-xpcom-ipcshared_TEMPLATE = XPCOMIPC
VBox-xpcom-ipcshared_INSTTYPE = none
VBox-xpcom-ipcshared_SOURCES = \
@@ -1080,23 +1127,7 @@ VBox-xpcom-ipcshared_SOURCES = \
ipc/ipcd/shared/src/ipcStringList.cpp \
ipc/ipcd/shared/src/ipcIDList.cpp \
ipc/ipcd/shared/src/ipcm.cpp
-
-VBox-xpcom-ipcdlock_TEMPLATE = XPCOMIPC
-VBox-xpcom-ipcdlock_INSTTYPE = none
-VBox-xpcom-ipcdlock_SOURCES = \
- ipc/ipcd/extensions/lock/src/ipcLockProtocol.cpp \
- ipc/ipcd/extensions/lock/src/ipcLockService.cpp
-
-VBox-xpcom-ipctransmgr_TEMPLATE = XPCOMIPC
-VBox-xpcom-ipctransmgr_INSTTYPE = none
-VBox-xpcom-ipctransmgr_SOURCES = \
- ipc/ipcd/extensions/transmngr/src/tmTransactionService.cpp
-
-VBox-xpcom-ipctmgrcom_TEMPLATE = XPCOMIPC
-VBox-xpcom-ipctmgrcom_INSTTYPE = none
-VBox-xpcom-ipctmgrcom_SOURCES = \
- ipc/ipcd/extensions/transmngr/common/tmTransaction.cpp \
- ipc/ipcd/extensions/transmngr/common/tmVector.cpp
+$(evalcall VBOX_XPCOM_X86,VBox-xpcom-ipcshared)
#
@@ -1110,7 +1141,19 @@ VBoxXPCOMIPCC_SOURCES = \
ipc/ipcd/client/src/ipcdclient.cpp \
ipc/ipcd/client/src/ipcService.cpp \
ipc/ipcd/client/src/ipcModuleFactory.cpp \
- ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp
+ ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp\
+ \
+ ipc/ipcd/util/src/ipcMessageReader.cpp \
+ ipc/ipcd/util/src/ipcMessageWriter.cpp \
+ \
+ ipc/ipcd/extensions/lock/src/ipcLockProtocol.cpp \
+ ipc/ipcd/extensions/lock/src/ipcLockService.cpp \
+ \
+ ipc/ipcd/extensions/transmngr/src/tmTransactionService.cpp \
+ \
+ ipc/ipcd/extensions/transmngr/common/tmTransaction.cpp \
+ ipc/ipcd/extensions/transmngr/common/tmVector.cpp
+
ifeq ($(KBUILD_TARGET),win)
VBoxXPCOMIPCC_SOURCES += \
ipc/ipcd/client/src/ipcConnectionWin.cpp
@@ -1120,13 +1163,12 @@ VBoxXPCOMIPCC_SOURCES += \
endif
VBoxXPCOMIPCC_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/components/VBoxXPCOMIPCC.dylib
VBoxXPCOMIPCC_LIBS = \
- $(VBox-xpcom-ipcutils_1_TARGET) \
- $(VBox-xpcom-ipcshared_1_TARGET) \
- $(VBox-xpcom-ipcdlock_1_TARGET) \
- $(VBox-xpcom-ipctransmgr_1_TARGET) \
- $(VBox-xpcom-ipctmgrcom_1_TARGET)
-# EF
-#VBoxXPCOMIPCC_LIBS += $(LIB_RUNTIME)
+ $(VBox-xpcom-ipcshared_1_TARGET)
+
+# 32-bit version of the component.
+$(evalcall VBOX_XPCOM_X86,VBoxXPCOMIPCC)
+VBoxXPCOMIPCC-x86_LIBS = \
+ $(VBox-xpcom-ipcshared-x86_1_TARGET)
#
@@ -1393,4 +1435,11 @@ $(PATH_TARGET)/xpcom-namespace-cleanup.map foo.map: $$(VBoxXPCOM_LIBS) $$(VBoxXP
-e 's/\<_init$$/&;/p' \
--append $@
$(QUIET)$(APPEND) $@ '};'
+ifeq ($(KBUILD_TARGET),solaris)
+ # Temporary gcc 4.5.2 hack on Solaris which emits unknown mangled symbols for ctors/dtors for certain objects. See @bugref{5838}.
+ if $(VBOX_GCC_VERSION_CXX) == 40502
+ $(QUIET)$(SED) -re '/^_Z.*[C-D]5E/d' $@ > $@-sedtmp
+ $(QUIET)$(MV) $@-sedtmp $@
+ endif
+endif
diff --git a/src/libs/xpcom18a4/ipc/ipcd/client/Makefile.kup b/src/libs/xpcom18a4/ipc/ipcd/client/Makefile.kup
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/libs/xpcom18a4/ipc/ipcd/client/Makefile.kup
diff --git a/src/libs/xpcom18a4/ipc/ipcd/client/src/Makefile.kup b/src/libs/xpcom18a4/ipc/ipcd/client/src/Makefile.kup
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/src/libs/xpcom18a4/ipc/ipcd/client/src/Makefile.kup
diff --git a/src/libs/xpcom18a4/ipc/ipcd/client/src/ipcdclient.cpp b/src/libs/xpcom18a4/ipc/ipcd/client/src/ipcdclient.cpp
index 3477949a..9212273b 100644
--- a/src/libs/xpcom18a4/ipc/ipcd/client/src/ipcdclient.cpp
+++ b/src/libs/xpcom18a4/ipc/ipcd/client/src/ipcdclient.cpp
@@ -58,6 +58,11 @@
#include "prproces.h"
#include "pratom.h"
+#ifdef VBOX
+# include <iprt/critsect.h>
+# define VBOX_WITH_IPCCLIENT_RW_CS
+#endif
+
/* ------------------------------------------------------------------------- */
#define IPC_REQUEST_TIMEOUT PR_SecondsToInterval(30)
@@ -146,10 +151,15 @@ public:
~ipcClientState()
{
+#ifndef VBOX_WITH_IPCCLIENT_RW_CS
if (monitor)
nsAutoMonitor::DestroyMonitor(monitor);
+#else
+ RTCritSectRwDelete(&critSect);
+#endif
}
+#ifndef VBOX_WITH_IPCCLIENT_RW_CS
//
// the monitor protects the targetMap and the connected and shutdown flags.
//
@@ -159,6 +169,9 @@ public:
// wrapper for PRLock.
//
PRMonitor *monitor;
+#else /* VBOX_WITH_IPCCLIENT_RW_CS */
+ RTCRITSECTRW critSect;
+#endif /* VBOX_WITH_IPCCLIENT_RW_CS */
ipcTargetMap targetMap;
PRBool connected;
PRBool shutdown;
@@ -171,11 +184,20 @@ public:
private:
ipcClientState()
+#ifndef VBOX_WITH_IPCCLIENT_RW_CS
: monitor(nsAutoMonitor::NewMonitor("ipcClientState"))
, connected(PR_FALSE)
+#else
+ : connected(PR_FALSE)
+#endif
, shutdown(PR_FALSE)
, selfID(0)
- {}
+ {
+#ifdef VBOX_WITH_IPCCLIENT_RW_CS
+ /* Not employing the lock validator here to keep performance up in debug builds. */
+ RTCritSectRwInitEx(&critSect, RTCRITSECT_FLAGS_NO_LOCK_VAL, NIL_RTLOCKVALCLASS, RTLOCKVAL_SUB_CLASS_NONE, NULL);
+#endif
+ }
};
ipcClientState *
@@ -185,7 +207,11 @@ ipcClientState::Create()
if (!cs)
return NULL;
+#ifndef VBOX_WITH_IPCCLIENT_RW_CS
if (!cs->monitor || !cs->targetMap.Init())
+#else
+ if (!RTCritSectRwIsInitialized(&cs->critSect) || !cs->targetMap.Init())
+#endif
{
delete cs;
return NULL;
@@ -201,22 +227,42 @@ static ipcClientState *gClientState;
static PRBool
GetTarget(const nsID &aTarget, ipcTargetData **td)
{
+#ifndef VBOX_WITH_IPCCLIENT_RW_CS
nsAutoMonitor mon(gClientState->monitor);
return gClientState->targetMap.Get(nsIDHashKey(&aTarget).GetKey(), td);
+#else
+ RTCritSectRwEnterShared(&gClientState->critSect);
+ PRBool fRc = gClientState->targetMap.Get(nsIDHashKey(&aTarget).GetKey(), td);
+ RTCritSectRwLeaveShared(&gClientState->critSect);
+ return fRc;
+#endif
}
static PRBool
PutTarget(const nsID &aTarget, ipcTargetData *td)
{
+#ifndef VBOX_WITH_IPCCLIENT_RW_CS
nsAutoMonitor mon(gClientState->monitor);
return gClientState->targetMap.Put(nsIDHashKey(&aTarget).GetKey(), td);
+#else
+ RTCritSectRwEnterExcl(&gClientState->critSect);
+ PRBool fRc = gClientState->targetMap.Put(nsIDHashKey(&aTarget).GetKey(), td);
+ RTCritSectRwLeaveExcl(&gClientState->critSect);
+ return fRc;
+#endif
}
static void
DelTarget(const nsID &aTarget)
{
+#ifndef VBOX_WITH_IPCCLIENT_RW_CS
nsAutoMonitor mon(gClientState->monitor);
gClientState->targetMap.Remove(nsIDHashKey(&aTarget).GetKey());
+#else
+ RTCritSectRwEnterExcl(&gClientState->critSect);
+ gClientState->targetMap.Remove(nsIDHashKey(&aTarget).GetKey());
+ RTCritSectRwLeaveExcl(&gClientState->critSect);
+#endif
}
/* ------------------------------------------------------------------------- */
@@ -804,9 +850,18 @@ IPC_Shutdown()
// first, set the shutdown flag and unblock any calls to WaitTarget.
// all targets but IPCM will not be able to use WaitTarget any more.
+#ifndef VBOX_WITH_IPCCLIENT_RW_CS
nsAutoMonitor mon(gClientState->monitor);
+#else
+ RTCritSectRwEnterExcl(&gClientState->critSect);
+#endif
+
gClientState->shutdown = PR_TRUE;
gClientState->targetMap.EnumerateRead(EnumerateTargetMapAndNotify, nsnull);
+
+#ifdef VBOX_WITH_IPCCLIENT_RW_CS
+ RTCritSectRwLeaveExcl(&gClientState->critSect);
+#endif
}
// inform all client observers that we're being shutdown to let interested
@@ -1289,9 +1344,18 @@ IPC_OnConnectionEnd(nsresult error)
// now, go through the target map, and tickle each monitor. that should
// unblock any calls to WaitTarget.
+#ifndef VBOX_WITH_IPCCLIENT_RW_CS
nsAutoMonitor mon(gClientState->monitor);
+#else
+ RTCritSectRwEnterExcl(&gClientState->critSect);
+#endif
+
gClientState->connected = PR_FALSE;
gClientState->targetMap.EnumerateRead(EnumerateTargetMapAndNotify, nsnull);
+
+#ifdef VBOX_WITH_IPCCLIENT_RW_CS
+ RTCritSectRwLeaveExcl(&gClientState->critSect);
+#endif
}
/* ------------------------------------------------------------------------- */
@@ -1309,6 +1373,7 @@ PlaceOnPendingQ(const nsID &target, ipcTargetData *td, ipcMessage *msg)
td->pendingQ.Append(msg);
#ifdef IPC_LOGGING
+ if (IPC_LOG_ENABLED())
{
char *targetStr = target.ToString();
LOG(("placed message on pending queue for target %s and notifying all...\n", targetStr));
@@ -1391,9 +1456,17 @@ IPC_OnMessageAvailable(ipcMessage *msg)
// pending event queue. that unblocks all WaitTarget calls (on all
// targets) giving them an opportuninty to finish wait cycle because of
// the peer client death, when appropriate.
+#ifndef VBOX_WITH_IPCCLIENT_RW_CS
nsAutoMonitor mon(gClientState->monitor);
+#else
+ RTCritSectRwEnterShared(&gClientState->critSect);
+#endif
+
gClientState->targetMap.EnumerateRead(EnumerateTargetMapAndPlaceMsg, msg);
+#ifdef VBOX_WITH_IPCCLIENT_RW_CS
+ RTCritSectRwLeaveShared(&gClientState->critSect);
+#endif
delete msg;
return;
diff --git a/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp b/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp
index e9a40271..b20fdd8e 100644
--- a/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp
+++ b/src/libs/xpcom18a4/ipc/ipcd/extensions/dconnect/src/ipcDConnectService.cpp
@@ -1580,7 +1580,7 @@ DConnectStub::AddRefIPC()
// DConnectInstance::CreateStub
nsrefcnt count = AddRef();
- mRefCntLevels.Push((void *) count);
+ mRefCntLevels.Push((void *)(uintptr_t) count);
return count;
}
@@ -1981,7 +1981,13 @@ ipcDConnectService::SerializeException(ipcMessageWriter &writer,
if (!xcpt)
{
// write null address
+#ifdef VBOX
+ // see ipcDConnectService::DeserializeException()!
+ PtrBits bits = 0;
+ writer.PutBytes(&bits, sizeof(bits));
+#else
writer.PutBytes(&xcpt, sizeof(xcpt));
+#endif
}
else
{
@@ -2232,10 +2238,13 @@ ipcDConnectService::DeserializeException(ipcMessageReader &reader,
DConnectStub::~DConnectStub()
{
#ifdef IPC_LOGGING
- const char *name = NULL;
- mIInfo->GetNameShared(&name);
- LOG(("{%p} DConnectStub::<dtor>(): peer=%d instance=0x%Lx {%s}\n",
- this, mPeerID, mInstance, name));
+ if (IPC_LOG_ENABLED())
+ {
+ const char *name = NULL;
+ mIInfo->GetNameShared(&name);
+ LOG(("{%p} DConnectStub::<dtor>(): peer=%d instance=0x%Lx {%s}\n",
+ this, mPeerID, mInstance, name));
+ }
#endif
// release the cached nsISupports instance if it's not the same object
@@ -2273,10 +2282,13 @@ DConnectStub::Release()
#ifdef IPC_LOGGING
- const char *name;
- mIInfo->GetNameShared(&name);
- LOG(("{%p} DConnectStub::Release(): peer=%d instance=0x%Lx {%s}, new count=%d\n",
- this, mPeerID, mInstance, name, count));
+ if (IPC_LOG_ENABLED())
+ {
+ const char *name;
+ mIInfo->GetNameShared(&name);
+ LOG(("{%p} DConnectStub::Release(): peer=%d instance=0x%Lx {%s}, new count=%d\n",
+ this, mPeerID, mInstance, name, count));
+ }
#endif
// mRefCntLevels may already be empty here (due to the "stabilize" trick below)
@@ -2431,6 +2443,7 @@ DConnectStub::QueryInterface(const nsID &aIID, void **aInstancePtr)
// else, we need to query the peer object by making an IPC call
#ifdef IPC_LOGGING
+ if (IPC_LOG_ENABLED())
{
const char *name;
mIInfo->GetNameShared(&name);
@@ -2517,13 +2530,16 @@ DConnectStub::CallMethod(PRUint16 aMethodIndex,
PRUint8 i, paramCount = aInfo->GetParamCount();
#ifdef IPC_LOGGING
- const char *name;
- nsCOMPtr<nsIInterfaceInfo> iinfo;
- GetInterfaceInfo(getter_AddRefs(iinfo));
- iinfo->GetNameShared(&name);
- LOG((" instance=0x%Lx {%s}\n", mInstance, name));
- LOG((" name=%s\n", aInfo->GetName()));
- LOG((" param-count=%u\n", (PRUint32) paramCount));
+ if (IPC_LOG_ENABLED())
+ {
+ const char *name;
+ nsCOMPtr<nsIInterfaceInfo> iinfo;
+ GetInterfaceInfo(getter_AddRefs(iinfo));
+ iinfo->GetNameShared(&name);
+ LOG((" instance=0x%Lx {%s}\n", mInstance, name));
+ LOG((" name=%s\n", aInfo->GetName()));
+ LOG((" param-count=%u\n", (PRUint32) paramCount));
+ }
#endif
@@ -3006,10 +3022,13 @@ EnumerateInstanceMapAndDelete (const DConnectInstanceKey::Key &aKey,
// disregarding the reference counter
#ifdef IPC_LOGGING
- const char *name;
- aData->InterfaceInfo()->GetNameShared(&name);
- LOG(("ipcDConnectService: WARNING: deleting unreleased "
- "instance=%p iface=%p {%s}\n", aData, aData->RealInstance(), name));
+ if (IPC_LOG_ENABLED())
+ {
+ const char *name;
+ aData->InterfaceInfo()->GetNameShared(&name);
+ LOG(("ipcDConnectService: WARNING: deleting unreleased "
+ "instance=%p iface=%p {%s}\n", aData, aData->RealInstance(), name));
+ }
#endif
delete aData;
@@ -3251,10 +3270,13 @@ nsresult
ipcDConnectService::StoreInstance(DConnectInstance *wrapper)
{
#ifdef IPC_LOGGING
- const char *name;
- wrapper->InterfaceInfo()->GetNameShared(&name);
- LOG(("ipcDConnectService::StoreInstance(): instance=%p iface=%p {%s}\n",
- wrapper, wrapper->RealInstance(), name));
+ if (IPC_LOG_ENABLED())
+ {
+ const char *name;
+ wrapper->InterfaceInfo()->GetNameShared(&name);
+ LOG(("ipcDConnectService::StoreInstance(): instance=%p iface=%p {%s}\n",
+ wrapper, wrapper->RealInstance(), name));
+ }
#endif
nsresult rv = mInstanceSet.Put(wrapper);
@@ -3276,10 +3298,13 @@ ipcDConnectService::DeleteInstance(DConnectInstance *wrapper,
PR_Lock(mLock);
#ifdef IPC_LOGGING
- const char *name;
- wrapper->InterfaceInfo()->GetNameShared(&name);
- LOG(("ipcDConnectService::DeleteInstance(): instance=%p iface=%p {%s}\n",
- wrapper, wrapper->RealInstance(), name));
+ if (IPC_LOG_ENABLED())
+ {
+ const char *name;
+ wrapper->InterfaceInfo()->GetNameShared(&name);
+ LOG(("ipcDConnectService::DeleteInstance(): instance=%p iface=%p {%s}\n",
+ wrapper, wrapper->RealInstance(), name));
+ }
#endif
mInstances.Remove(wrapper->GetKey());
@@ -3318,12 +3343,15 @@ nsresult
ipcDConnectService::StoreStub(DConnectStub *stub)
{
#ifdef IPC_LOGGING
- const char *name;
- nsCOMPtr<nsIInterfaceInfo> iinfo;
- stub->GetInterfaceInfo(getter_AddRefs(iinfo));
- iinfo->GetNameShared(&name);
- LOG(("ipcDConnectService::StoreStub(): stub=%p instance=0x%Lx {%s}\n",
- stub, stub->Instance(), name));
+ if (IPC_LOG_ENABLED())
+ {
+ const char *name;
+ nsCOMPtr<nsIInterfaceInfo> iinfo;
+ stub->GetInterfaceInfo(getter_AddRefs(iinfo));
+ iinfo->GetNameShared(&name);
+ LOG(("ipcDConnectService::StoreStub(): stub=%p instance=0x%Lx {%s}\n",
+ stub, stub->Instance(), name));
+ }
#endif
return mStubs.Put(stub->GetKey(), stub)
@@ -3334,12 +3362,15 @@ void
ipcDConnectService::DeleteStub(DConnectStub *stub)
{
#ifdef IPC_LOGGING
- const char *name;
- nsCOMPtr<nsIInterfaceInfo> iinfo;
- stub->GetInterfaceInfo(getter_AddRefs(iinfo));
- iinfo->GetNameShared(&name);
- LOG(("ipcDConnectService::DeleteStub(): stub=%p instance=0x%Lx {%s}\n",
- stub, stub->Instance(), name));
+ if (IPC_LOG_ENABLED())
+ {
+ const char *name;
+ nsCOMPtr<nsIInterfaceInfo> iinfo;
+ stub->GetInterfaceInfo(getter_AddRefs(iinfo));
+ iinfo->GetNameShared(&name);
+ LOG(("ipcDConnectService::DeleteStub(): stub=%p instance=0x%Lx {%s}\n",
+ stub, stub->Instance(), name));
+ }
#endif
// this method is intended to be called only from DConnectStub::Release().
diff --git a/src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcLog.cpp b/src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcLog.cpp
index 00035c8e..340b211c 100644
--- a/src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcLog.cpp
+++ b/src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcLog.cpp
@@ -48,10 +48,10 @@
#include "plstr.h"
#ifdef VBOX
-#if defined(__OS2__) && defined(PAGE_SIZE)
-#undef PAGE_SIZE
-#endif
-#include <iprt/initterm.h> // for RTR3InitDll
+# if defined(__OS2__) && defined(PAGE_SIZE)
+# undef PAGE_SIZE
+# endif
+# include <iprt/initterm.h> // for RTR3InitDll
#else // !VBOX
PRBool ipcLogEnabled = PR_FALSE;
#endif // !VBOX
@@ -65,21 +65,6 @@ char ipcLogPrefix[10] = {0};
//-----------------------------------------------------------------------------
#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
- #if defined(L4ENV)
-#include <l4/sys/types.h>
-#include <l4/sys/syscalls.h>
-
-static inline PRUint32
-WritePrefix(char *buf, PRUint32 bufLen)
-{
- l4_threadid_t my_id = l4_myself();
- return PR_snprintf(buf, bufLen, "[%u.%u] %s ",
- static_cast<unsigned>(my_id.id.task),
- static_cast<unsigned>(my_id.id.lthread),
- ipcLogPrefix);
-}
-
- #else /* Not L4ENV */
#include <sys/types.h>
#include <unistd.h>
@@ -91,7 +76,6 @@ WritePrefix(char *buf, PRUint32 bufLen)
PR_GetCurrentThread(),
ipcLogPrefix);
}
- #endif /* Not L4ENV */
#endif
//-----------------------------------------------------------------------------
@@ -121,7 +105,7 @@ IPC_InitLog(const char *prefix)
{
#ifdef VBOX
// initialize VBox Runtime
- RTR3InitDll(0);
+ RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);
PL_strncpyz(ipcLogPrefix, prefix, sizeof(ipcLogPrefix));
#else
diff --git a/src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcLog.h b/src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcLog.h
index 8d480190..e21f6211 100644
--- a/src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcLog.h
+++ b/src/libs/xpcom18a4/ipc/ipcd/shared/src/ipcLog.h
@@ -52,15 +52,15 @@
#ifdef VBOX
/* Redefine logging group to IPC */
-#ifdef LOG_GROUP
-#undef LOG_GROUP
-#endif
-#define LOG_GROUP LOG_GROUP_IPC
+# ifdef LOG_GROUP
+# undef LOG_GROUP
+# endif
+# define LOG_GROUP LOG_GROUP_IPC
/* Ensure log macros are enabled */
-#ifndef LOG_ENABLED
-#define LOG_ENABLED
-#endif
+# ifndef LOG_ENABLED
+# define LOG_ENABLED
+# endif
#include <VBox/log.h>
@@ -68,17 +68,18 @@ extern NS_HIDDEN_(void) IPC_InitLog(const char *prefix);
extern NS_HIDDEN_(void) IPC_Log(const char *fmt, ...);
extern NS_HIDDEN_(void) IPC_LogBinary(const PRUint8 *data, PRUint32 len);
-#define IPC_LOG(_args) \
- PR_BEGIN_MACRO \
- IPC_Log _args; \
+# define IPC_LOG(_args) \
+ PR_BEGIN_MACRO \
+ if (IPC_LOG_ENABLED()) \
+ IPC_Log _args; \
PR_END_MACRO
/* IPC_Log() internally uses LogFlow() so use LogIsFlowEnabled() below */
-#define IPC_LOG_ENABLED() (LogIsFlowEnabled())
+# define IPC_LOG_ENABLED() (LogIsFlowEnabled())
-#define LOG(args) IPC_LOG(args)
+# define LOG(args) IPC_LOG(args)
-#else // VBOX
+#else /* !VBOX */
extern PRBool ipcLogEnabled;
extern NS_HIDDEN_(void) IPC_InitLog(const char *prefix);
@@ -95,7 +96,7 @@ extern NS_HIDDEN_(void) IPC_LogBinary(const PRUint8 *data, PRUint32 len);
#define LOG(args) IPC_LOG(args)
-#endif // VBOX
+#endif /* !VBOX */
#else // IPC_LOGGING
diff --git a/src/libs/xpcom18a4/java/Makefile.kmk b/src/libs/xpcom18a4/java/Makefile.kmk
index 58dfd18a..51053b71 100644
--- a/src/libs/xpcom18a4/java/Makefile.kmk
+++ b/src/libs/xpcom18a4/java/Makefile.kmk
@@ -173,6 +173,7 @@ $(VBOX_JXPCOM_GEN)/jxpcomglue.list: \
$(call MSG_L1,Generating Java glue files from XIDL)
$(QUIET)$(RM) -f $(wildcard $(VBOX_JXPCOM_GEN)/java/glue/*.java)
$(QUIET)$(VBOX_XSLTPROC) \
+ --stringparam filelistonly "" \
--stringparam G_vboxApiSuffix $(VBOX_API_SUFFIX) \
--stringparam G_vboxGlueStyle xpcom \
--stringparam G_vboxDirPrefix "" \
diff --git a/src/libs/xpcom18a4/java/src/nsJavaInterfaces.cpp b/src/libs/xpcom18a4/java/src/nsJavaInterfaces.cpp
index 4b3fa5e0..5649c828 100644
--- a/src/libs/xpcom18a4/java/src/nsJavaInterfaces.cpp
+++ b/src/libs/xpcom18a4/java/src/nsJavaInterfaces.cpp
@@ -146,7 +146,7 @@ nsresult
InitXPCOMVBox_Impl(JNIEnv* env, jobject aVBoxBinDirectory)
{
#if defined(VBOX_PATH_APP_PRIVATE_ARCH) && defined(VBOX_PATH_SHARED_LIBS)
- rv = RTR3InitDll(0);
+ rv = RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);
#else
const char *pszHome = nsnull;
const char *jhome = nsnull;
@@ -174,9 +174,9 @@ InitXPCOMVBox_Impl(JNIEnv* env, jobject aVBoxBinDirectory)
char *pszExePath = (char *)alloca(cchHome + 32);
memcpy(pszExePath, pszHome, cchHome);
memcpy(pszExePath + cchHome, "/javafake", sizeof("/javafake"));
- rv = RTR3InitEx(RTR3INIT_VER_CUR, RTR3INIT_FLAGS_DLL, 0, NULL, pszExePath);
+ rv = RTR3InitEx(RTR3INIT_VER_CUR, RTR3INIT_FLAGS_DLL | RTR3INIT_FLAGS_UNOBTRUSIVE, 0, NULL, pszExePath);
} else {
- rv = RTR3InitDll(0);
+ rv = RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);
}
if (jhome)
@@ -354,13 +354,13 @@ XPCOM_NATIVE(getComponentRegistrar) (JNIEnv *env, jobject)
}
#ifdef VBOX
-# include <VBox/com/EventQueue.h>
+# include <VBox/com/NativeEventQueue.h>
# include <iprt/err.h>
extern "C" NS_EXPORT jint JNICALL
XPCOM_NATIVE2(waitForEvents) (JNIEnv *env, jobject, jlong aTimeout)
{
- com::EventQueue* aEventQ = com::EventQueue::getMainEventQueue();
+ com::NativeEventQueue* aEventQ = com::NativeEventQueue::getMainEventQueue();
NS_WARN_IF_FALSE(aEventQ != nsnull, "Null main event queue");
if (!aEventQ)
return -1;
@@ -379,7 +379,11 @@ XPCOM_NATIVE2(waitForEvents) (JNIEnv *env, jobject, jlong aTimeout)
#endif
extern "C" NS_EXPORT jobject JNICALL
+#ifdef VBOX
+XPCOM_NATIVE2(getServiceManager) (JNIEnv *env, jobject)
+#else
XPCOM_NATIVE(getServiceManager) (JNIEnv *env, jobject)
+#endif
{
// Call XPCOM method
nsCOMPtr<nsIServiceManager> sm;
diff --git a/src/libs/xpcom18a4/java/src/nsJavaWrapper.cpp b/src/libs/xpcom18a4/java/src/nsJavaWrapper.cpp
index 35b59b6d..19436f14 100644
--- a/src/libs/xpcom18a4/java/src/nsJavaWrapper.cpp
+++ b/src/libs/xpcom18a4/java/src/nsJavaWrapper.cpp
@@ -1006,7 +1006,7 @@ FinalizeParams(JNIEnv *env, const nsXPTParamInfo &aParamInfo, PRUint8 aType,
aVariant.val.u8;
if (aParamInfo.IsRetval() && !aIsArrayElement) {
*aParam = env->NewObject(shortClass, shortInitMID, value);
- } else if ((aParamInfo.IsOut() || aIsArrayElement) && aParam) {
+ } else if ((aParamInfo.IsOut() || aIsArrayElement) && *aParam) {
env->SetShortArrayRegion((jshortArray) *aParam, aIndex, 1, &value);
}
}
@@ -1495,7 +1495,7 @@ static void makeErrorMessage(nsresult r, char* msg, size_t msgSize)
if (NS_SUCCEEDED (rc))
{
nsCOMPtr <nsIException> ex;
- rc = em->GetExceptionFromProvider(r, NULL, getter_AddRefs (ex));
+ rc = em->GetCurrentException(getter_AddRefs (ex));
if (NS_SUCCEEDED (rc) && ex)
{
nsXPIDLCString emsg;
@@ -1753,8 +1753,9 @@ JAVAPROXY_NATIVE(callXPCOMMethod) (JNIEnv *env, jclass that, jobject aJavaProxy,
}
jobject* javaElement;
+ jobject element = nsnull;
if (!paramInfo.IsRetval()) {
- jobject element = env->GetObjectArrayElement(aParams, i);
+ element = env->GetObjectArrayElement(aParams, i);
javaElement = &element;
} else {
javaElement = &result;
diff --git a/src/libs/xpcom18a4/java/src/nsThreadUtils.h b/src/libs/xpcom18a4/java/src/nsThreadUtils.h
index 9c6a0efd..53f3dbdb 100644
--- a/src/libs/xpcom18a4/java/src/nsThreadUtils.h
+++ b/src/libs/xpcom18a4/java/src/nsThreadUtils.h
@@ -50,11 +50,11 @@ do_GetMainThread() {
return already_AddRefed<nsIThread>(thread);
}
-#include "VBox/com/EventQueue.h"
+#include "VBox/com/NativeEventQueue.h"
inline already_AddRefed<nsIEventQueue> do_GetMainThreadQueue()
{
- com::EventQueue* eq = com::EventQueue::getMainEventQueue();
+ com::NativeEventQueue* eq = com::NativeEventQueue::getMainEventQueue();
NS_ASSERTION(eq != nsnull, "Must be valid");
return eq->getIEventQueue();
}
diff --git a/src/libs/xpcom18a4/java/src/org/mozilla/xpcom/XPCOMException.java b/src/libs/xpcom18a4/java/src/org/mozilla/xpcom/XPCOMException.java
index 44636d54..9eca58f6 100644
--- a/src/libs/xpcom18a4/java/src/org/mozilla/xpcom/XPCOMException.java
+++ b/src/libs/xpcom18a4/java/src/org/mozilla/xpcom/XPCOMException.java
@@ -87,7 +87,7 @@ public class XPCOMException extends RuntimeException {
* @param message detailed message of exception
*/
public XPCOMException(long code, String message) {
- super(message + " (0x" + Long.toHexString(code) + ")");
+ super(message + " (0x" + Long.toHexString(code) + ")");
this.errorcode = code;
}
diff --git a/src/libs/xpcom18a4/java/tools/genjifaces.xsl b/src/libs/xpcom18a4/java/tools/genjifaces.xsl
index 9dc7901b..3910de73 100644
--- a/src/libs/xpcom18a4/java/tools/genjifaces.xsl
+++ b/src/libs/xpcom18a4/java/tools/genjifaces.xsl
@@ -7,9 +7,9 @@
<!--
genjifaces.xsl:
- XSLT stylesheet that generates Java XPCOM bridge intreface code from VirtualBox.xidl.
+ XSLT stylesheet that generates Java XPCOM bridge interface code from VirtualBox.xidl.
- Copyright (C) 2010 Oracle Corporation
+ Copyright (C) 2010-2013 Oracle Corporation
This file is part of VirtualBox Open Source Edition (OSE), as
available from http://www.virtualbox.org. This file is free software;
@@ -67,7 +67,7 @@
<xsl:template name="fileheader">
<xsl:param name="name" />
<xsl:text>/**
- * Copyright (C) 2010 Oracle Corporation
+ * Copyright (C) 2010-2013 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
@@ -119,16 +119,14 @@ public interface nsISupports
"{00000000-0000-0000-c000-000000000046}";
public nsISupports queryInterface(String arg1);
-
}
-
]]></xsl:text>
<xsl:call-template name="endFile">
<xsl:with-param name="file" select="'nsISupports.java'" />
</xsl:call-template>
-<xsl:call-template name="startFile">
+ <xsl:call-template name="startFile">
<xsl:with-param name="file" select="'nsIComponentManager.java'" />
</xsl:call-template>
@@ -146,14 +144,13 @@ public interface nsIComponentManager extends nsISupports
public nsISupports createInstanceByContractID(String arg1, nsISupports arg2, String arg3);
}
-
]]></xsl:text>
<xsl:call-template name="endFile">
<xsl:with-param name="file" select="'nsIComponentManager.java'" />
</xsl:call-template>
-<xsl:call-template name="startFile">
+ <xsl:call-template name="startFile">
<xsl:with-param name="file" select="'nsIServiceManager.java'" />
</xsl:call-template>
@@ -171,14 +168,67 @@ public interface nsIServiceManager extends nsISupports
public boolean isServiceInstantiatedByContractID(String arg1, String arg2);
}
-
]]></xsl:text>
<xsl:call-template name="endFile">
<xsl:with-param name="file" select="'nsIServiceManager.java'" />
</xsl:call-template>
-<xsl:call-template name="startFile">
+ <xsl:call-template name="startFile">
+ <xsl:with-param name="file" select="'nsIExceptionManager.java'" />
+ </xsl:call-template>
+
+ <xsl:text><![CDATA[
+public interface nsIExceptionManager extends nsISupports
+{
+ public static final String NS_IEXCEPTIONMANAGER_IID =
+ "{efc9d00b-231c-4feb-852c-ac017266a415}";
+
+ public nsIException getCurrentException();
+}
+]]></xsl:text>
+
+ <xsl:call-template name="endFile">
+ <xsl:with-param name="file" select="'nsISupports.java'" />
+ </xsl:call-template>
+
+ <xsl:call-template name="startFile">
+ <xsl:with-param name="file" select="'nsIExceptionService.java'" />
+ </xsl:call-template>
+
+ <xsl:text><![CDATA[
+public interface nsIExceptionService extends nsIExceptionManager
+{
+ public static final String NS_IEXCEPTIONSERVICE_IID =
+ "{35a88f54-f267-4414-92a7-191f6454ab52}";
+
+ public nsIExceptionManager getCurrentExceptionManager();
+}
+]]></xsl:text>
+
+ <xsl:call-template name="endFile">
+ <xsl:with-param name="file" select="'nsISupports.java'" />
+ </xsl:call-template>
+
+ <xsl:call-template name="startFile">
+ <xsl:with-param name="file" select="'nsIException.java'" />
+ </xsl:call-template>
+
+ <xsl:text><![CDATA[
+public interface nsIException extends nsISupports
+{
+ public static final String NS_IEXCEPTION_IID =
+ "{f3a8d3b4-c424-4edc-8bf6-8974c983ba78}";
+
+ // No methods - placeholder
+}
+]]></xsl:text>
+
+ <xsl:call-template name="endFile">
+ <xsl:with-param name="file" select="'nsISupports.java'" />
+ </xsl:call-template>
+
+ <xsl:call-template name="startFile">
<xsl:with-param name="file" select="'nsIComponentRegistrar.java'" />
</xsl:call-template>
@@ -190,7 +240,6 @@ public interface nsIComponentRegistrar extends nsISupports
// No methods - placeholder
}
-
]]></xsl:text>
<xsl:call-template name="endFile">
@@ -198,7 +247,7 @@ public interface nsIComponentRegistrar extends nsISupports
</xsl:call-template>
-<xsl:call-template name="startFile">
+ <xsl:call-template name="startFile">
<xsl:with-param name="file" select="'nsIFile.java'" />
</xsl:call-template>
@@ -210,14 +259,13 @@ public interface nsIFile extends nsISupports
// No methods - placeholder
}
-
]]></xsl:text>
<xsl:call-template name="endFile">
<xsl:with-param name="file" select="'nsIFile.java'" />
</xsl:call-template>
-<xsl:call-template name="startFile">
+ <xsl:call-template name="startFile">
<xsl:with-param name="file" select="'nsILocalFile.java'" />
</xsl:call-template>
@@ -229,7 +277,6 @@ public interface nsILocalFile extends nsIFile
// No methods - placeholder
}
-
]]></xsl:text>
<xsl:call-template name="endFile">
diff --git a/src/libs/xpcom18a4/nsprpub/pr/include/md/_iprt_atomic.h b/src/libs/xpcom18a4/nsprpub/pr/include/md/_iprt_atomic.h
index 94960497..fd5ce610 100644
--- a/src/libs/xpcom18a4/nsprpub/pr/include/md/_iprt_atomic.h
+++ b/src/libs/xpcom18a4/nsprpub/pr/include/md/_iprt_atomic.h
@@ -4,7 +4,7 @@
*/
/*
- * Copyright (C) 2009 Oracle Corporation
+ * Copyright (C) 2009-2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
diff --git a/src/libs/xpcom18a4/nsprpub/pr/include/md/_l4v2.cfg b/src/libs/xpcom18a4/nsprpub/pr/include/md/_l4v2.cfg
deleted file mode 100644
index 2557161d..00000000
--- a/src/libs/xpcom18a4/nsprpub/pr/include/md/_l4v2.cfg
+++ /dev/null
@@ -1,661 +0,0 @@
-/* -*- 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):
- *
- * 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 ***** */
-
-#ifndef nspr_cpucfg___
-#define nspr_cpucfg___
-
-#ifndef XP_UNIX
-#define XP_UNIX
-#endif
-
-#ifndef L4ENV
-#define L4ENV
-#endif
-
-#define PR_AF_INET6 10 /* same as AF_INET6 */
-
-#ifdef __powerpc__
-
-#undef IS_LITTLE_ENDIAN
-#define IS_BIG_ENDIAN 1
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__alpha)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-#define PR_ALIGN_OF_WORD 8
-
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__ia64__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-#define PR_ALIGN_OF_WORD 8
-
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__x86_64__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-#define PR_ALIGN_OF_WORD 8
-
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__mc68000__)
-
-#undef IS_LITTLE_ENDIAN
-#define IS_BIG_ENDIAN 1
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 2
-#define PR_ALIGN_OF_LONG 2
-#define PR_ALIGN_OF_INT64 2
-#define PR_ALIGN_OF_FLOAT 2
-#define PR_ALIGN_OF_DOUBLE 2
-#define PR_ALIGN_OF_POINTER 2
-#define PR_ALIGN_OF_WORD 2
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__sparc__)
-
-#undef IS_LITTLE_ENDIAN
-#define IS_BIG_ENDIAN 1
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__i386__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 4
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 4
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__mips__)
-
-#ifdef __MIPSEB__
-#define IS_BIG_ENDIAN 1
-#undef IS_LITTLE_ENDIAN
-#elif defined(__MIPSEL__)
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-#else
-#error "Unknown MIPS endianness."
-#endif
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__arm__)
-
-#define IS_LITTLE_ENDIAN 1
-#undef IS_BIG_ENDIAN
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 4
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 4
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__hppa__)
-
-#undef IS_LITTLE_ENDIAN
-#define IS_BIG_ENDIAN 1
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__s390__)
-
-#define IS_BIG_ENDIAN 1
-#undef IS_LITTLE_ENDIAN
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 4
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 4
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 32
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 32
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 5
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 5
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 4
-#define PR_ALIGN_OF_INT64 4
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 4
-#define PR_ALIGN_OF_POINTER 4
-#define PR_ALIGN_OF_WORD 4
-
-#define PR_BYTES_PER_WORD_LOG2 2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#elif defined(__s390x__)
-
-#define IS_BIG_ENDIAN 1
-#undef IS_LITTLE_ENDIAN
-#define IS_64
-
-#define PR_BYTES_PER_BYTE 1
-#define PR_BYTES_PER_SHORT 2
-#define PR_BYTES_PER_INT 4
-#define PR_BYTES_PER_INT64 8
-#define PR_BYTES_PER_LONG 8
-#define PR_BYTES_PER_FLOAT 4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD 8
-#define PR_BYTES_PER_DWORD 8
-
-#define PR_BITS_PER_BYTE 8
-#define PR_BITS_PER_SHORT 16
-#define PR_BITS_PER_INT 32
-#define PR_BITS_PER_INT64 64
-#define PR_BITS_PER_LONG 64
-#define PR_BITS_PER_FLOAT 32
-#define PR_BITS_PER_DOUBLE 64
-#define PR_BITS_PER_WORD 64
-
-#define PR_BITS_PER_BYTE_LOG2 3
-#define PR_BITS_PER_SHORT_LOG2 4
-#define PR_BITS_PER_INT_LOG2 5
-#define PR_BITS_PER_INT64_LOG2 6
-#define PR_BITS_PER_LONG_LOG2 6
-#define PR_BITS_PER_FLOAT_LOG2 5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2 6
-
-#define PR_ALIGN_OF_SHORT 2
-#define PR_ALIGN_OF_INT 4
-#define PR_ALIGN_OF_LONG 8
-#define PR_ALIGN_OF_INT64 8
-#define PR_ALIGN_OF_FLOAT 4
-#define PR_ALIGN_OF_DOUBLE 8
-#define PR_ALIGN_OF_POINTER 8
-#define PR_ALIGN_OF_WORD 8
-
-#define PR_BYTES_PER_WORD_LOG2 3
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#else
-
-#error "Unknown CPU architecture"
-
-#endif
-
-#define HAVE_LONG_LONG
-#if PR_ALIGN_OF_DOUBLE == 8
-#define HAVE_ALIGNED_DOUBLES
-#endif
-#if PR_ALIGN_OF_INT64 == 8
-#define HAVE_ALIGNED_LONGLONGS
-#endif
-
-#ifndef NO_NSPR_10_SUPPORT
-
-#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
-#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
-#define BYTES_PER_INT PR_BYTES_PER_INT
-#define BYTES_PER_INT64 PR_BYTES_PER_INT64
-#define BYTES_PER_LONG PR_BYTES_PER_LONG
-#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
-#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
-#define BYTES_PER_WORD PR_BYTES_PER_WORD
-#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
-
-#define BITS_PER_BYTE PR_BITS_PER_BYTE
-#define BITS_PER_SHORT PR_BITS_PER_SHORT
-#define BITS_PER_INT PR_BITS_PER_INT
-#define BITS_PER_INT64 PR_BITS_PER_INT64
-#define BITS_PER_LONG PR_BITS_PER_LONG
-#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
-#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
-#define BITS_PER_WORD PR_BITS_PER_WORD
-
-#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
-#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
-#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
-#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
-#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
-#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
-#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
-#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
-
-#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
-#define ALIGN_OF_INT PR_ALIGN_OF_INT
-#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
-#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
-#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
-#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
-#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
-#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
-
-#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
-#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
-#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
-
-#endif /* NO_NSPR_10_SUPPORT */
-
-#endif /* nspr_cpucfg___ */
diff --git a/src/libs/xpcom18a4/nsprpub/pr/include/md/_l4v2.h b/src/libs/xpcom18a4/nsprpub/pr/include/md/_l4v2.h
deleted file mode 100644
index b05a844d..00000000
--- a/src/libs/xpcom18a4/nsprpub/pr/include/md/_l4v2.h
+++ /dev/null
@@ -1,838 +0,0 @@
-/* -*- 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):
- *
- * 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 ***** */
-
-#ifndef nspr_l4v2_defs_h___
-#define nspr_l4v2_defs_h___
-
-/**
- * I have "#if 0"ed a lot of this out, and plan to add most of it manually as the
- * compiler complains about it in order to get a better idea of what is here and
- * what it does. Not to mention which bits are needed by the runtime itself, and
- * which only by the unix port.
- */
-
-#include "prthread.h"
-
-/*
- * Internal configuration macros
- */
-
-#define PR_LINKER_ARCH "l4v2"
-#define _PR_SI_SYSNAME "L4ENV"
-#define _PR_SI_ARCHITECTURE "x86"
-#define PR_DLL_SUFFIX ".s.so"
-
-#define _PR_VMBASE 0x30000000 /* not used */
-#define _PR_STACK_VMBASE 0x50000000 /* only used in an unused fn */
-#define _MD_DEFAULT_STACK_SIZE 65536L
-#define _MD_MMAP_FLAGS MAP_PRIVATE
-
-#undef HAVE_STACK_GROWING_UP
-
-/*
- * L4env supports dl* functions
- */
-#define HAVE_DLL
-#define USE_DLFCN
-
-#define USE_SETJMP
-#undef _PR_USE_POLL
-#define _PR_STAT_HAS_ONLY_ST_ATIME
-#define _PR_HAVE_OFF64_T
-
-#include <setjmp.h>
-
-#define PR_CONTEXT_TYPE jmp_buf
-
-#define CONTEXT(_th) ((_th)->md.context)
-
-/* Now come the things specifically added for the l4v2 target */
-
-/* Don't know quite what this means yet, except that we don't have "it" */
-/* #define TCP_NODELAY _PR_NO_SUCH_SOCKOPT */
-
-/* And what is this? Something to do with memory... Used in
- xpcom18a4/nsprpub/pr/src/memory/prseg.c */
-/**
- * definitions and macros for l4env/memory.c
- */
-
-struct _MDSegment {
- PRInt8 notused;
-};
-
-
-extern void
-_MD_InitSegs(void);
-#define _MD_INIT_SEGS _MD_InitSegs
-
-extern PRStatus
-_MD_AllocSegment(PRSegment *seg, PRUint32 size, void *vaddr);
-#define _MD_ALLOC_SEGMENT _MD_AllocSegment
-
-extern void
-_MD_FreeSegment(PRSegment *seg);
-#define _MD_FREE_SEGMENT _MD_FreeSegment
-
-/**
- * definitions and macros for l4env/clock.c
- */
-extern void
-_MD_IntervalInit(void);
-#define _MD_INTERVAL_INIT()
-
-/**
- * definitions and macros for l4env/l4env.c
- */
-
-/* See xpcom18a4/nsprpub/pr/src/misc/prinit.c regarding the following function */
-extern void
-_MD_EarlyInit(void);
-#define _MD_EARLY_INIT() _MD_EarlyInit()
-
-extern void
-_MD_StartInterrupts(void);
-
-extern void
-_MD_StopInterrupts(void);
-
-extern void
-_MD_DisableClockInterrupts(void);
-
-extern void
-_MD_EnableClockInterrupts(void);
-
-extern void
-_MD_BlockClockInterrupts(void);
-
-extern void
-_MD_UnblockClockInterrupts(void);
-
-#define __USE_SVID /* for now, to get putenv */
-#include <stdlib.h>
-
-/**
- * definitions and macros for l4env/atomic.c
- */
-#if defined(__i386__)
-#define _PR_HAVE_ATOMIC_OPS
-#define _MD_INIT_ATOMIC()
-
-extern PRInt32
-_PR_x86_AtomicIncrement(PRInt32 *val);
-#define _MD_ATOMIC_INCREMENT _PR_x86_AtomicIncrement
-
-extern PRInt32
-_PR_x86_AtomicDecrement(PRInt32 *val);
-#define _MD_ATOMIC_DECREMENT _PR_x86_AtomicDecrement
-
-extern PRInt32
-_PR_x86_AtomicAdd(PRInt32 *ptr, PRInt32 val);
-
-#define _MD_ATOMIC_ADD _PR_x86_AtomicAdd
-extern PRInt32
-_PR_x86_AtomicSet(PRInt32 *val, PRInt32 newval);
-#define _MD_ATOMIC_SET _PR_x86_AtomicSet
-#endif
-
-/**
- * definitions and macros for l4env/threads.c
- */
-#define _PR_LOCAL_THREADS_ONLY
-#if 0
-struct _MDThread {
- PRInt8 notused;
-};
-
-struct _MDThreadStack {
- PRInt8 notused;
-};
-#endif /* 0 */
-
-#ifndef _PR_LOCAL_THREADS_ONLY
-extern PR_IMPLEMENT(PRThread*)
-PR_GetCurrentThread(void);
-#define _MD_CURRENT_THREAD() PR_GetCurrentThread()
-#endif /* _PR_LOCAL_THREADS_ONLY */
-
-#define _MD_EXIT_THREAD(thread)
-
-#ifndef _PR_LOCAL_THREADS_ONLY
-extern PR_IMPLEMENT(struct _PRCPU *)
-PR_GetCurrentCPU(void);
-#define _MD_CURRENT_CPU() PR_GetCurrentCPU()
-#endif /* _PR_LOCAL_THREADS_ONLY */
-
-#if 0
-#define _L4_GET_NUMBER_OF_CPUS() 1
-#define _MD_SET_INTSOFF(_val)
-#define _MD_GET_INTSOFF() 1
-#endif /* 0 */
-
-#if 0 /* these are the Win32 versions of the above macros - all other versions are defined
- as here. */
-#define _MD_GET_INTSOFF() \
- (_pr_use_static_tls ? _pr_ints_off \
- : (PRUintn) TlsGetValue(_pr_intsOffIndex))
-
-#define _MD_SET_INTSOFF(_val) \
- PR_BEGIN_MACRO \
- if (_pr_use_static_tls) { \
- _pr_ints_off = (_val); \
- } else { \
- TlsSetValue(_pr_intsOffIndex, (LPVOID) (_val)); \
- } \
- PR_END_MACRO
-#endif /* 0 */
-
-/**
- * definitions and macros for file l4env/mmap.c
- */
-
-/* Memory-mapped files */
-
-extern PRStatus
-_MD_CreateFileMap(struct PRFileMap *fmap, PRInt64 size);
-#define _MD_CREATE_FILE_MAP _MD_CreateFileMap
-
-extern PRStatus
-_MD_CloseFileMap(struct PRFileMap *fmap);
-#define _MD_CLOSE_FILE_MAP _MD_CloseFileMap
-
-#define _MD_GET_MEM_MAP_ALIGNMENT() PR_GetPageSize()
-
-extern void *
-_MD_MemMap(struct PRFileMap *fmap, PRInt64 offset,
- PRUint32 len);
-#define _MD_MEM_MAP _MD_MemMap
-
-extern PRStatus
-_MD_MemUnmap(void *addr, PRUint32 size);
-#define _MD_MEM_UNMAP _MD_MemUnmap
-
-/**
- * definitions and macros for file l4env/fileio.c
- */
-#define PR_DIRECTORY_SEPARATOR '/'
-#define PR_DIRECTORY_SEPARATOR_STR "/"
-#define PR_PATH_SEPARATOR ':'
-#define PR_PATH_SEPARATOR_STR ":"
-#define GCPTR
-
-#if 0
-typedef int (*FARPROC)(); /* Where is this used? */
-#endif
-
-extern PRInt32
-_MD_write(PRFileDesc *fd, const void *buf, PRInt32 amount);
-#define _MD_WRITE(fd,buf,amount) _MD_write(fd,buf,amount)
-
-extern void
-_MD_query_fd_inheritable(PRFileDesc *fd);
-#define _MD_QUERY_FD_INHERITABLE _MD_query_fd_inheritable
-
-/**
- * definitions and macros for file l4env/sockets.c
- */
-extern PRStatus
-_MD_getsockopt(PRFileDesc *fd, PRInt32 level,
- PRInt32 optname, char* optval, PRInt32* optlen);
-#define _MD_GETSOCKOPT _MD_getsockopt
-extern PRStatus
-_MD_setsockopt(PRFileDesc *fd, PRInt32 level,
- PRInt32 optname, const char* optval, PRInt32 optlen);
-#define _MD_SETSOCKOPT _MD_setsockopt
-
-extern PRStatus
-_MD_gethostname(char *name, PRUint32 namelen);
-#define _MD_GETHOSTNAME _MD_gethostname
-
-/**
- * definitions and macros for file l4env/locks.c
- */
-struct _MDSemaphore {
- PRInt8 notused;
-};
-
-struct _MDCVar {
- PRInt8 notused;
-};
-
-struct _MDLock {
- int unused;
-};
-
-
-/* Intel based Linux, err sorry, L4 */
-#define _MD_GET_SP(_t) CONTEXT(_t)[0].__jmpbuf[JB_SP]
-#define _MD_SET_FP(_t, val) (CONTEXT(_t)[0].__jmpbuf[JB_BP] = val)
-#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t))
-#define _MD_GET_FP_PTR(_t) &(CONTEXT(_t)[0].__jmpbuf[JB_BP])
-#define _MD_SP_TYPE __ptr_t
-#define PR_NUM_GCREGS 6
-
-/*
-** Initialize a thread context to run "_main()" when started
-*/
-#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
-{ \
- *status = PR_TRUE; \
- if (sigsetjmp(CONTEXT(_thread), 1)) { \
- _main(); \
- } \
- _MD_GET_SP(_thread) = (_MD_SP_TYPE) ((_sp) - 64); \
- _thread->md.sp = _MD_GET_SP_PTR(_thread); \
- _thread->md.fp = _MD_GET_FP_PTR(_thread); \
- _MD_SET_FP(_thread, 0); \
-}
-
-#define _MD_SWITCH_CONTEXT(_thread) \
- if (!sigsetjmp(CONTEXT(_thread), 1)) { \
- (_thread)->md.errcode = errno; \
- _PR_Schedule(); \
- }
-
-/*
-** Restore a thread context, saved by _MD_SWITCH_CONTEXT
-*/
-#define _MD_RESTORE_CONTEXT(_thread) \
-{ \
- errno = (_thread)->md.errcode; \
- _MD_SET_CURRENT_THREAD(_thread); \
- siglongjmp(CONTEXT(_thread), 1); \
-}
-
-/* Machine-dependent (MD) data structures */
-
-struct _MDThread {
- PR_CONTEXT_TYPE context;
-/* The next two are purely for debugging purposes */
- int sp;
- int fp;
- int id;
- int errcode;
-};
-
-struct _MDThreadStack {
- PRInt8 notused;
-};
-
-
-/*
- * md-specific cpu structure field
- */
-
-#include <sys/time.h> /* for FD_SETSIZE */
-#define _PR_MD_MAX_OSFD FD_SETSIZE
-
-struct _MDCPU_Unix {
- PRCList ioQ;
- PRUint32 ioq_timeout;
- PRInt32 ioq_max_osfd;
- PRInt32 ioq_osfd_cnt;
-#ifndef _PR_USE_POLL
- fd_set fd_read_set, fd_write_set, fd_exception_set;
- PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD],
- fd_exception_cnt[_PR_MD_MAX_OSFD];
-#else
- struct pollfd *ioq_pollfds;
- int ioq_pollfds_size;
-#endif /* _PR_USE_POLL */
-};
-
-#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ)
-#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu))
-#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set)
-#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt)
-#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set)
-#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt)
-#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set)
-#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt)
-#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout)
-#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd)
-#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt)
-#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds)
-#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size)
-
-#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32
-
-struct _MDCPU {
- struct _MDCPU_Unix md_unix;
-};
-
-#define _MD_INIT_LOCKS()
-#define _MD_NEW_LOCK(lock) PR_SUCCESS
-#define _MD_FREE_LOCK(lock)
-#define _MD_LOCK(lock)
-#define _MD_UNLOCK(lock)
-#define _MD_INIT_IO()
-#define _MD_IOQ_LOCK()
-#define _MD_IOQ_UNLOCK()
-
-#if 0
-extern PRStatus _MD_InitializeThread(PRThread *thread);
-#endif /* 0 */
-
-#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu)
-
-#define _MD_INIT_THREAD _MD_InitializeThread
-
-#if 0
-#define _MD_EXIT_THREAD(thread)
-#define _MD_SUSPEND_THREAD(thread) _MD_suspend_thread
-#define _MD_RESUME_THREAD(thread) _MD_resume_thread
-#endif /* 0 */
-
-#define _MD_CLEAN_THREAD(_thread)
-
-#if 0
-extern PRStatus _MD_CREATE_THREAD(
- PRThread *thread,
- void (*start) (void *),
- PRThreadPriority priority,
- PRThreadScope scope,
- PRThreadState state,
- PRUint32 stackSize);
-extern void _MD_SET_PRIORITY(struct _MDThread *thread, PRUintn newPri);
-#endif /* 0 */
-
-extern PRStatus _MD_WAIT(PRThread *, PRIntervalTime timeout);
-extern PRStatus _MD_WAKEUP_WAITER(PRThread *);
-
-#if 0
-extern void _MD_YIELD(void);
-
-extern void _MD_EarlyInit(void);
-#endif /* 0 */
-
-extern PRIntervalTime _PR_UNIX_GetInterval(void);
-extern PRIntervalTime _PR_UNIX_TicksPerSecond(void);
-
-#if 0
-#define _MD_EARLY_INIT _MD_EarlyInit
-#endif /* 0 */
-#define _MD_FINAL_INIT _PR_UnixInit
-#define _MD_GET_INTERVAL _PR_UNIX_GetInterval
-#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond
-
-/*
- * We wrapped the select() call. _MD_SELECT refers to the built-in,
- * unwrapped version.
- */
-#if 0
-#define _MD_SELECT __select
-#else
-#define _MD_SELECT select
-#endif
-
-#ifdef _PR_POLL_AVAILABLE
-#include <sys/poll.h>
-extern int __syscall_poll(struct pollfd *ufds, unsigned long int nfds,
- int timeout);
-#define _MD_POLL __syscall_poll
-#endif
-
-#if 0
-/* For writev() */
-#include <sys/uio.h>
-
-extern void _MD_l4_map_sendfile_error(int err);
-
-#include <sys/types.h>
-#include <dirent.h>
-
-#include "prio.h"
-#include "prmem.h"
-#include "prclist.h"
-#endif /* 0 */
-
-#if 0
-/*
- * intervals at which GLOBAL threads wakeup to check for pending interrupt
- */
-#define _PR_INTERRUPT_CHECK_INTERVAL_SECS 5
-extern PRIntervalTime intr_timeout_ticks;
-
-#define _PR_POLLQUEUE_PTR(_qp) \
- ((PRPollQueue*) ((char*) (_qp) - offsetof(PRPollQueue,links)))
-
-extern void _PR_Unblock_IO_Wait(struct PRThread *thr);
-
-#endif /* 0 */
-
-#if 0
-
-struct _MDDir {
- DIR *d;
-};
-
-struct _PRCPU;
-#endif /* 0 */
-
-/*
-** Make a redzone at both ends of the stack segment. Disallow access
-** to those pages of memory. It's ok if the mprotect call's don't
-** work - it just means that we don't really have a functional
-** redzone.
-*/
-#if 0
-#include <sys/mman.h>
-#ifndef PROT_NONE
-#define PROT_NONE 0x0
-#endif
-
-#define _MD_INIT_STACK(ts,REDZONE)
-#define _MD_CLEAR_STACK(ts)
-
-#define PR_SET_INTSOFF(newval)
-#endif
-
-#if 0
-
-struct PRProcess;
-struct PRProcessAttr;
-
-/* Create a new process (fork() + exec()) */
-#define _MD_CREATE_PROCESS _MD_l4CreateProcess
- /* When the compiler complains about this, we will do something about it. */
-
-#define _MD_DETACH_PROCESS _MD_l4DetachProcess
-
-/* Wait for a child process to terminate */
-#define _MD_WAIT_PROCESS _MD_l4WaitProcess
-
-#define _MD_KILL_PROCESS _MD_l4KillProcess
-#endif
-
-/************************************************************************/
-
-#if 0
-extern void _MD_EnableClockInterrupts(void);
-extern void _MD_DisableClockInterrupts(void);
-
-#define _MD_START_INTERRUPTS _MD_StartInterrupts
-#define _MD_STOP_INTERRUPTS _MD_StopInterrupts
-#define _MD_DISABLE_CLOCK_INTERRUPTS _MD_DisableClockInterrupts
-#define _MD_ENABLE_CLOCK_INTERRUPTS _MD_EnableClockInterrupts
-#define _MD_BLOCK_CLOCK_INTERRUPTS _MD_BlockClockInterrupts
-#define _MD_UNBLOCK_CLOCK_INTERRUPTS _MD_UnblockClockInterrupts
-#endif
-
-/************************************************************************/
-
-#if 0
-extern void _MD_InitCPUS(void);
-#define _MD_INIT_CPUS _MD_InitCPUS
-
-extern void _MD_Wakeup_CPUs(void);
-#define _MD_WAKEUP_CPUS _MD_Wakeup_CPUs
-
-#define _MD_PAUSE_CPU _MD_PauseCPU
-
-#if defined(_PR_LOCAL_THREADS_ONLY) || defined(_PR_GLOBAL_THREADS_ONLY)
-#define _MD_CLEANUP_BEFORE_EXIT()
-#endif
-
-#define _MD_EXIT(status) _exit(status)
-#endif
-
-/************************************************************************/
-
-#if 0
-#define _MD_GET_ENV getenv
-#define _MD_PUT_ENV putenv
-#endif /* 0 */
-
-/************************************************************************/
-
-#if 0
-#define _MD_INIT_FILEDESC(fd)
-
-extern void _MD_MakeNonblock(PRFileDesc *fd);
-#define _MD_MAKE_NONBLOCK _MD_MakeNonblock
-#endif
-
-/************************************************************************/
-
-#if 0
-#if !defined(_PR_PTHREADS)
-
-extern void _MD_InitSegs(void);
-extern PRStatus _MD_AllocSegment(PRSegment *seg, PRUint32 size,
- void *vaddr);
-extern void _MD_FreeSegment(PRSegment *seg);
-
-#define _MD_INIT_SEGS _MD_InitSegs
-#define _MD_ALLOC_SEGMENT _MD_AllocSegment
-#define _MD_FREE_SEGMENT _MD_FreeSegment
-
-#endif /* !defined(_PR_PTHREADS) */
-#endif /* 0 */
-
-/************************************************************************/
-
-#if 0
-#define _MD_INTERVAL_INIT()
-#define _MD_INTERVAL_PER_MILLISEC() (_PR_MD_INTERVAL_PER_SEC() / 1000)
-#define _MD_INTERVAL_PER_MICROSEC() (_PR_MD_INTERVAL_PER_SEC() / 1000000)
-#endif
-
-/************************************************************************/
-
-#if 0
-#define _MD_ERRNO() (errno)
-#define _MD_GET_SOCKET_ERROR() (errno)
-#endif
-
-/************************************************************************/
-
-#if 0
-extern PRInt32 _MD_AvailableSocket(PRInt32 osfd);
-
-extern void _MD_StartInterrupts(void);
-extern void _MD_StopInterrupts(void);
-extern void _MD_DisableClockInterrupts(void);
-extern void _MD_BlockClockInterrupts(void);
-extern void _MD_UnblockClockInterrupts(void);
-extern void _MD_PauseCPU(PRIntervalTime timeout);
-#endif /* 0 */
-
-#if 0
-extern PRStatus _MD_open_dir(struct _MDDir *, const char *);
-extern PRInt32 _MD_close_dir(struct _MDDir *);
-extern char * _MD_read_dir(struct _MDDir *, PRIntn);
-extern PRInt32 _MD_open(const char *name, PRIntn osflags, PRIntn mode);
-extern PRInt32 _MD_delete(const char *name);
-extern PRInt32 _MD_getfileinfo(const char *fn, PRFileInfo *info);
-extern PRInt32 _MD_getfileinfo64(const char *fn, PRFileInfo64 *info);
-extern PRInt32 _MD_getopenfileinfo(const PRFileDesc *fd, PRFileInfo *info);
-extern PRInt32 _MD_getopenfileinfo64(const PRFileDesc *fd, PRFileInfo64 *info);
-extern PRInt32 _MD_rename(const char *from, const char *to);
-extern PRInt32 _MD_access(const char *name, PRAccessHow how);
-extern PRInt32 _MD_mkdir(const char *name, PRIntn mode);
-extern PRInt32 _MD_rmdir(const char *name);
-extern PRInt32 _MD_accept_read(PRInt32 sock, PRInt32 *newSock,
- PRNetAddr **raddr, void *buf, PRInt32 amount);
-extern PRInt32 _PR_UnixSendFile(PRFileDesc *sd, PRSendFileData *sfd,
- PRTransmitFileFlags flags, PRIntervalTime timeout);
-
-extern PRStatus _MD_LockFile(PRInt32 osfd);
-extern PRStatus _MD_TLockFile(PRInt32 osfd);
-extern PRStatus _MD_UnlockFile(PRInt32 osfd);
-
-#define _MD_OPEN_DIR(dir, name) _MD_open_dir(dir, name)
-#define _MD_CLOSE_DIR(dir) _MD_close_dir(dir)
-#define _MD_READ_DIR(dir, flags) _MD_read_dir(dir, flags)
-#define _MD_OPEN(name, osflags, mode) _MD_open(name, osflags, mode)
-#define _MD_OPEN_FILE(name, osflags, mode) _MD_open(name, osflags, mode)
-extern PRInt32 _MD_read(PRFileDesc *fd, void *buf, PRInt32 amount);
-#define _MD_READ(fd,buf,amount) _MD_read(fd,buf,amount)
-extern PRInt32 _MD_write(PRFileDesc *fd, const void *buf, PRInt32 amount);
-#define _MD_WRITE(fd,buf,amount) _MD_write(fd,buf,amount)
-#define _MD_DELETE(name) _MD_delete(name)
-#define _MD_GETFILEINFO(fn, info) _MD_getfileinfo(fn, info)
-#define _MD_GETFILEINFO64(fn, info) _MD_getfileinfo64(fn, info)
-#define _MD_GETOPENFILEINFO(fd, info) _MD_getopenfileinfo(fd, info)
-#define _MD_GETOPENFILEINFO64(fd, info) _MD_getopenfileinfo64(fd, info)
-#define _MD_RENAME(from, to) _MD_rename(from, to)
-#define _MD_ACCESS(name, how) _MD_access(name, how)
-#define _MD_MKDIR(name, mode) _MD_mkdir(name, mode)
-#define _MD_MAKE_DIR(name, mode) _MD_mkdir(name, mode)
-#define _MD_RMDIR(name) _MD_rmdir(name)
-#define _MD_ACCEPT_READ(sock, newSock, raddr, buf, amount) _MD_accept_read(sock, newSock, raddr, buf, amount)
-
-#define _MD_LOCKFILE _MD_LockFile
-#define _MD_TLOCKFILE _MD_TLockFile
-#define _MD_UNLOCKFILE _MD_UnlockFile
-#endif /* 0 */
-
-#if 0
-extern PRInt32 _MD_socket(int af, int type, int flags);
-#define _MD_SOCKET _MD_socket
-extern PRInt32 _MD_connect(PRFileDesc *fd, const PRNetAddr *addr,
- PRUint32 addrlen, PRIntervalTime timeout);
-#define _MD_CONNECT _MD_connect
-extern PRInt32 _MD_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen,
- PRIntervalTime timeout);
-#define _MD_ACCEPT _MD_accept
-extern PRInt32 _MD_bind(PRFileDesc *fd, const PRNetAddr *addr, PRUint32 addrlen);
-#define _MD_BIND _MD_bind
-extern PRInt32 _MD_listen(PRFileDesc *fd, PRIntn backlog);
-#define _MD_LISTEN _MD_listen
-extern PRInt32 _MD_shutdown(PRFileDesc *fd, PRIntn how);
-#define _MD_SHUTDOWN _MD_shutdown
-
-extern PRInt32 _MD_recv(PRFileDesc *fd, void *buf, PRInt32 amount,
- PRIntn flags, PRIntervalTime timeout);
-#define _MD_RECV _MD_recv
-extern PRInt32 _MD_send(PRFileDesc *fd, const void *buf, PRInt32 amount,
- PRIntn flags, PRIntervalTime timeout);
-#define _MD_SEND _MD_send
-extern PRInt32 _MD_recvfrom(PRFileDesc *fd, void *buf, PRInt32 amount,
- PRIntn flags, PRNetAddr *addr, PRUint32 *addrlen,
- PRIntervalTime timeout);
-#define _MD_RECVFROM _MD_recvfrom
-extern PRInt32 _MD_sendto(PRFileDesc *fd, const void *buf, PRInt32 amount,
- PRIntn flags, const PRNetAddr *addr, PRUint32 addrlen,
- PRIntervalTime timeout);
-#define _MD_SENDTO _MD_sendto
-extern PRInt32 _MD_writev(PRFileDesc *fd, const struct PRIOVec *iov,
- PRInt32 iov_size, PRIntervalTime timeout);
-#define _MD_WRITEV _MD_writev
-
-extern PRInt32 _MD_socketavailable(PRFileDesc *fd);
-#define _MD_SOCKETAVAILABLE _MD_socketavailable
-extern PRInt64 _MD_socketavailable64(PRFileDesc *fd);
-#define _MD_SOCKETAVAILABLE64 _MD_socketavailable64
-
-#define _MD_PIPEAVAILABLE _MD_socketavailable
-
-extern PRInt32 _MD_pr_poll(PRPollDesc *pds, PRIntn npds,
- PRIntervalTime timeout);
-#define _MD_PR_POLL _MD_pr_poll
-#endif /* 0 */
-
-#if 0
-extern PRInt32 _MD_close(PRInt32 osfd);
-#define _MD_CLOSE_FILE _MD_close
-extern PRInt32 _MD_lseek(PRFileDesc*, PRInt32, PRSeekWhence);
-#define _MD_LSEEK _MD_lseek
-extern PRInt64 _MD_lseek64(PRFileDesc*, PRInt64, PRSeekWhence);
-#define _MD_LSEEK64 _MD_lseek64
-extern PRInt32 _MD_fsync(PRFileDesc *fd);
-#define _MD_FSYNC _MD_fsync
-#endif /* 0 */
-
-#if 0
-extern PRInt32 _MD_socketpair(int af, int type, int flags, PRInt32 *osfd);
-#define _MD_SOCKETPAIR _MD_socketpair
-
-#define _MD_CLOSE_SOCKET _MD_close
-
-#ifndef NO_NSPR_10_SUPPORT
-#define _MD_STAT stat
-#endif
-
-extern PRStatus _MD_getpeername(PRFileDesc *fd, PRNetAddr *addr,
- PRUint32 *addrlen);
-#define _MD_GETPEERNAME _MD_getpeername
-extern PRStatus _MD_getsockname(PRFileDesc *fd, PRNetAddr *addr,
- PRUint32 *addrlen);
-#define _MD_GETSOCKNAME _MD_getsockname
-
-extern PRStatus _MD_getsockopt(PRFileDesc *fd, PRInt32 level,
- PRInt32 optname, char* optval, PRInt32* optlen);
-#define _MD_GETSOCKOPT _MD_getsockopt
-extern PRStatus _MD_setsockopt(PRFileDesc *fd, PRInt32 level,
- PRInt32 optname, const char* optval, PRInt32 optlen);
-#define _MD_SETSOCKOPT _MD_setsockopt
-
-extern PRStatus _MD_set_fd_inheritable(PRFileDesc *fd, PRBool inheritable);
-#define _MD_SET_FD_INHERITABLE _MD_set_fd_inheritable
-
-extern void _MD_init_fd_inheritable(PRFileDesc *fd, PRBool imported);
-#define _MD_INIT_FD_INHERITABLE _MD_init_fd_inheritable
-
-extern void _MD_query_fd_inheritable(PRFileDesc *fd);
-#define _MD_QUERY_FD_INHERITABLE _MD_query_fd_inheritable
-
-extern PRStatus _MD_gethostname(char *name, PRUint32 namelen);
-#define _MD_GETHOSTNAME _MD_gethostname
-
-extern PRStatus _MD_getsysinfo(PRSysInfo cmd, char *name, PRUint32 namelen);
-#define _MD_GETSYSINFO _MD_getsysinfo
-#endif /* 0 */
-
-#if 0
-struct _MDFileMap {
- PRIntn prot;
- PRIntn flags;
- PRBool isAnonFM; /* when true, PR_CloseFileMap() must close the related fd */
-};
-
-extern PRStatus _MD_CreateFileMap(struct PRFileMap *fmap, PRInt64 size);
-#define _MD_CREATE_FILE_MAP _MD_CreateFileMap
-
-#define _MD_GET_MEM_MAP_ALIGNMENT() PR_GetPageSize()
-
-extern void * _MD_MemMap(struct PRFileMap *fmap, PRInt64 offset,
- PRUint32 len);
-#define _MD_MEM_MAP _MD_MemMap
-
-extern PRStatus _MD_MemUnmap(void *addr, PRUint32 size);
-#define _MD_MEM_UNMAP _MD_MemUnmap
-
-extern PRStatus _MD_CloseFileMap(struct PRFileMap *fmap);
-#define _MD_CLOSE_FILE_MAP _MD_CloseFileMap
-#endif /* 0 */
-
-#if 0
-#define GETTIMEOFDAY(tp) gettimeofday((tp), NULL)
-
-#if defined(_PR_PTHREADS) && !defined(_PR_POLL_AVAILABLE)
-#define _PR_NEED_FAKE_POLL
-#endif
-
-/*
-** A vector of the UNIX I/O calls we use. These are here to smooth over
-** the rough edges needed for large files. All of NSPR's implmentaions
-** go through this vector using syntax of the form
-** result = _md_iovector.xxx64(args);
-*/
-
-typedef struct stat _MDStat64;
-typedef off_t _MDOff64_t;
-
-typedef PRIntn (*_MD_Fstat64)(PRIntn osfd, _MDStat64 *buf);
-typedef PRIntn (*_MD_Open64)(const char *path, int oflag, ...);
-typedef PRIntn (*_MD_Stat64)(const char *path, _MDStat64 *buf);
-typedef _MDOff64_t (*_MD_Lseek64)(PRIntn osfd, _MDOff64_t, PRIntn whence);
-typedef void* (*_MD_Mmap64)(
- void *addr, PRSize len, PRIntn prot, PRIntn flags,
- PRIntn fildes, _MDOff64_t offset);
-struct _MD_IOVector
-{
- _MD_Open64 _open64;
- _MD_Mmap64 _mmap64;
- _MD_Stat64 _stat64;
- _MD_Fstat64 _fstat64;
- _MD_Lseek64 _lseek64;
-};
-extern struct _MD_IOVector _md_iovector;
-#endif /* 0 */
-
-#endif /* nspr_l4v2_defs_h___ */
diff --git a/src/libs/xpcom18a4/nsprpub/pr/include/md/_unixos.h b/src/libs/xpcom18a4/nsprpub/pr/include/md/_unixos.h
index 1f30e884..60793de1 100644
--- a/src/libs/xpcom18a4/nsprpub/pr/include/md/_unixos.h
+++ b/src/libs/xpcom18a4/nsprpub/pr/include/md/_unixos.h
@@ -46,7 +46,7 @@
* Linux: FD_SETSIZE is defined in /usr/include/sys/select.h and should
* not be redefined.
*/
-#if !defined(LINUX) && !defined(DARWIN) && !defined(NEXTSTEP) && !defined(L4ENV)
+#if !defined(LINUX) && !defined(DARWIN) && !defined(NEXTSTEP)
#ifndef FD_SETSIZE
#define FD_SETSIZE 4096
#endif
diff --git a/src/libs/xpcom18a4/nsprpub/pr/include/md/prosdep.h b/src/libs/xpcom18a4/nsprpub/pr/include/md/prosdep.h
index b747edb3..93496520 100644
--- a/src/libs/xpcom18a4/nsprpub/pr/include/md/prosdep.h
+++ b/src/libs/xpcom18a4/nsprpub/pr/include/md/prosdep.h
@@ -138,9 +138,6 @@ PR_BEGIN_EXTERN_C
#elif defined(NTO)
#include "md/_nto.h"
-#elif defined(L4ENV)
-#include "md/_l4v2.h"
-
#else
#error unknown Unix flavor
diff --git a/src/libs/xpcom18a4/nsprpub/pr/src/io/prlog.c b/src/libs/xpcom18a4/nsprpub/pr/src/io/prlog.c
index 1c9142c2..7eb4ef69 100644
--- a/src/libs/xpcom18a4/nsprpub/pr/src/io/prlog.c
+++ b/src/libs/xpcom18a4/nsprpub/pr/src/io/prlog.c
@@ -423,7 +423,7 @@ PR_IMPLEMENT(PRBool) PR_SetLogFile(const char *file)
#if defined(VBOX) && defined(DEBUG)
if (strcmp(file, "IPRT") == 0) {
/* initialize VBox Runtime */
- RTR3InitDll(0);
+ RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);
newLogFile = IPRT_DEBUG_FILE;
}
else
@@ -464,7 +464,7 @@ PR_IMPLEMENT(PRBool) PR_SetLogFile(const char *file)
#if defined(VBOX) && defined(DEBUG)
if (strcmp(file, "IPRT") == 0) {
/* initialize VBox Runtime */
- RTR3InitDll(0);
+ RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);
logFile = IPRT_DEBUG_FILE;
return PR_TRUE;
}
diff --git a/src/libs/xpcom18a4/nsprpub/pr/src/md/l4env/locks.c b/src/libs/xpcom18a4/nsprpub/pr/src/md/l4env/locks.c
deleted file mode 100644
index 281e34e7..00000000
--- a/src/libs/xpcom18a4/nsprpub/pr/src/md/l4env/locks.c
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- 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):
- *
- * 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 ***** */
-
-/*
-** File: l4env/locks.c
-** Descritpion: Implemenation for locks using l4env
-** Exports: none, that I am aware of
-*/
-
-/**
- * @note The Windows implementation uses critical sections to implement locks.
- * Solaris uses mutexes.
- */
-
-#include "prlog.h"
-#include "primpl.h"
-
-PR_IMPLEMENT(void)
-_MD_init_locks(void) { } /* PR_InitLocks */
-
-PR_IMPLEMENT(PRStatus)
-_MD_new_lock(
- struct _MDLock *md_lock)
-{
- PR_ASSERT("_MD_new_lock called!");
- return 0;
-} /* _MD_new_lock */
-
-PR_IMPLEMENT(void)
-_MD_free_lock(
- struct _MDLock *md_lock)
-{
- PR_ASSERT("_MD_free_lock called!");
-} /* _MD_free_lock */
-
-PR_IMPLEMENT(void)
-_MD_lock(
- struct _MDLock *md_lock)
-{
- PR_ASSERT("_MD_lock called!");
-} /* _MD_lock */
-
-PR_IMPLEMENT(void)
-_MD_unlock(
- struct _MDLock *md_lock)
-{
- PR_ASSERT("_MD_unlock called!");
-} /* _MD_unlock */
-
-/* locks.c */
diff --git a/src/libs/xpcom18a4/nsprpub/pr/src/md/l4env/prnetdb.c b/src/libs/xpcom18a4/nsprpub/pr/src/md/l4env/prnetdb.c
deleted file mode 100644
index cab79a51..00000000
--- a/src/libs/xpcom18a4/nsprpub/pr/src/md/l4env/prnetdb.c
+++ /dev/null
@@ -1,217 +0,0 @@
-/* -*- 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):
- *
- * 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 <string.h>
-
-void _PR_InitNet(void)
-{
- PR_ASSERT("_PR_InitNet called!");
-} /* _PR_InitNet */
-
-void _PR_CleanupNet(void)
-{
- PR_ASSERT("_PR_CleanupNet called!");
-} /* _PR_CleanupNet */
-
-PR_IMPLEMENT(PRStatus) PR_GetHostByName(
- const char *name, char *buf, PRIntn bufsize, PRHostEnt *hp)
-{
- PR_ASSERT("PR_GetHostByName called!");
- return 0;
-} /* PR_GetHostByName */
-
-PR_IMPLEMENT(PRStatus) PR_GetIPNodeByName(
- const char *name, PRUint16 af, PRIntn flags,
- char *buf, PRIntn bufsize, PRHostEnt *hp)
-{
- PR_ASSERT("PR_GetIPNodeByName called!");
- return 0;
-} /* PR_GetIPNodeByName */
-
-PR_IMPLEMENT(PRStatus) PR_GetHostByAddr(
- const PRNetAddr *hostaddr, char *buf, PRIntn bufsize, PRHostEnt *hostentry)
-{
- PR_ASSERT("PR_GetHostByAddr called!");
- return 0;
-} /* PR_GetHostByAddr */
-
-PR_IMPLEMENT(PRStatus) PR_GetProtoByName(
- const char* name, char* buffer, PRInt32 buflen, PRProtoEnt* result)
-{
- PR_ASSERT("PR_GetProtoByName called!");
- return 0;
-} /* PR_GetProtoByName */
-
-PR_IMPLEMENT(PRStatus) PR_GetProtoByNumber(
- PRInt32 number, char* buffer, PRInt32 buflen, PRProtoEnt* result)
-{
- PR_ASSERT("PR_GetProtoByNumber called!");
- return 0;
-} /* PR_GetProtoByNumber */
-
-PRUintn _PR_NetAddrSize(const PRNetAddr* addr)
-{
- PR_ASSERT("_PR_NetAddrSize called!");
- return 0;
-} /* _PR_NetAddrSize */
-
-PR_IMPLEMENT(PRIntn) PR_EnumerateHostEnt(
- PRIntn enumIndex, const PRHostEnt *hostEnt, PRUint16 port, PRNetAddr *address)
-{
- PR_ASSERT("PR_EnumerateHostEnt called!");
- return 0;
-} /* PR_EnumerateHostEnt */
-
-PR_IMPLEMENT(PRStatus) PR_InitializeNetAddr(
- PRNetAddrValue val, PRUint16 port, PRNetAddr *addr)
-{
- PR_ASSERT("PR_InitializeNetAddr called!");
- return 0;
-} /* PR_InitializeNetAddr */
-
-PR_IMPLEMENT(PRStatus) PR_SetNetAddr(
- PRNetAddrValue val, PRUint16 af, PRUint16 port, PRNetAddr *addr)
-{
- PR_ASSERT("PR_SetNetAddr called!");
- return 0;
-} /* PR_SetNetAddr */
-
-PR_IMPLEMENT(PRBool)
-PR_IsNetAddrType(const PRNetAddr *addr, PRNetAddrValue val)
-{
- PR_ASSERT("PR_IsNetAddrType called!");
- return PR_FALSE;
-} /* PR_IsNetAddrType */
-
-PR_IMPLEMENT(PRStatus) PR_StringToNetAddr(const char *string, PRNetAddr *addr)
-{
- PR_ASSERT("PR_StringToNetAddr called!");
- return 0;
-} /* PR_StringToNetAddr */
-
-PR_IMPLEMENT(PRStatus) PR_NetAddrToString(
- const PRNetAddr *addr, char *string, PRUint32 size)
-{
- PR_ASSERT("PR_NetAddrToString called!");
- return 0;
-} /* PR_NetAddrToString */
-
-/*
- * Convert an IPv4 addr to an (IPv4-mapped) IPv6 addr
- */
-PR_IMPLEMENT(void) PR_ConvertIPv4AddrToIPv6(PRUint32 v4addr, PRIPv6Addr *v6addr)
-{
- PRUint8 *dstp;
- dstp = v6addr->pr_s6_addr;
- memset(dstp, 0, 10);
- memset(dstp + 10, 0xff, 2);
- memcpy(dstp + 12,(char *) &v4addr, 4);
-}
-
-PR_IMPLEMENT(PRUint16) PR_ntohs(PRUint16 n) { return ntohs(n); }
-PR_IMPLEMENT(PRUint32) PR_ntohl(PRUint32 n) { return ntohl(n); }
-PR_IMPLEMENT(PRUint16) PR_htons(PRUint16 n) { return htons(n); }
-PR_IMPLEMENT(PRUint32) PR_htonl(PRUint32 n) { return htonl(n); }
-PR_IMPLEMENT(PRUint64) PR_ntohll(PRUint64 n)
-{
-#ifdef IS_BIG_ENDIAN
- return n;
-#else
- PRUint64 tmp;
- PRUint32 hi, lo;
- LL_L2UI(lo, n);
- LL_SHR(tmp, n, 32);
- LL_L2UI(hi, tmp);
- hi = PR_ntohl(hi);
- lo = PR_ntohl(lo);
- LL_UI2L(n, lo);
- LL_SHL(n, n, 32);
- LL_UI2L(tmp, hi);
- LL_ADD(n, n, tmp);
- return n;
-#endif
-} /* ntohll */
-
-PR_IMPLEMENT(PRUint64) PR_htonll(PRUint64 n)
-{
-#ifdef IS_BIG_ENDIAN
- return n;
-#else
- PRUint64 tmp;
- PRUint32 hi, lo;
- LL_L2UI(lo, n);
- LL_SHR(tmp, n, 32);
- LL_L2UI(hi, tmp);
- hi = htonl(hi);
- lo = htonl(lo);
- LL_UI2L(n, lo);
- LL_SHL(n, n, 32);
- LL_UI2L(tmp, hi);
- LL_ADD(n, n, tmp);
- return n;
-#endif
-} /* htonll */
-
-PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInfoByName(const char *hostname,
- PRUint16 af,
- PRIntn flags)
-{
- PR_ASSERT("PR_AddrInfoByName called!");
- return NULL;
-} /* PR_AddrInfoByName */
-
-PR_IMPLEMENT(void) PR_FreeAddrInfo(PRAddrInfo *ai)
-{
- PR_ASSERT("PR_FreeAddrInfo called!");
-} /* PR_FreeAddrInfo */
-
-PR_IMPLEMENT(void *) PR_EnumerateAddrInfo(void *iterPtr,
- const PRAddrInfo *base,
- PRUint16 port,
- PRNetAddr *result)
-{
- PR_ASSERT("PR_EnumerateAddrInfo called!");
- return NULL;
-} /* PR_EnumerateAddrInfo */
-
-PR_IMPLEMENT(const char *) PR_GetCanonNameFromAddrInfo(const PRAddrInfo *ai)
-{
- PR_ASSERT("PR_GetCanonNameFromAddrInfo called!");
- return NULL;
-} /* PR_GetCanonNameFromAddrInfo */
diff --git a/src/libs/xpcom18a4/nsprpub/pr/src/md/l4env/threads.c b/src/libs/xpcom18a4/nsprpub/pr/src/md/l4env/threads.c
deleted file mode 100644
index b23f1a57..00000000
--- a/src/libs/xpcom18a4/nsprpub/pr/src/md/l4env/threads.c
+++ /dev/null
@@ -1,267 +0,0 @@
-/* -*- 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):
- *
- * 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 ***** */
-
-/*
-** File: l4env/threads.c
-** Descritpion: Implemenation for L4 threads using l4env
-** Exports: ptthread.h
-*/
-
-#include "prlog.h"
-#include "primpl.h"
-#include "prpdce.h"
-
-PR_IMPLEMENT(PRThread*) PR_CreateThread(
- PRThreadType type, void (*start)(void *arg), void *arg,
- PRThreadPriority priority, PRThreadScope scope,
- PRThreadState state, PRUint32 stackSize)
-{
- PR_ASSERT("PR_CreateThread called!");
- return NULL;
-} /* PR_CreateThread */
-
-PR_IMPLEMENT(PRThread*) PR_CreateThreadGCAble(
- PRThreadType type, void (*start)(void *arg), void *arg,
- PRThreadPriority priority, PRThreadScope scope,
- PRThreadState state, PRUint32 stackSize)
-{
- PR_ASSERT("PR_CreateThreadGCAble called!");
- return NULL;
-} /* PR_CreateThreadGCAble */
-
-PR_IMPLEMENT(void*) GetExecutionEnvironment(PRThread *thred)
-{
- PR_ASSERT("GetExecutionEnvironment called!");
- return NULL;
-} /* GetExecutionEnvironment */
-
-PR_IMPLEMENT(void) SetExecutionEnvironment(PRThread *thred, void *env)
-{
- PR_ASSERT("SetExecutionEnvironment called!");
-} /* SetExecutionEnvironment */
-
-PR_IMPLEMENT(PRThread*) PR_AttachThread(
- PRThreadType type, PRThreadPriority priority, PRThreadStack *stack)
-{
- PR_ASSERT("PR_AttachThread called!");
- return NULL;
-} /* PR_AttachThread */
-
-
-PR_IMPLEMENT(PRStatus) PR_JoinThread(PRThread *thred)
-{
- PR_ASSERT("PR_JoinThread called!");
- return 0;
-} /* PR_JoinThread */
-
-PR_IMPLEMENT(void) PR_DetachThread(void)
-{
- PR_ASSERT("PR_DetachThread called!");
-} /* PR_DetachThread */
-
-PR_IMPLEMENT(PRThread*) PR_GetCurrentThread(void)
-{
- PR_ASSERT("PR_GetCurrentThread called!");
- return NULL;
-} /* PR_GetCurrentThread */
-
-PR_IMPLEMENT(PRThreadScope) PR_GetThreadScope(const PRThread *thred)
-{
- PR_ASSERT("PR_GetThreadScope called!");
- return 0;
-} /* PR_GetThreadScope() */
-
-PR_IMPLEMENT(PRThreadType) PR_GetThreadType(const PRThread *thred)
-{
- PR_ASSERT("PR_GetThreadType called!");
- return 0;
-}
-
-PR_IMPLEMENT(PRThreadState) PR_GetThreadState(const PRThread *thred)
-{
- PR_ASSERT("PR_GetThreadState called!");
- return 0;
-} /* PR_GetThreadState */
-
-PR_IMPLEMENT(PRThreadPriority) PR_GetThreadPriority(const PRThread *thred)
-{
- PR_ASSERT("PR_GetThreadPriority called!");
- return 0;
-} /* PR_GetThreadPriority */
-
-PR_IMPLEMENT(void) PR_SetThreadPriority(PRThread *thred, PRThreadPriority newPri)
-{
- PR_ASSERT("PR_SetThreadPriority called!");
-} /* PR_SetThreadPriority */
-
-PR_IMPLEMENT(PRStatus) PR_Interrupt(PRThread *thred)
-{
- PR_ASSERT("PR_Interrupt called!");
- return 0;
-} /* PR_Interrupt */
-
-PR_IMPLEMENT(void) PR_ClearInterrupt(void)
-{
- PR_ASSERT("PR_ClearInterrupt called!");
-} /* PR_ClearInterrupt */
-
-PR_IMPLEMENT(void) PR_BlockInterrupt(void)
-{
- PR_ASSERT("PR_BlockInterrupt called!");
-} /* PR_BlockInterrupt */
-
-PR_IMPLEMENT(void) PR_UnblockInterrupt(void)
-{
- PR_ASSERT("PR_UnblockInterrupt called!");
-} /* PR_UnblockInterrupt */
-
-PR_IMPLEMENT(PRStatus) PR_Yield(void)
-{
- PR_ASSERT("PR_Yield called!");
- return 0;
-}
-
-PR_IMPLEMENT(PRStatus) PR_Sleep(PRIntervalTime ticks)
-{
- PR_ASSERT("PR_Sleep called!");
- return 0;
-} /* PR_Sleep */
-
-/* The next two functions are defined in the pthreads code, but also in prinit.c if
- _PR_PTHREADS and _PR_BTHREADS are not defined */
-#if 0
-PR_IMPLEMENT(PRStatus) PR_Cleanup(void)
-{
- PR_ASSERT("PR_Cleanup called!");
- return 0;
-} /* PR_Cleanup */
-#endif /* 0 */
-
-#if 0
-PR_IMPLEMENT(void) PR_ProcessExit(PRIntn status)
-{
- exit(status);
-}
-#endif
-
-PR_IMPLEMENT(PRUint32) PR_GetThreadID(PRThread *thred)
-{
- PR_ASSERT("PR_GetThreadID called!");
- return 0;
-}
-
-/*
- * $$$
- * The following two thread-to-processor affinity functions are not
- * yet implemented for pthreads. By the way, these functions should return
- * PRStatus rather than PRInt32 to indicate the success/failure status.
- * $$$
- */
-
-PR_IMPLEMENT(PRInt32) PR_GetThreadAffinityMask(PRThread *thread, PRUint32 *mask)
-{
- return 0; /* not implemented */
-}
-
-PR_IMPLEMENT(PRInt32) PR_SetThreadAffinityMask(PRThread *thread, PRUint32 mask )
-{
- return 0; /* not implemented */
-}
-
-PR_IMPLEMENT(struct _PRCPU *)
-PR_GetCurrentCPU(void)
-{
- PR_ASSERT("PR_GetCurrentCPU called!");
- return NULL;
-} /* PR_GetCurrentCPU */
-
-PR_IMPLEMENT(void)
-PR_SetThreadDumpProc(PRThread* thread, PRThreadDumpProc dump, void *arg)
-{
- PR_ASSERT("PR_SetThreadDumpProc called!");
-}
-
-/*
- * Garbage collection support follows.
- */
-
-PR_IMPLEMENT(void) PR_SetThreadGCAble(void)
-{
- PR_ASSERT("PR_SetThreadGCAble called!");
-} /* PR_SetThreadGCAble */
-
-PR_IMPLEMENT(void) PR_ClearThreadGCAble(void)
-{
- PR_ASSERT("PR_ClearThreadGCAble called!");
-} /* PR_ClearThreadGCAble */
-
-PR_IMPLEMENT(PRStatus) PR_EnumerateThreads(PREnumerator func, void *arg)
-{
- PR_ASSERT("PR_SetThreadGCAble called!");
- return 0;
-} /* PR_EnumerateThreads */
-
-/*
- * PR_SuspendAll and PR_ResumeAll are called during garbage collection. The strategy
- * we use is to send a SIGUSR2 signal to every gc able thread that we intend to suspend.
- * The signal handler will record the stack pointer and will block until resumed by
- * the resume call. Since the signal handler is the last routine called for the
- * suspended thread, the stack pointer will also serve as a place where all the
- * registers have been saved on the stack for the previously executing routines.
- *
- * Through global variables, we also make sure that PR_Suspend and PR_Resume does not
- * proceed until the thread is suspended or resumed.
- */
-
-PR_IMPLEMENT(void) PR_SuspendAll(void)
-{
- PR_ASSERT("PR_SuspendAll called!");
-} /* PR_SuspendAll */
-
-PR_IMPLEMENT(void) PR_ResumeAll(void)
-{
- PR_ASSERT("PR_ResumeAll called!");
-} /* PR_ResumeAll */
-
-/* Return the stack pointer for the given thread- used by the GC */
-PR_IMPLEMENT(void *)PR_GetSP(PRThread *thred)
-{
- PR_ASSERT("PR_SetSP called!");
- return NULL;
-} /* PR_GetSP */
-
-/* ptthread.c */
diff --git a/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/l4env.c b/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/l4env.c
deleted file mode 100644
index b9cf5e20..00000000
--- a/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/l4env.c
+++ /dev/null
@@ -1,123 +0,0 @@
-/* -*- 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):
- *
- * 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"
-
-void _MD_EarlyInit(void)
-{
-}
-
-PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
-{
-#ifndef _PR_PTHREADS
- if (isCurrent) {
- (void) setjmp(CONTEXT(t));
- }
- *np = sizeof(CONTEXT(t)) / sizeof(PRWord);
- return (PRWord *) CONTEXT(t);
-#else
- *np = 0;
- return NULL;
-#endif
-}
-
-#ifdef _PR_PTHREADS
-
-extern void _MD_unix_terminate_waitpid_daemon(void);
-
-void _MD_CleanupBeforeExit(void)
-{
- _MD_unix_terminate_waitpid_daemon();
-}
-
-#else /* ! _PR_PTHREADS */
-
-void
-_MD_SET_PRIORITY(_MDThread *thread, PRUintn newPri)
-{
- return;
-}
-
-PRStatus
-_MD_InitializeThread(PRThread *thread)
-{
- /*
- * set the pointers to the stack-pointer and frame-pointer words in the
- * context structure; this is for debugging use.
- */
- thread->md.sp = _MD_GET_SP_PTR(thread);
- thread->md.fp = _MD_GET_FP_PTR(thread);
- return PR_SUCCESS;
-}
-
-PRStatus
-_MD_WAIT(PRThread *thread, PRIntervalTime ticks)
-{
- PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
- _PR_MD_SWITCH_CONTEXT(thread);
- return PR_SUCCESS;
-}
-
-PRStatus
-_MD_WAKEUP_WAITER(PRThread *thread)
-{
- if (thread) {
- PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
- }
- return PR_SUCCESS;
-}
-
-/* These functions should not be called for Linux */
-void
-_MD_YIELD(void)
-{
- PR_NOT_REACHED("_MD_YIELD has not yet been implemented on L4.");
-}
-
-PRStatus
-_MD_CREATE_THREAD(
- PRThread *thread,
- void (*start) (void *),
- PRThreadPriority priority,
- PRThreadScope scope,
- PRThreadState state,
- PRUint32 stackSize)
-{
- PR_NOT_REACHED("_MD_CREATE_THREAD has not yet been implemented on L4.");
- return PR_FAILURE;
-}
-#endif /* ! _PR_PTHREADS */
diff --git a/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/unix.c b/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/unix.c
index 12834a70..c69a233a 100644
--- a/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/unix.c
+++ b/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/unix.c
@@ -65,8 +65,7 @@
* PRInt32* pointer to a _PRSockLen_t* pointer.
*/
#if defined(HAVE_SOCKLEN_T) \
- || (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2) \
- || defined(L4ENV)
+ || (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2)
#define _PRSockLen_t socklen_t
#elif defined(IRIX) || defined(HPUX) || defined(OSF1) || defined(SOLARIS) \
|| defined(AIX4_1) || defined(LINUX) || defined(SONY) \
diff --git a/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/uxrng.c b/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/uxrng.c
index b5f30781..9099c5ff 100644
--- a/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/uxrng.c
+++ b/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/uxrng.c
@@ -298,7 +298,7 @@ GetHighResClock(void *buf, size_t maxbytes)
return 0;
}
#elif defined(SCO) || defined(UNIXWARE) || defined(BSDI) || defined(NTO) \
- || defined(QNX) || defined(DARWIN) || defined(L4ENV)
+ || defined(QNX) || defined(DARWIN)
#include <sys/times.h>
static size_t
diff --git a/src/libs/xpcom18a4/nsprpub/pr/src/misc/prinit.c b/src/libs/xpcom18a4/nsprpub/pr/src/misc/prinit.c
index 6dea7ddc..eef45968 100644
--- a/src/libs/xpcom18a4/nsprpub/pr/src/misc/prinit.c
+++ b/src/libs/xpcom18a4/nsprpub/pr/src/misc/prinit.c
@@ -176,7 +176,7 @@ static void _PR_InitStuff(void)
if (_pr_initialized) return;
_pr_initialized = PR_TRUE;
#ifdef VBOX_USE_IPRT_IN_NSPR
- RTR3InitDll(0);
+ RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);
#endif
#ifdef _PR_ZONE_ALLOCATOR
_PR_InitZones();
diff --git a/src/libs/xpcom18a4/nsprpub/pr/src/misc/prnetdb.c b/src/libs/xpcom18a4/nsprpub/pr/src/misc/prnetdb.c
index f3ed2857..c3b7cdd5 100644
--- a/src/libs/xpcom18a4/nsprpub/pr/src/misc/prnetdb.c
+++ b/src/libs/xpcom18a4/nsprpub/pr/src/misc/prnetdb.c
@@ -108,7 +108,7 @@ PRLock *_pr_dnsLock = NULL;
#define _PR_HAVE_GETPROTO_R_INT
#endif
-#if (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2) || defined(L4ENV)
+#if (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2)
#define _PR_HAVE_GETPROTO_R
#define _PR_HAVE_5_ARG_GETPROTO_R
#endif
diff --git a/src/libs/xpcom18a4/python/Makefile.kmk b/src/libs/xpcom18a4/python/Makefile.kmk
index ea62ae26..50cc5e2d 100644
--- a/src/libs/xpcom18a4/python/Makefile.kmk
+++ b/src/libs/xpcom18a4/python/Makefile.kmk
@@ -26,24 +26,27 @@ endif
#
# List of supported Python versions, defining a number of
-# VBOX_PYTHON[25|26|27|28|DEF]_[INC|LIB] variables which get picked up below.
+# VBOX_PYTHON[25|26|27|DEF]_[INC|LIB] variables which get picked up below.
#
ifeq ($(KBUILD_TARGET),darwin) # Relatively predictable, don't script.
ifeq ($(KBUILD_TARGET_ARCH),x86)
VBOX_PYTHON25_INC = $(VBOX_PATH_MACOSX_SDK)/usr/include/python2.5
VBOX_PYTHON25_LIB = $(VBOX_PATH_MACOSX_SDK)/usr/lib/libpython2.5.dylib
+ VBOX_PYTHON25_LIB_X86 = $(VBOX_PYTHON25_LIB)
endif
if !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_6) \
&& ( !defined(VBOX_OSE) \
|| "$(wildcard $(VBOX_PATH_MACOSX_SDK_10_6)/usr/lib/libpython2.6.dylib)" != "")
VBOX_PYTHON26_INC = $(VBOX_PATH_MACOSX_SDK_10_6)/usr/include/python2.6
VBOX_PYTHON26_LIB = $(VBOX_PATH_MACOSX_SDK_10_6)/usr/lib/libpython2.6.dylib
+ VBOX_PYTHON26_LIB_X86 = $(VBOX_PYTHON26_LIB)
endif
if !defined(VBOX_WITHOUT_VBOXPYTHON_FOR_OSX_10_7) \
&& ( defined(VBOX_NOT_OSE_LATER_SOMETIME) \
|| "$(wildcard $(VBOX_PATH_MACOSX_SDK_10_7)/usr/lib/libpython2.7.dylib)" != "")
VBOX_PYTHON27_INC = $(VBOX_PATH_MACOSX_SDK_10_7)/usr/include/python2.7
VBOX_PYTHON27_LIB = $(VBOX_PATH_MACOSX_SDK_10_7)/usr/lib/libpython2.7.dylib
+ VBOX_PYTHON27_LIB_X86 = $(VBOX_PYTHON27_LIB)
endif
else
@@ -102,6 +105,14 @@ VBoxPythonBase_LIBS = \
$(PATH_STAGE_LIB)/VBoxCOM$(VBOX_SUFF_LIB) \
$(PATH_STAGE_BIN)/VBoxXPCOM$(VBOX_SUFF_DLL)
+# 32-bit base.
+VBoxPythonBase_x86_TEMPLATE = XPCOM-x86
+VBoxPythonBase_x86_EXTENDS = VBoxPythonBase
+VBoxPythonBase_x86_DEFS = MODULE_NAME_SUFFIX=_x86 $(VBoxPythonBase_DEFS)
+VBoxPythonBase_x86_LIBS = \
+ $(PATH_STAGE_LIB)/VBoxCOM-x86$(VBOX_SUFF_LIB) \
+ $(PATH_STAGE_BIN)/VBoxXPCOM-x86$(VBOX_SUFF_DLL)
+
ifdef VBOX_PYTHON23_INC
#
@@ -113,6 +124,15 @@ VBoxPython2_3_EXTENDS_BY = appending
VBoxPython2_3_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX104,)
VBoxPython2_3_INCS = $(VBOX_PYTHON23_INC)
VBoxPython2_3_LIBS = $(VBOX_PYTHON23_LIB)
+
+ ifdef VBOX_WITH_32_ON_64_MAIN_API
+DLLS += VBoxPython2_3_x86
+VBoxPython2_3_x86_EXTENDS = VBoxPythonBase_x86
+VBoxPython2_3_x86_EXTENDS_BY = appending
+VBoxPython2_3_x86_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX104,-x86)
+VBoxPython2_3_x86_INCS = $(VBOX_PYTHON23_INC)
+VBoxPython2_3_x86_LIBS = $(VBOX_PYTHON23_LIB_X86)
+ endif
endif
ifdef VBOX_PYTHON24_INC
@@ -124,6 +144,14 @@ VBoxPython2_4_EXTENDS = VBoxPythonBase
VBoxPython2_4_EXTENDS_BY = appending
VBoxPython2_4_INCS = $(VBOX_PYTHON24_INC)
VBoxPython2_4_LIBS = $(VBOX_PYTHON24_LIB)
+
+ ifdef VBOX_WITH_32_ON_64_MAIN_API
+DLLS += VBoxPython2_4_x86
+VBoxPython2_4_x86_EXTENDS = VBoxPythonBase_x86
+VBoxPython2_4_x86_EXTENDS_BY = appending
+VBoxPython2_4_x86_INCS = $(VBOX_PYTHON24_INC)
+VBoxPython2_4_x86_LIBS = $(VBOX_PYTHON24_LIB_X86)
+ endif
endif
ifdef VBOX_PYTHON25_INC
@@ -133,9 +161,16 @@ ifdef VBOX_PYTHON25_INC
DLLS += VBoxPython2_5
VBoxPython2_5_EXTENDS = VBoxPythonBase
VBoxPython2_5_EXTENDS_BY = appending
-VBoxPython2_5_TEMPLATE = XPCOM
VBoxPython2_5_INCS = $(VBOX_PYTHON25_INC)
VBoxPython2_5_LIBS = $(VBOX_PYTHON25_LIB)
+
+ ifdef VBOX_WITH_32_ON_64_MAIN_API
+DLLS += VBoxPython2_5_x86
+VBoxPython2_5_x86_EXTENDS = VBoxPythonBase_x86
+VBoxPython2_5_x86_EXTENDS_BY = appending
+VBoxPython2_5_x86_INCS = $(VBOX_PYTHON25_INC)
+VBoxPython2_5_x86_LIBS = $(VBOX_PYTHON25_LIB_X86)
+ endif
endif
ifdef VBOX_PYTHON26_INC
@@ -148,6 +183,15 @@ VBoxPython2_6_EXTENDS_BY = appending
VBoxPython2_6_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX106,)
VBoxPython2_6_INCS = $(VBOX_PYTHON26_INC)
VBoxPython2_6_LIBS = $(VBOX_PYTHON26_LIB)
+
+ ifdef VBOX_WITH_32_ON_64_MAIN_API
+DLLS += VBoxPython2_6_x86
+VBoxPython2_6_x86_EXTENDS = VBoxPythonBase_x86
+VBoxPython2_6_x86_EXTENDS_BY = appending
+VBoxPython2_6_x86_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX106,-x86)
+VBoxPython2_6_x86_INCS = $(VBOX_PYTHON26_INC)
+VBoxPython2_6_x86_LIBS = $(VBOX_PYTHON26_LIB_X86)
+ endif
endif
ifdef VBOX_PYTHON27_INC
@@ -160,17 +204,15 @@ VBoxPython2_7_EXTENDS_BY = appending
VBoxPython2_7_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX107,)
VBoxPython2_7_INCS = $(VBOX_PYTHON27_INC)
VBoxPython2_7_LIBS = $(VBOX_PYTHON27_LIB)
-endif
-ifdef VBOX_PYTHON28_INC
-#
-# Python 2.8 version
-#
-DLLS += VBoxPython2_8
-VBoxPython2_8_EXTENDS = VBoxPythonBase
-VBoxPython2_8_EXTENDS_BY = appending
-VBoxPython2_8_INCS = $(VBOX_PYTHON28_INC)
-VBoxPython2_8_LIBS = $(VBOX_PYTHON28_LIB)
+ ifdef VBOX_WITH_32_ON_64_MAIN_API
+DLLS += VBoxPython2_7_x86
+VBoxPython2_7_x86_EXTENDS = VBoxPythonBase_x86
+VBoxPython2_7_x86_EXTENDS_BY = appending
+VBoxPython2_7_x86_TEMPLATE = XPCOM$(if-expr "$(KBUILD_TARGET)" == "darwin",OSX107,-x86)
+VBoxPython2_7_x86_INCS = $(VBOX_PYTHON27_INC)
+VBoxPython2_7_x86_LIBS = $(VBOX_PYTHON27_LIB_X86)
+ endif
endif
ifdef VBOX_PYTHONDEF_INC
@@ -186,6 +228,17 @@ if "$(KBUILD_TARGET)" == "linux"
else
VBoxPython_LIBS = $(VBoxPythonBase_LIBS) $(VBOX_PYTHONDEF_LIB)
endif
+
+ ifdef VBOX_WITH_32_ON_64_MAIN_API
+VBoxPython_x86_EXTENDS = VBoxPythonBase_x86
+VBoxPython_x86_DEFS = $(filter-out VBOX_PYXPCOM_VERSIONED,$(VBoxPythonBase_x86_DEFS))
+VBoxPython_x86_INCS = $(VBoxPythonBase_x86_INCS) $(VBOX_PYTHONDEF_INC)
+if "$(KBUILD_TARGET)" == "linux"
+ VBoxPython_x86_LIBS = $(VBoxPythonBase_x86_LIBS)
+else
+ VBoxPython_x86_LIBS = $(VBoxPythonBase_x86_LIBS) $(VBOX_PYTHONDEF_LIB_X86)
+endif
+ endif
endif
endif # VBOX_ONLY_SDK
diff --git a/src/libs/xpcom18a4/python/gen_python_deps.py b/src/libs/xpcom18a4/python/gen_python_deps.py
index bcca1da0..1cf39b3b 100755
--- a/src/libs/xpcom18a4/python/gen_python_deps.py
+++ b/src/libs/xpcom18a4/python/gen_python_deps.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
"""
-Copyright (C) 2009-2012 Oracle Corporation
+Copyright (C) 2009-2013 Oracle Corporation
This file is part of VirtualBox Open Source Edition (OSE), as
available from http://www.virtualbox.org. This file is free software;
@@ -14,7 +14,7 @@ hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
import os,sys
-versions = ["2.3", "2.4", "2.5", "2.6", "2.7", "2.8"]
+versions = ["2.3", "2.4", "2.5", "2.6", "2.7",]
prefixes = ["/usr", "/usr/local", "/opt", "/opt/local"]
known = {}
@@ -23,26 +23,29 @@ def checkPair(p, v,dllpre,dllsuff, bitness_magic):
if not os.path.isfile(file):
return None
- lib = os.path.join(p, "lib", dllpre+"python"+v+dllsuff)
+ lib = os.path.join(p, "lib/i386-linux-gnu", dllpre+"python"+v+dllsuff)
+ if not os.path.isfile(lib):
+ lib = os.path.join(p, "lib", dllpre+"python"+v+dllsuff)
if bitness_magic == 1:
lib64 = os.path.join(p, "lib", "64", dllpre+"python"+v+dllsuff)
elif bitness_magic == 2:
- lib64 = os.path.join(p, "lib64", dllpre+"python"+v+dllsuff)
+ lib64 = os.path.join(p, "lib/x86_64-linux-gnu", dllpre+"python"+v+dllsuff)
if not os.path.isfile(lib64):
- lib64 = lib
+ lib64 = os.path.join(p, "lib64", dllpre+"python"+v+dllsuff)
+ if not os.path.isfile(lib64):
+ lib64 = lib
else:
lib64 = None
- return [os.path.join(p, "include", "python"+v),
- lib,
- lib64]
+ return [os.path.join(p, "include", "python"+v), lib, lib64]
def print_vars(vers, known, sep, bitness_magic):
print "VBOX_PYTHON%s_INC=%s%s" %(vers, known[0], sep)
if bitness_magic > 0:
- print "VBOX_PYTHON%s_LIB=%s%s" %(vers, known[2], sep)
+ print "VBOX_PYTHON%s_LIB=%s%s" %(vers, known[2], sep)
+ print "VBOX_PYTHON%s_LIB_X86=%s%s" %(vers, known[1], sep)
else:
- print "VBOX_PYTHON%s_LIB=%s%s" %(vers, known[1], sep)
+ print "VBOX_PYTHON%s_LIB=%s%s" %(vers, known[1], sep)
def main(argv):
diff --git a/src/libs/xpcom18a4/python/server/loader.py b/src/libs/xpcom18a4/python/server/loader.py
index b5875546..e59155a5 100644
--- a/src/libs/xpcom18a4/python/server/loader.py
+++ b/src/libs/xpcom18a4/python/server/loader.py
@@ -57,11 +57,15 @@ def FindCOMComponents(py_module):
# For now, just run over all classes looking for likely candidates.
comps = []
for name, object in py_module.__dict__.items():
- if type(object)==types.ClassType and \
- _has_good_attr(object, "_com_interfaces_") and \
- _has_good_attr(object, "_reg_clsid_") and \
- _has_good_attr(object, "_reg_contractid_"):
- comps.append(object)
+ try:
+ if (type(object) == types.ClassType or issubclass(object, object)) and \
+ _has_good_attr(object, "_com_interfaces_") and \
+ _has_good_attr(object, "_reg_clsid_") and \
+ _has_good_attr(object, "_reg_contractid_"):
+ comps.append(object)
+ except TypeError:
+ # The issubclass call raises TypeError when the obj is not a class.
+ pass;
return comps
def register_self(klass, compMgr, location, registryLocation, componentType):
diff --git a/src/libs/xpcom18a4/python/src/PyGBase.cpp b/src/libs/xpcom18a4/python/src/PyGBase.cpp
index 93fe03f9..0a935017 100644
--- a/src/libs/xpcom18a4/python/src/PyGBase.cpp
+++ b/src/libs/xpcom18a4/python/src/PyGBase.cpp
@@ -195,7 +195,8 @@ void *PyG_Base::ThisAsIID( const nsIID &iid )
PyG_Base::AutoWrapPythonInstance(PyObject *ob, const nsIID &iid, nsISupports **ppret)
{
NS_PRECONDITION(ppret!=NULL, "null pointer when wrapping a Python instance!");
- NS_PRECONDITION(ob && PyInstance_Check(ob), "AutoWrapPythonInstance is expecting an non-NULL instance!");
+ NS_PRECONDITION(ob && PyObject_HasAttrString(ob, "__class__"),
+ "AutoWrapPythonInstance is expecting an non-NULL instance!");
PRBool ok = PR_FALSE;
// XXX - todo - this static object leaks! (but Python on Windows leaks 2000+ objects as it is ;-)
static PyObject *func = NULL; // fetch this once and remember!
diff --git a/src/libs/xpcom18a4/python/src/PyIID.cpp b/src/libs/xpcom18a4/python/src/PyIID.cpp
index 2cdcf5c0..783c9c61 100644
--- a/src/libs/xpcom18a4/python/src/PyIID.cpp
+++ b/src/libs/xpcom18a4/python/src/PyIID.cpp
@@ -114,7 +114,7 @@ Py_nsIID::IIDFromPyObject(PyObject *ob, nsIID *pRet) {
}
} else if (ob->ob_type == &type) {
iid = ((Py_nsIID *)ob)->m_iid;
- } else if (PyInstance_Check(ob)) {
+ } else if (PyObject_HasAttrString(ob, "__class__")) {
// Get the _iidobj_ attribute
PyObject *use_ob = PyObject_GetAttrString(ob, "_iidobj_");
if (use_ob==NULL) {
diff --git a/src/libs/xpcom18a4/python/src/PyISupports.cpp b/src/libs/xpcom18a4/python/src/PyISupports.cpp
index 508eeeae..0802eeed 100644
--- a/src/libs/xpcom18a4/python/src/PyISupports.cpp
+++ b/src/libs/xpcom18a4/python/src/PyISupports.cpp
@@ -321,7 +321,7 @@ Py_nsISupports::InterfaceFromPyObject(PyObject *ob,
// support nsIVariant
if (iid.Equals(NS_GET_IID(nsIVariant)) || iid.Equals(NS_GET_IID(nsIWritableVariant))) {
// Check it is not already nsIVariant
- if (PyInstance_Check(ob)) {
+ if (PyObject_HasAttrString(ob, "__class__")) {
PyObject *sub_ob = PyObject_GetAttrString(ob, "_comobj_");
if (sub_ob==NULL) {
PyErr_Clear();
@@ -344,7 +344,7 @@ Py_nsISupports::InterfaceFromPyObject(PyObject *ob,
}
// end of variant support.
- if (PyInstance_Check(ob)) {
+ if (PyObject_HasAttrString(ob, "__class__")) {
// Get the _comobj_ attribute
PyObject *use_ob = PyObject_GetAttrString(ob, "_comobj_");
if (use_ob==NULL) {
diff --git a/src/libs/xpcom18a4/python/src/VariantUtils.cpp b/src/libs/xpcom18a4/python/src/VariantUtils.cpp
index 0c864ec4..cc050b5f 100644
--- a/src/libs/xpcom18a4/python/src/VariantUtils.cpp
+++ b/src/libs/xpcom18a4/python/src/VariantUtils.cpp
@@ -1116,7 +1116,7 @@ PRBool PyXPCOM_InterfaceVariantHelper::Init(PyObject *obParams)
if (PySequence_Length(m_pyparams) != total_params_needed) {
#ifdef VBOX
PyErr_Format(PyExc_ValueError, "The type descriptions indicate %d args are needed, but %ld were provided",
- total_params_needed, PySequence_Length(m_pyparams));
+ total_params_needed, (long)PySequence_Length(m_pyparams));
#else
PyErr_Format(PyExc_ValueError, "The type descriptions indicate %d args are needed, but %d were provided",
total_params_needed, PySequence_Length(m_pyparams));
diff --git a/src/libs/xpcom18a4/python/src/module/_xpcom.cpp b/src/libs/xpcom18a4/python/src/module/_xpcom.cpp
index f5465131..be6b1888 100644
--- a/src/libs/xpcom18a4/python/src/module/_xpcom.cpp
+++ b/src/libs/xpcom18a4/python/src/module/_xpcom.cpp
@@ -74,24 +74,44 @@ extern PYXPCOM_EXPORT void PyXPCOM_InterpreterState_Ensure();
#endif
#ifdef VBOX_PYXPCOM
+# include <iprt/cdefs.h>
+# ifndef MODULE_NAME_SUFFIX
+# define MANGLE_MODULE_NAME(a_szName) a_szName
+# define MANGLE_MODULE_INIT(a_Name) a_Name
+# else
+# define MANGLE_MODULE_NAME(a_szName) a_szName RT_XSTR(MODULE_NAME_SUFFIX)
+# define MANGLE_MODULE_INIT(a_Name) RT_CONCAT(a_Name, MODULE_NAME_SUFFIX)
+# endif
# ifdef VBOX_PYXPCOM_VERSIONED
# if PY_VERSION_HEX >= 0x02080000
-# define MODULE_NAME "VBoxPython2_8"
+# define MODULE_NAME MANGLE_MODULE_NAME("VBoxPython2_8")
+# define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_8)
+
# elif PY_VERSION_HEX >= 0x02070000
-# define MODULE_NAME "VBoxPython2_7"
+# define MODULE_NAME MANGLE_MODULE_NAME("VBoxPython2_7")
+# define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_7)
+
# elif PY_VERSION_HEX >= 0x02060000
-# define MODULE_NAME "VBoxPython2_6"
+# define MODULE_NAME MANGLE_MODULE_NAME("VBoxPython2_6")
+# define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_6)
+
# elif PY_VERSION_HEX >= 0x02050000
-# define MODULE_NAME "VBoxPython2_5"
+# define MODULE_NAME MANGLE_MODULE_NAME("VBoxPython2_5")
+# define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_5)
+
# elif PY_VERSION_HEX >= 0x02040000
-# define MODULE_NAME "VBoxPython2_4"
+# define MODULE_NAME MANGLE_MODULE_NAME("VBoxPython2_4")
+# define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_4)
+
# elif PY_VERSION_HEX >= 0x02030000
-# define MODULE_NAME "VBoxPython2_3"
+# define MODULE_NAME MANGLE_MODULE_NAME("VBoxPython2_3")
+# define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython2_3)
# else
# error "Fix module versioning."
# endif
# else
-# define MODULE_NAME "VBoxPython"
+# define MODULE_NAME MANGLE_MODULE_NAME("VBoxPython")
+# define initVBoxPython MANGLE_MODULE_INIT(initVBoxPython)
# endif
#else
#define MODULE_NAME "_xpcom"
@@ -510,7 +530,7 @@ PyObject *LogConsoleMessage(PyObject *self, PyObject *args)
#ifdef VBOX
-# include <VBox/com/EventQueue.h>
+# include <VBox/com/NativeEventQueue.h>
# include <iprt/err.h>
static PyObject *
@@ -521,7 +541,7 @@ PyXPCOMMethod_WaitForEvents(PyObject *self, PyObject *args)
return NULL;
int rc;
- com::EventQueue* aEventQ = com::EventQueue::getMainEventQueue();
+ com::NativeEventQueue* aEventQ = com::NativeEventQueue::getMainEventQueue();
NS_WARN_IF_FALSE(aEventQ != nsnull, "Null main event queue");
if (!aEventQ)
{
@@ -556,7 +576,7 @@ PyXPCOMMethod_WaitForEvents(PyObject *self, PyObject *args)
static PyObject*
PyXPCOMMethod_InterruptWait(PyObject *self, PyObject *args)
{
- com::EventQueue* aEventQ = com::EventQueue::getMainEventQueue();
+ com::NativeEventQueue* aEventQ = com::NativeEventQueue::getMainEventQueue();
NS_WARN_IF_FALSE(aEventQ != nsnull, "Null main event queue");
if (!aEventQ)
return NULL;
@@ -776,31 +796,13 @@ using namespace com;
extern "C" NS_EXPORT
void
-# ifdef VBOX_PYXPCOM_VERSIONED
-# if PY_VERSION_HEX >= 0x02080000
-initVBoxPython2_8() {
-# elif PY_VERSION_HEX >= 0x02070000
-initVBoxPython2_7() {
-# elif PY_VERSION_HEX >= 0x02060000
-initVBoxPython2_6() {
-# elif PY_VERSION_HEX >= 0x02050000
-initVBoxPython2_5() {
-# elif PY_VERSION_HEX >= 0x02040000
-initVBoxPython2_4() {
-# elif PY_VERSION_HEX >= 0x02030000
-initVBoxPython2_3() {
-# else
-# error "Fix module versioning."
-# endif
-# else
-initVBoxPython() {
-# endif
+initVBoxPython() { /* NOTE! This name is redefined at the top of the file! */
static bool s_vboxInited = false;
if (!s_vboxInited) {
int rc = 0;
#if defined(VBOX_PATH_APP_PRIVATE_ARCH) && defined(VBOX_PATH_SHARED_LIBS)
- rc = RTR3InitDll(0);
+ rc = RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);
#else
const char *home = getenv("VBOX_PROGRAM_PATH");
if (home) {
@@ -808,9 +810,9 @@ initVBoxPython() {
char *exepath = (char *)alloca(len + 32);
memcpy(exepath, home, len);
memcpy(exepath + len, "/pythonfake", sizeof("/pythonfake"));
- rc = RTR3InitEx(RTR3INIT_VER_CUR, RTR3INIT_FLAGS_DLL, 0, NULL, exepath);
+ rc = RTR3InitEx(RTR3INIT_VER_CUR, RTR3INIT_FLAGS_DLL | RTR3INIT_FLAGS_UNOBTRUSIVE, 0, NULL, exepath);
} else {
- rc = RTR3InitDll(0);
+ rc = RTR3InitDll(RTR3INIT_FLAGS_UNOBTRUSIVE);
}
#endif
diff --git a/src/libs/xpcom18a4/python/vboxxpcom.py b/src/libs/xpcom18a4/python/vboxxpcom.py
index 47b11d0f..fa1f597a 100755
--- a/src/libs/xpcom18a4/python/vboxxpcom.py
+++ b/src/libs/xpcom18a4/python/vboxxpcom.py
@@ -1,5 +1,5 @@
"""
-Copyright (C) 2008 Oracle Corporation
+Copyright (C) 2008-2012 Oracle Corporation
This file is part of VirtualBox Open Source Edition (OSE), as
available from http://www.virtualbox.org. This file is free software;
@@ -14,38 +14,49 @@ import xpcom
import sys
import platform
-# this code overcomes somewhat unlucky feature of Python, where it searches
+#
+# This code overcomes somewhat unlucky feature of Python, where it searches
# for binaries in the same place as platfom independent modules, while
# rest of Python bindings expect _xpcom to be inside xpcom module
-
-candidates = ['VBoxPython' + str(sys.version_info[0]) + '_' + str(sys.version_info[1]),
- 'VBoxPython' + str(sys.version_info[0]),
- 'VBoxPython']
+#
+
+_asVBoxPythons = [
+ 'VBoxPython' + str(sys.version_info[0]) + '_' + str(sys.version_info[1]),
+ 'VBoxPython' + str(sys.version_info[0]),
+ 'VBoxPython'
+];
+
+# On platforms where we ship both 32-bit and 64-bit API bindings, we have to
+# look for the right set if we're a 32-bit process.
+if platform.system() in [ 'SunOS', ] and sys.maxsize <= 2**32:
+ _asNew = [ sCandidate + '_x86' for sCandidate in _asVBoxPythons ];
+ _asNew.extend(_asVBoxPythons);
+ _asVBoxPythons = _asNew;
+ del _asNew;
+
+# On Darwin (aka Mac OS X) we know exactly where things are in a normal
+# VirtualBox installation.
+## @todo Edit this at build time to the actual VBox location set in the make files.
+## @todo We know the location for most hardened builds, not just darwin!
if platform.system() == 'Darwin':
- # On Darwin (aka Mac OS X) we know exactly where things are in a normal
- # VirtualBox installation. Also, there are two versions of python there
- # (2.3.x and 2.5.x) depending on whether the os is striped or spotty, so
- # we have to choose the right module to load.
- #
- # XXX: This needs to be adjusted for OSE builds. A more general solution would
- # be to to sed the file during install and inject the VBOX_PATH_APP_PRIVATE_ARCH
- # and VBOX_PATH_SHARED_LIBS when these are set.
sys.path.append('/Applications/VirtualBox.app/Contents/MacOS')
-cglue = None
-for m in candidates:
- try:
- cglue = __import__(m)
- break
- except:
- pass
+_oVBoxPythonMod = None
+for m in _asVBoxPythons:
+ try:
+ _oVBoxPythonMod = __import__(m)
+ break
+ except Exception, x:
+ print 'm=%s x=%s' % (m, x);
+ #except:
+ # pass
if platform.system() == 'Darwin':
sys.path.remove('/Applications/VirtualBox.app/Contents/MacOS')
-if cglue == None:
- raise Exception, "Cannot find VBoxPython module"
+if _oVBoxPythonMod == None:
+ raise Exception('Cannot find VBoxPython module (tried: %s)' % (', '.join(_asVBoxPythons),));
-sys.modules['xpcom._xpcom'] = cglue
-xpcom._xpcom = cglue
+sys.modules['xpcom._xpcom'] = _oVBoxPythonMod;
+xpcom._xpcom = _oVBoxPythonMod;
diff --git a/src/libs/xpcom18a4/xpcom-namespace-cleanup.map b/src/libs/xpcom18a4/xpcom-namespace-cleanup.map
index 3ad053fc..40867352 100644
--- a/src/libs/xpcom18a4/xpcom-namespace-cleanup.map
+++ b/src/libs/xpcom18a4/xpcom-namespace-cleanup.map
@@ -4,7 +4,7 @@
# the Mozilla project. VirtualBox shouldn't pollute the namespace.
#
-# Copyright (C) 2008 Oracle Corporation
+# Copyright (C) 2008-2010 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
diff --git a/src/libs/xpcom18a4/xpcom-private.h b/src/libs/xpcom18a4/xpcom-private.h
index f30e7ce4..e0721fae 100644
--- a/src/libs/xpcom18a4/xpcom-private.h
+++ b/src/libs/xpcom18a4/xpcom-private.h
@@ -11,17 +11,13 @@
#define HAVE_GETPAGESIZE 1
/* Define if iconv() is available */
-#ifndef L4ENV
#define HAVE_ICONV 1
-#endif
/* Define if iconv() supports const input */
/* #undef HAVE_ICONV_WITH_CONST_INPUT */
/* Define if mbrtowc() is available */
-#ifndef L4ENV
#define HAVE_MBRTOWC 1
-#endif
/* Define if <sys/mount.h> is present */
#define HAVE_SYS_MOUNT_H 1
@@ -30,9 +26,7 @@
#define HAVE_SYS_VFS_H 1
/* Define if wcrtomb() is available */
-#ifndef L4ENV
#define HAVE_WCRTOMB 1
-#endif
#endif /* _XPCOM_PRIVATE_H_ */
diff --git a/src/libs/xpcom18a4/xpcom/components/nsComponentManager.cpp b/src/libs/xpcom18a4/xpcom/components/nsComponentManager.cpp
index 681030a0..ec3cb3f5 100644
--- a/src/libs/xpcom18a4/xpcom/components/nsComponentManager.cpp
+++ b/src/libs/xpcom18a4/xpcom/components/nsComponentManager.cpp
@@ -2375,7 +2375,7 @@ nsComponentManagerImpl::GetServiceByContractID(const char* aContractID,
mon.Enter();
-#ifdef XPCOM_CHECK_PENDING_CIDS
+#ifdef XPCOM_CHECK_PENDING_CIDS
if (entry)
RemovePendingCID(entry->mCid);
#endif
@@ -3722,8 +3722,21 @@ NS_GetServiceManager(nsIServiceManager* *result)
if (nsComponentManagerImpl::gComponentManager == nsnull)
{
+#ifdef VBOX
+ // While XPCOM might need initialization, we're not in a position
+ // to pass the right values to this call. This is actually triggered
+ // on object destruction, so there is no point in re-initializing,
+ // and actually the attempt would lead to nested calls to
+ // xptiInterfaceInfoManager::BuildFileSearchPath, which it detects
+ // as unsafe in debug builds. Just fail, no real problem.
+#ifdef DEBUG
+ printf("NS_GetServiceManager: no current instance, suppressed XPCOM initialization!\n");
+#endif
+ rv = NS_ERROR_SERVICE_NOT_AVAILABLE;
+#else /* !VBOX */
// XPCOM needs initialization.
rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
+#endif /* !VBOX */
}
if (NS_FAILED(rv))
diff --git a/src/libs/xpcom18a4/xpcom/components/nsNativeComponentLoader.cpp b/src/libs/xpcom18a4/xpcom/components/nsNativeComponentLoader.cpp
index 1ccd862c..a3fd5df8 100644
--- a/src/libs/xpcom18a4/xpcom/components/nsNativeComponentLoader.cpp
+++ b/src/libs/xpcom18a4/xpcom/components/nsNativeComponentLoader.cpp
@@ -674,6 +674,7 @@ nsNativeComponentLoader::AutoRegisterComponent(PRInt32 when,
*registered = PR_FALSE;
+#ifndef VBOX
/* this should be a pref or registry entry, or something */
static const char *ValidDllExtensions[] = {
".dll", /* Windows */
@@ -749,6 +750,53 @@ nsNativeComponentLoader::AutoRegisterComponent(PRInt32 when,
// Skip invalid extensions
return NS_OK;
+#else /* VBOX */
+ /* VBox: Only one valid suffix exist, so dispense with the the list. */
+# ifdef RT_OS_DARWIN
+# ifdef VBOX_IN_32_ON_64_MAIN_API
+ static const char s_szSuff[] = "-x86.dylib";
+# else
+ static const char s_szSuff[] = ".dylib";
+ static const char s_szSuffInvalid[] = "-x86.dylib";
+# endif
+# elif defined(RT_OS_OS2) || defined(RT_OS_WINDOWS)
+# ifdef VBOX_IN_32_ON_64_MAIN_API
+ static const char s_szSuff[] = "-x86.dll";
+#else
+ static const char s_szSuff[] = ".dll";
+ static const char s_szSuffInvalid[] = "-x86.dll";
+# endif
+# else
+# ifdef VBOX_IN_32_ON_64_MAIN_API
+ static const char s_szSuff[] = "-x86.so";
+#else
+ static const char s_szSuff[] = ".so";
+ static const char s_szSuffInvalid[] = "-x86.so";
+# endif
+# endif
+
+ nsCAutoString strLeafName;
+ rv = component->GetNativeLeafName(strLeafName);
+ if (NS_FAILED(rv))
+ return rv;
+ size_t cchLeafName = strLeafName.Length();
+ if ( cchLeafName <= sizeof(s_szSuff)
+ || PL_strcasecmp(strLeafName.get() + cchLeafName - sizeof(s_szSuff) + 1, s_szSuff))
+ {
+ PR_LOG(nsComponentManagerLog, PR_LOG_DEBUG, ("Skipping '%s'...", strLeafName.get()));
+ return NS_OK; /* skip */
+ }
+# ifndef VBOX_IN_32_ON_64_MAIN_API
+ if ( cchLeafName >= sizeof(s_szSuffInvalid)
+ && !PL_strcasecmp(strLeafName.get() + cchLeafName - sizeof(s_szSuffInvalid) + 1, s_szSuffInvalid))
+ {
+ PR_LOG(nsComponentManagerLog, PR_LOG_DEBUG, ("Skipping '%s' (#2)...", strLeafName.get()));
+ return NS_OK; /* skip */
+ }
+# endif
+ PR_LOG(nsComponentManagerLog, PR_LOG_DEBUG, ("... '%s'", strLeafName.get()));
+#endif /* VBOX */
+
nsXPIDLCString persistentDescriptor;
// what I want to do here is QI for a Component Registration Manager. Since this
// has not been invented yet, QI to the obsolete manager. Kids, don't do this at home.
diff --git a/src/libs/xpcom18a4/xpcom/io/nsAppFileLocationProvider.cpp b/src/libs/xpcom18a4/xpcom/io/nsAppFileLocationProvider.cpp
index c67b182f..eb144c55 100644
--- a/src/libs/xpcom18a4/xpcom/io/nsAppFileLocationProvider.cpp
+++ b/src/libs/xpcom18a4/xpcom/io/nsAppFileLocationProvider.cpp
@@ -378,10 +378,6 @@ NS_METHOD nsAppFileLocationProvider::GetProductDirectory(nsILocalFile **aLocalFi
rv = directoryService->Get(NS_WIN_WINDOWS_DIR, NS_GET_IID(nsILocalFile), getter_AddRefs(localDir));
}
if (NS_FAILED(rv)) return rv;
-#elif defined(L4ENV)
- /* Major hack attack, should sort out the environment stuff!!! */
- rv = NS_NewNativeLocalFile(nsDependentCString("."), PR_TRUE, getter_AddRefs(localDir));
- if (NS_FAILED(rv)) return rv;
#elif defined(XP_UNIX)
rv = NS_NewNativeLocalFile(nsDependentCString(PR_GetEnv("HOME")), PR_TRUE, getter_AddRefs(localDir));
if (NS_FAILED(rv)) return rv;
diff --git a/src/libs/xpcom18a4/xpcom/io/nsDirectoryService.cpp b/src/libs/xpcom18a4/xpcom/io/nsDirectoryService.cpp
index e5cc844c..4e650721 100644
--- a/src/libs/xpcom18a4/xpcom/io/nsDirectoryService.cpp
+++ b/src/libs/xpcom18a4/xpcom/io/nsDirectoryService.cpp
@@ -92,7 +92,7 @@
#else
#define COMPONENT_REGISTRY_NAME NS_LITERAL_CSTRING("compreg.dat")
#define COMPONENT_DIRECTORY NS_LITERAL_CSTRING("components")
-#endif
+#endif
#define XPTI_REGISTRY_NAME NS_LITERAL_CSTRING("xpti.dat")
@@ -111,22 +111,22 @@
#endif
//----------------------------------------------------------------------------------------
-nsresult
+nsresult
nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile)
//----------------------------------------------------------------------------------------
{
NS_ENSURE_ARG_POINTER(aFile);
*aFile = nsnull;
-
+
// Set the component registry location:
if (!mService)
return NS_ERROR_FAILURE;
- nsresult rv;
-
+ nsresult rv;
+
nsCOMPtr<nsIProperties> dirService;
- rv = nsDirectoryService::Create(nsnull,
- NS_GET_IID(nsIProperties),
+ rv = nsDirectoryService::Create(nsnull,
+ NS_GET_IID(nsIProperties),
getter_AddRefs(dirService)); // needs to be around for life of product
if (dirService)
@@ -156,7 +156,7 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile)
char* lastSlash = PL_strrchr(buf, '\\');
if (lastSlash)
*(lastSlash + 1) = '\0';
-
+
localFile->InitWithNativePath(nsDependentCString(buf));
*aFile = localFile;
return NS_OK;
@@ -182,9 +182,9 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile)
// create an FSSpec from the volume and dirid of the app.
FSSpec appFSSpec;
::FSMakeFSSpec(pInfo.processAppSpec->vRefNum, pInfo.processAppSpec->parID, 0, &appFSSpec);
-
+
nsCOMPtr<nsILocalFileMac> localFileMac = do_QueryInterface((nsIFile*)localFile);
- if (localFileMac)
+ if (localFileMac)
{
localFileMac->InitWithFSSpec(&appFSSpec);
*aFile = localFile;
@@ -192,6 +192,11 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile)
}
}
#elif defined(XP_MACOSX)
+# ifdef MOZ_DEFAULT_VBOX_XPCOM_HOME
+ rv = localFile->InitWithNativePath(nsDependentCString(MOZ_DEFAULT_VBOX_XPCOM_HOME));
+ if (NS_SUCCEEDED(rv))
+ *aFile = localFile;
+# else
// Works even if we're not bundled.
CFBundleRef appBundle = CFBundleGetMainBundle();
if (appBundle != nsnull)
@@ -220,8 +225,9 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile)
CFRelease(bundleURL);
}
}
-
- NS_ASSERTION(*aFile, "nsDirectoryService - Could not determine CurrentProcessDir.\n");
+#endif
+
+ NS_ASSERTION(*aFile, "nsDirectoryService - Could not determine CurrentProcessDir.\n");
if (*aFile)
return NS_OK;
@@ -242,7 +248,7 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile)
char buf2[MAXPATHLEN + 3];
buf2[0] = '\0';
- /*
+ /*
* Env.var. VBOX_XPCOM_HOME first.
*/
char *psz = PR_GetEnv("VBOX_XPCOM_HOME");
@@ -250,7 +256,7 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile)
{
if (strlen(psz) < MAXPATHLEN)
{
- if (!realpath(psz, buf2))
+ if (!realpath(psz, buf2))
strcpy(buf2, psz);
strcat(buf2, "/x"); /* for the filename stripping */
}
@@ -277,7 +283,7 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile)
{
char buf[MAXPATHLEN];
int cchLink = readlink("/proc/self/exe", buf, sizeof(buf) - 1);
- if (cchLink > 0 || cchLink != sizeof(buf) - 1)
+ if (cchLink > 0 || cchLink != sizeof(buf) - 1)
{
buf[cchLink] = '\0';
if (!realpath(buf, buf2))
@@ -296,7 +302,7 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile)
p[p == buf2] = '\0';
#ifdef DEBUG
printf("debug: (1) VBOX_XPCOM_HOME=%s\n", buf2);
- #endif
+ #endif
strcpy(szPath, buf2);
fPathSet = true;
}
@@ -312,12 +318,12 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile)
#endif
- // The MOZ_DEFAULT_VBOX_XPCOMHOME variable can be set at configure time with
+ // The MOZ_DEFAULT_VBOX_XPCOM_HOME variable can be set at configure time with
// a --with-default-mozilla-five-home=foo autoconf flag.
- //
+ //
// The idea here is to allow for builds that have a default VBOX_XPCOM_HOME
// regardless of the environment. This makes it easier to write apps that
- // embed mozilla without having to worry about setting up the environment
+ // embed mozilla without having to worry about setting up the environment
//
// We do this py putenv()ing the default value into the environment. Note that
// we only do this if it is not already set.
@@ -398,7 +404,7 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile)
}
#endif
-
+
NS_RELEASE(localFile);
NS_ERROR("unable to get current process directory");
@@ -448,7 +454,7 @@ nsIAtom* nsDirectoryService::sPictureDocumentsDirectory = nsnull;
nsIAtom* nsDirectoryService::sMovieDocumentsDirectory = nsnull;
nsIAtom* nsDirectoryService::sMusicDocumentsDirectory = nsnull;
nsIAtom* nsDirectoryService::sInternetSitesDirectory = nsnull;
-#elif defined (XP_WIN)
+#elif defined (XP_WIN)
nsIAtom* nsDirectoryService::sSystemDirectory = nsnull;
nsIAtom* nsDirectoryService::sWindowsDirectory = nsnull;
nsIAtom* nsDirectoryService::sHomeDirectory = nsnull;
@@ -557,7 +563,7 @@ static const nsStaticAtom directory_atoms[] = {
{ NS_OSX_MOVIE_DOCUMENTS_DIR, &nsDirectoryService::sMovieDocumentsDirectory },
{ NS_OSX_MUSIC_DOCUMENTS_DIR, &nsDirectoryService::sMusicDocumentsDirectory },
{ NS_OSX_INTERNET_SITES_DIR, &nsDirectoryService::sInternetSitesDirectory },
-#elif defined (XP_WIN)
+#elif defined (XP_WIN)
{ NS_OS_SYSTEM_DIR, &nsDirectoryService::sSystemDirectory },
{ NS_WIN_WINDOWS_DIR, &nsDirectoryService::sWindowsDirectory },
{ NS_WIN_HOME_DIR, &nsDirectoryService::sHomeDirectory },
@@ -600,18 +606,18 @@ static const nsStaticAtom directory_atoms[] = {
{ NS_BEOS_HOME_DIR, &nsDirectoryService::sHomeDirectory },
{ NS_BEOS_DESKTOP_DIR, &nsDirectoryService::sDesktopDirectory },
#endif
-};
+};
nsresult
nsDirectoryService::Init()
{
nsresult rv;
-
+
rv = NS_NewISupportsArray(getter_AddRefs(mProviders));
if (NS_FAILED(rv)) return rv;
NS_RegisterStaticAtoms(directory_atoms, NS_ARRAY_LENGTH(directory_atoms));
-
+
// Let the list hold the only reference to the provider.
nsAppFileLocationProvider *defaultProvider = new nsAppFileLocationProvider;
if (!defaultProvider)
@@ -665,7 +671,7 @@ struct FileData
data(nsnull),
persistent(PR_TRUE),
uuid(aUUID) {}
-
+
const char* property;
nsISupports* data;
PRBool persistent;
@@ -706,9 +712,9 @@ NS_IMETHODIMP
nsDirectoryService::Get(const char* prop, const nsIID & uuid, void* *result)
{
nsCStringKey key(prop);
-
+
nsCOMPtr<nsISupports> value = dont_AddRef(mHashtable.Get(&key));
-
+
if (value)
{
nsCOMPtr<nsIFile> cloneFile;
@@ -767,7 +773,7 @@ nsDirectoryService::Set(const char* prop, nsISupports* value)
return NS_OK;
}
- return NS_ERROR_FAILURE;
+ return NS_ERROR_FAILURE;
}
NS_IMETHODIMP
@@ -776,14 +782,14 @@ nsDirectoryService::Has(const char *prop, PRBool *_retval)
*_retval = PR_FALSE;
nsCOMPtr<nsIFile> value;
nsresult rv = Get(prop, NS_GET_IID(nsIFile), getter_AddRefs(value));
- if (NS_FAILED(rv))
+ if (NS_FAILED(rv))
return rv;
-
+
if (value)
{
*_retval = PR_TRUE;
}
-
+
return rv;
}
@@ -822,7 +828,7 @@ nsDirectoryService::UnregisterProvider(nsIDirectoryServiceProvider *prov)
// DO NOT ADD ANY LOCATIONS TO THIS FUNCTION UNTIL YOU TALK TO: dougt@netscape.com.
// This is meant to be a place of xpcom or system specific file locations, not
// application specific locations. If you need the later, register a callback for
-// your application.
+// your application.
NS_IMETHODIMP
nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_retval)
@@ -836,8 +842,8 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret
nsIAtom* inAtom = NS_NewAtom(prop);
// check to see if it is one of our defaults
-
- if (inAtom == nsDirectoryService::sCurrentProcess ||
+
+ if (inAtom == nsDirectoryService::sCurrentProcess ||
inAtom == nsDirectoryService::sOS_CurrentProcessDirectory )
{
rv = GetCurrentProcessDirectory(getter_AddRefs(localFile));
@@ -848,8 +854,8 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret
if (!localFile)
return NS_ERROR_FAILURE;
- localFile->AppendNative(COMPONENT_DIRECTORY);
- localFile->AppendNative(COMPONENT_REGISTRY_NAME);
+ localFile->AppendNative(COMPONENT_DIRECTORY);
+ localFile->AppendNative(COMPONENT_REGISTRY_NAME);
}
else if (inAtom == nsDirectoryService::sXPTIRegistry)
{
@@ -857,10 +863,10 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret
if (!localFile)
return NS_ERROR_FAILURE;
- localFile->AppendNative(COMPONENT_DIRECTORY);
- localFile->AppendNative(XPTI_REGISTRY_NAME);
+ localFile->AppendNative(COMPONENT_DIRECTORY);
+ localFile->AppendNative(XPTI_REGISTRY_NAME);
}
-
+
// Unless otherwise set, the core pieces of the GRE exist
// in the current process directory.
else if (inAtom == nsDirectoryService::sGRE_Directory)
@@ -880,7 +886,7 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret
{
rv = GetCurrentProcessDirectory(getter_AddRefs(localFile));
if (localFile)
- localFile->AppendNative(COMPONENT_DIRECTORY);
+ localFile->AppendNative(COMPONENT_DIRECTORY);
}
else if (inAtom == nsDirectoryService::sOS_DriveDirectory)
{
@@ -892,13 +898,13 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret
}
else if (inAtom == nsDirectoryService::sOS_CurrentProcessDirectory)
{
- rv = GetSpecialSystemDirectory(OS_CurrentProcessDirectory, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(OS_CurrentProcessDirectory, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sOS_CurrentWorkingDirectory)
{
- rv = GetSpecialSystemDirectory(OS_CurrentWorkingDirectory, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(OS_CurrentWorkingDirectory, getter_AddRefs(localFile));
}
-
+
#if defined(XP_MACOSX)
else if (inAtom == nsDirectoryService::sDirectory)
{
@@ -947,7 +953,7 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret
else if (inAtom == nsDirectoryService::sInternetSearchDirectory)
{
rv = GetOSXFolderType(kClassicDomain, kInternetSearchSitesFolderType, getter_AddRefs(localFile));
- }
+ }
else if (inAtom == nsDirectoryService::sUserLibDirectory)
{
rv = GetOSXFolderType(kUserDomain, kDomainLibraryFolderType, getter_AddRefs(localFile));
@@ -979,14 +985,14 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret
}
::ICStop(icInstance);
}
-
+
if NS_FAILED(rv)
- {
+ {
// We got an error getting the DL folder from IC so try finding the user's Desktop folder
rv = GetOSXFolderType(kUserDomain, kDesktopFolderType, getter_AddRefs(localFile));
}
}
-
+
// Don't cache the DL directory as the user may change it while we're running.
// Negligible perf hit as this directory is only requested for downloads
*persistent = PR_FALSE;
@@ -1058,39 +1064,39 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret
#elif defined (XP_WIN)
else if (inAtom == nsDirectoryService::sSystemDirectory)
{
- rv = GetSpecialSystemDirectory(Win_SystemDirectory, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_SystemDirectory, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sWindowsDirectory)
{
- rv = GetSpecialSystemDirectory(Win_WindowsDirectory, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_WindowsDirectory, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sHomeDirectory)
{
- rv = GetSpecialSystemDirectory(Win_HomeDirectory, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_HomeDirectory, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sDesktop)
{
- rv = GetSpecialSystemDirectory(Win_Desktop, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Desktop, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sPrograms)
{
- rv = GetSpecialSystemDirectory(Win_Programs, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Programs, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sControls)
{
- rv = GetSpecialSystemDirectory(Win_Controls, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Controls, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sPrinters)
{
- rv = GetSpecialSystemDirectory(Win_Printers, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Printers, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sPersonal)
{
- rv = GetSpecialSystemDirectory(Win_Personal, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Personal, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sFavorites)
{
- rv = GetSpecialSystemDirectory(Win_Favorites, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Favorites, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sStartup)
{
@@ -1098,23 +1104,23 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret
}
else if (inAtom == nsDirectoryService::sRecent)
{
- rv = GetSpecialSystemDirectory(Win_Recent, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Recent, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sSendto)
{
- rv = GetSpecialSystemDirectory(Win_Sendto, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Sendto, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sBitbucket)
{
- rv = GetSpecialSystemDirectory(Win_Bitbucket, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Bitbucket, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sStartmenu)
{
- rv = GetSpecialSystemDirectory(Win_Startmenu, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Startmenu, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sDesktopdirectory)
{
- rv = GetSpecialSystemDirectory(Win_Desktopdirectory, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Desktopdirectory, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sDrives)
{
@@ -1122,11 +1128,11 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret
}
else if (inAtom == nsDirectoryService::sNetwork)
{
- rv = GetSpecialSystemDirectory(Win_Network, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Network, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sNethood)
{
- rv = GetSpecialSystemDirectory(Win_Nethood, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Nethood, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sFonts)
{
@@ -1134,41 +1140,41 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret
}
else if (inAtom == nsDirectoryService::sTemplates)
{
- rv = GetSpecialSystemDirectory(Win_Templates, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Templates, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sCommon_Startmenu)
{
- rv = GetSpecialSystemDirectory(Win_Common_Startmenu, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Common_Startmenu, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sCommon_Programs)
{
- rv = GetSpecialSystemDirectory(Win_Common_Programs, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Common_Programs, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sCommon_Startup)
{
- rv = GetSpecialSystemDirectory(Win_Common_Startup, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Common_Startup, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sCommon_Desktopdirectory)
{
- rv = GetSpecialSystemDirectory(Win_Common_Desktopdirectory, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Common_Desktopdirectory, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sAppdata)
{
- rv = GetSpecialSystemDirectory(Win_Appdata, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Appdata, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sPrinthood)
{
- rv = GetSpecialSystemDirectory(Win_Printhood, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Printhood, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sWinCookiesDirectory)
{
- rv = GetSpecialSystemDirectory(Win_Cookies, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Win_Cookies, getter_AddRefs(localFile));
}
#elif defined (XP_UNIX)
else if (inAtom == nsDirectoryService::sLocalDirectory)
{
- rv = GetSpecialSystemDirectory(Unix_LocalDirectory, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Unix_LocalDirectory, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sLibDirectory)
{
@@ -1176,29 +1182,29 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret
}
else if (inAtom == nsDirectoryService::sHomeDirectory)
{
- rv = GetSpecialSystemDirectory(Unix_HomeDirectory, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(Unix_HomeDirectory, getter_AddRefs(localFile));
}
#elif defined (XP_OS2)
else if (inAtom == nsDirectoryService::sSystemDirectory)
{
- rv = GetSpecialSystemDirectory(OS2_SystemDirectory, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(OS2_SystemDirectory, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sOS2Directory)
{
- rv = GetSpecialSystemDirectory(OS2_OS2Directory, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(OS2_OS2Directory, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sHomeDirectory)
{
- rv = GetSpecialSystemDirectory(OS2_HomeDirectory, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(OS2_HomeDirectory, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sDesktopDirectory)
{
- rv = GetSpecialSystemDirectory(OS2_DesktopDirectory, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(OS2_DesktopDirectory, getter_AddRefs(localFile));
}
#elif defined (XP_BEOS)
else if (inAtom == nsDirectoryService::sSettingsDirectory)
{
- rv = GetSpecialSystemDirectory(BeOS_SettingsDirectory, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(BeOS_SettingsDirectory, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sHomeDirectory)
{
@@ -1206,11 +1212,11 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret
}
else if (inAtom == nsDirectoryService::sDesktopDirectory)
{
- rv = GetSpecialSystemDirectory(BeOS_DesktopDirectory, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(BeOS_DesktopDirectory, getter_AddRefs(localFile));
}
else if (inAtom == nsDirectoryService::sSystemDirectory)
{
- rv = GetSpecialSystemDirectory(BeOS_SystemDirectory, getter_AddRefs(localFile));
+ rv = GetSpecialSystemDirectory(BeOS_SystemDirectory, getter_AddRefs(localFile));
}
#endif
@@ -1230,6 +1236,6 @@ nsDirectoryService::GetFiles(const char *prop, nsISimpleEnumerator **_retval)
{
NS_ENSURE_ARG_POINTER(_retval);
*_retval = nsnull;
-
+
return NS_ERROR_FAILURE;
}
diff --git a/src/libs/xpcom18a4/xpcom/io/nsLocalFile.h b/src/libs/xpcom18a4/xpcom/io/nsLocalFile.h
index 4ab859aa..8201affb 100644
--- a/src/libs/xpcom18a4/xpcom/io/nsLocalFile.h
+++ b/src/libs/xpcom18a4/xpcom/io/nsLocalFile.h
@@ -74,9 +74,6 @@
#include "nsLocalFileOSX.h"
#elif defined(XP_MAC)
#include "nsLocalFileMac.h"
-#elif defined(L4ENV)
- /* Major hack attack!!! */
-#include "nsLocalFileL4.h"
#elif defined(XP_UNIX) || defined(XP_BEOS)
#include "nsLocalFileUnix.h"
#elif defined(XP_OS2)
diff --git a/src/libs/xpcom18a4/xpcom/io/nsLocalFileL4.cpp b/src/libs/xpcom18a4/xpcom/io/nsLocalFileL4.cpp
deleted file mode 100644
index 1a3c974f..00000000
--- a/src/libs/xpcom18a4/xpcom/io/nsLocalFileL4.cpp
+++ /dev/null
@@ -1,549 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; 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 Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998-1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Mike Shaver <shaver@mozilla.org>
- * Christopher Blizzard <blizzard@mozilla.org>
- * Jason Eager <jce2@po.cwru.edu>
- * Stuart Parmenter <pavlov@netscape.com>
- * Brendan Eich <brendan@mozilla.org>
- * Pete Collins <petejc@mozdev.org>
- * Paul Ashford <arougthopher@lizardland.net>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 ***** */
-
-/**
- * Implementation of nsIFile for L4 systems.
- *
- * Notes to all those who have something to do with this file again: I have told almost
- * all functions to return NS_ERROR_FAILURE. A good starting point if you need to
- * implement any of it would be to search/replace those with standard assertions.
- */
-
-#include "nsDirectoryServiceDefs.h"
-#include "nsCRT.h"
-#include "nsCOMPtr.h"
-#include "nsMemory.h"
-#include "nsIFile.h"
-#include "nsString.h"
-#include "nsReadableUtils.h"
-#include "nsLocalFile.h"
-#include "nsIComponentManager.h"
-#include "nsXPIDLString.h"
-#include "prproces.h"
-#include "nsISimpleEnumerator.h"
-#include "nsITimelineService.h"
-
-#include "nsNativeCharsetUtils.h"
-
-#if 0
-/* directory enumerator */
-class NS_COM
-nsDirEnumeratorL4 : public nsISimpleEnumerator
-{
- public:
- nsDirEnumeratorL4();
-
- // nsISupports interface
- NS_DECL_ISUPPORTS
-
- // nsISimpleEnumerator interface
- NS_DECL_NSISIMPLEENUMERATOR
-
- NS_IMETHOD Init(nsLocalFile *parent, PRBool ignored);
-
- private:
- ~nsDirEnumeratorL4();
-
- protected:
- NS_IMETHOD GetNextEntry();
-
-};
-
-nsDirEnumeratorL4::nsDirEnumeratorL4() :
- mDir(nsnull),
- mEntry(nsnull)
-{
- NS_ASSERTION(0, "nsDirEnumeratorL4 created!");
-}
-
-nsDirEnumeratorL4::~nsDirEnumeratorL4()
-{
-}
-
-NS_IMPL_ISUPPORTS1(nsDirEnumeratorL4, nsISimpleEnumerator)
-
-NS_IMETHODIMP
-nsDirEnumeratorL4::Init(nsLocalFile *parent, PRBool resolveSymlinks /*ignored*/)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsDirEnumeratorL4::HasMoreElements(PRBool *result)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsDirEnumeratorL4::GetNext(nsISupports **_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsDirEnumeratorL4::GetNextEntry()
-{
- return NS_ERROR_FAILURE;
-}
-#endif /* 0 */
-
-nsLocalFile::nsLocalFile()
-{
- NS_ASSERTION(0, "nsLocalFile created!");
-}
-
-nsLocalFile::nsLocalFile(const nsLocalFile& other)
-{
- NS_ASSERTION(0, "nsLocalFile created!");
-}
-
-NS_IMPL_THREADSAFE_ISUPPORTS2(nsLocalFile,
- nsIFile,
- nsILocalFile)
-
-nsresult
-nsLocalFile::nsLocalFileConstructor(nsISupports *outer,
- const nsIID &aIID,
- void **aInstancePtr)
-{
- NS_ASSERTION(0, "nsLocalFile::nsLocalFileConstructor called!");
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::Clone(nsIFile **file)
-{
- // Just copy-construct ourselves
- *file = new nsLocalFile(*this);
- if (!*file)
- return NS_ERROR_OUT_OF_MEMORY;
-
- NS_ADDREF(*file);
-
- return NS_OK;
-}
-
-NS_IMETHODIMP
-nsLocalFile::InitWithNativePath(const nsACString &filePath)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc **_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::OpenANSIFileDesc(const char *mode, FILE **_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::Create(PRUint32 type, PRUint32 permissions)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::AppendNative(const nsACString &fragment)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::AppendRelativeNativePath(const nsACString &fragment)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::Normalize()
-{
- return NS_ERROR_FAILURE;
-}
-
-void
-nsLocalFile::LocateNativeLeafName(nsACString::const_iterator &begin,
- nsACString::const_iterator &end)
-{
-}
-
-NS_IMETHODIMP
-nsLocalFile::GetNativeLeafName(nsACString &aLeafName)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::SetNativeLeafName(const nsACString &aLeafName)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::GetNativePath(nsACString &_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-nsresult
-nsLocalFile::GetNativeTargetPathName(nsIFile *newParent,
- const nsACString &newName,
- nsACString &_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-nsresult
-nsLocalFile::CopyDirectoryTo(nsIFile *newParent)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::CopyToNative(nsIFile *newParent, const nsACString &newName)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::CopyToFollowingLinksNative(nsIFile *newParent, const nsACString &newName)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::MoveToNative(nsIFile *newParent, const nsACString &newName)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::Remove(PRBool recursive)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::GetLastModifiedTime(PRInt64 *aLastModTime)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::SetLastModifiedTime(PRInt64 aLastModTime)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::GetLastModifiedTimeOfLink(PRInt64 *aLastModTimeOfLink)
-{
- return NS_ERROR_FAILURE;
-}
-
-/*
- * utime(2) may or may not dereference symlinks, joy.
- */
-NS_IMETHODIMP
-nsLocalFile::SetLastModifiedTimeOfLink(PRInt64 aLastModTimeOfLink)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::GetPermissions(PRUint32 *aPermissions)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::GetPermissionsOfLink(PRUint32 *aPermissionsOfLink)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::SetPermissions(PRUint32 aPermissions)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::SetPermissionsOfLink(PRUint32 aPermissions)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::GetFileSize(PRInt64 *aFileSize)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::SetFileSize(PRInt64 aFileSize)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::GetFileSizeOfLink(PRInt64 *aFileSize)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::GetParent(nsIFile **aParent)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::Exists(PRBool *_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::IsWritable(PRBool *_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::IsReadable(PRBool *_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::IsExecutable(PRBool *_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::IsDirectory(PRBool *_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::IsFile(PRBool *_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::IsHidden(PRBool *_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::IsSymlink(PRBool *_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::IsSpecial(PRBool *_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::Equals(nsIFile *inFile, PRBool *_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::Contains(nsIFile *inFile, PRBool recur, PRBool *_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::GetNativeTarget(nsACString &_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-/* attribute PRBool followLinks; */
-NS_IMETHODIMP
-nsLocalFile::GetFollowLinks(PRBool *aFollowLinks)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::SetFollowLinks(PRBool aFollowLinks)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::GetDirectoryEntries(nsISimpleEnumerator **entries)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::Load(PRLibrary **_retval)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::GetPersistentDescriptor(nsACString &aPersistentDescriptor)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::SetPersistentDescriptor(const nsACString &aPersistentDescriptor)
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::Reveal()
-{
- return NS_ERROR_FAILURE;
-}
-
-NS_IMETHODIMP
-nsLocalFile::Launch()
-{
- return NS_ERROR_FAILURE;
-}
-
-nsresult
-NS_NewNativeLocalFile(const nsACString &path, PRBool followSymlinks, nsILocalFile **result)
-{
- return NS_ERROR_FAILURE;
-}
-
-// Unicode interface Wrapper
-nsresult
-nsLocalFile::InitWithPath(const nsAString &filePath)
-{
- return NS_ERROR_FAILURE;
-}
-nsresult
-nsLocalFile::Append(const nsAString &node)
-{
- return NS_ERROR_FAILURE;
-}
-nsresult
-nsLocalFile::AppendRelativePath(const nsAString &node)
-{
- return NS_ERROR_FAILURE;
-}
-nsresult
-nsLocalFile::GetLeafName(nsAString &aLeafName)
-{
- return NS_ERROR_FAILURE;
-}
-nsresult
-nsLocalFile::SetLeafName(const nsAString &aLeafName)
-{
- return NS_ERROR_FAILURE;
-}
-nsresult
-nsLocalFile::GetPath(nsAString &_retval)
-{
- return NS_ERROR_FAILURE;
-}
-nsresult
-nsLocalFile::CopyTo(nsIFile *newParentDir, const nsAString &newName)
-{
- return NS_ERROR_FAILURE;
-}
-nsresult
-nsLocalFile::CopyToFollowingLinks(nsIFile *newParentDir, const nsAString &newName)
-{
- return NS_ERROR_FAILURE;
-}
-nsresult
-nsLocalFile::MoveTo(nsIFile *newParentDir, const nsAString &newName)
-{
- return NS_ERROR_FAILURE;
-}
-nsresult
-nsLocalFile::GetTarget(nsAString &_retval)
-{
- return NS_ERROR_FAILURE;
-}
-nsresult
-NS_NewLocalFile(const nsAString &path, PRBool followLinks, nsILocalFile* *result)
-{
- return NS_ERROR_FAILURE;
-}
-
-//-----------------------------------------------------------------------------
-// global init/shutdown
-//-----------------------------------------------------------------------------
-
-void
-nsLocalFile::GlobalInit()
-{
-}
-
-void
-nsLocalFile::GlobalShutdown()
-{
-}
diff --git a/src/libs/xpcom18a4/xpcom/io/nsLocalFileL4.h b/src/libs/xpcom18a4/xpcom/io/nsLocalFileL4.h
deleted file mode 100644
index 80af548c..00000000
--- a/src/libs/xpcom18a4/xpcom/io/nsLocalFileL4.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; 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 Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998-1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Mike Shaver <shaver@mozilla.org>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either of 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 ***** */
-
-/*
- * Implementation of nsIFile for L4 systems.
- */
-
-#ifndef _nsLocalFileL4_H_
-#define _nsLocalFileL4_H_
-
-#include "nscore.h"
-#include "nsString.h"
-#include "nsReadableUtils.h"
-
-class NS_COM nsLocalFile : public nsILocalFile
-{
-public:
- NS_DEFINE_STATIC_CID_ACCESSOR(NS_LOCAL_FILE_CID)
-
- nsLocalFile();
-
- static NS_METHOD nsLocalFileConstructor(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr);
-
- // nsISupports
- NS_DECL_ISUPPORTS
-
- // nsIFile
- NS_DECL_NSIFILE
-
- // nsILocalFile
- NS_DECL_NSILOCALFILE
-
-public:
- static void GlobalInit();
- static void GlobalShutdown();
-
-private:
- nsLocalFile(const nsLocalFile& other);
- ~nsLocalFile() {}
-
-protected:
- void LocateNativeLeafName(nsACString::const_iterator &,
- nsACString::const_iterator &);
-
- nsresult CopyDirectoryTo(nsIFile *newParent);
- nsresult CreateAllAncestors(PRUint32 permissions);
- nsresult GetNativeTargetPathName(nsIFile *newParent,
- const nsACString &newName,
- nsACString &_retval);
-
- void InvalidateCache() { }
- nsresult FillStatCache();
-
- nsresult CreateAndKeepOpen(PRUint32 type, PRIntn flags,
- PRUint32 permissions, PRFileDesc **_retval);
-};
-
-#endif /* _nsLocalFileL4_H_ */
diff --git a/src/libs/xpcom18a4/xpcom/io/nsNativeCharsetUtils.cpp b/src/libs/xpcom18a4/xpcom/io/nsNativeCharsetUtils.cpp
index a9cc2101..55b5c63c 100644
--- a/src/libs/xpcom18a4/xpcom/io/nsNativeCharsetUtils.cpp
+++ b/src/libs/xpcom18a4/xpcom/io/nsNativeCharsetUtils.cpp
@@ -642,13 +642,9 @@ nsNativeCharsetConverter::GlobalInit()
char a = 'a';
unsigned int w = 0;
-#ifndef L4ENV
int res = mbtowc((wchar_t *) &w, &a, 1);
gWCharIsUnicode = (res != -1 && w == 'a');
-#else
- gWCharIsUnicode = 0;
-#endif
#ifdef DEBUG
if (!gWCharIsUnicode)
@@ -663,8 +659,6 @@ nsNativeCharsetConverter::NativeToUnicode(const char **input,
PRUint32 *outputLeft)
{
if (gWCharIsUnicode) {
-#ifndef L4ENV
- /* We don't have any wchar support built into uclibc just now */
int incr;
// cannot use wchar_t here since it may have been redefined (e.g.,
@@ -689,7 +683,6 @@ nsNativeCharsetConverter::NativeToUnicode(const char **input,
(*output)++;
(*outputLeft)--;
}
-#endif /* not defined L4ENV */
}
else {
// wchar_t isn't unicode, so the best we can do is treat the
@@ -707,8 +700,6 @@ nsNativeCharsetConverter::UnicodeToNative(const PRUnichar **input,
PRUint32 *outputLeft)
{
if (gWCharIsUnicode) {
-#ifndef L4ENV
- /* We don't have any wchar support built into uclibc just now */
int incr;
while (*inputLeft && *outputLeft >= MB_CUR_MAX) {
@@ -730,7 +721,6 @@ nsNativeCharsetConverter::UnicodeToNative(const PRUnichar **input,
(*input)++;
(*inputLeft)--;
}
-#endif /* not defined L4ENV */
}
else {
// wchar_t isn't unicode, so the best we can do is treat the
diff --git a/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h b/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h
index 688533de..23eb23ee 100644
--- a/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h
+++ b/src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptc_platforms_unixish_x86.h
@@ -67,8 +67,7 @@
*
*/
-#if defined(LINUX) || defined(L4)
-/* I am assuming that since we are using the Linux compiler for L4, the same will hold true... */
+#if defined(LINUX)
#if (__GNUC__ == 2) && (__GNUC_MINOR__ <= 7)
/* Old gcc 2.7.x.x. What does gcc 2.8.x do?? */