Index: trunk/src/libs/xpcom18a4/Makefile.kmk
===================================================================
--- trunk/src/libs/xpcom18a4/Makefile.kmk	(revision 101795)
+++ trunk/src/libs/xpcom18a4/Makefile.kmk	(revision 101796)
@@ -220,5 +220,4 @@
 	nsprpub/pr/include/md/_netbsd.cfg \
 	nsprpub/pr/include/md/_openbsd.cfg \
-	nsprpub/pr/include/md/_solaris32.cfg \
 	nsprpub/pr/include/md/_solaris64.cfg
 NSPRPUB-OBS-HEADERS_INST = $(INST_SDK)bindings/xpcom/include/nsprpub/obsolete/
@@ -564,13 +563,8 @@
 endif
 
-VBox-xpcom-nspr_SOURCES.darwin = nsprpub/pr/src/md/unix/darwin.c
-
+VBox-xpcom-nspr_SOURCES.darwin  = nsprpub/pr/src/md/unix/darwin.c
 VBox-xpcom-nspr_SOURCES.freebsd = nsprpub/pr/src/md/unix/freebsd.c
-
-VBox-xpcom-nspr_SOURCES.linux = nsprpub/pr/src/md/unix/linux.c
-
+VBox-xpcom-nspr_SOURCES.linux   = nsprpub/pr/src/md/unix/linux.c
 VBox-xpcom-nspr_SOURCES.solaris = nsprpub/pr/src/md/unix/solaris.c
-VBox-xpcom-nspr_SOURCES.solaris.x86 = nsprpub/pr/src/md/unix/os_SunOS_x86.s
-VBox-xpcom-nspr_SOURCES.solaris.amd64 = nsprpub/pr/src/md/unix/os_SunOS_x86_64.s
 
 $(call KB_FN_DO_PASS0_ON_TARGET,VBox-xpcom-nspr)
Index: trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_solaris.h
===================================================================
--- trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_solaris.h	(revision 101795)
+++ trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_solaris.h	(revision 101796)
@@ -178,22 +178,5 @@
 #define _MD_INTERVAL_PER_SEC              _MD_Solaris_TicksPerSecond
 
-#if defined(_PR_HAVE_ATOMIC_OPS)
-/*
-** Atomic Operations
-*/
-#define _MD_INIT_ATOMIC()
-
-NSPR_API(PRInt32) _MD_AtomicIncrement(PRInt32 *val);
-#define _MD_ATOMIC_INCREMENT _MD_AtomicIncrement
-
-NSPR_API(PRInt32) _MD_AtomicAdd(PRInt32 *ptr, PRInt32 val);
-#define _MD_ATOMIC_ADD _MD_AtomicAdd
-
-NSPR_API(PRInt32) _MD_AtomicDecrement(PRInt32 *val);
-#define _MD_ATOMIC_DECREMENT _MD_AtomicDecrement
-
-NSPR_API(PRInt32) _MD_AtomicSet(PRInt32 *val, PRInt32 newval);
-#define _MD_ATOMIC_SET _MD_AtomicSet
-#endif /* _PR_HAVE_ATOMIC_OPS */
+#include "_iprt_atomic.h"
 
 #if defined(_PR_PTHREADS)
Index: trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_solaris32.cfg
===================================================================
--- trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_solaris32.cfg	(revision 101795)
+++ 	(revision )
@@ -1,150 +1,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 SOLARIS
-#define SOLARIS
-#endif
-
-#if defined(sparc) || defined(__sparc)
-#undef  IS_LITTLE_ENDIAN
-#define IS_BIG_ENDIAN 1
-#define PR_ALIGN_OF_INT64   8
-#define PR_ALIGN_OF_DOUBLE  8
-#elif defined(i386) || defined(__i386)
-#define IS_LITTLE_ENDIAN 1
-#undef  IS_BIG_ENDIAN
-#define PR_ALIGN_OF_INT64   4
-#define PR_ALIGN_OF_DOUBLE  4
-#else
-#error unknown processor
-#endif
-
-#define PR_AF_INET6 26  /* same as AF_INET6 */
-
-#define PR_BYTES_PER_BYTE   1
-#define PR_BYTES_PER_SHORT  2
-#define PR_BYTES_PER_INT    4
-#define PR_BYTES_PER_INT64  8
-#define PR_BYTES_PER_LONG   4
-#define PR_BYTES_PER_FLOAT  4
-#define PR_BYTES_PER_DOUBLE 8
-#define PR_BYTES_PER_WORD   4
-#define PR_BYTES_PER_DWORD  8
-#define PR_BYTES_PER_WORD_LOG2   2
-#define PR_BYTES_PER_DWORD_LOG2  3
-
-#define PR_BITS_PER_BYTE    8
-#define PR_BITS_PER_SHORT   16
-#define PR_BITS_PER_INT     32
-#define PR_BITS_PER_INT64   64
-#define PR_BITS_PER_LONG    32
-#define PR_BITS_PER_FLOAT   32
-#define PR_BITS_PER_DOUBLE  64
-#define PR_BITS_PER_WORD    32
-
-#define PR_BITS_PER_BYTE_LOG2   3
-#define PR_BITS_PER_SHORT_LOG2  4
-#define PR_BITS_PER_INT_LOG2    5
-#define PR_BITS_PER_INT64_LOG2  6
-#define PR_BITS_PER_LONG_LOG2   5
-#define PR_BITS_PER_FLOAT_LOG2  5
-#define PR_BITS_PER_DOUBLE_LOG2 6
-#define PR_BITS_PER_WORD_LOG2   5
-
-#define PR_ALIGN_OF_SHORT   2
-#define PR_ALIGN_OF_INT     4
-#define PR_ALIGN_OF_LONG    4
-#define PR_ALIGN_OF_FLOAT   4
-#define PR_ALIGN_OF_POINTER 4
-
-#define	HAVE_LONG_LONG
-#define	HAVE_ALIGNED_DOUBLES
-#define	HAVE_ALIGNED_LONGLONGS
-
-#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 /* ifndef nspr_cpucfg___ */
Index: trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_vbox.cfg
===================================================================
--- trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_vbox.cfg	(revision 101795)
+++ trunk/src/libs/xpcom18a4/nsprpub/pr/include/md/_vbox.cfg	(revision 101796)
@@ -44,6 +44,4 @@
 #elif defined(RT_OS_FREEBSD)
 # include <md/_freebsd.cfg>
-#elif defined(RT_OS_L4)
-# include <md/_l4v2.cfg>
 #elif defined(RT_OS_LINUX)
 # include <md/_linux.cfg>
@@ -53,9 +51,5 @@
 # include <md/_openbsd.cfg>
 #elif defined(RT_OS_SOLARIS)
-# if defined(RT_ARCH_X86)
-#  include <md/_solaris32.cfg>
-# else
-#  include <md/_solaris64.cfg>
-# endif
+# include <md/_solaris64.cfg>
 #elif defined(RT_OS_OS2)
 # include <md/_os2.cfg>
Index: trunk/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_SunOS_x86.s
===================================================================
--- trunk/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_SunOS_x86.s	(revision 101795)
+++ 	(revision )
@@ -1,249 +1,0 @@
-/ -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
-/ 
-/ The contents of this file are subject to the Mozilla Public
-/ License Version 1.1 (the "License"); you may not use this file
-/ except in compliance with the License. You may obtain a copy of
-/ the License at http://www.mozilla.org/MPL/
-/ 
-/ Software distributed under the License is distributed on an "AS
-/ IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-/ implied. See the License for the specific language governing
-/ rights and limitations under the License.
-/ 
-/ The Original Code is the Netscape Portable Runtime (NSPR).
-/ 
-/ The Initial Developer of the Original Code is Netscape
-/ Communications Corporation.  Portions created by Netscape are 
-/ Copyright (C) 1998-2000 Netscape Communications Corporation.  All
-/ Rights Reserved.
-/ 
-/ Contributor(s):
-/ 
-/ Alternatively, the contents of this file may be used under the
-/ terms of the GNU General Public License Version 2 or later (the
-/ "GPL"), in which case the provisions of the GPL are applicable 
-/ instead of those above.  If you wish to allow use of your 
-/ version of this file only under the terms of the GPL and not to
-/ allow others to use your version of this file under the MPL,
-/ indicate your decision by deleting the provisions above and
-/ replace them with the notice and other provisions required by
-/ the GPL.  If you do not delete the provisions above, a recipient
-/ may use your version of this file under either the MPL or the
-/ GPL.
-/ 
-
-	.text
-
-	.globl	getedi
-getedi:
-	movl	%edi,%eax
-	ret
-	.type	getedi,@function
-	.size	getedi,.-getedi
- 
-	.globl	setedi
-setedi:
-	movl	4(%esp),%edi
-	ret
-	.type	setedi,@function
-	.size	setedi,.-setedi
-
-	.globl	__MD_FlushRegisterWindows
-	.globl _MD_FlushRegisterWindows
-
-__MD_FlushRegisterWindows:
-_MD_FlushRegisterWindows:
-
-	ret
-
-/
-/ sol_getsp()
-/
-/ Return the current sp (for debugging)
-/
-	.globl sol_getsp
-sol_getsp:
-	movl	%esp, %eax
-	ret
-
-/
-/ sol_curthread()
-/
-/ Return a unique identifier for the currently active thread.
-/
-	.globl sol_curthread
-sol_curthread:
-	movl	%ecx, %eax
-	ret
-
-/ PRInt32 _MD_AtomicIncrement(PRInt32 *val)
-/
-/ Atomically increment the integer pointed to by 'val' and return
-/ the result of the increment.
-/
-    .text
-    .globl _MD_AtomicIncrement
-    .align 4
-_MD_AtomicIncrement:
-    movl 4(%esp), %ecx
-    movl $1, %eax
-    lock
-    xaddl %eax, (%ecx)
-    incl %eax
-    ret
-
-/ PRInt32 _MD_AtomicDecrement(PRInt32 *val)
-/
-/ Atomically decrement the integer pointed to by 'val' and return
-/ the result of the decrement.
-/
-    .text
-    .globl _MD_AtomicDecrement
-    .align 4
-_MD_AtomicDecrement:
-    movl 4(%esp), %ecx
-    movl $-1, %eax
-    lock
-    xaddl %eax, (%ecx)
-    decl %eax
-    ret
-
-/ PRInt32 _MD_AtomicSet(PRInt32 *val, PRInt32 newval)
-/
-/ Atomically set the integer pointed to by 'val' to the new
-/ value 'newval' and return the old value.
-/
-/ An alternative implementation:
-/   .text
-/   .globl _MD_AtomicSet
-/   .align 4
-/_MD_AtomicSet:
-/   movl 4(%esp), %ecx
-/   movl 8(%esp), %edx
-/   movl (%ecx), %eax
-/retry:
-/   lock
-/   cmpxchgl %edx, (%ecx)
-/   jne retry
-/   ret
-/
-    .text
-    .globl _MD_AtomicSet
-    .align 4
-_MD_AtomicSet:
-    movl 4(%esp), %ecx
-    movl 8(%esp), %eax
-    lock
-    xchgl %eax, (%ecx)
-    ret
-
-/ PRInt32 _MD_AtomicAdd(PRInt32 *ptr, PRInt32 val)
-/
-/ Atomically add 'val' to the integer pointed to by 'ptr'
-/ and return the result of the addition.
-/
-    .text
-    .globl _MD_AtomicAdd
-    .align 4
-_MD_AtomicAdd:
-    movl 4(%esp), %ecx
-    movl 8(%esp), %eax
-    movl %eax, %edx
-    lock
-    xaddl %eax, (%ecx)
-    addl %edx, %eax
-    ret
-
-/
-/ PR_StackPush(listp, elementp)
-/
-/ Atomically push ElementP onto linked list ListP.
-/
-	.text
-#ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
-	.globl	VBoxNsprPR_StackPush
-#else /* !VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
-	.globl	PR_StackPush
-#endif /* !VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
-	.align	4
-#ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
-VBoxNsprPR_StackPush:
-#else /* !VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
-PR_StackPush:
-#endif /* !VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
-	movl	4(%esp), %ecx
-	movl	$-1,%eax
-pulock:
-/ Already locked?
-	cmpl	%eax,(%ecx)
-	je	pulock
-
-/ Attempt to lock it
-	lock
-	xchgl	%eax, (%ecx)
-
-/ Did we set the lock?
-	cmpl	$-1, %eax
-	je	pulock
-
-/ We now have the lock.  Update pointers
-	movl	8(%esp), %edx
-	movl	%eax, (%edx)
-	movl	%edx, (%ecx)
-
-/ Done
-	ret
-
-
-/
-/ elementp = PR_StackPop(listp)
-/
-/ Atomically pop ElementP off linked list ListP
-/
-	.text
-#ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
-	.globl	VBoxNsprPR_StackPop
-#else /* !VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
-	.globl	PR_StackPop
-#endif /* !VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
-	.align	4
-#ifdef VBOX_WITH_XPCOM_NAMESPACE_CLEANUP
-VBoxNsprPR_StackPop:
-#else /* !VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
-PR_StackPop:
-#endif /* !VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
-	movl	4(%esp), %ecx
-	movl	$-1, %eax
-polock:
-/ Already locked?
-	cmpl	%eax, (%ecx)
-	je	polock
-
-/ Attempt to lock it
-	lock
-	xchgl	%eax, (%ecx)
-
-/ Did we set the lock?
-	cmpl	$-1, %eax
-	je	polock
-
-/ We set the lock so now update pointers
-
-/ Was it empty?
-	movl	$0, %edx
-	cmpl	%eax,%edx
-	je	empty
-
-/ Get element "next" pointer
-	movl	(%eax), %edx
-
-/ Write NULL to the element "next" pointer
-	movl	$0, (%eax)
-
-empty:
-/ Put elements previous "next" value into listp
-/ NOTE: This also unlocks the listp
-	movl	%edx, (%ecx)
-
-/ Return previous listp value (already in eax)
-	ret
Index: trunk/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_SunOS_x86_64.s
===================================================================
--- trunk/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/os_SunOS_x86_64.s	(revision 101795)
+++ 	(revision )
@@ -1,95 +1,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) 2004
-/ 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 *****
-
-/ PRInt32 _MD_AtomicIncrement(PRInt32 *val)
-/
-/ Atomically increment the integer pointed to by 'val' and return
-/ the result of the increment.
-/
-    .text
-    .globl _MD_AtomicIncrement
-    .align 4
-_MD_AtomicIncrement:
-    movl $1, %eax
-    lock
-    xaddl %eax, (%rdi)
-    incl %eax
-    ret
-
-/ PRInt32 _MD_AtomicDecrement(PRInt32 *val)
-/
-/ Atomically decrement the integer pointed to by 'val' and return
-/ the result of the decrement.
-/
-    .text
-    .globl _MD_AtomicDecrement
-    .align 4
-_MD_AtomicDecrement:
-    movl $-1, %eax
-    lock
-    xaddl %eax, (%rdi)
-    decl %eax
-    ret
-
-/ PRInt32 _MD_AtomicSet(PRInt32 *val, PRInt32 newval)
-/
-/ Atomically set the integer pointed to by 'val' to the new
-/ value 'newval' and return the old value.
-/
-    .text
-    .globl _MD_AtomicSet
-    .align 4
-_MD_AtomicSet:
-    movl %esi, %eax
-    xchgl %eax, (%rdi)
-    ret
-
-/ PRInt32 _MD_AtomicAdd(PRInt32 *ptr, PRInt32 val)
-/
-/ Atomically add 'val' to the integer pointed to by 'ptr'
-/ and return the result of the addition.
-/
-    .text
-    .globl _MD_AtomicAdd
-    .align 4
-_MD_AtomicAdd:
-    movl %esi, %eax
-    lock
-    xaddl %eax, (%rdi)
-    addl %esi, %eax
-    ret
