summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Lohmann [pl] <Philipp.Lohmann@Sun.COM>2010-01-14 19:11:13 +0100
committerPhilipp Lohmann [pl] <Philipp.Lohmann@Sun.COM>2010-01-14 19:11:13 +0100
commitac27218d0d423c99fed81f7726ef0bb10d67c14e (patch)
treea8046e11a6fad9af2487ec0c4c26969be1316f25
parent98ff20e30873c73ca8ba3995fd0c959a1b28fc78 (diff)
parent6e8628fb7374b7d19e15f03e63f8ad221ca25f1e (diff)
rebase to DEV300_m69
-rw-r--r--bridges/prj/build.lst1
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx18
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/call.cxx145
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx728
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx337
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk86
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx102
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx524
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx27
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx81
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx6
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx54
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx10
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/abi.hxx2
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/call.s3
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx38
-rw-r--r--bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx25
-rw-r--r--bridges/source/cpp_uno/shared/vtablefactory.cxx10
-rw-r--r--bridges/source/remote/static/proxy.cxx8
-rw-r--r--bridges/source/remote/static/remote.cxx8
-rw-r--r--bridges/source/remote/urp/urp_log.hxx2
-rw-r--r--bridges/source/remote/urp/urp_reader.cxx4
-rw-r--r--bridges/test/testclient.cxx15
-rw-r--r--bridges/test/testcomp.cxx11
-rw-r--r--bridges/test/testoffice.cxx10
-rw-r--r--bridges/test/testsameprocess.cxx7
-rw-r--r--cli_ure/prj/build.lst2
-rw-r--r--cli_ure/qa/climaker/makefile.mk2
-rw-r--r--cli_ure/source/native/path.cxx2
-rw-r--r--codemaker/test/cppumaker/makefile.mk4
-rw-r--r--codemaker/test/cppumaker/test_codemaker_cppumaker.cxx2
-rw-r--r--cppu/qa/makefile.mk18
-rw-r--r--cppu/qa/test_any.cxx2
-rw-r--r--cppu/qa/test_recursion.cxx2
-rw-r--r--cppu/qa/test_reference.cxx2
-rw-r--r--cppu/qa/test_unotype.cxx2
-rw-r--r--cppuhelper/inc/cppuhelper/weak.hxx6
-rw-r--r--cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx2
-rw-r--r--cppuhelper/qa/ifcontainer/makefile.mk5
-rw-r--r--cppuhelper/qa/propertysetmixin/makefile.mk4
-rw-r--r--cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx2
-rw-r--r--cppuhelper/qa/unourl/cppu_unourl.cxx2
-rw-r--r--cppuhelper/qa/unourl/makefile.mk5
-rw-r--r--cppuhelper/qa/weak/makefile.mk6
-rw-r--r--cppuhelper/qa/weak/test_weak.cxx2
-rwxr-xr-xcppuhelper/source/cc5_solaris_sparc.map5
-rw-r--r--cppuhelper/source/component.cxx4
-rw-r--r--cppuhelper/source/gcc3.map6
-rw-r--r--cppuhelper/source/implbase.cxx4
-rw-r--r--cppuhelper/source/interfacecontainer.cxx7
-rw-r--r--cppuhelper/source/msvc_win32_intel.map5
-rw-r--r--cppuhelper/source/tdmgr.cxx12
-rw-r--r--cppuhelper/source/weak.cxx34
-rw-r--r--cppuhelper/test/testidlclass.cxx19
-rw-r--r--cppuhelper/test/testproptyphlp.cxx22
-rw-r--r--cpputools/source/sp2bv/makefile.mk2
-rw-r--r--io/source/stm/omark.cxx10
-rw-r--r--io/test/stm/datatest.cxx28
-rw-r--r--io/test/stm/marktest.cxx14
-rw-r--r--jurt/com/sun/star/lib/uno/environments/java/java_environment.java192
-rwxr-xr-xjvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk2
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx7
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx1
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx5
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx6
-rw-r--r--offapi/com/sun/star/awt/XTopWindow2.idl76
-rw-r--r--offapi/com/sun/star/awt/makefile.mk1
-rw-r--r--offapi/com/sun/star/document/DocumentEvent.idl1
-rw-r--r--offapi/com/sun/star/document/XDocumentEventBroadcaster.idl1
-rw-r--r--offapi/com/sun/star/document/XDocumentEventListener.idl1
-rw-r--r--offapi/com/sun/star/frame/XSessionManagerListener2.idl56
-rw-r--r--offapi/com/sun/star/frame/makefile.mk1
-rw-r--r--offapi/com/sun/star/modules.idl3
-rw-r--r--offapi/com/sun/star/presentation/XSlideShow.idl37
-rw-r--r--offapi/com/sun/star/presentation/XSlideShowController.idl8
-rw-r--r--offapi/com/sun/star/presentation/XSlideShowListener.idl6
-rw-r--r--offapi/com/sun/star/util/Duration.idl104
-rw-r--r--offapi/com/sun/star/util/makefile.mk1
-rw-r--r--pyuno/source/loader/makefile.mk2
-rw-r--r--pyuno/source/module/makefile.mk2
-rw-r--r--pyuno/source/module/pyuno_gc.cxx10
-rw-r--r--pyuno/zipcore/python.cxx10
-rw-r--r--registry/source/keyimpl.cxx8
-rw-r--r--registry/source/regimpl.cxx22
-rw-r--r--registry/source/regimpl.hxx2
-rw-r--r--registry/source/registry.cxx2
-rw-r--r--registry/test/testmerge.cxx22
-rw-r--r--sal/inc/osl/endian.h17
-rw-r--r--sal/inc/osl/thread.hxx4
-rw-r--r--sal/inc/rtl/math.hxx21
-rw-r--r--sal/inc/rtl/uuid.h2
-rw-r--r--sal/inc/sal/alloca.h2
-rw-r--r--sal/inc/sal/config.h2
-rw-r--r--sal/osl/os2/file.cxx4
-rw-r--r--sal/osl/os2/nlsupport.c21
-rw-r--r--sal/osl/os2/socket.c2
-rw-r--r--sal/osl/os2/system.h32
-rwxr-xr-xsal/osl/unx/backtrace.c48
-rw-r--r--sal/osl/unx/file.cxx4
-rw-r--r--sal/osl/unx/file_misc.cxx98
-rw-r--r--sal/osl/unx/file_volume.cxx425
-rw-r--r--sal/osl/unx/makefile.mk8
-rw-r--r--sal/osl/unx/module.c26
-rw-r--r--sal/osl/unx/nlsupport.c50
-rw-r--r--sal/osl/unx/process.c108
-rw-r--r--sal/osl/unx/profile.c12
-rw-r--r--sal/osl/unx/socket.c21
-rw-r--r--sal/osl/unx/system.h31
-rw-r--r--sal/osl/w32/dllentry.c4
-rw-r--r--sal/osl/w32/file.cxx2
-rw-r--r--sal/qa/ByteSequence/ByteSequence.cxx2
-rw-r--r--sal/qa/ByteSequence/makefile.mk17
-rw-r--r--sal/qa/ByteSequence/rtl_old_testbyteseq.cxx2
-rw-r--r--sal/qa/OStringBuffer/makefile.mk13
-rw-r--r--sal/qa/OStringBuffer/rtl_OStringBuffer.cxx2
-rw-r--r--sal/qa/osl/condition/makefile.mk13
-rw-r--r--sal/qa/osl/condition/osl_Condition_Const.h2
-rw-r--r--sal/qa/osl/file/makefile.mk24
-rw-r--r--sal/qa/osl/file/osl_File.cxx2
-rw-r--r--sal/qa/osl/file/osl_old_test_file.cxx2
-rwxr-xr-xsal/qa/osl/file/test_cpy_wrt_file.cxx2
-rw-r--r--sal/qa/osl/module/makefile.mk13
-rw-r--r--sal/qa/osl/module/osl_Module_Const.h2
-rw-r--r--sal/qa/osl/module/osl_Module_DLL.cxx2
-rwxr-xr-xsal/qa/osl/mutex/makefile.mk12
-rwxr-xr-xsal/qa/osl/mutex/osl_Mutex_Const.h2
-rw-r--r--sal/qa/osl/pipe/makefile.mk15
-rw-r--r--sal/qa/osl/pipe/osl_Pipe.cxx2
-rw-r--r--sal/qa/osl/process/makefile.mk27
-rw-r--r--sal/qa/osl/process/osl_Thread.cxx2
-rw-r--r--sal/qa/osl/process/osl_process.cxx2
-rw-r--r--sal/qa/osl/profile/makefile.mk8
-rw-r--r--sal/qa/osl/profile/osl_old_testprofile.cxx2
-rwxr-xr-xsal/qa/osl/security/makefile.mk14
-rwxr-xr-xsal/qa/osl/security/osl_Security_Const.h2
-rw-r--r--sal/qa/osl/semaphore/makefile.mk13
-rw-r--r--sal/qa/osl/semaphore/osl_Semaphore_Const.h2
-rwxr-xr-xsal/qa/osl/socket/makefile.mk50
-rw-r--r--sal/qa/osl/socket/osl_AcceptorSocket.cxx2
-rw-r--r--sal/qa/osl/socket/osl_ConnectorSocket.cxx2
-rw-r--r--sal/qa/osl/socket/osl_DatagramSocket.cxx2
-rwxr-xr-xsal/qa/osl/socket/osl_Socket.cxx2
-rw-r--r--sal/qa/osl/socket/osl_Socket2.cxx2
-rw-r--r--sal/qa/osl/socket/osl_SocketAddr.cxx2
-rw-r--r--sal/qa/osl/socket/osl_Socket_tests.cxx2
-rw-r--r--sal/qa/osl/socket/osl_StreamSocket.cxx2
-rw-r--r--sal/qa/osl/socket/sockethelper.cxx2
-rw-r--r--sal/qa/osl/thread/makefile.mk4
-rw-r--r--sal/qa/osl/thread/test_thread.cxx2
-rwxr-xr-xsal/qa/rtl/alloc/makefile.mk14
-rwxr-xr-xsal/qa/rtl/alloc/rtl_alloc.cxx2
-rw-r--r--sal/qa/rtl/bootstrap/makefile.mk10
-rw-r--r--sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx4
-rw-r--r--sal/qa/rtl/cipher/makefile.mk8
-rw-r--r--sal/qa/rtl/cipher/rtl_cipher.cxx2
-rwxr-xr-xsal/qa/rtl/crc32/makefile.mk13
-rwxr-xr-xsal/qa/rtl/crc32/rtl_crc32.cxx2
-rw-r--r--sal/qa/rtl/digest/makefile.mk8
-rw-r--r--sal/qa/rtl/digest/rtl_digest.cxx2
-rw-r--r--sal/qa/rtl/doublelock/makefile.mk8
-rw-r--r--sal/qa/rtl/doublelock/rtl_doublelocking.cxx2
-rw-r--r--sal/qa/rtl/locale/makefile.mk8
-rw-r--r--sal/qa/rtl/locale/rtl_locale.cxx2
-rw-r--r--sal/qa/rtl/logfile/makefile.mk6
-rw-r--r--sal/qa/rtl/logfile/rtl_logfile.cxx2
-rw-r--r--sal/qa/rtl/math/makefile.mk25
-rw-r--r--sal/qa/rtl/math/rtl_math.cxx2
-rw-r--r--sal/qa/rtl/math/rtl_old_testint64.cxx2
-rw-r--r--sal/qa/rtl/ostring/makefile.mk16
-rw-r--r--sal/qa/rtl/ostring/rtl_OString2.cxx2
-rw-r--r--sal/qa/rtl/ostring/rtl_str.cxx2
-rw-r--r--sal/qa/rtl/ostring/rtl_string.cxx2
-rw-r--r--sal/qa/rtl/oustring/makefile.mk12
-rw-r--r--sal/qa/rtl/oustring/rtl_OUString2.cxx2
-rw-r--r--sal/qa/rtl/oustring/rtl_ustr.cxx2
-rw-r--r--sal/qa/rtl/oustringbuffer/makefile.mk8
-rw-r--r--sal/qa/rtl/oustringbuffer/rtl_OUStringBuffer2.cxx2
-rw-r--r--sal/qa/rtl/process/makefile.mk12
-rw-r--r--sal/qa/rtl/process/rtl_Process.cxx2
-rw-r--r--sal/qa/rtl/random/makefile.mk8
-rw-r--r--sal/qa/rtl/random/rtl_random.cxx2
-rw-r--r--sal/qa/rtl/strings/makefile.mk4
-rw-r--r--sal/qa/rtl/strings/test_oustring_compare.cxx2
-rw-r--r--sal/qa/rtl/strings/test_oustring_convert.cxx2
-rw-r--r--sal/qa/rtl/strings/test_oustring_endswith.cxx2
-rw-r--r--sal/qa/rtl/strings/test_oustring_noadditional.cxx2
-rw-r--r--sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx2
-rw-r--r--sal/qa/rtl/textenc/makefile.mk10
-rw-r--r--sal/qa/rtl/textenc/rtl_tencinfo.cxx2
-rw-r--r--sal/qa/rtl/textenc/rtl_textcvt.cxx2
-rw-r--r--sal/qa/rtl/uri/makefile.mk10
-rw-r--r--sal/qa/rtl/uri/rtl_Uri.cxx2
-rw-r--r--sal/qa/rtl/uri/rtl_testuri.cxx2
-rw-r--r--sal/qa/rtl/uuid/makefile.mk8
-rw-r--r--sal/qa/rtl/uuid/rtl_Uuid.cxx2
-rw-r--r--sal/qa/rtl_strings/makefile.mk45
-rw-r--r--sal/qa/rtl_strings/rtl_old_testostring.cxx2
-rw-r--r--sal/qa/rtl_strings/rtl_old_testowstring.cxx2
-rw-r--r--sal/qa/rtl_strings/rtl_old_teststrbuf.cxx2
-rw-r--r--sal/qa/sal/makefile.mk4
-rw-r--r--sal/qa/sal/test_types.cxx2
-rw-r--r--sal/qa/systools/makefile.mk9
-rw-r--r--sal/qa/systools/test_comtools.cxx2
-rw-r--r--sal/qa/testHelperFunctions/makefile.mk6
-rw-r--r--sal/qa/testHelperFunctions/testHelperFunctions.cxx2
-rw-r--r--sal/qa/testHelperFunctions/testHelperFunctions2.cxx2
-rw-r--r--sal/rtl/source/alloc.c4
-rw-r--r--sal/rtl/source/bootstrap.cxx4
-rw-r--r--sal/rtl/source/macro.hxx6
-rw-r--r--sal/rtl/source/math.cxx9
-rw-r--r--sal/typesconfig/typesconfig.c2
-rw-r--r--sal/util/makefile.mk3
-rw-r--r--salhelper/qa/makefile.mk6
-rw-r--r--salhelper/qa/test_api.cxx2
-rwxr-xr-xsalhelper/source/simplereferenceobject.cxx2
-rw-r--r--stoc/test/javavm/testapplet/TestApplet.java1
-rw-r--r--stoc/test/javavm/testapplet/makefile.mk2
-rw-r--r--stoc/test/javavm/testcomponent/TestComponent.java5
-rw-r--r--stoc/test/javavm/testcomponent/makefile.mk2
-rw-r--r--stoc/test/uriproc/makefile.mk4
-rw-r--r--stoc/test/uriproc/test_uriproc.cxx2
-rw-r--r--store/source/stordata.hxx2
-rw-r--r--xml2cmp/source/xcd/xmlelem.cxx10
224 files changed, 3078 insertions, 1628 deletions
diff --git a/bridges/prj/build.lst b/bridges/prj/build.lst
index 430c49e8a849..c6e342520672 100644
--- a/bridges/prj/build.lst
+++ b/bridges/prj/build.lst
@@ -21,6 +21,7 @@ br bridges\source\cpp_uno\gcc3_linux_s390x nmake - u br_gccl3x br_unotypes br_i
br bridges\source\cpp_uno\gcc3_linux_sparc nmake - u br_gccl3s br_unotypes br_cppuno_shared br_inc NULL
br bridges\source\cpp_uno\gcc3_linux_arm nmake - u br_gccl3r br_unotypes NULL
br bridges\source\cpp_uno\gcc3_linux_ia64 nmake - u br_gccl3a br_unotypes NULL
+br bridges\source\cpp_uno\gcc3_linux_hppa nmake - u br_gccl3h br_unotypes NULL
br bridges\source\cpp_uno\gcc3_macosx_intel nmake - u br_gcc3macoxi br_cppuno_shared br_unotypes br_inc NULL
br bridges\source\cpp_uno\gcc3_macosx_powerpc nmake - u br_gcc3macoxp br_cppuno_shared br_unotypes br_inc NULL
br bridges\source\cpp_uno\cc50_solaris_sparc nmake - u br_cc50sols br_unotypes br_cppuno_shared br_inc NULL
diff --git a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
index b365bdb8aee1..f59a16b2ac38 100644
--- a/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx
@@ -45,7 +45,17 @@
#include <stdio.h>
#include <string.h>
-#if defined(__ARM_EABI__) && !defined(__SOFTFP__)
+/*
+ * Based on http://gcc.gnu.org/PR41443
+ * References to __SOFTFP__ are incorrect for EABI; the __SOFTFP__ code
+ * should be used for *soft-float ABI* whether or not VFP is enabled,
+ * and __SOFTFP__ does specifically mean soft-float not soft-float ABI.
+ *
+ * Changing the conditionals to __SOFTFP__ || __ARM_EABI__ then
+ * -mfloat-abi=softfp should work. -mfloat-abi=hard won't; that would
+ * need both a new macro to identify the hard-VFP ABI.
+ */
+#if !defined(__ARM_EABI__) && !defined(__SOFTFP__)
#error Not Implemented
/*
@@ -103,7 +113,7 @@ namespace arm
void MapReturn(long r0, long r1, typelib_TypeClass eReturnType, void *pRegisterReturn)
{
-#ifndef __SOFTFP__
+#if !defined(__ARM_EABI__) && !defined(__SOFTFP__)
register float fret asm("f0");
register double dret asm("f0");
#endif
@@ -128,14 +138,14 @@ void MapReturn(long r0, long r1, typelib_TypeClass eReturnType, void *pRegisterR
*(unsigned char*)pRegisterReturn = (unsigned char)r0;
break;
case typelib_TypeClass_FLOAT:
-#ifdef __SOFTFP__
+#if defined(__ARM_EABI__) || defined(__SOFTFP__)
((long*)pRegisterReturn)[0] = r0;
#else
*(float*)pRegisterReturn = fret;
#endif
break;
case typelib_TypeClass_DOUBLE:
-#ifdef __SOFTFP__
+#if defined(__ARM_EABI__) || defined(__SOFTFP__)
((long*)pRegisterReturn)[1] = r1;
((long*)pRegisterReturn)[0] = r0;
#else
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/call.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/call.cxx
new file mode 100644
index 000000000000..cd30e224bef5
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/call.cxx
@@ -0,0 +1,145 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: uno2cpp.cxx,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <malloc.h>
+#include <rtl/alloc.h>
+
+#include <com/sun/star/uno/genfunc.hxx>
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include <uno/data.h>
+
+#include <bridges/cpp_uno/shared/bridge.hxx>
+#include <bridges/cpp_uno/shared/types.hxx>
+#include <bridges/cpp_uno/shared/unointerfaceproxy.hxx>
+#include <bridges/cpp_uno/shared/vtables.hxx>
+
+#include "share.hxx"
+
+#include <stdio.h>
+#include <string.h>
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+
+void MapReturn(sal_uInt32 ret0, sal_uInt32 ret1, typelib_TypeDescription *pReturnTypeDescr, bool bRegisterReturn, sal_uInt32 *pRegisterReturn)
+{
+ register float fret asm("fr4");
+ register double dret asm("fr4");
+
+ switch (pReturnTypeDescr->eTypeClass)
+ {
+ case typelib_TypeClass_HYPER:
+ case typelib_TypeClass_UNSIGNED_HYPER:
+ pRegisterReturn[1] = ret1;
+ case typelib_TypeClass_LONG:
+ case typelib_TypeClass_UNSIGNED_LONG:
+ case typelib_TypeClass_ENUM:
+ case typelib_TypeClass_CHAR:
+ case typelib_TypeClass_SHORT:
+ case typelib_TypeClass_UNSIGNED_SHORT:
+ case typelib_TypeClass_BOOLEAN:
+ case typelib_TypeClass_BYTE:
+ pRegisterReturn[0] = ret0;
+ break;
+ case typelib_TypeClass_FLOAT:
+ *(float*)pRegisterReturn = fret;
+ break;
+ case typelib_TypeClass_DOUBLE:
+ *(double*)pRegisterReturn = dret;
+ break;
+ case typelib_TypeClass_STRUCT:
+ case typelib_TypeClass_EXCEPTION:
+ {
+ if (bRegisterReturn)
+ {
+ pRegisterReturn[0] = ret0;
+ pRegisterReturn[1] = ret1;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+}
+
+//Moved callVirtual into this .cxx so that I can do this and get gcc to not
+//touch r28 without having to learn any more pa-risc assembly than is
+//strictly necessary
+register sal_uInt32 r28 __asm__("%r28");
+
+void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
+ void * pRegisterReturn, typelib_TypeDescription *pReturnTypeDescr, bool bRegisterReturn,
+ sal_uInt32 *pStack, sal_uInt32 nStack, sal_uInt32 *pGPR, double *pFPR) __attribute__((noinline));
+
+void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
+ void * pRegisterReturn, typelib_TypeDescription *pReturnTypeDescr, bool bRegisterReturn,
+ sal_uInt32 *pStack, sal_uInt32 nStack, sal_uInt32 *pGPR, double *pFPR)
+{
+ register sal_uInt32* sp __asm__("%r30");
+
+ sal_uInt32 pMethod = *((sal_uInt32*)pThis);
+ pMethod += 4 * nVtableIndex;
+ pMethod = *((sal_uInt32 *)pMethod);
+
+#ifdef CMC_DEBUG
+ fprintf(stderr, "this is %p\n", pGPR[0]);
+ for (int i = 0; i < hppa::MAX_GPR_REGS ; ++i)
+ fprintf(stderr, "normal reg %d is %d %x\n", i, pGPR[i], pGPR[i]);
+
+ for (int i = 0; i < hppa::MAX_SSE_REGS ; ++i)
+ fprintf(stderr, "float reg %d is %x\n", i, pFPR[i]);
+
+ for (int i = 0; i < nStack; ++i)
+ fprintf(stderr, "stack bytes are %x\n", pStack[i]);
+#endif
+
+ //Always reserve 4 slots, and align to 8 bytes
+ sal_uInt32 nStackBytes = ( ( nStack + 4 + 1 ) >> 1 ) * 8;
+ __builtin_alloca(nStackBytes);
+ sal_uInt32 *stack = sp-8;
+ int o = -5;
+ for (sal_uInt32 i = 0; i < nStack; ++i, --o)
+ stack[o] = pStack[i];
+
+ typedef int (* FunctionCall )( sal_uInt32, sal_uInt32, sal_uInt32, sal_uInt32 );
+ FunctionCall pFunc = (FunctionCall)pMethod;
+
+ asm volatile("fldd %0, %%fr4" : : "m"(pFPR[0]) : "fr4");
+ asm volatile("fldd %0, %%fr5" : : "m"(pFPR[1]) : "fr5");
+ asm volatile("fldd %0, %%fr6" : : "m"(pFPR[2]) : "fr6");
+ asm volatile("fldd %0, %%fr7" : : "m"(pFPR[3]) : "fr7");
+ asm volatile("ldw %0, %%r28" : : "m"(pRegisterReturn) : "r28");
+ (*pFunc)(pGPR[0], pGPR[1], pGPR[2], pGPR[3]);
+
+ register sal_uInt32 r29 __asm__("%r29");
+ MapReturn(r28, r29, pReturnTypeDescr, bRegisterReturn, (sal_uInt32*)pRegisterReturn);
+}
+
+/* vi:set tabstop=4 shiftwidth=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx
new file mode 100644
index 000000000000..a78d7694c798
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx
@@ -0,0 +1,728 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: cpp2uno.cxx,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <malloc.h>
+#include <hash_map>
+
+#include <rtl/alloc.h>
+#include <osl/mutex.hxx>
+
+#include <com/sun/star/uno/genfunc.hxx>
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include <uno/data.h>
+#include <typelib/typedescription.hxx>
+
+#include "bridges/cpp_uno/shared/bridge.hxx"
+#include "bridges/cpp_uno/shared/cppinterfaceproxy.hxx"
+#include "bridges/cpp_uno/shared/types.hxx"
+#include "bridges/cpp_uno/shared/vtablefactory.hxx"
+
+#include "share.hxx"
+
+#include <dlfcn.h>
+
+
+using namespace ::osl;
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+
+namespace
+{
+
+ static typelib_TypeClass cpp2uno_call(
+ bridges::cpp_uno::shared::CppInterfaceProxy* pThis,
+ const typelib_TypeDescription * pMemberTypeDescr,
+ typelib_TypeDescriptionReference * pReturnTypeRef,
+ sal_Int32 nParams, typelib_MethodParameter * pParams,
+ long r8, void ** gpreg, double *fpreg, void ** ovrflw,
+ sal_Int64 * pRegisterReturn /* space for register return */ )
+ {
+ void ** startovrflw;
+ int nregs = 0; //number of words passed in registers
+
+#ifdef CMC_DEBUG
+ fprintf(stderr, "cpp2uno_call\n");
+#endif
+ // return
+ typelib_TypeDescription * pReturnTypeDescr = 0;
+ if (pReturnTypeRef)
+ TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
+
+ void * pUnoReturn = 0;
+ // complex return ptr: if != 0 && != pUnoReturn, reconversion need
+ void * pCppReturn = 0;
+
+ if (pReturnTypeDescr)
+ {
+ if (hppa::isRegisterReturn(pReturnTypeRef))
+ {
+#ifdef CMC_DEBUG
+ fprintf(stderr, "simple return\n");
+#endif
+ pUnoReturn = pRegisterReturn; // direct way for simple types
+ }
+ else
+ {
+#ifdef CMC_DEBUG
+ fprintf(stderr, "complex return via r8\n");
+#endif
+ pCppReturn = (void *)r8;
+
+ pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
+ ? alloca( pReturnTypeDescr->nSize )
+ : pCppReturn); // direct way
+ }
+ }
+ // pop this
+ gpreg++;
+ fpreg++;
+ nregs++;
+
+ // stack space
+ OSL_ENSURE( sizeof(void *) == sizeof(sal_Int32), "### unexpected size!" );
+ // parameters
+ void ** pUnoArgs = (void **)alloca( 4 * sizeof(void *) * nParams );
+ void ** pCppArgs = pUnoArgs + nParams;
+ // indizes of values this have to be converted (interface conversion
+ // cpp<=>uno)
+ sal_Int32 * pTempIndizes = (sal_Int32 *)(pUnoArgs + (2 * nParams));
+ // type descriptions for reconversions
+ typelib_TypeDescription ** ppTempParamTypeDescr =
+ (typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
+
+ sal_Int32 nTempIndizes = 0;
+ bool bOverFlowUsed = false;
+ for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
+ {
+ const typelib_MethodParameter & rParam = pParams[nPos];
+ typelib_TypeDescription * pParamTypeDescr = 0;
+ TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
+
+ if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
+ {
+ switch (pParamTypeDescr->eTypeClass)
+ {
+ case typelib_TypeClass_DOUBLE:
+ if (nregs < hppa::MAX_WORDS_IN_REGS && (nregs & 1))
+ {
+ gpreg++;
+ fpreg++;
+ nregs++;
+ }
+ if (nregs < hppa::MAX_WORDS_IN_REGS-1)
+ {
+ fpreg++;
+ pCppArgs[nPos] = pUnoArgs[nPos] = fpreg;
+ gpreg+=2;
+ fpreg+=2;
+ nregs+=2;
+ }
+ else
+ {
+ if ((startovrflw-ovrflw) & 4)
+ ovrflw--;
+ pCppArgs[nPos] = pUnoArgs[nPos] = ((char*)ovrflw - 4);
+ bOverFlowUsed = true;
+ }
+ if (bOverFlowUsed) ovrflw-=2;
+ break;
+ case typelib_TypeClass_FLOAT:
+ if (nregs < hppa::MAX_WORDS_IN_REGS)
+ {
+ pCppArgs[nPos] = pUnoArgs[nPos] = fpreg;
+ gpreg++;
+ fpreg++;
+ nregs++;
+ }
+ else
+ {
+ pCppArgs[nPos] = pUnoArgs[nPos] = ovrflw;
+ bOverFlowUsed = true;
+ }
+ if (bOverFlowUsed) ovrflw--;
+ break;
+ case typelib_TypeClass_HYPER:
+ case typelib_TypeClass_UNSIGNED_HYPER:
+ if (nregs < hppa::MAX_WORDS_IN_REGS && (nregs & 1))
+ {
+ gpreg++;
+ fpreg++;
+ nregs++;
+ }
+ if (nregs < hppa::MAX_WORDS_IN_REGS-1)
+ {
+ pCppArgs[nPos] = pUnoArgs[nPos] = gpreg;
+ gpreg+=2;
+ fpreg+=2;
+ nregs+=2;
+ }
+ else
+ {
+ if ((startovrflw-ovrflw) & 4)
+ ovrflw--;
+ pCppArgs[nPos] = pUnoArgs[nPos] = ((char*)ovrflw - 4);
+ bOverFlowUsed = true;
+ }
+ if (bOverFlowUsed) ovrflw-=2;
+ break;
+ case typelib_TypeClass_BYTE:
+ case typelib_TypeClass_BOOLEAN:
+ if (nregs < hppa::MAX_WORDS_IN_REGS)
+ {
+ pCppArgs[nPos] = pUnoArgs[nPos] = ((char*)gpreg + 3);
+ gpreg++;
+ fpreg++;
+ nregs++;
+ }
+ else
+ {
+ pCppArgs[nPos] = pUnoArgs[nPos] = ((char*)ovrflw+3);
+ bOverFlowUsed = true;
+ }
+ if (bOverFlowUsed) ovrflw--;
+ break;
+ case typelib_TypeClass_CHAR:
+ case typelib_TypeClass_SHORT:
+ case typelib_TypeClass_UNSIGNED_SHORT:
+ if (nregs < hppa::MAX_WORDS_IN_REGS)
+ {
+ pCppArgs[nPos] = pUnoArgs[nPos] = ((char*)gpreg+2);
+ gpreg++;
+ fpreg++;
+ nregs++;
+ }
+ else
+ {
+ pCppArgs[nPos] = pUnoArgs[nPos] = ((char*)ovrflw+2);
+ bOverFlowUsed = true;
+ }
+ if (bOverFlowUsed) ovrflw--;
+ break;
+ case typelib_TypeClass_ENUM:
+ case typelib_TypeClass_LONG:
+ case typelib_TypeClass_UNSIGNED_LONG:
+ default:
+ if (nregs < hppa::MAX_WORDS_IN_REGS)
+ {
+ pCppArgs[nPos] = pUnoArgs[nPos] = gpreg;
+ gpreg++;
+ fpreg++;
+ nregs++;
+ }
+ else
+ {
+ pCppArgs[nPos] = pUnoArgs[nPos] = ovrflw;
+ bOverFlowUsed = true;
+ }
+ if (bOverFlowUsed) ovrflw--;
+ break;
+ }
+ // no longer needed
+ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
+ }
+ else // ptr to complex value | ref
+ {
+ void *pCppStack;
+
+ if (nregs < hppa::MAX_WORDS_IN_REGS)
+ {
+ pCppArgs[nPos] = pCppStack = *gpreg;
+ gpreg++;
+ fpreg++;
+ nregs++;
+ }
+ else
+ {
+ pCppArgs[nPos] = pCppStack = *ovrflw;
+ bOverFlowUsed = true;
+ }
+ if (bOverFlowUsed) ovrflw--;
+
+ if (! rParam.bIn) // is pure out
+ {
+ // uno out is unconstructed mem!
+ pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize );
+ pTempIndizes[nTempIndizes] = nPos;
+ // will be released at reconversion
+ ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
+ }
+ // is in/inout
+ else if (bridges::cpp_uno::shared::relatesToInterfaceType(
+ pParamTypeDescr ))
+ {
+ uno_copyAndConvertData( pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ),
+ pCppStack, pParamTypeDescr,
+ pThis->getBridge()->getCpp2Uno() );
+ pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
+ // will be released at reconversion
+ ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
+ }
+ else // direct way
+ {
+ pUnoArgs[nPos] = pCppStack;
+ // no longer needed
+ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
+ }
+ }
+ }
+
+ // ExceptionHolder
+ uno_Any aUnoExc; // Any will be constructed by callee
+ uno_Any * pUnoExc = &aUnoExc;
+
+#ifdef CMC_DEBUG
+ fprintf(stderr, "before dispatch\n");
+#endif
+ // invoke uno dispatch call
+ (*pThis->getUnoI()->pDispatcher)(
+ pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
+
+#ifdef CMC_DEBUG
+ fprintf(stderr, "after dispatch\n");
+#endif
+
+ // in case an exception occured...
+ if (pUnoExc)
+ {
+ // destruct temporary in/inout params
+ for ( ; nTempIndizes--; )
+ {
+ sal_Int32 nIndex = pTempIndizes[nTempIndizes];
+
+ if (pParams[nIndex].bIn) // is in/inout => was constructed
+ uno_destructData( pUnoArgs[nIndex],
+ ppTempParamTypeDescr[nTempIndizes], 0 );
+ TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
+ }
+ if (pReturnTypeDescr)
+ TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
+
+ CPPU_CURRENT_NAMESPACE::raiseException( &aUnoExc,
+ pThis->getBridge()->getUno2Cpp() ); // has to destruct the any
+ // is here for dummy
+ return typelib_TypeClass_VOID;
+ }
+ else // else no exception occured...
+ {
+ // temporary params
+ for ( ; nTempIndizes--; )
+ {
+ sal_Int32 nIndex = pTempIndizes[nTempIndizes];
+ typelib_TypeDescription * pParamTypeDescr =
+ ppTempParamTypeDescr[nTempIndizes];
+
+ if (pParams[nIndex].bOut) // inout/out
+ {
+ // convert and assign
+ uno_destructData( pCppArgs[nIndex], pParamTypeDescr,
+ cpp_release );
+ uno_copyAndConvertData( pCppArgs[nIndex], pUnoArgs[nIndex],
+ pParamTypeDescr, pThis->getBridge()->getUno2Cpp() );
+ }
+ // destroy temp uno param
+ uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
+
+ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
+ }
+ // return
+ if (pCppReturn) // has complex return
+ {
+ if (pUnoReturn != pCppReturn) // needs reconversion
+ {
+ uno_copyAndConvertData( pCppReturn, pUnoReturn,
+ pReturnTypeDescr, pThis->getBridge()->getUno2Cpp() );
+ // destroy temp uno return
+ uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
+ }
+ // complex return ptr is set to eax
+ *(void **)pRegisterReturn = pCppReturn;
+ }
+ if (pReturnTypeDescr)
+ {
+ typelib_TypeClass eRet =
+ (typelib_TypeClass)pReturnTypeDescr->eTypeClass;
+ TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
+ return eRet;
+ }
+ else
+ return typelib_TypeClass_VOID;
+ }
+ }
+
+
+ //=====================================================================
+ static typelib_TypeClass cpp_mediate(
+ sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
+ void ** gpreg, double* fpreg,
+ long sp, long r8,
+ sal_Int64 * pRegisterReturn /* space for register return */ )
+
+ {
+ void ** ovrflw = (void**)(sp);
+#ifdef CMC_DEBUG
+ fprintf(stderr, "cpp_mediate with\n");
+ fprintf(stderr, "%x %x\n", nFunctionIndex, nVtableOffset);
+ fprintf(stderr, "and %x %x\n", (long)(ovrflw[0]), (long)(ovrflw[-1]));
+ fprintf(stderr, "and %x %x\n", (long)(ovrflw[-2]), (long)(ovrflw[-3]));
+ fprintf(stderr, "and %x %x\n", (long)(ovrflw[-4]), (long)(ovrflw[-5]));
+ fprintf(stderr, "and %x %x\n", (long)(ovrflw[-6]), (long)(ovrflw[-7]));
+ fprintf(stderr, "and %x %x\n", (long)(ovrflw[-8]), (long)(ovrflw[-9]));
+ fprintf(stderr, "and %x %x\n", (long)(ovrflw[-10]), (long)(ovrflw[-11]));
+ fprintf(stderr, "and %x %x\n", (long)(ovrflw[-12]), (long)(ovrflw[-13]));
+ fprintf(stderr, "and %x %x\n", (long)(ovrflw[-14]), (long)(ovrflw[-15]));
+#endif
+ OSL_ENSURE( sizeof(sal_Int32)==sizeof(void *), "### unexpected!" );
+
+ // gpreg: [ret *], this, [other gpr params]
+ // fpreg: [fpr params]
+ // ovrflw: [gpr or fpr params (properly aligned)]
+
+ void * pThis;
+ if (nFunctionIndex & 0x80000000 )
+ {
+ nFunctionIndex &= 0x7fffffff;
+ pThis = gpreg[1];
+#ifdef CMC_DEBUG
+ fprintf(stderr, "pThis is gpreg[1]\n");
+#endif
+ }
+ else
+ {
+ pThis = gpreg[0];
+#ifdef CMC_DEBUG
+ fprintf(stderr, "pThis is gpreg[0]\n");
+#endif
+ }
+
+ pThis = static_cast< char * >(pThis) - nVtableOffset;
+
+ bridges::cpp_uno::shared::CppInterfaceProxy * pCppI =
+ bridges::cpp_uno::shared::CppInterfaceProxy::castInterfaceToProxy(
+ pThis);
+
+ typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
+
+ OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex,
+ "### illegal vtable index!" );
+ if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
+ {
+ throw RuntimeException(
+ OUString::createFromAscii("illegal vtable index!"),
+ (XInterface *)pCppI );
+ }
+
+ // determine called method
+ OSL_ENSURE( nFunctionIndex < pTypeDescr->nMapFunctionIndexToMemberIndex,
+ "### illegal vtable index!" );
+ sal_Int32 nMemberPos =
+ pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
+ OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers,
+ "### illegal member index!" );
+
+ TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
+
+ typelib_TypeClass eRet;
+ switch (aMemberDescr.get()->eTypeClass)
+ {
+ case typelib_TypeClass_INTERFACE_ATTRIBUTE:
+ {
+ if (pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos] ==
+ nFunctionIndex)
+ {
+ // is GET method
+ eRet = cpp2uno_call(
+ pCppI, aMemberDescr.get(),
+ ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef,
+ 0, 0, // no params
+ r8, gpreg, fpreg, ovrflw, pRegisterReturn );
+ }
+ else
+ {
+ // is SET method
+ typelib_MethodParameter aParam;
+ aParam.pTypeRef =
+ ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
+ eRet = cpp2uno_call(
+ pCppI, aMemberDescr.get(),
+ 0, // indicates void return
+ 1, &aParam,
+ r8, gpreg, fpreg, ovrflw, pRegisterReturn );
+ }
+ break;
+ }
+ case typelib_TypeClass_INTERFACE_METHOD:
+ {
+ // is METHOD
+ switch (nFunctionIndex)
+ {
+ case 1: // acquire()
+ pCppI->acquireProxy(); // non virtual call!
+ eRet = typelib_TypeClass_VOID;
+ break;
+ case 2: // release()
+ pCppI->releaseProxy(); // non virtual call!
+ eRet = typelib_TypeClass_VOID;
+ break;
+ case 0: // queryInterface() opt
+ {
+ typelib_TypeDescription * pTD = 0;
+ TYPELIB_DANGER_GET(&pTD,
+ reinterpret_cast<Type *>(gpreg[1])->getTypeLibType());
+ if (pTD)
+ {
+ XInterface * pInterface = 0;
+ (*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
+ pCppI->getBridge()->getCppEnv(),
+ (void **)&pInterface, pCppI->getOid().pData,
+ (typelib_InterfaceTypeDescription *)pTD );
+
+ if (pInterface)
+ {
+ ::uno_any_construct(
+ reinterpret_cast< uno_Any * >( r8 ),
+ &pInterface, pTD, cpp_acquire );
+ pInterface->release();
+ TYPELIB_DANGER_RELEASE( pTD );
+ *(void **)pRegisterReturn = (void*)r8;
+ eRet = typelib_TypeClass_ANY;
+ break;
+ }
+ TYPELIB_DANGER_RELEASE( pTD );
+ }
+ } // else perform queryInterface()
+ default:
+ eRet = cpp2uno_call(
+ pCppI, aMemberDescr.get(),
+ ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pReturnTypeRef,
+ ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->nParams,
+ ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pParams,
+ r8, gpreg, fpreg, ovrflw, pRegisterReturn );
+ }
+ break;
+ }
+ default:
+ {
+ throw RuntimeException(
+ OUString::createFromAscii("no member description found!"),
+ (XInterface *)pCppI );
+ // is here for dummy
+ eRet = typelib_TypeClass_VOID;
+ }
+ }
+
+ return eRet;
+ }
+}
+
+//=======================================================================
+/**
+ * is called on incoming vtable calls
+ * (called by asm snippets)
+ */
+
+sal_Int64 cpp_vtable_call( sal_uInt32 in0, sal_uInt32 in1, sal_uInt32 in2, sal_uInt32 in3, sal_uInt32 firstonstack )
+{
+ register sal_Int32 r21 asm("r21");
+ register sal_Int32 r22 asm("r22");
+ register sal_Int32 r28 asm("r28");
+ sal_Int32 functionIndex = r21;
+ sal_Int32 vtableOffset = r22;
+ sal_Int32 r8 = r28;
+
+ long sp = (long)&firstonstack;
+
+ sal_uInt32 gpreg[hppa::MAX_GPR_REGS];
+ gpreg[0] = in0;
+ gpreg[1] = in1;
+ gpreg[2] = in2;
+ gpreg[3] = in3;
+
+ float fpreg[hppa::MAX_SSE_REGS]; //todo
+ register float f0 asm("fr4"); fpreg[0] = f0;
+ register float f1 asm("fr5"); fpreg[1] = f1;
+ register float f2 asm("fr6"); fpreg[2] = f2;
+ register float f3 asm("fr7"); fpreg[3] = f3;
+
+ double dpreg[hppa::MAX_SSE_REGS]; //todo
+ register double d0 asm("fr4"); dpreg[0] = d0;
+ register double d1 asm("fr5"); dpreg[1] = d1;
+ register double d2 asm("fr6"); dpreg[2] = d2;
+ register double d3 asm("fr7"); dpreg[3] = d3;
+
+
+#ifdef CMC_DEBUG
+ fprintf(stderr, "got to cpp_vtable_call with %x %x\n", functionIndex, vtableOffset);
+ for (int i = 0; i < hppa::MAX_GPR_REGS; ++i)
+ fprintf(stderr, "reg %d is %d %x\n", i, gpreg[i], gpreg[i]);
+ for (int i = 0; i < hppa::MAX_SSE_REGS; ++i)
+ fprintf(stderr, "float reg %d is %f %x\n", i, fpreg[i], ((long*)fpreg)[i]);
+ for (int i = 0; i < 4; ++i)
+ fprintf(stderr, "double reg %d is %f %llx\n", i, dpreg[i], ((long long*)dpreg)[i]);
+#endif
+
+ sal_Int64 nRegReturn;
+
+ typelib_TypeClass aType =
+ cpp_mediate( functionIndex, vtableOffset, (void**)gpreg, dpreg, sp, r8, &nRegReturn);
+
+ switch( aType )
+ {
+ case typelib_TypeClass_FLOAT:
+ f0 = (*((float*)&nRegReturn));
+ break;
+ case typelib_TypeClass_DOUBLE:
+ d0 = (*((double*)&nRegReturn));
+ break;
+ default:
+ break;
+ }
+
+ return nRegReturn;
+}
+
+
+namespace
+{
+ const int codeSnippetSize = 44;
+
+# define unldil(v) (((v & 0x7c) << 14) | ((v & 0x180) << 7) | ((v & 0x3) << 12) | ((v & 0xffe00) >> 8) | ((v & 0x100000) >> 20))
+# define L21(v) unldil(((unsigned long)(v) >> 11) & 0x1fffff) //Left 21 bits
+# define R11(v) (((unsigned long)(v) & 0x7FF) << 1) //Right 11 bits
+
+ unsigned char *codeSnippet(unsigned char* code, sal_Int32 functionIndex,
+ sal_Int32 vtableOffset, bool bHasHiddenParam)
+ {
+ if (bHasHiddenParam)
+ functionIndex |= 0x80000000;
+
+ unsigned char * p = code;
+ *(unsigned long*)&p[0] = 0xeaa00000; // b,l 0x8,r21
+ *(unsigned long*)&p[4] = 0xd6a01c1e; // depwi 0,31,2,r21
+ *(unsigned long*)&p[8] = 0x4aa10040; // ldw 32(r21),r1
+
+ *(unsigned long*)&p[12] = 0x22A00000 | L21(functionIndex); // ldil L<functionIndex>,r21
+ *(unsigned long*)&p[16] = 0x36B50000 | R11(functionIndex); // ldo R<functionIndex>,r21
+
+ *(unsigned long*)&p[20] = 0x22C00000 | L21(vtableOffset); // ldil L<vtableOffset>,r22
+ *(unsigned long*)&p[24] = 0x36D60000 | R11(vtableOffset); // ldo R<vtableOffset>,r22
+
+ *(unsigned long*)&p[28] = 0x0c201094; // ldw 0(r1),r20
+ *(unsigned long*)&p[32] = 0xea80c000; // bv r0(r20)
+ *(unsigned long*)&p[36] = 0x0c281093; // ldw 4(r1),r19
+ *(unsigned long*)&p[40] = ((unsigned long)(cpp_vtable_call) & ~2);
+
+ return code + codeSnippetSize;
+ }
+}
+
+struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
+
+bridges::cpp_uno::shared::VtableFactory::Slot *
+bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
+{
+ return static_cast< Slot * >(block) + 2;
+}
+
+sal_Size bridges::cpp_uno::shared::VtableFactory::getBlockSize(
+ sal_Int32 slotCount)
+{
+ return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
+}
+
+bridges::cpp_uno::shared::VtableFactory::Slot *
+bridges::cpp_uno::shared::VtableFactory::initializeBlock(
+ void * block, sal_Int32 slotCount)
+{
+ Slot * slots = mapBlockToVtable(block);
+ slots[-2].fn = 0;
+ slots[-1].fn = 0;
+ return slots + slotCount;
+}
+
+unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
+ Slot ** slots, unsigned char * code, sal_PtrDiff writetoexecdiff,
+ typelib_InterfaceTypeDescription const * type, sal_Int32 functionOffset,
+ sal_Int32 functionCount, sal_Int32 vtableOffset)
+{
+ (*slots) -= functionCount;
+ Slot * s = *slots;
+ for (sal_Int32 i = 0; i < type->nMembers; ++i)
+ {
+ typelib_TypeDescription * member = 0;
+ TYPELIB_DANGER_GET(&member, type->ppMembers[i]);
+ OSL_ASSERT(member != 0);
+ switch (member->eTypeClass)
+ {
+ case typelib_TypeClass_INTERFACE_ATTRIBUTE:
+ // Getter:
+ (s++)->fn = code + writetoexecdiff;
+ code = codeSnippet(code, functionOffset++, vtableOffset, false);
+ // Setter:
+ if (!reinterpret_cast<
+ typelib_InterfaceAttributeTypeDescription * >(
+ member)->bReadOnly)
+ {
+ (s++)->fn = code + writetoexecdiff;
+ code = codeSnippet(code, functionOffset++, vtableOffset, false);
+ }
+ break;
+ case typelib_TypeClass_INTERFACE_METHOD:
+ {
+ (s++)->fn = code + writetoexecdiff;
+ code = codeSnippet(code, functionOffset++, vtableOffset, false);
+ break;
+ }
+ default:
+ OSL_ASSERT(false);
+ break;
+ }
+ TYPELIB_DANGER_RELEASE(member);
+ }
+ return code;
+}
+
+void bridges::cpp_uno::shared::VtableFactory::flushCode(
+ unsigned char const *beg, unsigned char const *end)
+{
+ void *p = (void*)((size_t)beg & ~31);
+ size_t stride = 32;
+ while (p < end)
+ {
+ asm volatile("fdc (%0)\n\t"
+ "sync\n\t"
+ "fic,m %1(%%sr4, %0)\n\t"
+ "sync" : "+r"(p) : "r"(stride) : "memory");
+ }
+}
+
+/* vi:set tabstop=4 shiftwidth=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
new file mode 100644
index 000000000000..8242bacaedc6
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx
@@ -0,0 +1,337 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: except.cxx,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <stdio.h>
+#include <string.h>
+#include <dlfcn.h>
+#include <cxxabi.h>
+#include <hash_map>
+
+#include <rtl/strbuf.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <osl/diagnose.h>
+#include <osl/mutex.hxx>
+
+#include <com/sun/star/uno/genfunc.hxx>
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include <typelib/typedescription.hxx>
+#include <uno/any2.h>
+
+#include "share.hxx"
+
+
+using namespace ::std;
+using namespace ::osl;
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+using namespace ::__cxxabiv1;
+
+extern sal_Int32 * pHack;
+extern sal_Int32 nHack;
+
+namespace CPPU_CURRENT_NAMESPACE
+{
+ void dummy_can_throw_anything( char const * )
+ {
+ }
+
+ //===================================================================
+ static OUString toUNOname( char const * p ) SAL_THROW( () )
+ {
+#if OSL_DEBUG_LEVEL > 1
+ char const * start = p;
+#endif
+
+ // example: N3com3sun4star4lang24IllegalArgumentExceptionE
+
+ OUStringBuffer buf( 64 );
+ OSL_ASSERT( 'N' == *p );
+ ++p; // skip N
+
+ while ('E' != *p)
+ {
+ // read chars count
+ long n = (*p++ - '0');
+ while ('0' <= *p && '9' >= *p)
+ {
+ n *= 10;
+ n += (*p++ - '0');
+ }
+ buf.appendAscii( p, n );
+ p += n;
+ if ('E' != *p)
+ buf.append( (sal_Unicode)'.' );
+ }
+
+#if OSL_DEBUG_LEVEL > 1
+ OUString ret( buf.makeStringAndClear() );
+ OString c_ret( OUStringToOString( ret, RTL_TEXTENCODING_ASCII_US ) );
+ fprintf( stderr, "> toUNOname(): %s => %s\n", start, c_ret.getStr() );
+ return ret;
+#else
+ return buf.makeStringAndClear();
+#endif
+ }
+
+ //=====================================================================
+ class RTTI
+ {
+ typedef hash_map< OUString, type_info *, OUStringHash > t_rtti_map;
+
+ Mutex m_mutex;
+ t_rtti_map m_rttis;
+ t_rtti_map m_generatedRttis;
+
+ void * m_hApp;
+
+ public:
+ RTTI() SAL_THROW( () );
+ ~RTTI() SAL_THROW( () );
+
+ type_info * getRTTI(typelib_CompoundTypeDescription *) SAL_THROW( () );
+ };
+ //____________________________________________________________________
+ RTTI::RTTI() SAL_THROW( () )
+ : m_hApp( dlopen( 0, RTLD_LAZY ) )
+ {
+ }
+ //____________________________________________________________________
+ RTTI::~RTTI() SAL_THROW( () )
+ {
+ dlclose( m_hApp );
+ }
+
+ //____________________________________________________________________
+ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THROW( () )
+ {
+ type_info * rtti;
+
+ OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName;
+
+ MutexGuard guard( m_mutex );
+ t_rtti_map::const_iterator iRttiFind( m_rttis.find( unoName ) );
+ if (iRttiFind == m_rttis.end())
+ {
+ // RTTI symbol
+ OStringBuffer buf( 64 );
+ buf.append( RTL_CONSTASCII_STRINGPARAM("_ZTIN") );
+ sal_Int32 index = 0;
+ do
+ {
+ OUString token( unoName.getToken( 0, '.', index ) );
+ buf.append( token.getLength() );
+ OString c_token( OUStringToOString( token, RTL_TEXTENCODING_ASCII_US ) );
+ buf.append( c_token );
+ }
+ while (index >= 0);
+ buf.append( 'E' );
+
+ OString symName( buf.makeStringAndClear() );
+ rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
+
+ if (rtti)
+ {
+ pair< t_rtti_map::iterator, bool > insertion(
+ m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
+ OSL_ENSURE( insertion.second, "### inserting new rtti failed?!" );
+ }
+ else
+ {
+ // try to lookup the symbol in the generated rtti map
+ t_rtti_map::const_iterator iFind( m_generatedRttis.find( unoName ) );
+ if (iFind == m_generatedRttis.end())
+ {
+ // we must generate it !
+ // symbol and rtti-name is nearly identical,
+ // the symbol is prefixed with _ZTI
+ char const * rttiName = symName.getStr() +4;
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr,"generated rtti for %s\n", rttiName );
+#endif
+ if (pTypeDescr->pBaseTypeDescription)
+ {
+ // ensure availability of base
+ type_info * base_rtti = getRTTI(
+ (typelib_CompoundTypeDescription *)pTypeDescr->pBaseTypeDescription );
+ rtti = new __si_class_type_info(
+ strdup( rttiName ), (__class_type_info *)base_rtti );
+ }
+ else
+ {
+ // this class has no base class
+ rtti = new __class_type_info( strdup( rttiName ) );
+ }
+
+ pair< t_rtti_map::iterator, bool > insertion(
+ m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
+ OSL_ENSURE( insertion.second, "### inserting new generated rtti failed?!" );
+ }
+ else // taking already generated rtti
+ {
+ rtti = iFind->second;
+ }
+ }
+ }
+ else
+ {
+ rtti = iRttiFind->second;
+ }
+
+ return rtti;
+ }
+
+ //------------------------------------------------------------------
+ static void deleteException( void * pExc )
+ {
+ __cxa_exception const * header = ((__cxa_exception const *)pExc - 1);
+ typelib_TypeDescription * pTD = 0;
+ OUString unoName( toUNOname( header->exceptionType->name() ) );
+ ::typelib_typedescription_getByName( &pTD, unoName.pData );
+ OSL_ENSURE( pTD, "### unknown exception type! leaving out destruction => leaking!!!" );
+ if (pTD)
+ {
+ ::uno_destructData( pExc, pTD, cpp_release );
+ ::typelib_typedescription_release( pTD );
+ }
+ }
+
+ //==================================================================
+ void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
+ {
+#if OSL_DEBUG_LEVEL > 1
+ OString cstr(
+ OUStringToOString(
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
+ RTL_TEXTENCODING_ASCII_US ) );
+ fprintf( stderr, "> uno exception occured: %s\n", cstr.getStr() );
+#endif
+ void * pCppExc;
+ type_info * rtti;
+
+ {
+ // construct cpp exception object
+ typelib_TypeDescription * pTypeDescr = 0;
+ TYPELIB_DANGER_GET( &pTypeDescr, pUnoExc->pType );
+ OSL_ASSERT( pTypeDescr );
+ if (! pTypeDescr)
+ {
+ throw RuntimeException(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("cannot get typedescription for type ") ) +
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
+ Reference< XInterface >() );
+ }
+
+ pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
+ ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp );
+
+ // destruct uno exception
+ ::uno_any_destruct( pUnoExc, 0 );
+ // avoiding locked counts
+ static RTTI * s_rtti = 0;
+ if (! s_rtti)
+ {
+ MutexGuard guard( Mutex::getGlobalMutex() );
+ if (! s_rtti)
+ {
+#ifdef LEAK_STATIC_DATA
+ s_rtti = new RTTI();
+#else
+ static RTTI rtti_data;
+ s_rtti = &rtti_data;
+#endif
+ }
+ }
+ rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
+ TYPELIB_DANGER_RELEASE( pTypeDescr );
+ OSL_ENSURE( rtti, "### no rtti for throwing exception!" );
+ if (! rtti)
+ {
+ throw RuntimeException(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("no rtti for type ") ) +
+ *reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
+ Reference< XInterface >() );
+ }
+ }
+
+
+ __cxa_throw( pCppExc, rtti, deleteException );
+ }
+
+ static void* getAdjustedPtr(__cxa_exception* header)
+ {
+ return header->adjustedPtr;
+ }
+
+ //===================================================================
+ void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping * pCpp2Uno )
+ {
+ if (! header)
+ {
+ RuntimeException aRE(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("no exception header!") ),
+ Reference< XInterface >() );
+ Type const & rType = ::getCppuType( &aRE );
+ uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
+#if OSL_DEBUG_LEVEL > 0
+ OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
+ OSL_ENSURE( 0, cstr.getStr() );
+#endif
+ return;
+ }
+
+ typelib_TypeDescription * pExcTypeDescr = 0;
+ OUString unoName( toUNOname( header->exceptionType->name() ) );
+#if OSL_DEBUG_LEVEL > 1
+ OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
+ fprintf( stderr, "> c++ exception occured: %s\n", cstr_unoName.getStr() );
+#endif
+ typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
+ if (0 == pExcTypeDescr)
+ {
+ RuntimeException aRE(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("exception type not found: ") ) + unoName,
+ Reference< XInterface >() );
+ Type const & rType = ::getCppuType( &aRE );
+ uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
+#if OSL_DEBUG_LEVEL > 0
+ OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
+ OSL_ENSURE( 0, cstr.getStr() );
+#endif
+ }
+ else
+ {
+ // construct uno exception any
+ uno_any_constructAndConvert( pUnoExc, getAdjustedPtr(header), pExcTypeDescr, pCpp2Uno );
+ typelib_typedescription_release( pExcTypeDescr );
+ }
+ }
+}
+
+/* vi:set tabstop=4 shiftwidth=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk b/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk
new file mode 100644
index 000000000000..fcdcea72454f
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/makefile.mk
@@ -0,0 +1,86 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2008 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# $RCSfile: makefile.mk,v $
+#
+# $Revision: 1.2 $
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+PRJ=..$/..$/..
+
+PRJNAME=bridges
+TARGET=gcc3_uno
+LIBTARGET=no
+ENABLE_EXCEPTIONS=TRUE
+NO_BSYMBOLIC=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+# --- Files --------------------------------------------------------
+
+.IF "$(COM)$(OS)$(CPU)" == "GCCLINUXH"
+
+.IF "$(cppu_no_leak)" == ""
+CFLAGS += -DLEAK_STATIC_DATA
+.ENDIF
+
+CFLAGSCXX += -fno-omit-frame-pointer
+
+NOOPTFILES= \
+ $(SLO)$/cpp2uno.obj \
+ $(SLO)$/except.obj \
+ $(SLO)$/uno2cpp.obj \
+ $(SLO)$/call.obj
+
+CFLAGSNOOPT=-O0
+
+SLOFILES= \
+ $(SLO)$/cpp2uno.obj \
+ $(SLO)$/except.obj \
+ $(SLO)$/uno2cpp.obj \
+ $(SLO)$/call.obj
+
+SHL1TARGET= $(TARGET)
+
+SHL1DEF=$(MISC)$/$(SHL1TARGET).def
+SHL1IMPLIB=i$(TARGET)
+SHL1VERSIONMAP=..$/..$/bridge_exports.map
+SHL1RPATH=URELIB
+
+SHL1OBJS = $(SLOFILES)
+SHL1LIBS = $(SLB)$/cpp_uno_shared.lib
+
+SHL1STDLIBS= \
+ $(CPPULIB) \
+ $(SALLIB)
+
+.ENDIF
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx b/bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx
new file mode 100644
index 000000000000..eedfdf75da8d
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: share.hxx,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "uno/mapping.h"
+
+#include <typeinfo>
+#include <exception>
+#include <cstddef>
+
+namespace CPPU_CURRENT_NAMESPACE
+{
+
+ void dummy_can_throw_anything( char const * );
+
+
+// ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
+
+struct _Unwind_Exception
+{
+ unsigned exception_class __attribute__((__mode__(__DI__)));
+ void * exception_cleanup;
+ unsigned private_1 __attribute__((__mode__(__word__)));
+ unsigned private_2 __attribute__((__mode__(__word__)));
+} __attribute__((__aligned__));
+
+struct __cxa_exception
+{
+ ::std::type_info *exceptionType;
+ void (*exceptionDestructor)(void *);
+
+ ::std::unexpected_handler unexpectedHandler;
+ ::std::terminate_handler terminateHandler;
+
+ __cxa_exception *nextException;
+
+ int handlerCount;
+
+ int handlerSwitchValue;
+ const unsigned char *actionRecord;
+ const unsigned char *languageSpecificData;
+ void *catchTemp;
+ void *adjustedPtr;
+
+ _Unwind_Exception unwindHeader;
+};
+
+extern "C" void *__cxa_allocate_exception(
+ std::size_t thrown_size ) throw();
+extern "C" void __cxa_throw (
+ void *thrown_exception, std::type_info *tinfo, void (*dest) (void *) ) __attribute__((noreturn));
+
+struct __cxa_eh_globals
+{
+ __cxa_exception *caughtExceptions;
+ unsigned int uncaughtExceptions;
+};
+extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
+
+// -----
+
+//==================================================================================================
+void raiseException(
+ uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
+//==================================================================================================
+void fillUnoException(
+ __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
+}
+
+
+namespace hppa
+{
+ enum hppalimits { MAX_WORDS_IN_REGS = 4, MAX_GPR_REGS = 4, MAX_SSE_REGS = 4 };
+
+ bool isRegisterReturn( typelib_TypeDescriptionReference *pTypeRef );
+}
diff --git a/bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx
new file mode 100644
index 000000000000..a342568d5bf8
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx
@@ -0,0 +1,524 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: uno2cpp.cxx,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include <malloc.h>
+#include <rtl/alloc.h>
+
+#include <com/sun/star/uno/genfunc.hxx>
+#include "com/sun/star/uno/RuntimeException.hpp"
+#include <uno/data.h>
+
+#include <bridges/cpp_uno/shared/bridge.hxx>
+#include <bridges/cpp_uno/shared/types.hxx>
+#include <bridges/cpp_uno/shared/unointerfaceproxy.hxx>
+#include <bridges/cpp_uno/shared/vtables.hxx>
+
+#include "share.hxx"
+
+#include <stdio.h>
+#include <string.h>
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+
+void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
+ void * pRegisterReturn, typelib_TypeDescription *pReturnTypeDescr, bool bRegisterReturn,
+ sal_uInt32 *pStack, sal_uInt32 nStack, sal_uInt32 *pGPR, double *pFPR);
+
+#define INSERT_INT32( pSV, nr, pGPR, pDS, bOverFlow )\
+ if (nr < hppa::MAX_WORDS_IN_REGS) \
+ { \
+ pGPR[nr++] = *reinterpret_cast<sal_uInt32 *>( pSV ); \
+ } \
+ else \
+ bOverFlow = true; \
+ if (bOverFlow) \
+ *pDS++ = *reinterpret_cast<sal_uInt32 *>( pSV );
+
+#define INSERT_INT64( pSV, nr, pGPR, pDS, pStart, bOverFlow )\
+ if ( (nr < hppa::MAX_WORDS_IN_REGS) && (nr % 2) ) \
+ { \
+ ++nr; \
+ } \
+ if ( nr < hppa::MAX_WORDS_IN_REGS ) \
+ { \
+ pGPR[nr++] = *reinterpret_cast<sal_uInt32 *>( pSV ); \
+ pGPR[nr++] = *(reinterpret_cast<sal_uInt32 *>( pSV ) + 1); \
+ } \
+ else \
+ bOverFlow = true; \
+ if ( bOverFlow ) \
+ { \
+ if ( (pDS - pStart) % 2) \
+ ++pDS; \
+ *pDS++ = reinterpret_cast<sal_uInt32 *>( pSV )[1]; \
+ *pDS++ = reinterpret_cast<sal_uInt32 *>( pSV )[0]; \
+ }
+
+#define INSERT_FLOAT( pSV, nr, pFPR, pDS, bOverFlow ) \
+ if (nr < hppa::MAX_WORDS_IN_REGS) \
+ { \
+ sal_uInt32 *pDouble = (sal_uInt32 *)&(pFPR[nr++]); \
+ pDouble[0] = *reinterpret_cast<sal_uInt32 *>( pSV ); \
+ } \
+ else \
+ bOverFlow = true; \
+ if (bOverFlow) \
+ *pDS++ = *reinterpret_cast<sal_uInt32 *>( pSV );
+
+#define INSERT_DOUBLE( pSV, nr, pFPR, pDS, pStart, bOverFlow ) \
+ if ( (nr < hppa::MAX_WORDS_IN_REGS) && (nr % 2) ) \
+ { \
+ ++nr; \
+ } \
+ if ( nr < hppa::MAX_WORDS_IN_REGS ) \
+ { \
+ sal_uInt32 *pDouble = (sal_uInt32 *)&(pFPR[nr+1]); \
+ pDouble[0] = *reinterpret_cast<sal_uInt32 *>( pSV ); \
+ pDouble[1] = *(reinterpret_cast<sal_uInt32 *>( pSV ) + 1); \
+ nr+=2; \
+ } \
+ else \
+ bOverFlow = true; \
+ if ( bOverFlow ) \
+ { \
+ if ( (pDS - pStart) % 2) \
+ ++pDS; \
+ *pDS++ = reinterpret_cast<sal_uInt32 *>( pSV )[1]; \
+ *pDS++ = reinterpret_cast<sal_uInt32 *>( pSV )[0]; \
+ }
+
+#define INSERT_INT16( pSV, nr, pGPR, pDS, bOverFlow ) \
+ if ( nr < hppa::MAX_WORDS_IN_REGS ) \
+ pGPR[nr++] = *reinterpret_cast<sal_uInt16 *>( pSV ); \
+ else \
+ bOverFlow = true; \
+ if (bOverFlow) \
+ *pDS++ = *reinterpret_cast<sal_uInt16 *>( pSV );
+
+#define INSERT_INT8( pSV, nr, pGPR, pDS, bOverFlow ) \
+ if ( nr < hppa::MAX_WORDS_IN_REGS ) \
+ pGPR[nr++] = *reinterpret_cast<sal_uInt8 *>( pSV ); \
+ else \
+ bOverFlow = true; \
+ if (bOverFlow) \
+ *pDS++ = *reinterpret_cast<sal_uInt8 *>( pSV );
+
+namespace hppa
+{
+ bool is_complex_struct(const typelib_TypeDescription * type)
+ {
+ const typelib_CompoundTypeDescription * p
+ = reinterpret_cast< const typelib_CompoundTypeDescription * >(type);
+ for (sal_Int32 i = 0; i < p->nMembers; ++i)
+ {
+ if (p->ppTypeRefs[i]->eTypeClass == typelib_TypeClass_STRUCT ||
+ p->ppTypeRefs[i]->eTypeClass == typelib_TypeClass_EXCEPTION)
+ {
+ typelib_TypeDescription * t = 0;
+ TYPELIB_DANGER_GET(&t, p->ppTypeRefs[i]);
+ bool b = is_complex_struct(t);
+ TYPELIB_DANGER_RELEASE(t);
+ if (b) {
+ return true;
+ }
+ }
+ else if (!bridges::cpp_uno::shared::isSimpleType(p->ppTypeRefs[i]->eTypeClass))
+ return true;
+ }
+ if (p->pBaseTypeDescription != 0)
+ return is_complex_struct(&p->pBaseTypeDescription->aBase);
+ return false;
+ }
+
+ bool isRegisterReturn( typelib_TypeDescriptionReference *pTypeRef )
+ {
+ if (bridges::cpp_uno::shared::isSimpleType(pTypeRef))
+ return true;
+ else if (pTypeRef->eTypeClass == typelib_TypeClass_STRUCT || pTypeRef->eTypeClass == typelib_TypeClass_EXCEPTION)
+ {
+ typelib_TypeDescription * pTypeDescr = 0;
+ TYPELIB_DANGER_GET( &pTypeDescr, pTypeRef );
+
+ /* If the struct is larger than 8 bytes, then there is a buffer at r8 to stick the return value into */
+ bool bRet = pTypeDescr->nSize <= 8 && !is_complex_struct(pTypeDescr);
+
+ TYPELIB_DANGER_RELEASE( pTypeDescr );
+ return bRet;
+ }
+ return false;
+ }
+}
+
+
+namespace {
+//=======================================================================
+static void cpp_call(
+ bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
+ bridges::cpp_uno::shared::VtableSlot aVtableSlot,
+ typelib_TypeDescriptionReference * pReturnTypeRef,
+ sal_Int32 nParams, typelib_MethodParameter * pParams,
+ void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
+{
+ // max space for: [complex ret ptr], values|ptr ...
+ sal_uInt32 * pStack = (sal_uInt32 *)__builtin_alloca(
+ sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
+ sal_uInt32 * pStackStart = pStack;
+
+ sal_uInt32 pGPR[hppa::MAX_GPR_REGS];
+ double pFPR[hppa::MAX_SSE_REGS];
+ sal_uInt32 nRegs=0;
+
+ // return
+ typelib_TypeDescription * pReturnTypeDescr = 0;
+ TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
+ OSL_ENSURE( pReturnTypeDescr, "### expected return type description!" );
+
+ void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
+ bool bOverFlow = false;
+ bool bRegisterReturn = true;
+
+ if (pReturnTypeDescr)
+ {
+
+ bRegisterReturn = hppa::isRegisterReturn(pReturnTypeRef);
+ if (bRegisterReturn)
+ pCppReturn = pUnoReturn; // direct way for simple types
+ else
+ {
+ // complex return via ptr
+ pCppReturn = (bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
+ ? __builtin_alloca( pReturnTypeDescr->nSize )
+ : pUnoReturn); // direct way
+ }
+ }
+ // push this
+ void * pAdjustedThisPtr = reinterpret_cast< void ** >(pThis->getCppI())
+ + aVtableSlot.offset;
+ INSERT_INT32( &pAdjustedThisPtr, nRegs, pGPR, pStack, bOverFlow );
+
+ // stack space
+ OSL_ENSURE( sizeof(void *) == sizeof(sal_Int32), "### unexpected size!" );
+ // args
+ void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams );
+ // indizes of values this have to be converted (interface conversion cpp<=>uno)
+ sal_Int32 * pTempIndizes = (sal_Int32 *)(pCppArgs + nParams);
+ // type descriptions for reconversions
+ typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
+
+ sal_Int32 nTempIndizes = 0;
+
+ for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
+ {
+ const typelib_MethodParameter & rParam = pParams[nPos];
+ typelib_TypeDescription * pParamTypeDescr = 0;
+ TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
+
+ if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
+ {
+ uno_copyAndConvertData( pCppArgs[nPos] = alloca(8), pUnoArgs[nPos],
+ pParamTypeDescr, pThis->getBridge()->getUno2Cpp() );
+
+ switch (pParamTypeDescr->eTypeClass)
+ {
+ case typelib_TypeClass_HYPER:
+ case typelib_TypeClass_UNSIGNED_HYPER:
+#ifdef CMC_DEBUG
+ fprintf(stderr, "hyper is %llx\n", *((long long*)pCppArgs[nPos]));
+#endif
+ INSERT_INT64( pCppArgs[nPos], nRegs, pGPR, pStack, pStackStart, bOverFlow );
+ break;
+ case typelib_TypeClass_LONG:
+ case typelib_TypeClass_UNSIGNED_LONG:
+ case typelib_TypeClass_ENUM:
+#ifdef CMC_DEBUG
+ fprintf(stderr, "long is %x\n", pCppArgs[nPos]);
+#endif
+ INSERT_INT32( pCppArgs[nPos], nRegs, pGPR, pStack, bOverFlow );
+ break;
+ case typelib_TypeClass_SHORT:
+ case typelib_TypeClass_CHAR:
+ case typelib_TypeClass_UNSIGNED_SHORT:
+ INSERT_INT16( pCppArgs[nPos], nRegs, pGPR, pStack, bOverFlow );
+ break;
+ case typelib_TypeClass_BOOLEAN:
+ case typelib_TypeClass_BYTE:
+ INSERT_INT8( pCppArgs[nPos], nRegs, pGPR, pStack, bOverFlow );
+ break;
+ case typelib_TypeClass_FLOAT:
+ INSERT_FLOAT( pCppArgs[nPos], nRegs, pFPR, pStack, bOverFlow );
+ break;
+ case typelib_TypeClass_DOUBLE:
+ INSERT_DOUBLE( pCppArgs[nPos], nRegs, pFPR, pStack, pStackStart, bOverFlow );
+ break;
+ default:
+ break;
+ }
+ // no longer needed
+ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
+ }
+ else // ptr to complex value | ref
+ {
+ if (! rParam.bIn) // is pure out
+ {
+ // cpp out is constructed mem, uno out is not!
+ uno_constructData(
+ pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
+ pParamTypeDescr );
+ pTempIndizes[nTempIndizes] = nPos; // default constructed for cpp call
+ // will be released at reconversion
+ ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
+ }
+ // is in/inout
+ else if (bridges::cpp_uno::shared::relatesToInterfaceType( pParamTypeDescr ))
+ {
+ uno_copyAndConvertData(
+ pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
+ pUnoArgs[nPos], pParamTypeDescr, pThis->getBridge()->getUno2Cpp() );
+
+ pTempIndizes[nTempIndizes] = nPos; // has to be reconverted
+ // will be released at reconversion
+ ppTempParamTypeDescr[nTempIndizes++] = pParamTypeDescr;
+ }
+ else // direct way
+ {
+ pCppArgs[nPos] = pUnoArgs[nPos];
+ // no longer needed
+ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
+ }
+ INSERT_INT32( &(pCppArgs[nPos]), nRegs, pGPR, pStack, bOverFlow );
+ }
+ }
+
+ try
+ {
+ callVirtualMethod(
+ pAdjustedThisPtr, aVtableSlot.index,
+ pCppReturn, pReturnTypeDescr, bRegisterReturn,
+ pStackStart,
+ (pStack - pStackStart), pGPR, pFPR);
+
+ // NO exception occured...
+ *ppUnoExc = 0;
+
+ // reconvert temporary params
+ for ( ; nTempIndizes--; )
+ {
+ sal_Int32 nIndex = pTempIndizes[nTempIndizes];
+ typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndizes];
+
+ if (pParams[nIndex].bIn)
+ {
+ if (pParams[nIndex].bOut) // inout
+ {
+ uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 ); // destroy uno value
+ uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
+ pThis->getBridge()->getCpp2Uno() );
+ }
+ }
+ else // pure out
+ {
+ uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
+ pThis->getBridge()->getCpp2Uno() );
+ }
+ // destroy temp cpp param => cpp: every param was constructed
+ uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
+
+ TYPELIB_DANGER_RELEASE( pParamTypeDescr );
+ }
+ // return value
+ if (pCppReturn && pUnoReturn != pCppReturn)
+ {
+ uno_copyAndConvertData( pUnoReturn, pCppReturn, pReturnTypeDescr,
+ pThis->getBridge()->getCpp2Uno() );
+ uno_destructData( pCppReturn, pReturnTypeDescr, cpp_release );
+ }
+ }
+ catch (...)
+ {
+ // fill uno exception
+ fillUnoException( CPPU_CURRENT_NAMESPACE::__cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
+
+ // temporary params
+ for ( ; nTempIndizes--; )
+ {
+ sal_Int32 nIndex = pTempIndizes[nTempIndizes];
+ // destroy temp cpp param => cpp: every param was constructed
+ uno_destructData( pCppArgs[nIndex], ppTempParamTypeDescr[nTempIndizes], cpp_release );
+ TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndizes] );
+ }
+
+ // return type
+ if (pReturnTypeDescr)
+ TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
+ }
+}
+}
+
+namespace bridges { namespace cpp_uno { namespace shared {
+
+void unoInterfaceProxyDispatch(
+ uno_Interface * pUnoI, const typelib_TypeDescription * pMemberDescr,
+ void * pReturn, void * pArgs[], uno_Any ** ppException )
+{
+ // is my surrogate
+ bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
+ = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
+#if OSL_DEBUG_LEVEL > 0
+ typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
+#endif
+
+ switch (pMemberDescr->eTypeClass)
+ {
+ case typelib_TypeClass_INTERFACE_ATTRIBUTE:
+ {
+#if OSL_DEBUG_LEVEL > 0
+ // determine vtable call index
+ sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
+ OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
+#endif
+
+ VtableSlot aVtableSlot(
+ getVtableSlot(
+ reinterpret_cast<typelib_InterfaceAttributeTypeDescription const *>
+ (pMemberDescr)));
+
+ if (pReturn)
+ {
+ // dependent dispatch
+ cpp_call(
+ pThis, aVtableSlot,
+ ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef,
+ 0, 0, // no params
+ pReturn, pArgs, ppException );
+ }
+ else
+ {
+ // is SET
+ typelib_MethodParameter aParam;
+ aParam.pTypeRef =
+ ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
+ aParam.bIn = sal_True;
+ aParam.bOut = sal_False;
+
+ typelib_TypeDescriptionReference * pReturnTypeRef = 0;
+ OUString aVoidName( RTL_CONSTASCII_USTRINGPARAM("void") );
+ typelib_typedescriptionreference_new(
+ &pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
+
+ // dependent dispatch
+ aVtableSlot.index += 1;
+ cpp_call(
+ pThis, aVtableSlot, // get, then set method
+ pReturnTypeRef,
+ 1, &aParam,
+ pReturn, pArgs, ppException );
+
+ typelib_typedescriptionreference_release( pReturnTypeRef );
+ }
+
+ break;
+ }
+ case typelib_TypeClass_INTERFACE_METHOD:
+ {
+#if OSL_DEBUG_LEVEL > 0
+ // determine vtable call index
+ sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
+ OSL_ENSURE( nMemberPos < pTypeDescr->nAllMembers, "### member pos out of range!" );
+#endif
+
+ VtableSlot aVtableSlot(
+ getVtableSlot(
+ reinterpret_cast<typelib_InterfaceMethodTypeDescription const *>
+ (pMemberDescr)));
+
+ switch (aVtableSlot.index)
+ {
+ // standard calls
+ case 1: // acquire uno interface
+ (*pUnoI->acquire)( pUnoI );
+ *ppException = 0;
+ break;
+ case 2: // release uno interface
+ (*pUnoI->release)( pUnoI );
+ *ppException = 0;
+ break;
+ case 0: // queryInterface() opt
+ {
+ typelib_TypeDescription * pTD = 0;
+ TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pArgs[0] )->getTypeLibType() );
+ if (pTD)
+ {
+ uno_Interface * pInterface = 0;
+ (*pThis->getBridge()->getUnoEnv()->getRegisteredInterface)(
+ pThis->getBridge()->getUnoEnv(),
+ (void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
+
+ if (pInterface)
+ {
+ ::uno_any_construct(
+ reinterpret_cast< uno_Any * >( pReturn ),
+ &pInterface, pTD, 0 );
+ (*pInterface->release)( pInterface );
+ TYPELIB_DANGER_RELEASE( pTD );
+ *ppException = 0;
+ break;
+ }
+
+ TYPELIB_DANGER_RELEASE( pTD );
+ }
+ } // else perform queryInterface()
+ default:
+ // dependent dispatch
+ cpp_call(
+ pThis, aVtableSlot,
+ ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pReturnTypeRef,
+ ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->nParams,
+ ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pParams,
+ pReturn, pArgs, ppException );
+ }
+ break;
+ }
+ default:
+ {
+ ::com::sun::star::uno::RuntimeException aExc(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("illegal member type description!") ),
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
+
+ Type const & rExcType = ::getCppuType( &aExc );
+ // binary identical null reference
+ ::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
+ }
+ }
+}
+
+} } }
+
+/* vi:set tabstop=4 shiftwidth=4 expandtab: */
diff --git a/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx
index 35b16d882632..d1d98f222738 100644
--- a/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx
@@ -91,6 +91,31 @@ void MapReturn(const ia64::RegReturn &rRet, double dret, typelib_TypeDescription
namespace ia64
{
+ bool is_complex_struct(const typelib_TypeDescription * type)
+ {
+ const typelib_CompoundTypeDescription * p
+ = reinterpret_cast< const typelib_CompoundTypeDescription * >(type);
+ for (sal_Int32 i = 0; i < p->nMembers; ++i)
+ {
+ if (p->ppTypeRefs[i]->eTypeClass == typelib_TypeClass_STRUCT ||
+ p->ppTypeRefs[i]->eTypeClass == typelib_TypeClass_EXCEPTION)
+ {
+ typelib_TypeDescription * t = 0;
+ TYPELIB_DANGER_GET(&t, p->ppTypeRefs[i]);
+ bool b = is_complex_struct(t);
+ TYPELIB_DANGER_RELEASE(t);
+ if (b) {
+ return true;
+ }
+ }
+ else if (!bridges::cpp_uno::shared::isSimpleType(p->ppTypeRefs[i]->eTypeClass))
+ return true;
+ }
+ if (p->pBaseTypeDescription != 0)
+ return is_complex_struct(&p->pBaseTypeDescription->aBase);
+ return false;
+ }
+
bool is_complex_struct( typelib_TypeDescriptionReference *pTypeRef )
{
if (pTypeRef->eTypeClass == typelib_TypeClass_STRUCT || pTypeRef->eTypeClass == typelib_TypeClass_EXCEPTION)
@@ -98,7 +123,7 @@ namespace ia64
typelib_TypeDescription * pTypeDescr = 0;
TYPELIB_DANGER_GET( &pTypeDescr, pTypeRef );
- bool bRet = bridges::cpp_uno::shared::relatesToInterfaceType( pTypeDescr );
+ bool bRet = is_complex_struct( pTypeDescr );
TYPELIB_DANGER_RELEASE( pTypeDescr );
return bRet;
diff --git a/bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx
index 0581b52f0c8d..1d63ebde491f 100644
--- a/bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx
@@ -256,7 +256,7 @@ namespace
// destroy temp uno return
uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
}
- // complex return ptr is set to eax
+ // complex return ptr is set to return reg
*(void **)pRegisterReturn = pCppReturn;
}
if (pReturnTypeDescr)
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx
index 1aca0f480b6a..e901a110213f 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx
@@ -61,7 +61,9 @@ static typelib_TypeClass cpp2uno_call(
sal_Int64 * pRegisterReturn /* space for register return */ )
{
int ng = 0; //number of gpr registers used
+#ifndef __NO_FPRS__
int nf = 0; //number of fpr regsiters used
+#endif
void ** pCppStack; //temporary stack pointer
// gpreg: [ret *], this, [gpr params]
@@ -123,11 +125,23 @@ static typelib_TypeClass cpp2uno_call(
{
case typelib_TypeClass_DOUBLE:
+#ifndef __NO_FPRS__
if (nf < 8) {
pCppArgs[nPos] = fpreg;
pUnoArgs[nPos] = fpreg;
nf++;
fpreg += 2;
+#else
+ if (ng & 1) {
+ ng++;
+ gpreg++;
+ }
+ if (ng < 8) {
+ pCppArgs[nPos] = gpreg;
+ pUnoArgs[nPos] = gpreg;
+ ng += 2;
+ gpreg += 2;
+#endif
} else {
if (((long)ovrflw) & 4) ovrflw++;
pCppArgs[nPos] = ovrflw;
@@ -139,6 +153,7 @@ static typelib_TypeClass cpp2uno_call(
case typelib_TypeClass_FLOAT:
// fpreg are all double values so need to
// modify fpreg to be a single word float value
+#ifndef __NO_FPRS__
if (nf < 8) {
float tmp = (float) (*((double *)fpreg));
(*((float *) fpreg)) = tmp;
@@ -146,6 +161,13 @@ static typelib_TypeClass cpp2uno_call(
pUnoArgs[nPos] = fpreg;
nf++;
fpreg += 2;
+#else
+ if (ng < 8) {
+ pCppArgs[nPos] = gpreg;
+ pUnoArgs[nPos] = gpreg;
+ ng++;
+ gpreg++;
+#endif
} else {
#if 0 /* abi is not being followed correctly */
if (((long)ovrflw) & 4) ovrflw++;
@@ -164,11 +186,11 @@ static typelib_TypeClass cpp2uno_call(
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
- if (ng < 7) {
- if (ng & 1) {
- ng++;
- gpreg++;
- }
+ if (ng & 1) {
+ ng++;
+ gpreg++;
+ }
+ if (ng < 8) {
pCppArgs[nPos] = gpreg;
pUnoArgs[nPos] = gpreg;
ng += 2;
@@ -488,10 +510,12 @@ static typelib_TypeClass cpp_mediate(
static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpregptr, void** fpregptr, void** ovrflw)
{
sal_Int32 gpreg[8];
- double fpreg[8];
-
memcpy( gpreg, gpregptr, 32);
+
+#ifndef __NO_FPRS__
+ double fpreg[8];
memcpy( fpreg, fpregptr, 64);
+#endif
volatile long nRegReturn[2];
@@ -499,10 +523,14 @@ static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpreg
// fprintf(stderr,"in cpp_vtable_call nVtableOffset is %x\n",nVtableOffset);
// fflush(stderr);
- sal_Bool bComplex = nFunctionIndex & 0x80000000 ? sal_True : sal_False;
-
typelib_TypeClass aType =
- cpp_mediate( nFunctionIndex, nVtableOffset, (void**)gpreg, (void**)fpreg, ovrflw, (sal_Int64*)nRegReturn );
+ cpp_mediate( nFunctionIndex, nVtableOffset, (void**)gpreg,
+#ifndef __NO_FPRS__
+ (void**)fpreg,
+#else
+ NULL,
+#endif
+ ovrflw, (sal_Int64*)nRegReturn );
switch( aType )
{
@@ -524,13 +552,25 @@ static void cpp_vtable_call( int nFunctionIndex, int nVtableOffset, void** gpreg
break;
case typelib_TypeClass_FLOAT:
+#ifndef __NO_FPRS__
__asm__( "lfs 1,%0\n\t" : :
"m" (*((float*)nRegReturn)) );
+ #else
+ __asm__( "lwz 3,%0\n\t" : :
+ "m"(nRegReturn[0]) );
+#endif
break;
case typelib_TypeClass_DOUBLE:
+#ifndef __NO_FPRS__
__asm__( "lfd 1,%0\n\t" : :
"m" (*((double*)nRegReturn)) );
+#else
+ __asm__( "lwz 3,%0\n\t" : :
+ "m"(nRegReturn[0]) );
+ __asm__( "lwz 4,%0\n\t" : :
+ "m"(nRegReturn[1]) );
+#endif
break;
case typelib_TypeClass_HYPER:
@@ -577,6 +617,7 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal
// # next save fpr 1 to fpr 8 (aligned to 8)
+ // if dedicated floating point registers are used
// stfd f1,-2016(r1)
// stfd f2,-2008(r1)
// stfd f3,-2000(r1)
@@ -604,6 +645,10 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal
// #now load up the pointer to the saved fpr registers
// addi r6,r1,-2016
+ // if no dedicated floating point registers are used than we have NULL
+ // pointer there
+ // li r6, 0
+ //
// #now load up the pointer to the overflow call stack
// addi r7,r1,8
@@ -617,6 +662,7 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal
* p++ = 0x9101f814;
* p++ = 0x9121f818;
* p++ = 0x9141f81c;
+#ifndef __NO_FPRS__
* p++ = 0xd821f820;
* p++ = 0xd841f828;
* p++ = 0xd861f830;
@@ -625,6 +671,17 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal
* p++ = 0xd8c1f848;
* p++ = 0xd8e1f850;
* p++ = 0xd901f858;
+#else
+ /* these nops could be replaced with a smaller codeSnippetSize - 8 * 4 */
+ * p++ = 0x60000000;
+ * p++ = 0x60000000;
+ * p++ = 0x60000000;
+ * p++ = 0x60000000;
+ * p++ = 0x60000000;
+ * p++ = 0x60000000;
+ * p++ = 0x60000000;
+ * p++ = 0x60000000;
+#endif
* p++ = 0x3c600000 | (((unsigned long)cpp_vtable_call) >> 16);
* p++ = 0x60630000 | (((unsigned long)cpp_vtable_call) & 0x0000FFFF);
* p++ = 0x7c6903a6;
@@ -633,7 +690,11 @@ unsigned char * codeSnippet( unsigned char * code, sal_Int32 functionIndex, sal
* p++ = 0x3c800000 | (((unsigned long)vtableOffset) >> 16);
* p++ = 0x60840000 | (((unsigned long)vtableOffset) & 0x0000FFFF);
* p++ = 0x38a1f800;
+#ifndef __NO_FPRS__
* p++ = 0x38c1f820;
+#else
+ * p++ = 0x38c00000;
+#endif
* p++ = 0x38e10008;
* p++ = 0x4e800420;
return (code + codeSnippetSize);
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx
index 28ad7dc83ed7..adb10dae24c7 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx
@@ -137,8 +137,8 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName;
MutexGuard guard( m_mutex );
- t_rtti_map::const_iterator iFind( m_rttis.find( unoName ) );
- if (iFind == m_rttis.end())
+ t_rtti_map::const_iterator iRttiFind( m_rttis.find( unoName ) );
+ if (iRttiFind == m_rttis.end())
{
// RTTI symbol
OStringBuffer buf( 64 );
@@ -202,7 +202,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
}
else
{
- rtti = iFind->second;
+ rtti = iRttiFind->second;
}
return rtti;
diff --git a/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx
index 2a8626733f24..8c527df2d48c 100644
--- a/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx
@@ -74,12 +74,14 @@ static void callVirtualMethod(
void (*ptr)();
int gpr[8]; // storage for gpregisters, map to r3-r10
int off; // offset used to find function
+#ifndef __NO_FPRS__
double fpr[8]; // storage for fpregisters, map to f1-f8
- int n; // number of gprs mapped so far
int f; // number of fprs mapped so far
+ double dret; // temporary function return values
+#endif
+ int n; // number of gprs mapped so far
long *p; // pointer to parameter overflow area
int c; // character of parameter type being decoded
- double dret; // temporary function return values
int iret, iret2;
// Because of the Power PC calling conventions we could be passing
@@ -93,7 +95,7 @@ static void callVirtualMethod(
// Note: could require up to 2*nStackLongs words of parameter stack area
// if the call has many float parameters (i.e. floats take up only 1
- // word on the stack but take 2 words in parameter area in the
+ // word on the stack but double takes 2 words in parameter area in the
// stack frame .
// Update! floats on the outgoing parameter stack only take up 1 word
@@ -119,7 +121,9 @@ static void callVirtualMethod(
// now begin to load the C++ function arguments into storage
n = 0;
+#ifndef __NO_FPRS__
f = 0;
+#endif
// now we need to parse the entire signature string */
// until we get the END indicator */
@@ -143,8 +147,16 @@ static void callVirtualMethod(
c = *pPT;
switch (c) {
case 'D': /* type is double */
+#ifndef __NO_FPRS__
if (f < 8) {
fpr[f++] = *((double *)pStackLongs); /* store in register */
+#else
+ if (n & 1)
+ n++;
+ if (n < 8) {
+ gpr[n++] = *pStackLongs;
+ gpr[n++] = *(pStackLongs+1);
+#endif
} else {
if (((long) p) & 4)
p++;
@@ -163,8 +175,13 @@ static void callVirtualMethod(
store floats as a *single* word on outgoing parameter stack
to match what gcc actually does
*/
+#ifndef __NO_FPRS__
if (f < 8) {
fpr[f++] = *((float *)pStackLongs);
+#else
+ if (n < 8) {
+ gpr[n++] = *pStackLongs;
+#endif
} else {
#if 0 /* if abi were followed */
if (((long) p) & 4)
@@ -243,6 +260,7 @@ static void callVirtualMethod(
"lwz 8, 20(%0)\n\t"
"lwz 9, 24(%0)\n\t"
"lwz 10, 28(%0)\n\t"
+#ifndef __NO_FPRS__
"lfd 1, 0(%1)\n\t"
"lfd 2, 8(%1)\n\t"
"lfd 3, 16(%1)\n\t"
@@ -252,16 +270,24 @@ static void callVirtualMethod(
"lfd 7, 48(%1)\n\t"
"lfd 8, 56(%1)\n\t"
: : "r" (gpr), "r" (fpr)
+#else
+ : : "r" (gpr)
+#endif
: "0", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"
);
(*ptr)();
__asm__ __volatile__ (
- "mr %1, 3\n\t"
- "mr %2, 4\n\t"
- "fmr %0, 1\n\t"
- : "=f" (dret), "=r" (iret), "=r" (iret2) : );
+ "mr %0, 3\n\t"
+ "mr %1, 4\n\t"
+#ifndef __NO_FPRS__
+ "fmr %2, 1\n\t"
+ : "=r" (iret), "=r" (iret2), "=f" (dret)
+#else
+ : "=r" (iret), "=r" (iret2)
+#endif
+ : );
switch( eReturnType )
{
@@ -284,10 +310,21 @@ static void callVirtualMethod(
*(unsigned char*)pRegisterReturn = (unsigned char)iret;
break;
case typelib_TypeClass_FLOAT:
+#ifndef __NO_FPRS__
*(float*)pRegisterReturn = (float)dret;
+#else
+ ((unsigned int*)pRegisterReturn)[0] = iret;
+#endif
break;
case typelib_TypeClass_DOUBLE:
+#ifndef __NO_FPRS__
*(double*)pRegisterReturn = dret;
+#else
+ ((unsigned int*)pRegisterReturn)[0] = iret;
+ ((unsigned int*)pRegisterReturn)[1] = iret2;
+#endif
+ break;
+ default:
break;
}
}
@@ -399,6 +436,8 @@ static void cpp_call(
case typelib_TypeClass_UNSIGNED_HYPER:
*pPT++ = 'H';
pCppStack += sizeof(sal_Int32); // extra long
+ default:
+ break;
}
// no longer needed
@@ -518,7 +557,6 @@ void unoInterfaceProxyDispatch(
// is my surrogate
bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
= static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy *> (pUnoI);
- typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
switch (pMemberDescr->eTypeClass)
{
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx
index 2aeaf9423859..ad0faa1a01aa 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx
@@ -229,6 +229,7 @@ classify_argument( typelib_TypeDescriptionReference *pTypeRef, enum x86_64_reg_c
for ( sal_Int32 nMember = 0; nMember < pStruct->nMembers; ++nMember )
{
typelib_TypeDescriptionReference *pTypeInStruct = pStruct->ppTypeRefs[ nMember ];
+ rByteOffset = pStruct->pMemberOffsets[ nMember ];
int num = classify_argument( pTypeInStruct, subclasses, rByteOffset );
@@ -243,9 +244,6 @@ classify_argument( typelib_TypeDescriptionReference *pTypeRef, enum x86_64_reg_c
int pos = rByteOffset / 8;
classes[i + pos] = merge_classes( subclasses[i], classes[i + pos] );
}
-
- if ( pTypeInStruct->eTypeClass != typelib_TypeClass_STRUCT )
- rByteOffset = pStruct->pMemberOffsets[ nMember ];
}
TYPELIB_DANGER_RELEASE( pTypeDescr );
@@ -332,7 +330,7 @@ bool x86_64::return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef
return examine_argument( pTypeRef, true, g, s ) == 0;
}
-void x86_64::fill_struct( typelib_TypeDescriptionReference *pTypeRef, void * const *pGPR, void * const *pSSE, void *pStruct )
+void x86_64::fill_struct( typelib_TypeDescriptionReference *pTypeRef, const sal_uInt64 *pGPR, const double *pSSE, void *pStruct )
{
enum x86_64_reg_class classes[MAX_CLASSES];
int offset = 0;
@@ -346,12 +344,12 @@ void x86_64::fill_struct( typelib_TypeDescriptionReference *pTypeRef, void * con
{
case X86_64_INTEGER_CLASS:
case X86_64_INTEGERSI_CLASS:
- *pStructAlign++ = *reinterpret_cast<sal_uInt64 *>( *pGPR++ );
+ *pStructAlign++ = *pGPR++;
break;
case X86_64_SSE_CLASS:
case X86_64_SSESF_CLASS:
case X86_64_SSEDF_CLASS:
- *pStructAlign++ = *reinterpret_cast<sal_uInt64 *>( *pSSE++ );
+ *pStructAlign++ = *reinterpret_cast<const sal_uInt64 *>( pSSE++ );
break;
default:
break;
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.hxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.hxx
index 5fffe680c28a..c5b7d94d2e01 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/abi.hxx
@@ -63,7 +63,7 @@ bool examine_argument( typelib_TypeDescriptionReference *pTypeRef, bool bInRetur
*/
bool return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef );
-void fill_struct( typelib_TypeDescriptionReference *pTypeRef, void * const *pGPR, void * const *pSSE, void *pStruct );
+void fill_struct( typelib_TypeDescriptionReference *pTypeRef, const sal_uInt64* pGPR, const double* pSSE, void *pStruct );
} // namespace x86_64
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s b/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s
index 736230705d5a..a0572ef61641 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s
@@ -43,6 +43,9 @@ privateSnippetExecutor:
je .Lfloat
movq -144(%rbp), %rax # Return value (int case)
+ movq -136(%rbp), %rdx # Return value (int case)
+ movq -144(%rbp), %xmm0 # Return value (int case)
+ movq -136(%rbp), %xmm1 # Return value (int case)
jmp .Lfinish
.Lfloat:
movlpd -144(%rbp), %xmm0 # Return value (float/double case)
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
index 5fb2bd7e12a3..fc5a9af1ac5c 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
@@ -121,13 +121,14 @@ static typelib_TypeClass cpp2uno_call(
for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
{
const typelib_MethodParameter & rParam = pParams[nPos];
- typelib_TypeDescription * pParamTypeDescr = 0;
- TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
int nUsedGPR = 0;
int nUsedSSE = 0;
- bool bFitsRegisters = x86_64::examine_argument( rParam.pTypeRef, false, nUsedGPR, nUsedSSE );
- if ( !rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ) ) // value
+#if OSL_DEBUG_LEVEL > 0
+ bool bFitsRegisters =
+#endif
+ x86_64::examine_argument( rParam.pTypeRef, false, nUsedGPR, nUsedSSE );
+ if ( !rParam.bOut && bridges::cpp_uno::shared::isSimpleType( rParam.pTypeRef ) ) // value
{
// Simple types must fit exactly one register on x86_64
OSL_ASSERT( bFitsRegisters && ( ( nUsedSSE == 1 && nUsedGPR == 0 ) || ( nUsedSSE == 0 && nUsedGPR == 1 ) ) );
@@ -152,35 +153,14 @@ static typelib_TypeClass cpp2uno_call(
else
pCppArgs[nPos] = pUnoArgs[nPos] = ovrflw++;
}
-
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
}
else // struct <= 16 bytes || ptr to complex value || ref
{
- void *pCppStack;
- char pTmpStruct[16];
-
- if ( bFitsRegisters && !rParam.bOut &&
- ( pParamTypeDescr->eTypeClass == typelib_TypeClass_STRUCT ||
- pParamTypeDescr->eTypeClass == typelib_TypeClass_EXCEPTION ) )
- {
- if ( ( nr_gpr + nUsedGPR <= x86_64::MAX_GPR_REGS ) && ( nr_fpr + nUsedSSE <= x86_64::MAX_SSE_REGS ) )
- {
- x86_64::fill_struct( rParam.pTypeRef, gpreg, fpreg, pTmpStruct );
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr, "nUsedGPR == %d, nUsedSSE == %d, pTmpStruct[0] == 0x%x, pTmpStruct[1] == 0x%x, **gpreg == 0x%lx\n",
- nUsedGPR, nUsedSSE, pTmpStruct[0], pTmpStruct[1], *(sal_uInt64*)*gpreg );
-#endif
+ typelib_TypeDescription * pParamTypeDescr = 0;
+ TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
- pCppArgs[nPos] = pCppStack = reinterpret_cast<void *>( pTmpStruct );
- gpreg += nUsedGPR;
- fpreg += nUsedSSE;
- }
- else
- pCppArgs[nPos] = pCppStack = *ovrflw++;
- }
- else if ( nr_gpr < x86_64::MAX_GPR_REGS )
+ void *pCppStack;
+ if ( nr_gpr < x86_64::MAX_GPR_REGS )
{
pCppArgs[nPos] = pCppStack = *gpreg++;
nr_gpr++;
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
index 7199794409a8..23c40121afb7 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
@@ -53,13 +53,13 @@ using namespace ::com::sun::star::uno;
//==================================================================================================
static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
- void * pRegisterReturn, typelib_TypeDescription * pReturnTypeDescr, bool bSimpleReturn,
+ void * pRegisterReturn, typelib_TypeDescriptionReference * pReturnTypeRef, bool bSimpleReturn,
sal_uInt64 *pStack, sal_uInt32 nStack,
sal_uInt64 *pGPR, sal_uInt32 nGPR,
double *pFPR, sal_uInt32 nFPR) __attribute__((noinline));
static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
- void * pRegisterReturn, typelib_TypeDescription * pReturnTypeDescr, bool bSimpleReturn,
+ void * pRegisterReturn, typelib_TypeDescriptionReference * pReturnTypeRef, bool bSimpleReturn,
sal_uInt64 *pStack, sal_uInt32 nStack,
sal_uInt64 *pGPR, sal_uInt32 nGPR,
double *pFPR, sal_uInt32 nFPR)
@@ -113,6 +113,7 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
sal_uInt64 rax;
sal_uInt64 rdx;
double xmm0;
+ double xmm1;
asm volatile (
@@ -147,13 +148,14 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
"movq %%rax, %4\n\t"
"movq %%rdx, %5\n\t"
"movsd %%xmm0, %6\n\t"
+ "movsd %%xmm1, %7\n\t"
:
: "m" ( pMethod ), "m" ( pGPR ), "m" ( pFPR ), "m" ( nFPR ),
- "m" ( rax ), "m" ( rdx ), "m" ( xmm0 )
+ "m" ( rax ), "m" ( rdx ), "m" ( xmm0 ), "m" ( xmm1 )
: "rax", "rdi", "rsi", "rdx", "rcx", "r8", "r9", "r11"
);
- switch (pReturnTypeDescr->eTypeClass)
+ switch (pReturnTypeRef->eTypeClass)
{
case typelib_TypeClass_HYPER:
case typelib_TypeClass_UNSIGNED_HYPER:
@@ -179,12 +181,17 @@ static void callVirtualMethod(void * pThis, sal_uInt32 nVtableIndex,
break;
default:
{
- sal_Int32 const nRetSize = pReturnTypeDescr->nSize;
+ sal_Int32 const nRetSize = pReturnTypeRef->pType->nSize;
if (bSimpleReturn && nRetSize <= 16 && nRetSize > 0)
{
- if (nRetSize > 8)
- static_cast<sal_uInt64 *>(pRegisterReturn)[1] = rdx;
- static_cast<sal_uInt64 *>(pRegisterReturn)[0] = rax;
+ sal_uInt64 longs[2];
+ longs[0] = rax;
+ longs[1] = rdx;
+
+ double doubles[2];
+ doubles[0] = xmm0;
+ doubles[1] = xmm1;
+ x86_64::fill_struct( pReturnTypeRef, &longs[0], &doubles[0], pRegisterReturn);
}
break;
}
@@ -367,7 +374,7 @@ static void cpp_call(
{
callVirtualMethod(
pAdjustedThisPtr, aVtableSlot.index,
- pCppReturn, pReturnTypeDescr, bSimpleReturn,
+ pCppReturn, pReturnTypeRef, bSimpleReturn,
pStackStart, ( pStack - pStackStart ),
pGPR, nGPR,
pFPR, nFPR );
diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx b/bridges/source/cpp_uno/shared/vtablefactory.cxx
index 34e5f9635974..3784f3959594 100644
--- a/bridges/source/cpp_uno/shared/vtablefactory.cxx
+++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx
@@ -272,7 +272,7 @@ bool VtableFactory::createBlock(Block &block, sal_Int32 slotCount) const
char *tmpfname = new char[aTmpName.getLength()+1];
strncpy(tmpfname, aTmpName.getStr(), aTmpName.getLength()+1);
if ((block.fd = mkstemp(tmpfname)) == -1)
- perror("creation of executable memory area failed");
+ perror("creation of executable memory area failed");
if (block.fd == -1)
{
delete[] tmpfname;
@@ -280,7 +280,13 @@ bool VtableFactory::createBlock(Block &block, sal_Int32 slotCount) const
}
unlink(tmpfname);
delete[] tmpfname;
- ftruncate(block.fd, block.size);
+ if (ftruncate(block.fd, block.size) == -1)
+ {
+ perror("truncation of executable memory area failed");
+ close(block.fd);
+ block.fd = -1;
+ break;
+ }
block.start = mmap(NULL, block.size, PROT_READ | PROT_WRITE, MAP_SHARED, block.fd, 0);
if (block.start== MAP_FAILED) {
block.start = 0;
diff --git a/bridges/source/remote/static/proxy.cxx b/bridges/source/remote/static/proxy.cxx
index 6f07ba95d6ff..6cfd9c11e9fb 100644
--- a/bridges/source/remote/static/proxy.cxx
+++ b/bridges/source/remote/static/proxy.cxx
@@ -30,12 +30,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_bridges.hxx"
-#if OSL_DEBUG_LEVEL == 0
-# ifndef NDEBUG
-# define NDEBUG
-# endif
-#endif
-#include <assert.h>
#include <sal/alloca.h>
#include <bridges/remote/proxy.hxx>
#include <bridges/remote/context.h>
@@ -84,7 +78,7 @@ void acquireRemote2UnoProxy( uno_Interface *pThis )
freeRemote2UnoProxy,
p->m_sOid.pData,
p->m_pType );
- assert( (uno_Interface *)p == pThis );
+ OSL_ASSERT( (uno_Interface *)p == pThis );
}
}
diff --git a/bridges/source/remote/static/remote.cxx b/bridges/source/remote/static/remote.cxx
index 1cb26b4ccd9c..ed8b1dbc9d59 100644
--- a/bridges/source/remote/static/remote.cxx
+++ b/bridges/source/remote/static/remote.cxx
@@ -30,12 +30,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_bridges.hxx"
-#if OSL_DEBUG_LEVEL == 0
-# ifndef NDEBUG
-# define NDEBUG
-# endif
-#endif
-#include <assert.h>
#include <bridges/remote/remote.hxx>
#include <bridges/remote/counter.hxx>
@@ -90,7 +84,7 @@ void acquireRemote2RemoteStub( remote_Interface *pThis )
freeRemote2RemoteStub,
p->m_sOid.pData,
p->m_pType );
- assert( (remote_Interface *)p == pThis );
+ OSL_ASSERT( (remote_Interface *)p == pThis );
}
}
diff --git a/bridges/source/remote/urp/urp_log.hxx b/bridges/source/remote/urp/urp_log.hxx
index c7811faf51e9..6c96ea0dbffc 100644
--- a/bridges/source/remote/urp/urp_log.hxx
+++ b/bridges/source/remote/urp/urp_log.hxx
@@ -29,7 +29,7 @@
************************************************************************/
namespace bridges_urp
{
-#ifndef PRODUCT
+#ifdef DBG_UTIL
#define BRIDGES_URP_PROT
#endif
diff --git a/bridges/source/remote/urp/urp_reader.cxx b/bridges/source/remote/urp/urp_reader.cxx
index dd9ff0af80ec..f2ac4f3e9dc7 100644
--- a/bridges/source/remote/urp/urp_reader.cxx
+++ b/bridges/source/remote/urp/urp_reader.cxx
@@ -372,8 +372,8 @@ inline sal_Bool OReaderThread::readFlags( struct MessageFlags *pFlags )
}
pFlags->bSynchronous = ( HDRFLAG_SYNCHRONOUS & moreFlags );
pFlags->bMustReply = ( HDRFLAG_MUSTREPLY & moreFlags );
- OSL_ENSURE( pFlags->bSynchronous && pFlags->bMustReply ||
- ! pFlags->bSynchronous && !pFlags->bMustReply,
+ OSL_ENSURE( (pFlags->bSynchronous && pFlags->bMustReply) ||
+ (!pFlags->bSynchronous && !pFlags->bMustReply),
"urp-bridge : customized calls currently not supported !");
}
diff --git a/bridges/test/testclient.cxx b/bridges/test/testclient.cxx
index df5ac58d1a2d..ce870bc19ea9 100644
--- a/bridges/test/testclient.cxx
+++ b/bridges/test/testclient.cxx
@@ -32,11 +32,6 @@
#include "precompiled_bridges.hxx"
#include <string.h>
-#if OSL_DEBUG_LEVEL == 0
-#undef NDEBUG
-#define NDEBUG
-#endif
-#include <assert.h>
#include <osl/time.h>
#include <osl/mutex.hxx>
@@ -193,10 +188,10 @@ int main( int argc, char *argv[] )
{
// test the factory
Reference < XBridge > rBridge2 = rFactory->getBridge( OUString( RTL_CONSTASCII_USTRINGPARAM("bla blub")) );
- assert( rBridge2.is() );
- assert( rBridge2->getDescription() == rBridge->getDescription( ) );
- assert( rBridge2->getName() == rBridge->getName() );
- assert( rBridge2 == rBridge );
+ OSL_ASSERT( rBridge2.is() );
+ OSL_ASSERT( rBridge2->getDescription() == rBridge->getDescription( ) );
+ OSL_ASSERT( rBridge2->getName() == rBridge->getName() );
+ OSL_ASSERT( rBridge2 == rBridge );
}
@@ -230,7 +225,7 @@ int main( int argc, char *argv[] )
}
Reference < XBridge > rBridge = rFactory->getBridge( OUString( RTL_CONSTASCII_USTRINGPARAM("bla blub")) );
-// assert( ! rBridge.is() );
+// OSL_ASSERT( ! rBridge.is() );
}
}
diff --git a/bridges/test/testcomp.cxx b/bridges/test/testcomp.cxx
index 432a32f2a554..90a07ab31f43 100644
--- a/bridges/test/testcomp.cxx
+++ b/bridges/test/testcomp.cxx
@@ -30,11 +30,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_bridges.hxx"
-#if OSL_DEBUG_LEVEL == 0
-#undef NDEBUG
-#define NDEBUG
-#endif
-#include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <osl/time.h>
@@ -598,7 +593,7 @@ void testException( const Reference < XCallMe > &r )
{
try {
r->call( OUString( RTL_CONSTASCII_USTRINGPARAM("dummy")) , -1 );
- assert( ! "no exception flown !" );
+ OSL_ASSERT( ! "no exception flown !" );
}
catch( TestBridgeException & e )
{
@@ -606,11 +601,11 @@ void testException( const Reference < XCallMe > &r )
}
catch( Exception & e )
{
- assert( ! "only base class of exception could be catched!" );
+ OSL_ASSERT( ! "only base class of exception could be catched!" );
}
catch(...)
{
- assert(! "wrong unknown exception !" );
+ OSL_ASSERT(! "wrong unknown exception !" );
}
}
diff --git a/bridges/test/testoffice.cxx b/bridges/test/testoffice.cxx
index bae00be6caaa..bf5b470d7185 100644
--- a/bridges/test/testoffice.cxx
+++ b/bridges/test/testoffice.cxx
@@ -30,10 +30,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_bridges.hxx"
-#if OSL_DEBUG_LEVEL == 0
-#define NDEBUG
-#endif
-#include <assert.h>
#include <osl/time.h>
#include <osl/mutex.hxx>
@@ -96,7 +92,7 @@ void testPipe( const Reference < XMultiServiceFactory > & rSmgr )
rSmgr->createInstance( OUString::createFromAscii( "com.sun.star.io.Pipe" ) ),
UNO_QUERY );
- assert( rOut.is() );
+ OSL_ASSERT( rOut.is() );
{
Sequence < sal_Int8 > seq( 10 );
@@ -115,7 +111,7 @@ void testPipe( const Reference < XMultiServiceFactory > & rSmgr )
if( ! ( 42 == seq.getArray()[0] ) )
printf( "wrong element in sequence\n" );
-// assert( 0 );
+// OSL_ASSERT( 0 );
}
}
#include<stdio.h>
@@ -155,7 +151,7 @@ void testDocument( const Reference < XMultiServiceFactory > & rSmgr )
rSmgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop" ))),
UNO_QUERY );
- assert( rLoader.is() );
+ OSL_ASSERT( rLoader.is() );
sal_Char *urls[] = {
"private:factory/swriter",
diff --git a/bridges/test/testsameprocess.cxx b/bridges/test/testsameprocess.cxx
index cf67d2484cb3..1cfc44078376 100644
--- a/bridges/test/testsameprocess.cxx
+++ b/bridges/test/testsameprocess.cxx
@@ -30,11 +30,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_bridges.hxx"
-#if OSL_DEBUG_LEVEL == 0
-#undef NDEBUG
-#define NDEBUG
-#endif
-#include <assert.h>
#include <osl/time.h>
#include <osl/mutex.hxx>
@@ -201,7 +196,7 @@ int main( int argc, char *argv[] )
Reference < XBridge > rBridge = rFactory->getBridge(
OUString( RTL_CONSTASCII_USTRINGPARAM("bla blub")) );
- assert( ! rBridge.is() );
+ OSL_ASSERT( ! rBridge.is() );
}
catch( Exception & )
diff --git a/cli_ure/prj/build.lst b/cli_ure/prj/build.lst
index 007a01aec93f..268240c4597b 100644
--- a/cli_ure/prj/build.lst
+++ b/cli_ure/prj/build.lst
@@ -1,4 +1,4 @@
-ure cli_ure : cppu cppuhelper sal codemaker stoc udkapi tools NULL
+ure cli_ure : cppu cppuhelper sal codemaker stoc udkapi bridges NULL
ure cli_ure usr1 - all ure_mkout NULL
ure cli_ure\inc nmake - all ure_inc NULL
ure cli_ure\version nmake - all ure_source_version ure_inc NULL
diff --git a/cli_ure/qa/climaker/makefile.mk b/cli_ure/qa/climaker/makefile.mk
index cde3f4066142..a5b0af914f29 100644
--- a/cli_ure/qa/climaker/makefile.mk
+++ b/cli_ure/qa/climaker/makefile.mk
@@ -41,7 +41,7 @@ CLIMAKER*=$(WRAPCMD) $(BIN)$/climaker
#----- compile .java files -----------------------------------------
-JARFILES = sandbox.jar ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
+JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
JAVAFILES = ClimakerTestCase.java
JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
diff --git a/cli_ure/source/native/path.cxx b/cli_ure/source/native/path.cxx
index 075a3cdb75bd..9ef17010b0d2 100644
--- a/cli_ure/source/native/path.cxx
+++ b/cli_ure/source/native/path.cxx
@@ -38,7 +38,7 @@
#include <windows.h>
#include "sal/types.h"
-#include "tools/pathutils.hxx"
+//#include "tools/pathutils.hxx"
namespace cli_ure {
diff --git a/codemaker/test/cppumaker/makefile.mk b/codemaker/test/cppumaker/makefile.mk
index bab3dcbb30ea..1bc926dc0fe0 100644
--- a/codemaker/test/cppumaker/makefile.mk
+++ b/codemaker/test/cppumaker/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -43,7 +43,7 @@ INCPRE += $(MISC)$/$(TARGET)$/inc
SHL1TARGET = $(TARGET)
SHL1OBJS = $(SLO)$/test_codemaker_cppumaker.obj
-SHL1STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB)
+SHL1STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB) $(TESTSHL2LIB)
SHL1VERSIONMAP = version.map
SHL1IMPLIB = i$(SHL1TARGET)
DEF1NAME = $(SHL1TARGET)
diff --git a/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx b/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx
index 2f5c75fc1d92..9cd3dc70d3fd 100644
--- a/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx
+++ b/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx
@@ -369,7 +369,7 @@
#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "com/sun/star/uno/TypeClass.hpp"
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
diff --git a/cppu/qa/makefile.mk b/cppu/qa/makefile.mk
index 4051dd6d82ec..8b720c832cf4 100644
--- a/cppu/qa/makefile.mk
+++ b/cppu/qa/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -43,28 +43,28 @@ INCPRE += $(MISC)$/$(TARGET)$/inc
SHL1TARGET = $(TARGET)_any
SHL1OBJS = $(SLO)$/test_any.obj
-SHL1STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB)
+SHL1STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB)
SHL1VERSIONMAP = version.map
SHL1IMPLIB = i$(SHL1TARGET)
DEF1NAME = $(SHL1TARGET)
SHL2TARGET = $(TARGET)_unotype
SHL2OBJS = $(SLO)$/test_unotype.obj
-SHL2STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB)
+SHL2STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB)
SHL2VERSIONMAP = version.map
SHL2IMPLIB = i$(SHL2TARGET)
DEF2NAME = $(SHL2TARGET)
SHL3TARGET = $(TARGET)_reference
SHL3OBJS = $(SLO)$/test_reference.obj
-SHL3STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB)
+SHL3STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB)
SHL3VERSIONMAP = version.map
SHL3IMPLIB = i$(SHL3TARGET)
DEF3NAME = $(SHL3TARGET)
SHL4TARGET = $(TARGET)_recursion
SHL4OBJS = $(SLO)$/test_recursion.obj
-SHL4STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB)
+SHL4STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB)
SHL4VERSIONMAP = version.map
SHL4IMPLIB = i$(SHL4TARGET)
DEF4NAME = $(SHL4TARGET)
@@ -92,7 +92,7 @@ $(MISC)$/$(TARGET)$/types.urd: types.idl
$(IDLC) -O$(MISC)$/$(TARGET) -I$(SOLARIDLDIR) -cid -we $<
test .PHONY: $(SHL1TARGETN) $(SHL2TARGETN) $(SHL3TARGETN) $(SHL4TARGETN)
- testshl2 $(SHL1TARGETN)
- testshl2 $(SHL2TARGETN)
- testshl2 $(SHL3TARGETN)
- testshl2 $(SHL4TARGETN) \ No newline at end of file
+ $(TESTSHL2) $(SHL1TARGETN)
+ $(TESTSHL2) $(SHL2TARGETN)
+ $(TESTSHL2) $(SHL3TARGETN)
+ $(TESTSHL2) $(SHL4TARGETN)
diff --git a/cppu/qa/test_any.cxx b/cppu/qa/test_any.cxx
index cad91661926f..785af529e51a 100644
--- a/cppu/qa/test_any.cxx
+++ b/cppu/qa/test_any.cxx
@@ -58,7 +58,7 @@
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "com/sun/star/uno/XInterface.hpp"
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include "osl/diagnose.h"
#include "osl/interlck.h"
#include "rtl/string.h"
diff --git a/cppu/qa/test_recursion.cxx b/cppu/qa/test_recursion.cxx
index 6ae70c44d003..60853776662b 100644
--- a/cppu/qa/test_recursion.cxx
+++ b/cppu/qa/test_recursion.cxx
@@ -31,7 +31,7 @@
#include "precompiled_cppu.hxx"
#include "sal/config.h"
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include "sal/types.h"
#include "Rec.hpp"
diff --git a/cppu/qa/test_reference.cxx b/cppu/qa/test_reference.cxx
index afb12654a124..8bb793c655e4 100644
--- a/cppu/qa/test_reference.cxx
+++ b/cppu/qa/test_reference.cxx
@@ -35,7 +35,7 @@
#include "Interface1.hpp"
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include "rtl/ustring.hxx"
#include "sal/types.h"
diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx
index 0068dcedd463..ad457d516fa2 100644
--- a/cppu/qa/test_unotype.cxx
+++ b/cppu/qa/test_unotype.cxx
@@ -47,7 +47,7 @@
#include "com/sun/star/uno/XComponentContext.hpp"
#include "com/sun/star/uno/XInterface.hpp"
#include "cppu/unotype.hxx"
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
#include "sal/types.h"
diff --git a/cppuhelper/inc/cppuhelper/weak.hxx b/cppuhelper/inc/cppuhelper/weak.hxx
index f4b9c38d2215..9072ba6f6240 100644
--- a/cppuhelper/inc/cppuhelper/weak.hxx
+++ b/cppuhelper/inc/cppuhelper/weak.hxx
@@ -67,6 +67,12 @@ protected:
*/
virtual ~OWeakObject() SAL_THROW( (::com::sun::star::uno::RuntimeException) );
+ /** disposes and resets m_pWeakConnectionPoint
+ @precond
+ m_refCount equals 0
+ */
+ void disposeWeakConnectionPoint();
+
/** reference count.
@attention
diff --git a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx
index ddbc3f7c6f82..cfcfebf246e6 100644
--- a/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx
+++ b/cppuhelper/qa/ifcontainer/cppu_ifcontainer.cxx
@@ -28,7 +28,7 @@
*
************************************************************************/
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include "com/sun/star/lang/XEventListener.hpp"
#include "cppuhelper/interfacecontainer.hxx"
diff --git a/cppuhelper/qa/ifcontainer/makefile.mk b/cppuhelper/qa/ifcontainer/makefile.mk
index dd6c13fea52c..624bc797a64b 100644
--- a/cppuhelper/qa/ifcontainer/makefile.mk
+++ b/cppuhelper/qa/ifcontainer/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -41,7 +41,7 @@ ENABLE_EXCEPTIONS=TRUE
# BEGIN ----------------------------------------------------------------
-# auto generated Target:joblist by codegen.pl
+# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
$(SLO)$/cppu_ifcontainer.obj
SHL1TARGET= cppu_ifcontainer
@@ -49,6 +49,7 @@ SHL1STDLIBS=\
$(CPPUHELPERLIB) \
$(SALLIB) \
$(CPPULIB) \
+ $(TESTSHL2LIB)\
$(CPPUNITLIB)
SHL1IMPLIB= i$(SHL1TARGET)
DEF1NAME =$(SHL1TARGET)
diff --git a/cppuhelper/qa/propertysetmixin/makefile.mk b/cppuhelper/qa/propertysetmixin/makefile.mk
index b081274d8e99..2ad56c05ff1c 100644
--- a/cppuhelper/qa/propertysetmixin/makefile.mk
+++ b/cppuhelper/qa/propertysetmixin/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -54,7 +54,7 @@ INCPRE += -I$(MISC)$/$(TARGET)$/inc
SHL1TARGET = $(TARGET)
SHL1OBJS = $(SLO)$/test_propertysetmixin.obj
-SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB)
+SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB) $(TESTSHL2LIB)
SHL1IMPLIB = i$(SHL1TARGET)
DEF1NAME = $(SHL1TARGET)
diff --git a/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx b/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx
index 5336b60ae68a..ecb7220d110d 100644
--- a/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx
+++ b/cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx
@@ -64,7 +64,7 @@
#include "com/sun/star/uno/XComponentContext.hpp"
#include "cppuhelper/implbase1.hxx"
#include "cppuhelper/servicefactory.hxx"
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include "osl/mutex.hxx"
#include "osl/thread.h"
#include "rtl/ref.hxx"
diff --git a/cppuhelper/qa/unourl/cppu_unourl.cxx b/cppuhelper/qa/unourl/cppu_unourl.cxx
index 21af4b8d1364..f80388d5d122 100644
--- a/cppuhelper/qa/unourl/cppu_unourl.cxx
+++ b/cppuhelper/qa/unourl/cppu_unourl.cxx
@@ -28,7 +28,7 @@
*
************************************************************************/
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include "cppuhelper/unourl.hxx"
#include "rtl/malformeduriexception.hxx"
diff --git a/cppuhelper/qa/unourl/makefile.mk b/cppuhelper/qa/unourl/makefile.mk
index a611b135c7e9..a999532c5b4a 100644
--- a/cppuhelper/qa/unourl/makefile.mk
+++ b/cppuhelper/qa/unourl/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -41,7 +41,7 @@ ENABLE_EXCEPTIONS=TRUE
# BEGIN ----------------------------------------------------------------
-# auto generated Target:joblist by codegen.pl
+# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
$(SLO)$/cppu_unourl.obj
SHL1TARGET= cppu_unourl
@@ -49,6 +49,7 @@ SHL1STDLIBS=\
$(CPPUHELPERLIB) \
$(SALLIB) \
$(CPPULIB) \
+ $(TESTSHL2LIB)\
$(CPPUNITLIB)
SHL1IMPLIB= i$(SHL1TARGET)
DEF1NAME =$(SHL1TARGET)
diff --git a/cppuhelper/qa/weak/makefile.mk b/cppuhelper/qa/weak/makefile.mk
index 95f1697ef7be..bb0072b4d0f3 100644
--- a/cppuhelper/qa/weak/makefile.mk
+++ b/cppuhelper/qa/weak/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -41,7 +41,7 @@ DLLPRE = # no leading "lib" on .so files
SHL1TARGET = $(TARGET)
SHL1OBJS = $(SLO)$/test_weak.obj
-SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB)
+SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB) $(TESTSHL2LIB)
SHL1VERSIONMAP = version.map
SHL1IMPLIB = i$(SHL1TARGET)
DEF1NAME = $(SHL1TARGET)
@@ -53,4 +53,4 @@ SLOFILES = $(SHL1OBJS)
ALLTAR: test
test .PHONY: $(SHL1TARGETN)
- testshl2 $(SHL1TARGETN)
+ $(TESTSHL2) $(SHL1TARGETN)
diff --git a/cppuhelper/qa/weak/test_weak.cxx b/cppuhelper/qa/weak/test_weak.cxx
index 98bbb6527276..0cf128d519d6 100644
--- a/cppuhelper/qa/weak/test_weak.cxx
+++ b/cppuhelper/qa/weak/test_weak.cxx
@@ -41,7 +41,7 @@
#include "com/sun/star/uno/XWeak.hpp"
#include "cppuhelper/implbase1.hxx"
#include "cppuhelper/weak.hxx"
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include "rtl/ref.hxx"
#include "sal/types.h"
diff --git a/cppuhelper/source/cc5_solaris_sparc.map b/cppuhelper/source/cc5_solaris_sparc.map
index 0c3f1c556d64..0961c6830d1f 100755
--- a/cppuhelper/source/cc5_solaris_sparc.map
+++ b/cppuhelper/source/cc5_solaris_sparc.map
@@ -379,3 +379,8 @@ UDK_3.6 { # OOo 3.0
__1cEcppuSOPropertySetHelper2t5B6Mrn0ATOBroadcastHelperVar4n0AbIOMultiTypeInterfaceContainerHelper_nDcomDsunEstarDunoEType___pn0AWIEventNotificationHook_b_v_;
__1cEcppuSOPropertySetHelper2t6Mrn0ATOBroadcastHelperVar4n0AbIOMultiTypeInterfaceContainerHelper_nDcomDsunEstarDunoEType___pn0AWIEventNotificationHook_b_v_;
} UDK_3.5;
+
+UDK_3.7 { # OOo 3.3
+ global:
+ __1cEcppuLOWeakObjectbAdisposeWeakConnectionPoint6M_v_;
+} UDK_3.6;
diff --git a/cppuhelper/source/component.cxx b/cppuhelper/source/component.cxx
index d94614703be5..728f6815c309 100644
--- a/cppuhelper/source/component.cxx
+++ b/cppuhelper/source/component.cxx
@@ -90,6 +90,10 @@ void OComponentHelper::release() throw()
{
if (! rBHelper.bDisposed)
{
+ // *before* again incrementing our ref count, ensure that our weak connection point
+ // will not create references to us anymore (via XAdapter::queryAdapted)
+ disposeWeakConnectionPoint();
+
Reference<XInterface > xHoldAlive( *this );
// First dispose
try
diff --git a/cppuhelper/source/gcc3.map b/cppuhelper/source/gcc3.map
index 819c3e046b30..9348e91525c0 100644
--- a/cppuhelper/source/gcc3.map
+++ b/cppuhelper/source/gcc3.map
@@ -373,3 +373,9 @@ UDK_3.5 { # OOo 3.0
_ZN4cppu18OPropertySetHelperC1ERNS_19OBroadcastHelperVarINS_34OMultiTypeInterfaceContainerHelperEN3com3sun4star3uno4TypeEEEPNS_22IEventNotificationHookEb;
_ZN4cppu18OPropertySetHelperC2ERNS_19OBroadcastHelperVarINS_34OMultiTypeInterfaceContainerHelperEN3com3sun4star3uno4TypeEEEPNS_22IEventNotificationHookEb;
} UDK_3.4;
+
+UDK_3.6 { # OOo 3.3
+ global:
+ _ZN4cppu11OWeakObject26disposeWeakConnectionPointEv;
+} UDK_3.5;
+
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx
index 9caa4ca93615..acf05724c71b 100644
--- a/cppuhelper/source/implbase.cxx
+++ b/cppuhelper/source/implbase.cxx
@@ -247,6 +247,8 @@ void WeakComponentImplHelperBase::release()
throw ()
{
if (osl_decrementInterlockedCount( &m_refCount ) == 0) {
+ // ensure no other references are created, via the weak connection point, from now on
+ disposeWeakConnectionPoint();
// restore reference count:
osl_incrementInterlockedCount( &m_refCount );
if (! rBHelper.bDisposed) {
@@ -381,6 +383,8 @@ void WeakAggComponentImplHelperBase::release()
OWeakAggObject::release();
}
else if (osl_decrementInterlockedCount( &m_refCount ) == 0) {
+ // ensure no other references are created, via the weak connection point, from now on
+ disposeWeakConnectionPoint();
// restore reference count:
osl_incrementInterlockedCount( &m_refCount );
if (! rBHelper.bDisposed) {
diff --git a/cppuhelper/source/interfacecontainer.cxx b/cppuhelper/source/interfacecontainer.cxx
index 88f25e192e49..cc5b7708f1d8 100644
--- a/cppuhelper/source/interfacecontainer.cxx
+++ b/cppuhelper/source/interfacecontainer.cxx
@@ -40,13 +40,6 @@
#include <hash_map>
-#if OSL_DEBUG_LEVEL == 0
-# ifndef NDEBUG
-# define NDEBUG
-# endif
-#endif
-#include <assert.h>
-
#include <com/sun/star/lang/XEventListener.hpp>
diff --git a/cppuhelper/source/msvc_win32_intel.map b/cppuhelper/source/msvc_win32_intel.map
index a90ec88f3ca3..c999ae200ac2 100644
--- a/cppuhelper/source/msvc_win32_intel.map
+++ b/cppuhelper/source/msvc_win32_intel.map
@@ -271,3 +271,8 @@ UDK_3.5 { # OOo 3.0
global:
??0OPropertySetHelper@cppu@@QAE@AAU?$OBroadcastHelperVar@VOMultiTypeInterfaceContainerHelper@cppu@@VType@uno@star@sun@com@@@1@PAVIEventNotificationHook@1@_N@Z;
} UDK_3.4;
+
+UDK_3.6 { # OOo 3.3
+ global:
+ ?disposeWeakConnectionPoint@OWeakObject@cppu@@IAEXXZ;
+} UDK_3.5;
diff --git a/cppuhelper/source/tdmgr.cxx b/cppuhelper/source/tdmgr.cxx
index 306ace09d592..6f2aa70ea2d5 100644
--- a/cppuhelper/source/tdmgr.cxx
+++ b/cppuhelper/source/tdmgr.cxx
@@ -688,17 +688,17 @@ static void SAL_CALL typelib_callback(
catch (container::NoSuchElementException & exc)
{
(void) exc; // avoid warning about unused variable
- OSL_ENSURE(
- 0, OUStringToOString(
- OUString( RTL_CONSTASCII_USTRINGPARAM(
- "typelibrary type not available: ") ) +
+ OSL_TRACE(
+ "typelibrary type not available: %s",
+ OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
catch (Exception & exc)
{
(void) exc; // avoid warning about unused variable
- OSL_ENSURE(
- 0, OUStringToOString(
+ OSL_TRACE(
+ "%s",
+ OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index c4055eba4f8a..b518d2526e3b 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -216,25 +216,31 @@ void SAL_CALL OWeakObject::release() throw()
if (osl_decrementInterlockedCount( &m_refCount ) == 0) {
// notify/clear all weak-refs before object's dtor is executed
// (which may check weak-refs to this object):
- if (m_pWeakConnectionPoint != 0) {
- OWeakConnectionPoint * const p = m_pWeakConnectionPoint;
- m_pWeakConnectionPoint = 0;
- try {
- p->dispose();
- }
- catch (RuntimeException const& exc) {
- OSL_ENSURE(
- false, OUStringToOString(
- exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
- static_cast<void>(exc);
- }
- p->release();
- }
+ disposeWeakConnectionPoint();
// destroy object:
delete this;
}
}
+void OWeakObject::disposeWeakConnectionPoint()
+{
+ OSL_PRECOND( m_refCount == 0, "OWeakObject::disposeWeakConnectionPoint: only to be called with a ref count of 0!" );
+ if (m_pWeakConnectionPoint != 0) {
+ OWeakConnectionPoint * const p = m_pWeakConnectionPoint;
+ m_pWeakConnectionPoint = 0;
+ try {
+ p->dispose();
+ }
+ catch (RuntimeException const& exc) {
+ OSL_ENSURE(
+ false, OUStringToOString(
+ exc.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ static_cast<void>(exc);
+ }
+ p->release();
+ }
+}
+
OWeakObject::~OWeakObject() SAL_THROW( (RuntimeException) )
{
}
diff --git a/cppuhelper/test/testidlclass.cxx b/cppuhelper/test/testidlclass.cxx
index 8784f59d79e3..89b2d6411e77 100644
--- a/cppuhelper/test/testidlclass.cxx
+++ b/cppuhelper/test/testidlclass.cxx
@@ -30,11 +30,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_cppuhelper.hxx"
-#if OSL_DEBUG_LEVEL == 0
-#undef NDEBUG
-#define NDEBUG
-#endif
-#include <assert.h>
#include <cppuhelper/stdidlclass.hxx>
@@ -65,18 +60,18 @@ void testidlclass( const Reference < XMultiServiceFactory > &rSMgr)
(XServiceInfo * ) 0
);
- assert( r.is() );
+ OSL_ASSERT( r.is() );
{ // test the xidlclassprovider interface !
Reference< XIdlClassProvider > rProv( r , UNO_QUERY );
- assert( rProv.is() );
+ OSL_ASSERT( rProv.is() );
{
Sequence < Reference < XIdlClass > > seq = rProv->getIdlClasses();
// is always one
- assert( seq.getLength() == 1 );
+ OSL_ASSERT( seq.getLength() == 1 );
// test the weak reference
rProv->getIdlClasses();
@@ -89,7 +84,7 @@ void testidlclass( const Reference < XMultiServiceFactory > &rSMgr)
}
- assert( r->getName() == sImplName );
+ OSL_ASSERT( r->getName() == sImplName );
// test equals
Reference < XIdlClass > r2 =
@@ -101,18 +96,18 @@ void testidlclass( const Reference < XMultiServiceFactory > &rSMgr)
(XServiceInfo * ) 0
);
// test for implementation name
- assert( r2->equals( r ) );
+ OSL_ASSERT( r2->equals( r ) );
Sequence < Reference < XIdlClass > > seqIdlClass = r->getInterfaces();
//TODO !
// one idl class for one interface
// this test fails, if core reflection fails !
-// assert( 1 == seqIdlClass.getLength() );
+// OSL_ASSERT( 1 == seqIdlClass.getLength() );
// Reference < XIdlClass > rIdlInterface = seqIdlClass.getArray()[0];
// check for IdlClass interface returned by Core Reflection
-// assert( rIdlInterface.is() );
+// OSL_ASSERT( rIdlInterface.is() );
diff --git a/cppuhelper/test/testproptyphlp.cxx b/cppuhelper/test/testproptyphlp.cxx
index e798f86cab54..d3b17ed3e83a 100644
--- a/cppuhelper/test/testproptyphlp.cxx
+++ b/cppuhelper/test/testproptyphlp.cxx
@@ -34,12 +34,6 @@
#include <com/sun/star/beans/Property.hpp>
-#if OSL_DEBUG_LEVEL == 0
-#undef NDEBUG
-#define NDEBUG
-#endif
-#include <assert.h>
-
using namespace ::com::sun::star::uno;
using namespace ::cppu;
@@ -51,27 +45,27 @@ void testPropertyTypeHelper()
sal_Int32 i;
convertPropertyValue( i , a );
- assert( 25 == i );
+ OSL_ASSERT( 25 == i );
sal_Int16 i16;
convertPropertyValue( i16 , a );
- assert( 25 == i16 );
+ OSL_ASSERT( 25 == i16 );
sal_Int8 i8;
convertPropertyValue( i8 , a );
- assert( 25 == i8 );
+ OSL_ASSERT( 25 == i8 );
sal_uInt32 i32;
convertPropertyValue( i32 , a );
- assert( 25 == i32 );
+ OSL_ASSERT( 25 == i32 );
double d;
convertPropertyValue( d , a );
- assert( 25. == d );
+ OSL_ASSERT( 25. == d );
float f;
convertPropertyValue( f , a );
- assert( 25. == f );
+ OSL_ASSERT( 25. == f );
::com::sun::star::beans::Property prop;
@@ -83,11 +77,11 @@ void testPropertyTypeHelper()
::com::sun::star::beans::Property prop2;
convertPropertyValue( prop2 , a );
- assert( prop.Handle == prop2.Handle && prop.Name == prop2.Name && prop.Attributes == prop2.Attributes );
+ OSL_ASSERT( prop.Handle == prop2.Handle && prop.Name == prop2.Name && prop.Attributes == prop2.Attributes );
::rtl::OUString ow;
a <<= prop.Name;
convertPropertyValue( ow , a );
- assert( ow == prop.Name );
+ OSL_ASSERT( ow == prop.Name );
}
diff --git a/cpputools/source/sp2bv/makefile.mk b/cpputools/source/sp2bv/makefile.mk
index 2b80d6e431c6..e9ca09bff6df 100644
--- a/cpputools/source/sp2bv/makefile.mk
+++ b/cpputools/source/sp2bv/makefile.mk
@@ -34,7 +34,7 @@ PRJ=..$/..
PRJNAME=cpputools
TARGET=sp2bv
TARGETTYPE=CUI
-.IF "$(OS)"!="IRIX" && "$(OS)" != "MACOSX"
+.IF "$(OS)" != "MACOSX"
# hack to get stdc++ linked
NO_DEFAULT_STL=TRUE
.ENDIF
diff --git a/io/source/stm/omark.cxx b/io/source/stm/omark.cxx
index 69ccf08fce6a..29d326170ff1 100644
--- a/io/source/stm/omark.cxx
+++ b/io/source/stm/omark.cxx
@@ -49,12 +49,6 @@
#include <osl/mutex.hxx>
#include <rtl/ustrbuf.hxx>
-#if OSL_DEBUG_LEVEL == 0
-# ifndef NDEBUG
-# define NDEBUG
-# endif
-#endif
-#include <assert.h>
#include <string.h>
@@ -632,7 +626,7 @@ sal_Int32 OMarkableInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32
sal_Int32 nToRead = nBytesToRead - ( m_pBuffer->getSize() - m_nCurrentPos );
nRead = m_input->readBytes( aData , nToRead );
- assert( aData.getLength() == nRead );
+ OSL_ASSERT( aData.getLength() == nRead );
try
{
@@ -650,7 +644,7 @@ sal_Int32 OMarkableInputStream::readBytes(Sequence< sal_Int8 >& aData, sal_Int32
}
}
- assert( m_pBuffer->getSize() - m_nCurrentPos >= nBytesToRead );
+ OSL_ASSERT( m_pBuffer->getSize() - m_nCurrentPos >= nBytesToRead );
m_pBuffer->readAt( m_nCurrentPos , aData , nBytesToRead );
diff --git a/io/test/stm/datatest.cxx b/io/test/stm/datatest.cxx
index 3de10d5fe63e..b7515b3c5417 100644
--- a/io/test/stm/datatest.cxx
+++ b/io/test/stm/datatest.cxx
@@ -55,10 +55,6 @@
#include <osl/conditn.hxx>
#include <osl/mutex.hxx>
-#if OSL_DEBUG_LEVEL == 0
-#define NDEBUG
-#endif
-#include <assert.h>
#include <string.h>
using namespace ::rtl;
@@ -209,13 +205,13 @@ sal_Int32 ODataStreamTest::test(
rSource = Reference< XActiveDataSource > ( x, UNO_QUERY );
}
- assert( rPipeInput.is() );
- assert( rPipeOutput.is() );
+ OSL_ASSERT( rPipeInput.is() );
+ OSL_ASSERT( rPipeOutput.is() );
rSink->setInputStream( rPipeInput );
rSource->setOutputStream( rPipeOutput );
- assert( rSink->getInputStream().is() );
- assert( rSource->getOutputStream().is() );
+ OSL_ASSERT( rSink->getInputStream().is() );
+ OSL_ASSERT( rSource->getOutputStream().is() );
if( 1 == hTestHandle ) {
testSimple( rInput , rOutput );
@@ -778,10 +774,10 @@ sal_Int32 OObjectStreamTest::test( const OUString& TestName,
Reference <XOutputStream > markableOutput( x , UNO_QUERY );
Reference <XActiveDataSource > markableSource( x , UNO_QUERY );
- assert( markableInput.is() );
- assert( markableOutput.is() );
- assert( markableSink.is() );
- assert( markableSource.is() );
+ OSL_ASSERT( markableInput.is() );
+ OSL_ASSERT( markableOutput.is() );
+ OSL_ASSERT( markableSink.is() );
+ OSL_ASSERT( markableSource.is() );
markableSink->setInputStream( rPipeInput );
markableSource->setOutputStream( rPipeOutput );
@@ -799,14 +795,14 @@ sal_Int32 OObjectStreamTest::test( const OUString& TestName,
rSource = Reference <XActiveDataSource>( x, UNO_QUERY );
}
- assert( rPipeInput.is() );
- assert( rPipeOutput.is() );
+ OSL_ASSERT( rPipeInput.is() );
+ OSL_ASSERT( rPipeOutput.is() );
rSink->setInputStream( markableInput );
rSource->setOutputStream( markableOutput );
- assert( rSink->getInputStream().is() );
- assert( rSource->getOutputStream().is() );
+ OSL_ASSERT( rSink->getInputStream().is() );
+ OSL_ASSERT( rSource->getOutputStream().is() );
if( 1 + DATASTREAM_TEST_MAX_HANDLE == hTestHandle ) {
testObject( rOutput , rInput);
diff --git a/io/test/stm/marktest.cxx b/io/test/stm/marktest.cxx
index 88d52a09c891..20e4015ffa1f 100644
--- a/io/test/stm/marktest.cxx
+++ b/io/test/stm/marktest.cxx
@@ -46,12 +46,6 @@
#include <osl/conditn.hxx>
#include <osl/mutex.hxx>
-#if OSL_DEBUG_LEVEL == 0
-#define NDEBUG
-#endif
-#include <assert.h>
-#include <string.h>
-
using namespace ::rtl;
using namespace ::osl;
using namespace ::cppu;
@@ -159,8 +153,8 @@ sal_Int32 OMarkableOutputStreamTest::test(
Reference< XOutputStream > rOutput( TestObject , UNO_QUERY );
- assert( rPipeInput.is() );
- assert( rOutput.is() );
+ OSL_ASSERT( rPipeInput.is() );
+ OSL_ASSERT( rOutput.is() );
if( 1 == hTestHandle ) {
// checks usual streaming
testSimple( rOutput , rPipeInput );
@@ -526,8 +520,8 @@ sal_Int32 OMarkableInputStreamTest::test(
Reference < XInputStream > rInput( TestObject , UNO_QUERY );
- assert( rPipeOutput.is() );
- assert( rInput.is() );
+ OSL_ASSERT( rPipeOutput.is() );
+ OSL_ASSERT( rInput.is() );
if( 1 == hTestHandle ) {
// checks usual streaming
testSimple( rPipeOutput , rInput );
diff --git a/jurt/com/sun/star/lib/uno/environments/java/java_environment.java b/jurt/com/sun/star/lib/uno/environments/java/java_environment.java
index 36404f28d57e..aa9a21a26b22 100644
--- a/jurt/com/sun/star/lib/uno/environments/java/java_environment.java
+++ b/jurt/com/sun/star/lib/uno/environments/java/java_environment.java
@@ -37,7 +37,6 @@ import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.Iterator;
-import java.util.LinkedList;
/**
* The java_environment is the environment where objects and
@@ -159,70 +158,64 @@ public final class java_environment implements IEnvironment {
}
private static final class Registry {
- public Object register(Object object, String oid, Type type) {
- synchronized (map) {
- cleanUp();
- Level1Entry l1 = getLevel1Entry(oid);
- if (l1 != null) {
- Level2Entry l2 = l1.get(type);
- if (l2 != null) {
- Object o = l2.get();
- if (o != null) {
- l2.acquire();
- return o;
- }
+ public synchronized Object register(
+ Object object, String oid, Type type)
+ {
+ cleanUp();
+ Level1Entry l1 = level1map.get(oid);
+ if (l1 != null) {
+ Level2Entry l2 = l1.level2map.get(type);
+ if (l2 != null) {
+ Object o = l2.get();
+ if (o != null) {
+ l2.acquire();
+ return o;
}
}
- // TODO If a holder references an unreachable object, but still
- // has a positive count, it is replaced with a new holder
- // (referencing a reachable object, and with a count of 1). Any
- // later calls to revoke that should decrement the count of the
- // previous holder would now decrement the count of the new
- // holder, removing it prematurely. This is a design flaw that
- // will be fixed when IEnvironment.revokeInterface is changed to
- // no longer use counting. (And this problem is harmless, as
- // currently a holder either references a strongly held object
- // and uses register/revoke to control it, or references a
- // weakly held proxy and never revokes it.)
- if (l1 == null) {
- l1 = new Level1Entry();
- map.put(oid, l1);
- }
- l1.add(new Level2Entry(oid, type, object, queue));
}
+ // TODO If a holder references an unreachable object, but still has
+ // a positive count, it is replaced with a new holder (referencing a
+ // reachable object, and with a count of 1). Any later calls to
+ // revoke that should decrement the count of the previous holder
+ // would now decrement the count of the new holder, removing it
+ // prematurely. This is a design flaw that will be fixed when
+ // IEnvironment.revokeInterface is changed to no longer use
+ // counting. (And this problem is harmless, as currently a holder
+ // either references a strongly held object and uses register/revoke
+ // to control it, or references a weakly held proxy and never
+ // revokes it.)
+ if (l1 == null) {
+ l1 = new Level1Entry();
+ level1map.put(oid, l1);
+ }
+ l1.level2map.put(type, new Level2Entry(oid, type, object, queue));
return object;
}
- public boolean revoke(String oid, Type type) {
- synchronized (map) {
- Level1Entry l1 = getLevel1Entry(oid);
- Level2Entry l2 = null;
- if (l1 != null) {
- l2 = l1.get(type);
- if (l2 != null && l2.release()) {
- removeLevel2Entry(oid, l1, l2);
- }
+ public synchronized boolean revoke(String oid, Type type) {
+ Level1Entry l1 = level1map.get(oid);
+ Level2Entry l2 = null;
+ if (l1 != null) {
+ l2 = l1.level2map.get(type);
+ if (l2 != null && l2.release()) {
+ removeLevel2Entry(l1, oid, type);
}
- cleanUp();
- return l2 != null;
}
+ cleanUp();
+ return l2 != null;
}
- public Object get(String oid, Type type) {
- synchronized (map) {
- Level1Entry l1 = getLevel1Entry(oid);
- return l1 == null ? null : l1.find(type);
- }
+ public synchronized Object get(String oid, Type type) {
+ Level1Entry l1 = level1map.get(oid);
+ return l1 == null ? null : l1.find(type);
}
- public void clear() {
- synchronized (map) {
- map.clear();
- cleanUp();
- }
+ public synchronized void clear() {
+ level1map.clear();
+ cleanUp();
}
- // must only be called while synchronized on map:
+ // must only be called while synchronized on this Registry:
private void cleanUp() {
for (;;) {
Level2Entry l2 = (Level2Entry) queue.poll();
@@ -235,55 +228,38 @@ public final class java_environment implements IEnvironment {
// created since now e1.get() == null), and only then e1 is
// enqueued. To not erroneously remove the new e2 in that case,
// check whether the map still contains e1:
- String oid = l2.getOid();
- Level1Entry l1 = getLevel1Entry(oid);
- if (l1 != null && l1.get(l2.getType()) == l2) {
- removeLevel2Entry(oid, l1, l2);
+ Level1Entry l1 = level1map.get(l2.oid);
+ if (l1 != null && l1.level2map.get(l2.type) == l2) {
+ removeLevel2Entry(l1, l2.oid, l2.type);
}
}
}
- // must only be called while synchronized on map:
- private Level1Entry getLevel1Entry(String oid) {
- return (Level1Entry) map.get(oid);
- }
-
- // must only be called while synchronized on map:
- private void removeLevel2Entry(String oid, Level1Entry l1,
- Level2Entry l2) {
- if (l1.remove(l2)) {
- map.remove(oid);
+ // must only be called while synchronized on this Registry:
+ private void removeLevel2Entry(Level1Entry l1, String oid, Type type) {
+ l1.level2map.remove(type);
+ if (l1.level2map.isEmpty()) {
+ level1map.remove(oid);
}
}
private static final class Level1Entry {
- // must only be called while synchronized on map:
- public Level2Entry get(Type type) {
- for (Iterator i = list.iterator(); i.hasNext();) {
- Level2Entry l2 = (Level2Entry) i.next();
- if (l2.getType().equals(type)) {
- return l2;
- }
- }
- return null;
- }
-
- // must only be called while synchronized on map:
+ // must only be called while synchronized on enclosing Registry:
public Object find(Type type) {
// First, look for an exactly matching entry; then, look for an
// arbitrary entry for a subtype of the request type:
- for (Iterator i = list.iterator(); i.hasNext();) {
- Level2Entry l2 = (Level2Entry) i.next();
- if (l2.getType().equals(type)) {
- Object o = l2.get();
- if (o != null) {
- return o;
- }
+ Level2Entry l2 = level2map.get(type);
+ if (l2 != null) {
+ Object o = l2.get();
+ if (o != null) {
+ return o;
}
}
- for (Iterator i = list.iterator(); i.hasNext();) {
- Level2Entry l2 = (Level2Entry) i.next();
- if (type.isSupertypeOf(l2.getType())) {
+ for (Iterator<Level2Entry> i = level2map.values().iterator();
+ i.hasNext();)
+ {
+ l2 = i.next();
+ if (type.isSupertypeOf(l2.type)) {
Object o = l2.get();
if (o != null) {
return o;
@@ -293,53 +269,37 @@ public final class java_environment implements IEnvironment {
return null;
}
- // must only be called while synchronized on map:
- public void add(Level2Entry l2) {
- list.add(l2);
- }
-
- // must only be called while synchronized on map:
- public boolean remove(Level2Entry l2) {
- list.remove(l2);
- return list.isEmpty();
- }
-
- private final LinkedList list = new LinkedList(); // of Level2Entry
+ public final HashMap<Type, Level2Entry> level2map =
+ new HashMap<Type, Level2Entry>();
}
- private static final class Level2Entry extends WeakReference {
- public Level2Entry(String oid, Type type, Object object,
- ReferenceQueue queue) {
+ private static final class Level2Entry extends WeakReference<Object> {
+ public Level2Entry(
+ String oid, Type type, Object object, ReferenceQueue queue)
+ {
super(object, queue);
this.oid = oid;
this.type = type;
}
- public String getOid() {
- return oid;
- }
-
- public Type getType() {
- return type;
- }
-
- // must only be called while synchronized on map:
+ // must only be called while synchronized on enclosing Registry:
public void acquire() {
++count;
}
- // must only be called while synchronized on map:
+ // must only be called while synchronized on enclosing Registry:
public boolean release() {
return --count == 0;
}
- private final String oid;
- private final Type type;
+ public final String oid;
+ public final Type type;
+
private int count = 1;
}
- private final HashMap map = new HashMap();
- // from OID (String) to Level1Entry
+ private final HashMap<String, Level1Entry> level1map =
+ new HashMap<String, Level1Entry>();
private final ReferenceQueue queue = new ReferenceQueue();
}
diff --git a/jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk b/jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk
index 29aa95854d33..55fb0e2d3c0d 100755
--- a/jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk
+++ b/jvmfwk/plugins/sunmajor/javaenvsetup/makefile.mk
@@ -34,9 +34,7 @@ PRJ=..$/..$/..
PRJNAME=javaldx
TARGET=javaldx
TARGETTYPE=CUI
-.IF "$(OS)"!="IRIX"
NO_DEFAULT_STL=TRUE
-.ENDIF
LIBTARGET=NO
ENABLE_EXCEPTIONS=true
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
index 56972ea0e66f..e7f55eb91595 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.cxx
@@ -54,13 +54,6 @@ public:
} test;
#endif
-SunVersion::SunVersion(): m_nUpdateSpecial(0),
- m_preRelease(Rel_NONE),
- m_bValid(false)
-{
- memset(m_arVersionParts, 0, sizeof(m_arVersionParts));
-}
-
SunVersion::SunVersion(const rtl::OUString &usVer):
m_nUpdateSpecial(0), m_preRelease(Rel_NONE),
usVersion(usVer)
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx
index f6114672b17c..51b4ecf10221 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunversion.hxx
@@ -92,7 +92,6 @@ protected:
PreRelease m_preRelease;
public:
- SunVersion();
SunVersion(const char * szVer);
SunVersion(const rtl::OUString& usVer);
~SunVersion();
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index a823d551af88..674dd2103236 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -300,13 +300,14 @@ class AsynchReader: public Thread
public:
AsynchReader(oslFileHandle & rHandle);
-
+#if OSL_DEBUG_LEVEL >= 2
/** only call this function after this thread has finished.
That is, call join on this instance and then call getData.
*/
OString getData();
+#endif
};
AsynchReader::AsynchReader(oslFileHandle & rHandle):
@@ -314,11 +315,13 @@ AsynchReader::AsynchReader(oslFileHandle & rHandle):
{
}
+#if OSL_DEBUG_LEVEL >= 2
OString AsynchReader::getData()
{
OSL_ASSERT(isRunning() == sal_False );
return OString(m_arData.get(), m_nDataSize);
}
+#endif
void AsynchReader::run()
{
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx
index 680a1be74f41..b1be7cefc1a9 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/vendorbase.hxx
@@ -70,9 +70,11 @@ namespace jfw_plugin
#define JFW_PLUGIN_ARCH "ia64"
#elif defined M68K
#define JFW_PLUGIN_ARCH "m68k"
-#else // SPARC, INTEL, POWERPC, MIPS, ARM, IA64, M68K
+#elif defined HPPA
+#define JFW_PLUGIN_ARCH "parisc"
+#else // SPARC, INTEL, POWERPC, MIPS, ARM, IA64, M68K, HPPA
#error unknown plattform
-#endif // SPARC, INTEL, POWERPC, MIPS, ARM
+#endif // SPARC, INTEL, POWERPC, MIPS, ARM, IA64, M68K, HPPA
class MalformedVersionException
diff --git a/offapi/com/sun/star/awt/XTopWindow2.idl b/offapi/com/sun/star/awt/XTopWindow2.idl
new file mode 100644
index 000000000000..0cc289d42b17
--- /dev/null
+++ b/offapi/com/sun/star/awt/XTopWindow2.idl
@@ -0,0 +1,76 @@
+/*************************************************************************
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2009 by Sun Microsystems, Inc.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+************************************************************************/
+
+#ifndef __com_sun_star_awt_XTopWindow2_idl__
+#define __com_sun_star_awt_XTopWindow2_idl__
+
+#include <com/sun/star/awt/XTopWindow.idl>
+#include <com/sun/star/lang/IndexOutOfBoundsException.idl>
+
+//=============================================================================
+
+module com { module sun { module star { module awt {
+
+//=============================================================================
+
+/** extends XTopWindow with additional functionality
+ */
+interface XTopWindow2 : XTopWindow
+{
+ /** controls whether the window is currently maximized
+ */
+ [attribute] boolean IsMaximized;
+
+ /** controls whether the window is currently minimized
+ */
+ [attribute] boolean IsMinimized;
+
+ /** controls on which display the window is shown.
+
+ <p>When retrieving this property, in case the window is positioned on multiple displays,
+ the number returned will be of the display containing the upper left pixel of the frame
+ area (that is of the client area on system decorated windows, or the frame area of
+ undecorated resp. owner decorated windows).</p>
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if you attempt to set this property to a value which does not correspond to the number
+ of an existing screen.
+
+ @see com::sun::star::awt::DisplayAccess
+ @see com::sun::star::awt::DisplayInfo
+ */
+ [attribute] long Display
+ {
+ set raises (::com::sun::star::lang::IndexOutOfBoundsException);
+ };
+};
+
+//=============================================================================
+
+}; }; }; };
+
+//=============================================================================
+
+#endif
diff --git a/offapi/com/sun/star/awt/makefile.mk b/offapi/com/sun/star/awt/makefile.mk
index c0c501cbe2c5..dd2e9857124c 100644
--- a/offapi/com/sun/star/awt/makefile.mk
+++ b/offapi/com/sun/star/awt/makefile.mk
@@ -305,6 +305,7 @@ IDLFILES=\
XToggleButton.idl\
XToolkit.idl\
XTopWindow.idl\
+ XTopWindow2.idl\
XTopWindowListener.idl\
XUnitConversion.idl\
XUnoControlContainer.idl\
diff --git a/offapi/com/sun/star/document/DocumentEvent.idl b/offapi/com/sun/star/document/DocumentEvent.idl
index 1391f9becaf5..0b5b2cd5a205 100644
--- a/offapi/com/sun/star/document/DocumentEvent.idl
+++ b/offapi/com/sun/star/document/DocumentEvent.idl
@@ -52,6 +52,7 @@ module com { module sun { module star { module document {
anymore.</p>
@see XDocumentEventBroadcaster
+ @since OpenOffice.org 3.1
*/
struct DocumentEvent : ::com::sun::star::lang::EventObject
{
diff --git a/offapi/com/sun/star/document/XDocumentEventBroadcaster.idl b/offapi/com/sun/star/document/XDocumentEventBroadcaster.idl
index 596adf722ea8..5780d3f92bbf 100644
--- a/offapi/com/sun/star/document/XDocumentEventBroadcaster.idl
+++ b/offapi/com/sun/star/document/XDocumentEventBroadcaster.idl
@@ -61,6 +61,7 @@ interface XDocumentEventListener;
anymore.</p>
@see DocumentEvent
+ @since OpenOffice.org 3.1
*/
interface XDocumentEventBroadcaster
{
diff --git a/offapi/com/sun/star/document/XDocumentEventListener.idl b/offapi/com/sun/star/document/XDocumentEventListener.idl
index 345e320cecae..b98d81a73251 100644
--- a/offapi/com/sun/star/document/XDocumentEventListener.idl
+++ b/offapi/com/sun/star/document/XDocumentEventListener.idl
@@ -50,6 +50,7 @@ module com { module sun { module star { module document {
anymore.</p>
@see XDocumentEventBroadcaster
+ @since OpenOffice.org 3.1
*/
interface XDocumentEventListener : ::com::sun::star::lang::XEventListener
{
diff --git a/offapi/com/sun/star/frame/XSessionManagerListener2.idl b/offapi/com/sun/star/frame/XSessionManagerListener2.idl
new file mode 100644
index 000000000000..51e8643e459a
--- /dev/null
+++ b/offapi/com/sun/star/frame/XSessionManagerListener2.idl
@@ -0,0 +1,56 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: XSessionManagerListener.idl,v $
+ * $Revision: 1.4 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef __com_sun_star_frame_XSessionManagerListener2_idl__
+#define __com_sun_star_frame_XSessionManagerListener2_idl__
+
+#ifndef __com_sun_star_lang_XEventListener_idl__
+#include <com/sun/star/lang/XEventListener.idl>
+#endif
+
+#ifndef __com_sun_star_frame_XSessionManagerListener_idl__
+#include <com/sun/star/frame/XSessionManagerListener.idl>
+#endif
+//=============================================================================
+
+module com { module sun { module star { module frame {
+
+ interface XSessionManagerListener2 : XSessionManagerListener
+ {
+ /** doQuit gets called when the session manager has decided
+ the application should quit. Under these circumstances bringing up
+ further UI will usually be impossible and must be avoided.
+ */
+ [oneway] void doQuit();
+ };
+
+}; }; }; };
+
+
+#endif
diff --git a/offapi/com/sun/star/frame/makefile.mk b/offapi/com/sun/star/frame/makefile.mk
index 789a0f6e499e..0d0650a701fb 100644
--- a/offapi/com/sun/star/frame/makefile.mk
+++ b/offapi/com/sun/star/frame/makefile.mk
@@ -142,6 +142,7 @@ IDLFILES=\
XRecordableDispatch.idl\
XSessionManagerClient.idl\
XSessionManagerListener.idl\
+ XSessionManagerListener2.idl\
XStatusListener.idl\
XStatusbarController.idl\
XStorable.idl\
diff --git a/offapi/com/sun/star/modules.idl b/offapi/com/sun/star/modules.idl
index d91c8edad1ff..81bcb46f06a0 100644
--- a/offapi/com/sun/star/modules.idl
+++ b/offapi/com/sun/star/modules.idl
@@ -78,9 +78,6 @@ module chart {};
*/
module chart2 {};
-/// Non-JDBC conform database interfaces <b>(deprecated)</d>
-module data {};
-
/// Access to the tree of configuration data.
module configuration {};
diff --git a/offapi/com/sun/star/presentation/XSlideShow.idl b/offapi/com/sun/star/presentation/XSlideShow.idl
index 3d7f928249c9..88bbef3b16fb 100644
--- a/offapi/com/sun/star/presentation/XSlideShow.idl
+++ b/offapi/com/sun/star/presentation/XSlideShow.idl
@@ -93,6 +93,25 @@ interface XSlideShow : ::com::sun::star::uno::XInterface
*/
boolean nextEffect();
+ /** Undo the last effect in the main sequence of the slideshow.<p>
+
+ The current slide is displayed as if the last user-triggered effect
+ has never been triggered. If there is no previous effect on the
+ current slide then slideEnded(true) is called at the registered
+ XSlideShowListener objects, which can then trigger a change to the
+ previous slide. Note that this command is executed asynchronously.
+ Multiple calls to update() may be necessary to complete its execution.
+ If there is currently no slideshow running, this method does
+ nothing.<p>
+
+ @return <TRUE/>, if the previous effect was successfully
+ triggered. This method returns <FALSE/>, if there is no show
+ running, the first effect on the first slide was not yet
+ triggered, or the implementation failed to trigger the previous
+ effect.
+ */
+ boolean previousEffect();
+
/** Start a shape-intrinsic animation or activity.<p>
This method starts an animation or activity intrinsic to the
@@ -145,8 +164,24 @@ interface XSlideShow : ::com::sun::star::uno::XInterface
a different slide, this will still work but will not have any performance
improvements
</li>
+ <li>name: SkipAllMainSequenceEffects, value: boolean.
+ When <TRUE/> then all main sequence effects on the new slide
+ are triggered. This is typically used when going back one
+ effect leads to the previous slide. On that slide all
+ effects have to be shown in order to continue the backward
+ travelling.
+ When <FALSE/>, the default, then no main sequence effect is
+ triggered.
+ </li>
+ <li>name: SkipSlideTransition, value: boolean.
+ When <TRUE/> then the slide transition animation, if there
+ is any, is not displayed. This is typically used when going
+ back one effect leads to the previous slide. Typically used
+ together with SkipAllMainSequenceEffects also being <TRUE/>.
+ When <FALSE/>, the default, then the slide transition
+ effect, if it exists, is played.
+ </li>
</ul>
-
*/
void displaySlide(
[in] ::com::sun::star::drawing::XDrawPage xSlide,
diff --git a/offapi/com/sun/star/presentation/XSlideShowController.idl b/offapi/com/sun/star/presentation/XSlideShowController.idl
index 9476604a2c77..8ddc9931e163 100644
--- a/offapi/com/sun/star/presentation/XSlideShowController.idl
+++ b/offapi/com/sun/star/presentation/XSlideShowController.idl
@@ -121,6 +121,14 @@ interface XSlideShowController
//-------------------------------------------------------------------------
+ /** undo the last effects that where triggered by a generic trigger.
+ <p>If there is no previous effect that can be undone then the
+ previous slide will be displayed.
+ */
+ void gotoPreviousEffect();
+
+ //-------------------------------------------------------------------------
+
/** goto and display first slide */
void gotoFirstSlide();
diff --git a/offapi/com/sun/star/presentation/XSlideShowListener.idl b/offapi/com/sun/star/presentation/XSlideShowListener.idl
index 90b7dec18e84..46786eabc03c 100644
--- a/offapi/com/sun/star/presentation/XSlideShowListener.idl
+++ b/offapi/com/sun/star/presentation/XSlideShowListener.idl
@@ -65,8 +65,12 @@ interface XSlideShowListener : ::com::sun::star::animations::XAnimationListener
/** Notify that the current slide has ended,
e.g. the user has clicked on the slide.
Calling displaySlide() twice will not issue this event.
+ @param reverse
+ For the default order (forward) this flag is <FALSE/>.
+ When the main sequence was traversed in reverse order then this
+ flag is <TRUE/>.
*/
- void slideEnded();
+ void slideEnded( [in] boolean reverse );
/** Notifies that a hyperlink has been clicked.
@param hyperLink hyperlink URL
diff --git a/offapi/com/sun/star/util/Duration.idl b/offapi/com/sun/star/util/Duration.idl
new file mode 100644
index 000000000000..39f3ca8114ce
--- /dev/null
+++ b/offapi/com/sun/star/util/Duration.idl
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: DateTime.idl,v $
+ * $Revision: 1.7 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __com_sun_star_util_Duration_idl__
+#define __com_sun_star_util_Duration_idl__
+
+
+//========================================================================
+
+module com { module sun { module star { module util {
+
+//========================================================================
+
+/** represents a duration.
+
+ <p>
+ A duration is the difference of 2 <type>DateTime</type>s.
+ </p>
+
+ <p>
+ Note that there are no constraints on the ranges of the members,
+ except that every member must be non-negative:
+ for example, a Duration of 400 Days is valid.
+ </p>
+
+ @since OOo 3.3
+ */
+struct Duration
+{
+ //--------------------------------------------------------------------
+ /** explicit sign bit.
+ */
+ boolean Negative;
+
+ //--------------------------------------------------------------------
+ /** contains the years.
+ */
+ unsigned short Years;
+
+ //--------------------------------------------------------------------
+ /** contains the months.
+ */
+ unsigned short Months;
+
+ //--------------------------------------------------------------------
+ /** contains the days.
+ */
+ unsigned short Days;
+
+ //--------------------------------------------------------------------
+ /** contains the hours.
+ */
+ unsigned short Hours;
+
+ //--------------------------------------------------------------------
+ /** contains the minutes.
+ */
+ unsigned short Minutes;
+
+ //--------------------------------------------------------------------
+ /** contains the seconds.
+ */
+ unsigned short Seconds;
+
+ //--------------------------------------------------------------------
+ /** contains the hundredth seconds.
+ */
+ unsigned short HundredthSeconds;
+
+};
+
+//========================================================================
+
+}; }; }; };
+
+#endif
+
diff --git a/offapi/com/sun/star/util/makefile.mk b/offapi/com/sun/star/util/makefile.mk
index 44fbdf9065b2..e5f9aab136c3 100644
--- a/offapi/com/sun/star/util/makefile.mk
+++ b/offapi/com/sun/star/util/makefile.mk
@@ -53,6 +53,7 @@ IDLFILES=\
DateTime.idl\
DateTimeRange.idl\
DiskFullException.idl\
+ Duration.idl\
ElementChange.idl \
Endianness.idl \
FileIOException.idl\
diff --git a/pyuno/source/loader/makefile.mk b/pyuno/source/loader/makefile.mk
index 6e4f96ed7014..f9f00e4f13ae 100644
--- a/pyuno/source/loader/makefile.mk
+++ b/pyuno/source/loader/makefile.mk
@@ -42,7 +42,7 @@ DLLPRE =
#-------------------------------------------------------------------
-.IF "$(OS)$(CPU)$(COMEX)" == "SOLARISS4"
+.IF "$(OS)$(COMEX)" == "SOLARIS4"
# no -Bdirect for SunWS CC
DIRECT = $(LINKFLAGSDEFS)
.ENDIF
diff --git a/pyuno/source/module/makefile.mk b/pyuno/source/module/makefile.mk
index 2357d0062ed0..2928d29668aa 100644
--- a/pyuno/source/module/makefile.mk
+++ b/pyuno/source/module/makefile.mk
@@ -42,7 +42,7 @@ LINKFLAGSDEFS = # do not fail with missing symbols
.IF "$(L10N_framework)"==""
#-------------------------------------------------------------------
-.IF "$(OS)$(CPU)$(COMEX)" == "SOLARISS4"
+.IF "$(OS)$(COMEX)" == "SOLARIS4"
# no -Bdirect for SunWS CC
DIRECT = $(LINKFLAGSDEFS)
.ENDIF
diff --git a/pyuno/source/module/pyuno_gc.cxx b/pyuno/source/module/pyuno_gc.cxx
index 513c14a99378..1e0ca08ff954 100644
--- a/pyuno/source/module/pyuno_gc.cxx
+++ b/pyuno/source/module/pyuno_gc.cxx
@@ -43,6 +43,12 @@ public:
};
StaticDestructorGuard guard;
+static bool isAfterUnloadOrPy_Finalize()
+{
+ return g_destructorsOfStaticObjectsHaveBeenCalled ||
+ !Py_IsInitialized();
+}
+
class GCThread : public ::osl::Thread
{
PyObject *mPyObject;
@@ -64,7 +70,7 @@ GCThread::GCThread( PyInterpreterState *interpreter, PyObject * object ) :
void GCThread::run()
{
// otherwise we crash here, when main has been left already
- if( g_destructorsOfStaticObjectsHaveBeenCalled )
+ if( isAfterUnloadOrPy_Finalize() )
return;
try
{
@@ -100,7 +106,7 @@ void GCThread::onTerminated()
void decreaseRefCount( PyInterpreterState *interpreter, PyObject *object )
{
// otherwise we crash in the last after main ...
- if( g_destructorsOfStaticObjectsHaveBeenCalled )
+ if( isAfterUnloadOrPy_Finalize() )
return;
// delegate to a new thread, because there does not seem
diff --git a/pyuno/zipcore/python.cxx b/pyuno/zipcore/python.cxx
index 2e0e1ea0acb4..80765830d056 100644
--- a/pyuno/zipcore/python.cxx
+++ b/pyuno/zipcore/python.cxx
@@ -206,7 +206,7 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) {
MultiByteToWideChar(CP_ACP, 0, argv[i], -1, buff, nNeededWStrBuffSize);
buff[nNeededWStrBuffSize] = 0;
cp = encode(cp, buff);
- delete buff;
+ delete [] buff;
#else
cp = encode(cp, argv[i]);
#endif
@@ -235,9 +235,9 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) {
exit(EXIT_FAILURE);
}
if (n != 0) {
- delete orig;
+ delete [] orig;
}
- delete value;
+ delete [] value;
n = GetEnvironmentVariableW(L"PYTHONPATH", NULL, 0);
if (n == 0) {
if (GetLastError() != ERROR_ENVVAR_NOT_FOUND) {
@@ -276,9 +276,9 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) {
exit(EXIT_FAILURE);
}
if (n != 0) {
- delete orig;
+ delete [] orig;
}
- delete value;
+ delete [] value;
if (!SetEnvironmentVariableW(L"PYTHONHOME", pythonhome)) {
exit(EXIT_FAILURE);
}
diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx
index 281c8e27cbf0..b41fbbb5ada9 100644
--- a/registry/source/keyimpl.cxx
+++ b/registry/source/keyimpl.cxx
@@ -365,7 +365,7 @@ RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegVal
return REG_SET_VALUE_FAILED;
}
- rValue.flush();
+ //rValue.flush();
rtl_freeMemory(pBuffer);
return REG_NO_ERROR;
}
@@ -424,7 +424,7 @@ RegError ORegKey::setLongListValue(const OUString& valueName, sal_Int32* pValueL
return REG_SET_VALUE_FAILED;
}
- rValue.flush();
+ //rValue.flush();
rtl_freeMemory(pBuffer);
return REG_NO_ERROR;
}
@@ -492,7 +492,7 @@ RegError ORegKey::setStringListValue(const OUString& valueName, sal_Char** pValu
return REG_SET_VALUE_FAILED;
}
- rValue.flush();
+ //rValue.flush();
rtl_freeMemory(pBuffer);
return REG_NO_ERROR;
}
@@ -560,7 +560,7 @@ RegError ORegKey::setUnicodeListValue(const OUString& valueName, sal_Unicode** p
return REG_SET_VALUE_FAILED;
}
- rValue.flush();
+ //rValue.flush();
rtl_freeMemory(pBuffer);
return REG_NO_ERROR;
}
diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx
index 8a4dd8b88ee9..b9edca734232 100644
--- a/registry/source/regimpl.cxx
+++ b/registry/source/regimpl.cxx
@@ -848,7 +848,7 @@ RegError ORegistry::eraseKey(ORegKey* pKey, const OUString& keyName)
{
return REG_DELETE_KEY_FAILED;
}
- sFile.flush();
+ //sFile.flush();
// set flag deleted !!!
((ORegKey*)hOldKey)->setDeleted(sal_True);
@@ -894,7 +894,7 @@ RegError ORegistry::deleteSubkeysAndValues(ORegKey* pKey)
{
return REG_DELETE_VALUE_FAILED;
}
- ((OStoreFile&)pKey->getStoreFile()).flush();
+ //((OStoreFile&)pKey->getStoreFile()).flush();
}
_err = rStoreDir.next(iter);
@@ -1065,7 +1065,7 @@ RegError ORegistry::loadAndSaveValue(ORegKey* pTargetKey,
{
return REG_VALUE_NOT_EXISTS;
}
- pSourceKey->getStoreFile().flush();
+ //pSourceKey->getStoreFile().flush();
pBuffer = (sal_uInt8*)rtl_allocateMemory(VALUE_HEADERSIZE);
@@ -1137,7 +1137,7 @@ RegError ORegistry::loadAndSaveValue(ORegKey* pTargetKey,
rtl_freeMemory(pBuffer);
return REG_INVALID_VALUE;
}
- rTargetFile.flush();
+ //rTargetFile.flush();
if (rwBytes != nSize)
{
@@ -1482,6 +1482,20 @@ RegError ORegistry::dumpRegistry(RegKeyHandle hKey) const
return REG_NO_ERROR;
}
+RegError ORegistry::flush()
+{
+ REG_GUARD(m_mutex);
+
+ if (m_file.isValid())
+ {
+ m_file.flush();
+ return REG_NO_ERROR;
+ } else
+ {
+ return REG_REGISTRY_NOT_EXISTS;
+ }
+}
+
//*********************************************************************
// dumpValue()
diff --git a/registry/source/regimpl.hxx b/registry/source/regimpl.hxx
index c32dcf3527df..32baf9cc6ed5 100644
--- a/registry/source/regimpl.hxx
+++ b/registry/source/regimpl.hxx
@@ -113,6 +113,8 @@ public:
RegError dumpRegistry(RegKeyHandle hKey) const;
+ RegError flush();
+
~ORegistry();
sal_Bool isReadOnly() const
diff --git a/registry/source/registry.cxx b/registry/source/registry.cxx
index cb145b3910c2..139646f7cdc7 100644
--- a/registry/source/registry.cxx
+++ b/registry/source/registry.cxx
@@ -430,6 +430,8 @@ static RegError REGISTRY_CALLTYPE mergeKey(RegHandle hReg,
*/
_ret = pKey->closeKey(pNewKey);
+ if (_ret == REG_NO_ERROR )
+ _ret = pReg->flush();
return _ret;
}
diff --git a/registry/test/testmerge.cxx b/registry/test/testmerge.cxx
index 7cff15412745..efea89caf837 100644
--- a/registry/test/testmerge.cxx
+++ b/registry/test/testmerge.cxx
@@ -320,42 +320,42 @@ void test_merge()
Value = new sal_uInt8[valueSize];
REG_ENSURE(!key1.getValue(OUString::createFromAscii("/MergeKey1/MK1SubKey2/KeyWithStringValue"), (RegValue)Value), "testMerge error 76.a)");
REG_ENSURE(strcmp((const sal_Char*)Value, sValue) == 0, "testMerge error 76.b)");
- delete(Value);
+ delete [] Value;
REG_ENSURE(!key1.getValueInfo(OUString::createFromAscii("/MergeKey1/MK1SubKey3/KeyWithUnicodeValue"), &valueType, &valueSize), "testMerge error 77");
REG_ENSURE(valueType == RG_VALUETYPE_UNICODE && valueSize == (wValue.getLength()+1)*sizeof(sal_Unicode), "testMerge error 78");
Value = new sal_uInt8[valueSize];
REG_ENSURE(!key1.getValue(OUString::createFromAscii("/MergeKey1/MK1SubKey3/KeyWithUnicodeValue"), (RegValue)Value), "testMerge error 78.a)");
REG_ENSURE(wValue.equals( (const sal_Unicode*)Value ), "testMerge error 78.b)");
- delete(Value);
+ delete [] Value;
REG_ENSURE(!key1.getValueInfo(OUString::createFromAscii("/MergeKey1/MK1SubKey4/KeyWithBinaryValue"), &valueType, &valueSize), "testMerge error 79");
REG_ENSURE(valueType == RG_VALUETYPE_BINARY && valueSize == 27, "testMerge error 80");
Value = new sal_uInt8[valueSize];
REG_ENSURE(!key1.getValue(OUString::createFromAscii("/MergeKey1/MK1SubKey4/KeyWithBinaryValue"), (RegValue)Value), "testMerge error 80.a)");
REG_ENSURE(strcmp((const sal_Char*)Value, "abcdefghijklmnopqrstuvwxyz") == 0, "testMerge error 80.b)");
- delete(Value);
+ delete [] Value;
REG_ENSURE(!key1.getValueInfo(OUString::createFromAscii("/MergeKey2/MK2SubKey1/KeyWithBinaryValue"), &valueType, &valueSize), "testMerge error 81");
REG_ENSURE(valueType == RG_VALUETYPE_BINARY && valueSize == 11, "testMerge error 82");
Value = new sal_uInt8[valueSize];
REG_ENSURE(!key1.getValue(OUString::createFromAscii("/MergeKey2/MK2SubKey1/KeyWithBinaryValue"), (RegValue)Value), "testMerge error 82.a)");
REG_ENSURE(strcmp((const sal_Char*)Value, "1234567890") == 0, "testMerge error 82.b)");
- delete(Value);
+ delete [] Value;
REG_ENSURE(!key1.getValueInfo(OUString::createFromAscii("/MergeKey2/MK2SubKey2/KeyWithUnicodeValue"), &valueType, &valueSize), "testMerge error 83");
REG_ENSURE(valueType == RG_VALUETYPE_UNICODE&& valueSize == (wValue.getLength()+1)*sizeof(sal_Unicode), "testMerge error 84");
Value = new sal_uInt8[valueSize];
REG_ENSURE(!key1.getValue(OUString::createFromAscii("/MergeKey2/MK2SubKey2/KeyWithUnicodeValue"), (RegValue)Value), "testMerge error 84.a)");
REG_ENSURE(wValue.equals( (const sal_Unicode*)Value ), "testMerge error 84.b)");
- delete(Value);
+ delete [] Value;
REG_ENSURE(!key1.getValueInfo(OUString::createFromAscii("/MergeKey2/MK2SubKey3/KeyWithStringValue"), &valueType, &valueSize), "testMerge error 85");
REG_ENSURE(valueType == RG_VALUETYPE_STRING && valueSize == strlen(sValue)+1, "testMerge error 86");
Value = new sal_uInt8[valueSize];
REG_ENSURE(!key1.getValue(OUString::createFromAscii("/MergeKey2/MK2SubKey3/KeyWithStringValue"), (RegValue)Value), "testMerge error 86.a)");
REG_ENSURE(strcmp((const sal_Char*)Value, sValue) == 0, "testMerge error 86.b)");
- delete(Value);
+ delete [] Value;
REG_ENSURE(!key1.getValueInfo(OUString::createFromAscii("/MergeKey2/MK2SubKey4/KeyWithLongValue"), &valueType, &valueSize), "testMerge error 87");
REG_ENSURE(valueType == RG_VALUETYPE_LONG && valueSize == sizeof(sal_Int32), "testMerge error 88");
@@ -372,21 +372,21 @@ void test_merge()
Value = new sal_uInt8[valueSize];
REG_ENSURE(!key1.getValue(OUString::createFromAscii("/MergeKey1u2/MK1SubKey12/KeyWithStringValue"), (RegValue)Value), "testMerge error 92.a)");
REG_ENSURE(strcmp((const sal_Char*)Value, sValue) == 0, "testMerge error 92.b)");
- delete(Value);
+ delete [] Value;
REG_ENSURE(!key1.getValueInfo(OUString::createFromAscii("/MergeKey1u2/MK1SubKey13/KeyWithUnicodeValue"), &valueType, &valueSize), "testMerge error 93");
REG_ENSURE(valueType == RG_VALUETYPE_UNICODE && valueSize == (wValue.getLength()+1)*sizeof(sal_Unicode), "testMerge error 94");
Value = new sal_uInt8[valueSize];
REG_ENSURE(!key1.getValue(OUString::createFromAscii("/MergeKey1u2/MK1SubKey13/KeyWithUnicodeValue"), (RegValue)Value), "testMerge error 94.a)");
REG_ENSURE(wValue.equals( (const sal_Unicode*)Value ), "testMerge error 94.b)");
- delete(Value);
+ delete [] Value;
REG_ENSURE(!key1.getValueInfo(OUString::createFromAscii("/MergeKey1u2/MK2SubKey21/KeyWithBinaryValue"), &valueType, &valueSize), "testMerge error 95");
REG_ENSURE(valueType == RG_VALUETYPE_BINARY && valueSize == 19, "testMerge error 96");
Value = new sal_uInt8[valueSize];
REG_ENSURE(!key1.getValue(OUString::createFromAscii("/MergeKey1u2/MK2SubKey21/KeyWithBinaryValue"), (RegValue)Value), "testMerge error 96.a)");
REG_ENSURE(strcmp((const sal_Char*)Value, "a1b2c3d4e5f6g7h8i9") == 0, "testMerge error 96.b)");
- delete(Value);
+ delete [] Value;
REG_ENSURE(!key1.getValueInfo(OUString::createFromAscii("/MergeKey1u2/MK2SubKey22/KeyWithLongValue"), &valueType, &valueSize), "testMerge error 97");
REG_ENSURE(valueType == RG_VALUETYPE_LONG && valueSize == sizeof(sal_Int32), "testMerge error 98");
@@ -398,7 +398,7 @@ void test_merge()
Value = new sal_uInt8[valueSize];
REG_ENSURE(!key1.getValue(OUString::createFromAscii("/MergeKey1u2/MK2SubKey23/KeyWithStringValue"), (RegValue)Value), "testMerge error 100.a)");
REG_ENSURE(strcmp((const sal_Char*)Value, sValue) == 0, "testMerge error 100.b)");
- delete(Value);
+ delete [] Value;
REG_ENSURE(!key1.getValueInfo(OUString::createFromAscii("/MergeKey1u2/MK12SubKey1u2/KeyWithLongValue"), &valueType, &valueSize), "testMerge error 101");
REG_ENSURE(valueType == RG_VALUETYPE_LONG && valueSize == sizeof(sal_Int32), "testMerge error 102");
@@ -416,7 +416,7 @@ void test_merge()
REG_ENSURE(!myRegistry->destroy( OUString::createFromAscii("merge2.rdb") ), "test_registry_CppApi error 12");
REG_ENSURE(!myRegistry->destroy( OUString() ), "test_registry_CppApi error 13");
- delete(myRegistry);
+ delete myRegistry;
cout << "test_merge() Ok!\n";
return;
diff --git a/sal/inc/osl/endian.h b/sal/inc/osl/endian.h
index b0d2922839be..09529a48840f 100644
--- a/sal/inc/osl/endian.h
+++ b/sal/inc/osl/endian.h
@@ -118,20 +118,6 @@ extern "C" {
# include <machine/param.h>
#endif
-#ifdef IRIX
-# include <sys/endian.h>
-# if BYTE_ORDER == LITTLE_ENDIAN
-# undef _BIG_ENDIAN
-# undef _PDP_ENDIAN
-# elif BYTE_ORDER == BIG_ENDIAN
-# undef _LITTLE_ENDIAN
-# undef _PDP_ENDIAN
-# elif BYTE_ORDER == PDP_ENDIAN
-# undef _LITTLE_ENDIAN
-# undef _BIG_ENDIAN
-# endif
-#endif
-
#ifdef _WIN16
# define _LITTLE_ENDIAN
#endif
@@ -166,8 +152,7 @@ extern "C" {
#if !defined(_WIN32) && !defined(_WIN16) && !defined(OS2) && \
!defined(LINUX) && !defined(NETBSD) && !defined(SCO) && \
!defined(AIX) && !defined(HPUX) && \
- !defined(SOLARIS) && !defined(IRIX) && \
- !defined(MACOSX) && !defined(FREEBSD)
+ !defined(SOLARIS) && !defined(MACOSX) && !defined(FREEBSD)
# error "Target platform not specified !"
#endif
diff --git a/sal/inc/osl/thread.hxx b/sal/inc/osl/thread.hxx
index 0df24e07587a..b770120c167e 100644
--- a/sal/inc/osl/thread.hxx
+++ b/sal/inc/osl/thread.hxx
@@ -117,7 +117,7 @@ public:
osl_joinWithThread(m_hThread);
}
- sal_Bool SAL_CALL isRunning()
+ sal_Bool SAL_CALL isRunning() const
{
return osl_isThreadRunning(m_hThread);
}
@@ -128,7 +128,7 @@ public:
osl_setThreadPriority(m_hThread, Priority);
}
- oslThreadPriority SAL_CALL getPriority()
+ oslThreadPriority SAL_CALL getPriority() const
{
return m_hThread ? osl_getThreadPriority(m_hThread) : osl_Thread_PriorityUnknown;
}
diff --git a/sal/inc/rtl/math.hxx b/sal/inc/rtl/math.hxx
index 5760340cc6a4..4891b7565647 100644
--- a/sal/inc/rtl/math.hxx
+++ b/sal/inc/rtl/math.hxx
@@ -357,17 +357,28 @@ inline bool isSignBitSet(double d)
*/
inline void setInf(double * pd, bool bNegative)
{
- reinterpret_cast< sal_math_Double * >(pd)->w32_parts.msw
- = bNegative ? 0xFFF00000 : 0x7FF00000;
- reinterpret_cast< sal_math_Double * >(pd)->w32_parts.lsw = 0;
+ union
+ {
+ double sd;
+ sal_math_Double md;
+ };
+ md.w32_parts.msw = bNegative ? 0xFFF00000 : 0x7FF00000;
+ md.w32_parts.lsw = 0;
+ *pd = sd;
}
/** Set a QNAN.
*/
inline void setNan(double * pd)
{
- reinterpret_cast< sal_math_Double * >(pd)->w32_parts.msw = 0x7FFFFFFF;
- reinterpret_cast< sal_math_Double * >(pd)->w32_parts.lsw = 0xFFFFFFFF;
+ union
+ {
+ double sd;
+ sal_math_Double md;
+ };
+ md.w32_parts.msw = 0x7FFFFFFF;
+ md.w32_parts.lsw = 0xFFFFFFFF;
+ *pd = sd;
}
/** If a value is a valid argument for sin(), cos(), tan().
diff --git a/sal/inc/rtl/uuid.h b/sal/inc/rtl/uuid.h
index 6451ac7738d6..76911dd841fb 100644
--- a/sal/inc/rtl/uuid.h
+++ b/sal/inc/rtl/uuid.h
@@ -201,8 +201,6 @@ void SAL_CALL rtl_createNamedUuid(
#define UUID_SYSTEM_TIME_RESOLUTION_100NS_TICKS 10
#elif MACOSX
#define UUID_SYSTEM_TIME_RESOLUTION_100NS_TICKS 100000
-#elif IRIX
-#define UUID_SYSTEM_TIME_RESOLUTION_100NS_TICKS 10
#else
#error "System time resolution must be calculated!"
#endif
diff --git a/sal/inc/sal/alloca.h b/sal/inc/sal/alloca.h
index 703027277f18..912e58eff06e 100644
--- a/sal/inc/sal/alloca.h
+++ b/sal/inc/sal/alloca.h
@@ -31,7 +31,7 @@
#ifndef INCLUDED_SAL_ALLOCA_H
#define INCLUDED_SAL_ALLOCA_H
-#if defined (SOLARIS) || defined (LINUX) || defined (IRIX) || defined(__EMX__)
+#if defined (SOLARIS) || defined (LINUX) || defined(__EMX__)
#ifndef INCLUDED_ALLOCA_H
#include <alloca.h>
diff --git a/sal/inc/sal/config.h b/sal/inc/sal/config.h
index f16165fe72cb..c9d31a437758 100644
--- a/sal/inc/sal/config.h
+++ b/sal/inc/sal/config.h
@@ -102,7 +102,7 @@ extern "C" {
#define SAL_SYSCONFIGFILE( name ) name ".ini"
#endif
-#if defined(SOLARIS) || defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || defined(SCO) || defined(IRIX)
+#if defined(SOLARIS) || defined(LINUX) || defined(NETBSD) || defined(FREEBSD) || defined(SCO)
#define SAL_UNX
#define SAL_DLLEXTENSION ".so"
#define SAL_DLLPREFIX "lib"
diff --git a/sal/osl/os2/file.cxx b/sal/osl/os2/file.cxx
index e89ce6450bee..f3c1ad015de0 100644
--- a/sal/osl/os2/file.cxx
+++ b/sal/osl/os2/file.cxx
@@ -2343,7 +2343,7 @@ oslFileError SAL_CALL osl_syncFile(oslFileHandle Handle)
# define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) ((__OSL_MSDOS_SUPER_MAGIC != (a).f_type))
#endif /* LINUX */
-#if defined(SOLARIS) || defined(IRIX)
+#if defined(SOLARIS)
# define __OSL_STATFS_STRUCT struct statvfs
# define __OSL_STATFS(dir, sfs) statvfs((dir), (sfs))
# define __OSL_STATFS_BLKSIZ(a) ((sal_uInt64)((a).f_frsize))
@@ -2355,7 +2355,7 @@ oslFileError SAL_CALL osl_syncFile(oslFileHandle Handle)
of the target platforms fix it!!!! */
# define __OSL_STATFS_IS_CASE_SENSITIVE_FS(a) (1)
# define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) (1)
-#endif /* SOLARIS || IRIX*/
+#endif /* SOLARIS */
# define __OSL_STATFS_INIT(a) (memset(&(a), 0, sizeof(__OSL_STATFS_STRUCT)))
diff --git a/sal/osl/os2/nlsupport.c b/sal/osl/os2/nlsupport.c
index 0efccaa787e6..b05332bab0ea 100644
--- a/sal/osl/os2/nlsupport.c
+++ b/sal/osl/os2/nlsupport.c
@@ -411,9 +411,6 @@ void _imp_getProcessLocale( rtl_Locale ** ppLocale )
int _imp_setProcessLocale( rtl_Locale * pLocale )
{
-#ifdef IRIX
- char env_buf[80];
-#endif
char locale_buf[64];
/* convert rtl_Locale to locale string */
@@ -421,11 +418,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale )
{
/* only change env vars that exist already */
if( getenv( "LC_ALL" ) ) {
-#if defined( IRIX )
- snprintf(env_buf, sizeof(env_buf), "LC_ALL=%s", locale_buf);
- env_buf[sizeof(env_buf)] = '\0';
- putenv(env_buf);
-#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ )
+#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ )
setenv( "LC_ALL", locale_buf, 1);
#else
setenv( "LC_ALL", locale_buf );
@@ -433,11 +426,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale )
}
if( getenv( "LC_CTYPE" ) ) {
-#if defined( IRIX )
- snprintf(env_buf, sizeof(env_buf), "LC_CTYPE=%s", locale_buf);
- env_buf[sizeof(env_buf)] = '\0';
- putenv(env_buf);
-#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ )
+#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ )
setenv("LC_CTYPE", locale_buf, 1 );
#else
setenv( "LC_CTYPE", locale_buf );
@@ -445,11 +434,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale )
}
if( getenv( "LANG" ) ) {
-#if defined( IRIX )
- snprintf(env_buf, sizeof(env_buf), "LANG=%s", locale_buf);
- env_buf[sizeof(env_buf)] = '\0';
- putenv(env_buf);
-#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ )
+#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX ) || defined( __EMX__ )
setenv("LC_CTYPE", locale_buf, 1 );
#else
setenv( "LANG", locale_buf );
diff --git a/sal/osl/os2/socket.c b/sal/osl/os2/socket.c
index de70e5b8885a..1c6603b55932 100644
--- a/sal/osl/os2/socket.c
+++ b/sal/osl/os2/socket.c
@@ -48,7 +48,7 @@
#undef HAVE_POLL_H
#endif
-#if defined(LINUX) || defined (IRIX) || defined(NETBSD) || defined ( FREEBSD ) || defined (MACOSX)
+#if defined(LINUX) || defined(NETBSD) || defined ( FREEBSD ) || defined (MACOSX)
#include <sys/poll.h>
#define HAVE_POLL_H
#endif /* HAVE_POLL_H */
diff --git a/sal/osl/os2/system.h b/sal/osl/os2/system.h
index 565dfe3ea9c6..ef7626e9c036 100644
--- a/sal/osl/os2/system.h
+++ b/sal/osl/os2/system.h
@@ -306,36 +306,6 @@ extern unsigned int nanosleep(unsigned int);
# define PTHREAD_SIGACTION cma_sigaction
#endif
-#ifdef IRIX
-# define AF_IPX -1
-# include <pthread.h>
-# include <semaphore.h>
-# include <sched.h>
-# include <sys/socket.h>
-# include <sys/un.h>
-# include <sys/stropts.h>
-# include <netinet/tcp.h>
-# include <procfs/procfs.h>
-# include <sys/endian.h>
-# if BYTE_ORDER == LITTLE_ENDIAN
-# undef _BIG_ENDIAN
-# undef _PDP_ENDIAN
-# elif BYTE_ORDER == BIG_ENDIAN
-# undef _LITTLE_ENDIAN
-# undef _PDP_ENDIAN
-# elif BYTE_ORDER == PDP_ENDIAN
-# undef _LITTLE_ENDIAN
-# undef _BIG_ENDIAN
-# endif
-# define SA_FAMILY_DECL \
- union { struct { short sa_family2; } sa_generic; } sa_union
-# define PTR_SIZE_T(s) ((int *)&(s))
-# define NO_PTHREAD_PRIORITY
-# include <dlfcn.h>
-# define IOCHANNEL_TRANSFER_BSD
-extern char *strdup(const char *);
-#endif
-
#ifdef SOLARIS
# include <shadow.h>
# include <sys/procfs.h>
@@ -389,7 +359,7 @@ char *macxp_tempnam( const char *tmpdir, const char *prefix );
#if !defined(_WIN32) && !defined(_WIN16) && !defined(OS2) && \
!defined(LINUX) && !defined(NETBSD) && !defined(FREEBSD) && !defined(SCO) && \
!defined(AIX) && !defined(HPUX) && \
- !defined(SOLARIS) && !defined(IRIX) && !defined(MAC) && \
+ !defined(SOLARIS) && !defined(MAC) && \
!defined(MACOSX)
# error "Target plattform not specified !"
#endif
diff --git a/sal/osl/unx/backtrace.c b/sal/osl/unx/backtrace.c
index 437d31157049..886da0c3bee5 100755
--- a/sal/osl/unx/backtrace.c
+++ b/sal/osl/unx/backtrace.c
@@ -207,54 +207,6 @@ void backtrace_symbols_fd( void **buffer, int size, int fd )
}
#endif /* defined FREEBSD */
-#if defined(IRIX)
-#include <stdio.h>
-#include <rld_interface.h>
-#include <exception.h>
-#include <sys/signal.h>
-#include <unistd.h>
-
-/* Need extra libs -lexc -ldwarf -lelf */
-
-int backtrace( void **buffer, int max_frames )
-{
- struct sigcontext context;
- int i = 0;
-
- memset(&context, 0, sizeof(struct sigcontext));
-
- exc_setjmp(&context);
- while(context.sc_pc != 1 && i < max_frames) {
- exc_unwind(&context, 0);
- if(context.sc_pc != 1) {
- *(buffer++) = (void *)context.sc_pc;
- i++;
- }
- }
- return(i);
-}
-
-void backtrace_symbols_fd( void **buffer, int size, int fd )
-{
- FILE *fp = fdopen( fd, "w" );
- struct sigcontext context;
- char *name;
-
- if ( fp ) {
- while(context.sc_pc!=1) {
- if(context.sc_pc != 1) {
- exc_unwind_name(&context, 0, &name);
- fprintf(fp, " 0x%012lx %.100s\n", context.sc_pc, name ? name : "<unknown function>");
- free(name);
- }
- }
-
- fflush( fp );
- fclose( fp );
- }
-}
-#endif /* defined IRIX */
-
#ifdef LINUX
#ifndef _GNU_SOURCE
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 8e7d76cda614..e02485cdf4ce 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -466,6 +466,7 @@ oslFileError FileHandle_Impl::readFileAt (
oslFileError result = syncFile();
if (result != osl_File_E_None)
return (result);
+ m_bufptr = -1, m_buflen = 0;
if (nBytesRequested >= m_bufsiz)
{
@@ -535,6 +536,7 @@ oslFileError FileHandle_Impl::writeFileAt (
oslFileError result = syncFile();
if (result != osl_File_E_None)
return (result);
+ m_bufptr = -1, m_buflen = 0;
if (nBytesToWrite >= m_bufsiz)
{
@@ -1009,7 +1011,7 @@ SAL_CALL osl_syncFile(oslFileHandle Handle)
FileHandle_Impl::Guard lock (&(pImpl->m_mutex));
- OSL_FILE_TRACE("osl_syncFile(%d)", pImpl->m_fd);
+ OSL_TRACE("osl_syncFile(%d)", pImpl->m_fd);
oslFileError result = pImpl->syncFile();
if (result != osl_File_E_None)
return (result);
diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx
index 3f3cf02fb010..b9b2b6a23c7d 100644
--- a/sal/osl/unx/file_misc.cxx
+++ b/sal/osl/unx/file_misc.cxx
@@ -29,6 +29,7 @@
#include "osl/diagnose.h"
#include "osl/thread.h"
+#include <osl/signal.h>
#include "rtl/alloc.h"
#include "system.h"
@@ -48,6 +49,8 @@
#include <sys/stat.h>
#include <sys/mman.h>
+#include <algorithm>
+
/************************************************************************
* ToDo
*
@@ -1002,7 +1005,6 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD
int SourceFileFD=0;
int DestFileFD=0;
int nRet=0;
- void* pSourceFile=0;
SourceFileFD=open(pszSourceFileName,O_RDONLY);
if ( SourceFileFD < 0 )
@@ -1011,6 +1013,18 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD
return nRet;
}
+ // read and lseek are used to check the possibility to access the data
+ // not a nice solution, but it allows to avoid a crash in case it is an opened samba file
+ // generally, reading of one byte should not affect the performance
+ char nCh;
+ if ( 1 != read( SourceFileFD, &nCh, 1 )
+ || -1 == lseek( SourceFileFD, 0, SEEK_SET ) )
+ {
+ nRet = errno;
+ (void) close( SourceFileFD );
+ return nRet;
+ }
+
DestFileFD=open(pszDestFileName, O_WRONLY | O_CREAT, mode);
if ( DestFileFD < 0 )
@@ -1029,56 +1043,58 @@ static int oslDoCopyFile(const sal_Char* pszSourceFileName, const sal_Char* pszD
return 0;
}
- /* FIXME doCopy: fall back code for systems not having mmap */
- /* mmap file -- open dest file -- write once -- fsync it */
- pSourceFile=mmap(0,nSourceSize,PROT_READ,MAP_PRIVATE,SourceFileFD,0);
+ size_t nWritten = 0;
+ size_t nRemains = nSourceSize;
- if ( pSourceFile == MAP_FAILED )
+ /* mmap file -- open dest file -- write -- fsync it at the end */
+ void* pSourceFile = mmap( 0, nSourceSize, PROT_READ, MAP_SHARED, SourceFileFD, 0 );
+ if ( pSourceFile != MAP_FAILED )
{
- /* it's important to set nRet before the hack
- otherwise errno may be changed by lstat */
- nRet = errno;
- close(SourceFileFD);
- close(DestFileFD);
-
- return nRet;
+ nWritten = write( DestFileFD, pSourceFile, nSourceSize );
+ nRemains -= nWritten;
+ munmap( (char*)pSourceFile, nSourceSize );
}
- nRet = write(DestFileFD,pSourceFile,nSourceSize);
-
- /* #112584# if 'write' could not write the requested number of bytes
- we have to fail of course; because it's not exactly specified if 'write'
- sets errno if less than requested byte could be written we set nRet
- explicitly to ENOSPC */
- if ((nRet < 0) || (nRet != sal::static_int_cast< int >(nSourceSize)))
+ if ( nRemains )
{
- if (nRet < 0)
- nRet = errno;
- else
- nRet = ENOSPC;
+ /* mmap has problems, try the direct streaming */
+ char pBuffer[32000];
+ size_t nRead = 0;
- close(SourceFileFD);
- close(DestFileFD);
- munmap((char*)pSourceFile,nSourceSize);
- return nRet;
+ nRemains = nSourceSize;
+
+ if ( -1 != lseek( SourceFileFD, 0, SEEK_SET )
+ && -1 != lseek( DestFileFD, 0, SEEK_SET ) )
+ {
+ do
+ {
+ nRead = 0;
+ nWritten = 0;
+
+ size_t nToRead = std::min( (size_t)32000, nRemains );
+ nRead = read( SourceFileFD, pBuffer, nToRead );
+ if ( (size_t)-1 != nRead )
+ nWritten = write( DestFileFD, pBuffer, nRead );
+
+ if ( (size_t)-1 != nWritten )
+ nRemains -= nWritten;
+ }
+ while( nRemains && (size_t)-1 != nRead && nRead == nWritten );
+ }
}
- nRet = munmap((char*)pSourceFile,nSourceSize);
- if ( nRet < 0 )
+ if ( nRemains )
{
- nRet=errno;
- close(SourceFileFD);
- close(DestFileFD);
- return nRet;
+ if ( errno )
+ nRet = errno;
+ else
+ nRet = ENOSPC;
}
- close(SourceFileFD);
+ close( SourceFileFD );
+ if ( close( DestFileFD ) == -1 && nRet == 0 )
+ nRet = errno;
- // Removed call to 'fsync' again (#112584#) and instead
- // evaluate the return value of 'close' in order to detect
- // and report ENOSPC and other erronous conditions on close
- if (close(DestFileFD) == -1)
- return errno;
- else
- return 0;
+ return nRet;
}
+
diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx
index a3b7109123b7..4489368a4c9b 100644
--- a/sal/osl/unx/file_volume.cxx
+++ b/sal/osl/unx/file_volume.cxx
@@ -76,16 +76,6 @@ static const sal_Char* MOUNTTAB="/etc/mtab";
* This information is stored only in the kernel. */
/* static const sal_Char* MOUNTTAB="/etc/mtab"; */
-#elif defined(IRIX)
-
-#include <mntent.h>
-#include <sys/mount.h>
-#include <sys/statvfs.h>
-#define HAVE_STATFS_H
-#include <sys/quota.h>
-//#include <ctype.h>
-static const sal_Char* MOUNTTAB="/etc/mtab";
-
#elif defined(MACOSX)
#include <ufs/ufs/quota.h>
@@ -140,12 +130,6 @@ static sal_Bool osl_isFloppyMounted(oslVolumeDeviceHandleImpl* pDevice);
static sal_Bool osl_getFloppyMountEntry(const sal_Char* pszPath, oslVolumeDeviceHandleImpl* pItem);
#endif /* LINUX */
-
-#if defined(IRIX)
-static sal_Bool osl_isFloppyMounted(oslVolumeDeviceHandleImpl* pDevice);
-static sal_Bool osl_getFloppyMountEntry(const sal_Char* pszPath, oslVolumeDeviceHandleImpl* pItem);
-#endif /* IRIX */
-
#ifdef DEBUG_OSL_FILE
static void osl_printFloppyHandle(oslVolumeDeviceHandleImpl* hFloppy);
#endif /* DEBUG_OSL_FILE */
@@ -220,7 +204,7 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI
# define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) ((__OSL_MSDOS_SUPER_MAGIC != (a).f_type))
#endif /* LINUX */
-#if defined(SOLARIS) || defined(IRIX)
+#if defined(SOLARIS)
# define __OSL_STATFS_STRUCT struct statvfs
# define __OSL_STATFS(dir, sfs) statvfs((dir), (sfs))
# define __OSL_STATFS_BLKSIZ(a) ((sal_uInt64)((a).f_frsize))
@@ -232,7 +216,7 @@ oslFileError osl_getVolumeInformation( rtl_uString* ustrDirectoryURL, oslVolumeI
of the target platforms fix it!!!! */
# define __OSL_STATFS_IS_CASE_SENSITIVE_FS(a) (1)
# define __OSL_STATFS_IS_CASE_PRESERVING_FS(a) (1)
-#endif /* SOLARIS || IRIX*/
+#endif /* SOLARIS */
# define __OSL_STATFS_INIT(a) (memset(&(a), 0, sizeof(__OSL_STATFS_STRUCT)))
@@ -1093,411 +1077,6 @@ osl_isFloppyMounted (oslVolumeDeviceHandleImpl* pDevice)
}
#endif /* LINUX */
-/******************************************************************************
- *
- * IRIX FLOPPY FUNCTIONS
- *
- *****************************************************************************/
-
-#if defined(IRIX)
-static oslVolumeDeviceHandle osl_isFloppyDrive(const sal_Char* pszPath)
-{
- oslVolumeDeviceHandleImpl* pItem = osl_newVolumeDeviceHandleImpl ();
- sal_Bool bRet = sal_False;
-
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"In osl_isFloppyDrive\n");
-#endif
-
- bRet=osl_getFloppyMountEntry(pszPath,pItem);
-
- if ( bRet == sal_False )
- {
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"Out osl_isFloppyDrive [not a floppy]\n");
-#endif
- rtl_freeMemory(pItem);
- return 0;
- }
-
-
-#ifdef DEBUG_OSL_FILE
- osl_printFloppyHandle(pItem);
-#endif
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"Out osl_isFloppyDrive [ok]\n");
-#endif
-
- return (oslVolumeDeviceHandle) pItem;
-}
-
-
-static oslFileError osl_mountFloppy(oslVolumeDeviceHandle hFloppy)
-{
- sal_Bool bRet = sal_False;
- oslVolumeDeviceHandleImpl* pItem=0;
- int nRet;
- sal_Char pszCmd[PATH_MAX];
- sal_Char* pszMountProg = "mount";
- sal_Char* pszSuDo = 0;
- sal_Char* pszTmp = 0;
-
- pszCmd[0] = '\0';
-
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"In osl_mountFloppy\n");
-#endif
-
- pItem = (oslVolumeDeviceHandleImpl*) hFloppy;
-
- if ( pItem == 0 )
- {
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"Out osl_mountFloppy [pItem == 0]\n");
-#endif
-
- return osl_File_E_INVAL;
- }
-
- if ( pItem->ident[0] != 'O' || pItem->ident[1] != 'V' || pItem->ident[2] != 'D' || pItem->ident[3] != 'H' )
- {
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"Out osl_mountFloppy [invalid handle]\n");
-#endif
- return osl_File_E_INVAL;
- }
-
- bRet = osl_isFloppyMounted(pItem);
- if ( bRet == sal_True )
- {
-#ifdef DEBUG_OSL_FILE
- fprintf(stderr,"detected mounted floppy at '%s'\n",pItem->pszMountPoint);
-#endif
- return osl_File_E_BUSY;
- }
-
- /* mfe: we can't use the mount(2) system call!!! */
- /* even if we are root */
- /* since mtab is not updated!!! */
- /* but we need it to be updated */
- /* some "magic" must be done */
-
-/* nRet = mount(pItem->pszDevice,pItem->pszMountPoint,0,0,0); */
-/* if ( nRet != 0 ) */
-/* { */
-/* nRet=errno; */
-/* #ifdef DEBUG_OSL_FILE */
-/* perror("mount"); */
-/* #endif */
-/* } */
-
- pszTmp = getenv("SAL_MOUNT_MOUNTPROG");
- if ( pszTmp != 0 )
- {
- pszMountProg=pszTmp;
- }
-
- pszTmp=getenv("SAL_MOUNT_SU_DO");
- if ( pszTmp != 0 )
- {
- pszSuDo=pszTmp;
- }
-
- if ( pszSuDo != 0 )
- {
- snprintf(pszCmd, sizeof(pszCmd), "%s %s %s %s",pszSuDo,pszMountProg,pItem->pszDevice,pItem->pszMountPoint);
- }
- else
- {
- snprintf(pszCmd, sizeof(pszCmd), "%s %s",pszMountProg,pItem->pszMountPoint);
- }
-
-
-#ifdef DEBUG_OSL_FILE
- fprintf(stderr,"executing '%s'\n",pszCmd);
-#endif
-
- nRet = system(pszCmd);
-
-#ifdef DEBUG_OSL_FILE
- fprintf(stderr,"call returned '%i'\n",nRet);
- fprintf(stderr,"exit status is '%i'\n", WEXITSTATUS(nRet));
-#endif
-
-
- switch ( WEXITSTATUS(nRet) )
- {
- case 0:
- nRet=0;
- break;
-
- case 2:
- nRet=EPERM;
- break;
-
- case 4:
- nRet=ENOENT;
- break;
-
- case 8:
- nRet=EINTR;
- break;
-
- case 16:
- nRet=EPERM;
- break;
-
- case 32:
- nRet=EBUSY;
- break;
-
- case 64:
- nRet=EAGAIN;
- break;
-
- default:
- nRet=EBUSY;
- break;
- }
-
- return ((0 == nRet) ? oslTranslateFileError(OSL_FET_SUCCESS, nRet) : oslTranslateFileError(OSL_FET_ERROR, nRet));
-}
-
-static oslFileError osl_unmountFloppy(oslVolumeDeviceHandle hFloppy)
-{
- oslVolumeDeviceHandleImpl* pItem=0;
- int nRet=0;
- sal_Char pszCmd[PATH_MAX];
- sal_Char* pszTmp = 0;
- sal_Char* pszSuDo = 0;
- sal_Char* pszUmountProg = "umount";
-
- pszCmd[0] = '\0';
-
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"In osl_unmountFloppy\n");
-#endif
-
- pItem = (oslVolumeDeviceHandleImpl*) hFloppy;
-
- if ( pItem == 0 )
- {
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"Out osl_unmountFloppy [pItem==0]\n");
-#endif
- return osl_File_E_INVAL;
- }
-
- if ( pItem->ident[0] != 'O' || pItem->ident[1] != 'V' || pItem->ident[2] != 'D' || pItem->ident[3] != 'H' )
- {
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"Out osl_unmountFloppy [invalid handle]\n");
-#endif
- return osl_File_E_INVAL;
- }
-
- /* mfe: we can't use the umount(2) system call!!! */
- /* even if we are root */
- /* since mtab is not updated!!! */
- /* but we need it to be updated */
- /* some "magic" must be done */
-
-/* nRet=umount(pItem->pszDevice); */
-/* if ( nRet != 0 ) */
-/* { */
-/* nRet = errno; */
-
-/* #ifdef DEBUG_OSL_FILE */
-/* perror("mount"); */
-/* #endif */
-/* } */
-
-
- pszTmp = getenv("SAL_MOUNT_UMOUNTPROG");
- if ( pszTmp != 0 )
- {
- pszUmountProg=pszTmp;
- }
-
- pszTmp = getenv("SAL_MOUNT_SU_DO");
- if ( pszTmp != 0 )
- {
- pszSuDo=pszTmp;
- }
-
- if ( pszSuDo != 0 )
- {
- snprintf(pszCmd, sizeof(pszCmd), "%s %s %s",pszSuDo,pszUmountProg,pItem->pszMountPoint);
- }
- else
- {
- snprintf(pszCmd, sizeof(pszCmd), "%s %s",pszUmountProg,pItem->pszMountPoint);
- }
-
-
-#ifdef DEBUG_OSL_FILE
- fprintf(stderr,"executing '%s'\n",pszCmd);
-#endif
-
- nRet = system(pszCmd);
-
-#ifdef DEBUG_OSL_FILE
- fprintf(stderr,"call returned '%i'\n",nRet);
- fprintf(stderr,"exit status is '%i'\n", WEXITSTATUS(nRet));
-#endif
-
- switch ( WEXITSTATUS(nRet) )
- {
- case 0:
- nRet=0;
- break;
-
- default:
- nRet=EBUSY;
- break;
- }
-
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"Out osl_unmountFloppy [ok]\n");
-#endif
-
- return ((0 == nRet) ? oslTranslateFileError(OSL_FET_SUCCESS, nRet) : oslTranslateFileError(OSL_FET_ERROR, nRet));
-
-/* return osl_File_E_None;*/
-}
-
-static sal_Bool osl_getFloppyMountEntry(const sal_Char* pszPath, oslVolumeDeviceHandleImpl* pItem)
-{
- struct mntent* pMountEnt=0;
- sal_Char buffer[PATH_MAX];
- FILE* mntfile=0;
- int nRet=0;
-
- buffer[0] = '\0';
-
- mntfile = setmntent(MOUNTTAB,"r");
-
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"In osl_getFloppyMountEntry\n");
-#endif
-
- memset(buffer, 0, sizeof(buffer));
- strncpy(buffer, pszPath, sizeof(buffer) - 1);
-
-#ifdef DEBUG_OSL_FILE
- fprintf(stderr,"Checking mount of %s\n",buffer);
-#endif
-
-
- if ( mntfile == 0 )
- {
- nRet=errno;
-#ifdef DEBUG_OSL_FILE
- perror("mounttab");
-#endif
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"Out osl_getFloppyMountEntry [mntfile]\n");
-#endif
- return sal_False;
- }
-
- pMountEnt=getmntent(mntfile);
- while ( pMountEnt != 0 )
- {
-#ifdef DEBUG_OSL_FILE
-/* fprintf(stderr,"mnt_fsname : %s\n",pMountEnt->mnt_fsname); */
-/* fprintf(stderr,"mnt_dir : %s\n",pMountEnt->mnt_dir); */
-/* fprintf(stderr,"mnt_type : %s\n",pMountEnt->mnt_type);*/
-#endif
- if ( strcmp(pMountEnt->mnt_dir,buffer) == 0 &&
- strncmp(pMountEnt->mnt_fsname,"/dev/fd",strlen("/dev/fd")) == 0 )
- {
-
- memset(pItem->pszMountPoint, 0, sizeof(pItem->pszMountPoint));
- strncpy(pItem->pszMountPoint, pMountEnt->mnt_dir, sizeof(pItem->pszMountPoint) - 1);
-
- memset(pItem->pszFilePath, 0, sizeof(pItem->pszFilePath));
- strncpy(pItem->pszFilePath, pMountEnt->mnt_dir, sizeof(pItem->pszFilePath) - 1);
-
- memset(pItem->pszDevice, 0, sizeof(pItem->pszDevice));
- strncpy(pItem->pszDevice, pMountEnt->mnt_fsname, sizeof(pItem->pszDevice) - 1);
-
- fclose(mntfile);
-#ifdef DEBUG_OSL_FILE
- fprintf(stderr,"Mount Point found '%s'\n",pItem->pszMountPoint);
-#endif
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"Out osl_getFloppyMountEntry [found]\n");
-#endif
- return sal_True;
- }
-#ifdef DEBUG_OSL_FILE
-/* fprintf(stderr,"=================\n");*/
-#endif
- pMountEnt=getmntent(mntfile);
- }
-
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"Out osl_getFloppyMountEntry [not found]\n");
-#endif
-
- fclose(mntfile);
- return sal_False;
-}
-
-static sal_Bool osl_isFloppyMounted(oslVolumeDeviceHandleImpl* pDevice)
-{
- sal_Char buffer[PATH_MAX];
- oslVolumeDeviceHandleImpl* pItem=0;
- sal_Bool bRet=0;
-
- buffer[0] = '\0';
-
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"In osl_isFloppyMounted\n");
-#endif
-
- pItem = osl_newVolumeDeviceHandleImpl ();
- if ( pItem == 0 )
- return osl_File_E_NOMEM;
-
- memset(buffer, 0, sizeof(buffer));
- strncpy(buffer, pDevice->pszMountPoint, sizeof(buffer) - 1);
-
-#ifdef DEBUG_OSL_FILE
- fprintf(stderr,"Checking mount of %s\n",buffer);
-#endif
-
- bRet = osl_getFloppyMountEntry(buffer,pItem);
-
- if ( bRet == sal_False )
- {
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"Out osl_isFloppyMounted [not mounted]\n");
-#endif
- return sal_False;
- }
-
- if (strcmp(pItem->pszMountPoint, pDevice->pszMountPoint) == 0 &&
- strcmp(pItem->pszDevice,pDevice->pszDevice) == 0)
- {
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"Out osl_isFloppyMounted [is mounted]\n");
-#endif
- rtl_freeMemory(pItem);
- return sal_True;
- }
-
-#ifdef TRACE_OSL_FILE
- fprintf(stderr,"Out osl_isFloppyMounted [may be EBUSY]\n");
-#endif
-
- rtl_freeMemory(pItem);
- return sal_False;
-}
-#endif /* IRIX */
-
-
/* NetBSD floppy functions have to be added here. Until we have done that,
* we use the MACOSX definitions for nonexistent floppy.
* */
diff --git a/sal/osl/unx/makefile.mk b/sal/osl/unx/makefile.mk
index 0e728c29dbcd..eac4c24cdfa9 100644
--- a/sal/osl/unx/makefile.mk
+++ b/sal/osl/unx/makefile.mk
@@ -55,7 +55,8 @@ CXXFLAGS+= $(LFS_CFLAGS)
# --- Files --------------------------------------------------------
-SLOFILES= $(SLO)$/conditn.obj \
+SLOFILES= \
+ $(SLO)$/conditn.obj \
$(SLO)$/diagnose.obj \
$(SLO)$/semaphor.obj \
$(SLO)$/socket.obj \
@@ -74,7 +75,7 @@ SLOFILES= $(SLO)$/conditn.obj \
$(SLO)$/util.obj \
$(SLO)$/tempfile.obj\
$(SLO)$/file.obj \
- $(SLO)$/file_misc.obj \
+ $(SLO)$/file_misc.obj\
$(SLO)$/file_url.obj\
$(SLO)$/file_error_transl.obj\
$(SLO)$/file_path_helper.obj\
@@ -84,6 +85,7 @@ SLOFILES= $(SLO)$/conditn.obj \
$(SLO)$/process_impl.obj\
$(SLO)$/salinit.obj
+
#.IF "$(UPDATER)"=="YES"
OBJFILES= $(OBJ)$/conditn.obj \
$(OBJ)$/diagnose.obj \
@@ -104,7 +106,7 @@ OBJFILES= $(OBJ)$/conditn.obj \
$(OBJ)$/util.obj \
$(OBJ)$/tempfile.obj\
$(OBJ)$/file.obj \
- $(OBJ)$/file_misc.obj \
+ $(OBJ)$/file_misc.obj\
$(OBJ)$/file_url.obj\
$(OBJ)$/file_error_transl.obj\
$(OBJ)$/file_path_helper.obj\
diff --git a/sal/osl/unx/module.c b/sal/osl/unx/module.c
index d486aad00e01..ffb0ebb61e7b 100644
--- a/sal/osl/unx/module.c
+++ b/sal/osl/unx/module.c
@@ -35,32 +35,6 @@
#include <osl/process.h>
#include <osl/file.h>
-#ifdef IRIX
-#ifndef _RLD_INTERFACE_DLFCN_H_DLADDR
-#define _RLD_INTERFACE_DLFCN_H_DLADDR
-typedef struct DL_INFO {
- const char * dli_fname;
- void * dli_fbase;
- const char * dli_sname;
- void * dli_saddr;
- int dli_version;
- int dli_reserved1;
- long dli_reserved[4];
-} Dl_info;
-#endif
-#include <rld_interface.h>
-#define _RLD_DLADDR 14
-int dladdr(void *address, Dl_info *dl);
-
-int dladdr(void *address, Dl_info *dl)
-{
- void *v;
- v = _rld_new_interface(_RLD_DLADDR,address,dl);
-
- return (int)v;
-}
-#endif
-
#include "system.h"
#if OSL_DEBUG_LEVEL > 1
diff --git a/sal/osl/unx/nlsupport.c b/sal/osl/unx/nlsupport.c
index e5390089e6d7..5f3741be883e 100644
--- a/sal/osl/unx/nlsupport.c
+++ b/sal/osl/unx/nlsupport.c
@@ -33,7 +33,7 @@
#include <osl/process.h>
#include <rtl/memory.h>
-#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD) || defined(MACOSX)
+#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD) || defined(MACOSX)
#include <pthread.h>
#ifndef MACOSX
#include <locale.h>
@@ -42,7 +42,7 @@
#include <osl/module.h>
#include <osl/thread.h>
#endif /* !MACOSX */
-#endif /* LINUX || SOLARIS || IRIX || NETBSD || MACOSX */
+#endif /* LINUX || SOLARIS || NETBSD || MACOSX */
#include <string.h>
@@ -229,13 +229,12 @@ static rtl_Locale * _parse_locale( const char * locale )
return NULL;
}
-#if defined(LINUX) || defined(SOLARIS) || defined(IRIX) || defined(NETBSD) || defined(FREEBSD)
+#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || defined(FREEBSD)
/*
* This implementation of osl_getTextEncodingFromLocale maps
* from nl_langinfo(CODESET) to rtl_textencoding defines.
- * nl_langinfo() is supported only on Linux and Solaris.
- * nl_langinfo() is supported only on Linux, Solaris and IRIX,
+ * nl_langinfo() is supported only on Linux, Solaris,
* >= NetBSD 1.6 and >= FreeBSD 4.4
*
* This routine is SLOW because of the setlocale call, so
@@ -299,24 +298,6 @@ const _pair _nl_language_list[] = {
/* XXX MS-874 is an extension to tis620, so this is not
* really equivalent */
-#elif defined(IRIX)
-
-const _pair _nl_language_list[] = {
- { "big5", RTL_TEXTENCODING_BIG5 }, /* China - Traditional Chinese */
- { "eucCN", RTL_TEXTENCODING_EUC_CN }, /* China */
- { "eucgbk", RTL_TEXTENCODING_DONTKNOW }, /* China - Simplified Chinese */
- { "eucJP", RTL_TEXTENCODING_EUC_JP }, /* Japan */
- { "eucKR", RTL_TEXTENCODING_EUC_KR }, /* Korea */
- { "eucTW", RTL_TEXTENCODING_EUC_TW }, /* Taiwan - Traditional Chinese */
- { "gbk", RTL_TEXTENCODING_GBK }, /* China - Simplified Chinese */
- { "ISO8859-1", RTL_TEXTENCODING_ISO_8859_1 }, /* Western */
- { "ISO8859-2", RTL_TEXTENCODING_ISO_8859_2 }, /* Central European */
- { "ISO8859-5", RTL_TEXTENCODING_ISO_8859_5 }, /* Cyrillic */
- { "ISO8859-7", RTL_TEXTENCODING_ISO_8859_7 }, /* Greek */
- { "ISO8859-9", RTL_TEXTENCODING_ISO_8859_9 }, /* Turkish */
- { "ISO8859-15", RTL_TEXTENCODING_ISO_8859_15 }, /* Western Updated (w/Euro sign) */
- { "sjis", RTL_TEXTENCODING_SHIFT_JIS } /* Japan */
-};
#elif defined(LINUX) || defined(NETBSD)
@@ -552,7 +533,7 @@ const _pair _nl_language_list[] = {
{ "UTF-8", RTL_TEXTENCODING_UTF8 } /* ISO-10646/UTF-8 */
};
-#endif /* ifdef SOLARIS IRIX LINUX FREEBSD NETBSD */
+#endif /* ifdef SOLARIS LINUX FREEBSD NETBSD */
static pthread_mutex_t aLocalMutex = PTHREAD_MUTEX_INITIALIZER;
@@ -927,9 +908,6 @@ void _imp_getProcessLocale( rtl_Locale ** ppLocale )
int _imp_setProcessLocale( rtl_Locale * pLocale )
{
-#ifdef IRIX
- char env_buf[80];
-#endif
char locale_buf[64];
/* convert rtl_Locale to locale string */
@@ -937,11 +915,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale )
{
/* only change env vars that exist already */
if( getenv( "LC_ALL" ) ) {
-#if defined( IRIX )
- snprintf(env_buf, sizeof(env_buf), "LC_ALL=%s", locale_buf);
- env_buf[sizeof(env_buf)] = '\0';
- putenv(env_buf);
-#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX )
+#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX )
setenv( "LC_ALL", locale_buf, 1);
#else
setenv( "LC_ALL", locale_buf );
@@ -949,11 +923,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale )
}
if( getenv( "LC_CTYPE" ) ) {
-#if defined( IRIX )
- snprintf(env_buf, sizeof(env_buf), "LC_CTYPE=%s", locale_buf);
- env_buf[sizeof(env_buf)] = '\0';
- putenv(env_buf);
-#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX )
+#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX )
setenv("LC_CTYPE", locale_buf, 1 );
#else
setenv( "LC_CTYPE", locale_buf );
@@ -961,11 +931,7 @@ int _imp_setProcessLocale( rtl_Locale * pLocale )
}
if( getenv( "LANG" ) ) {
-#if defined( IRIX )
- snprintf(env_buf, sizeof(env_buf), "LANG=%s", locale_buf);
- env_buf[sizeof(env_buf)] = '\0';
- putenv(env_buf);
-#elif defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX )
+#if defined( FREEBSD ) || defined( NETBSD ) || defined( MACOSX )
setenv("LC_CTYPE", locale_buf, 1 );
#else
setenv( "LANG", locale_buf );
diff --git a/sal/osl/unx/process.c b/sal/osl/unx/process.c
index a1f47cdf76a5..e3f78ff2f2b4 100644
--- a/sal/osl/unx/process.c
+++ b/sal/osl/unx/process.c
@@ -49,7 +49,7 @@
#endif
#include "system.h"
-#if defined(SOLARIS) || defined(IRIX)
+#if defined(SOLARIS)
# include <sys/procfs.h>
#endif
#include <osl/diagnose.h>
@@ -269,7 +269,7 @@ static sal_Bool sendFdPipe(int PipeFD, int SocketFD)
cmptr->cmsg_level = SOL_SOCKET;
cmptr->cmsg_type = SCM_RIGHTS;
cmptr->cmsg_len = CONTROLLEN;
- *(int*)CMSG_DATA(cmptr) = SocketFD;
+ memcpy(CMSG_DATA(cmptr), &SocketFD, sizeof(int));
#endif
@@ -360,7 +360,7 @@ static oslSocket receiveFdPipe(int PipeFD)
( msghdr.msg_controllen == CONTROLLEN ) )
{
OSL_TRACE("receiveFdPipe : received '%i' bytes\n",nRead);
- newfd = *(int*)CMSG_DATA(cmptr);
+ memcpy(&newfd, CMSG_DATA(cmptr), sizeof(int));
}
#endif
else
@@ -431,10 +431,8 @@ oslSocket osl_receiveResourcePipe(oslPipe pPipe)
static void ChildStatusProc(void *pData)
{
- int i;
-/* int first = 0;*/
- pid_t pid;
-/* int status;*/
+ pid_t pid = -1;
+ int status = 0;
int channel[2];
ProcessData data;
ProcessData *pdata;
@@ -447,25 +445,31 @@ static void ChildStatusProc(void *pData)
in our child process */
memcpy(&data, pData, sizeof(data));
- socketpair(AF_UNIX, SOCK_STREAM, 0, channel);
+ if (socketpair(AF_UNIX, SOCK_STREAM, 0, channel) == -1)
+ status = errno;
fcntl(channel[0], F_SETFD, FD_CLOEXEC);
fcntl(channel[1], F_SETFD, FD_CLOEXEC);
/* Create redirected IO pipes */
+ if ( status == 0 && data.m_pInputWrite )
+ if (pipe( stdInput ) == -1)
+ status = errno;
- if ( data.m_pInputWrite )
- pipe( stdInput );
-
- if ( data.m_pOutputRead )
- pipe( stdOutput );
+ if ( status == 0 && data.m_pOutputRead )
+ if (pipe( stdOutput ) == -1)
+ status = errno;
- if ( data.m_pErrorRead )
- pipe( stdError );
+ if ( status == 0 && data.m_pErrorRead )
+ if (pipe( stdError ) == -1)
+ status = errno;
- if ((pid = fork()) == 0)
+ if ( (status == 0) && ((pid = fork()) == 0) )
{
/* Child */
+ int chstatus = 0;
+ sal_Int32 nWrote;
+
if (channel[0] != -1) close(channel[0]);
if ((data.m_uid != (uid_t)-1) && ((data.m_uid != getuid()) || (data.m_gid != getgid())))
@@ -481,20 +485,15 @@ static void ChildStatusProc(void *pData)
#endif
}
- if ((data.m_uid == (uid_t)-1) || ((data.m_uid == getuid()) && (data.m_gid == getgid())))
+ if (data.m_pszDir)
+ chstatus = chdir(data.m_pszDir);
+ if (chstatus == 0 && ((data.m_uid == (uid_t)-1) || ((data.m_uid == getuid()) && (data.m_gid == getgid()))))
{
- if (data.m_pszDir)
- chdir(data.m_pszDir);
-
+ int i;
for (i = 0; data.m_pszEnv[i] != NULL; i++)
putenv(data.m_pszEnv[i]);
-#if defined(LINUX) && !defined(NPTL)
- /* mfe: linux likes to have just one thread when the exec family is called */
- /* this np function has this purpose ... */
- pthread_kill_other_threads_np();
-#endif
OSL_TRACE("ChildStatusProc : starting '%s'",data.m_pszArgs[0]);
/* Connect std IO to pipe ends */
@@ -537,7 +536,9 @@ static void ChildStatusProc(void *pData)
OSL_TRACE("ChildStatusProc : starting '%s' failed",data.m_pszArgs[0]);
/* if we reach here, something went wrong */
- write(channel[1], &errno, sizeof(errno));
+ nWrote = write(channel[1], &errno, sizeof(errno));
+ if (nWrote != sizeof(errno))
+ OSL_TRACE("sendFdPipe : sending failed (%s)",strerror(errno));
if (channel[1] != -1) close(channel[1]);
@@ -545,8 +546,7 @@ static void ChildStatusProc(void *pData)
}
else
{ /* Parent */
- int status;
-
+ int i = -1;
if (channel[1] != -1) close(channel[1]);
/* Close unused pipe ends */
@@ -554,15 +554,17 @@ static void ChildStatusProc(void *pData)
if (stdOutput[1] != -1) close( stdOutput[1] );
if (stdError[1] != -1) close( stdError[1] );
- while (((i = read(channel[0], &status, sizeof(status))) < 0))
+ if (pid > 0)
{
- if (errno != EINTR)
- break;
+ while (((i = read(channel[0], &status, sizeof(status))) < 0))
+ {
+ if (errno != EINTR)
+ break;
+ }
}
if (channel[0] != -1) close(channel[0]);
-
if ((pid > 0) && (i == 0))
{
pid_t child_pid;
@@ -1368,48 +1370,6 @@ oslProcessError SAL_CALL osl_getProcessInfo(oslProcess Process, oslProcessData F
return (pInfo->Fields == Fields) ? osl_Process_E_None : osl_Process_E_Unknown;
}
-#elif defined(IRIX)
-
- int fd;
- sal_Char name[PATH_MAX + 1];
-
- snprintf(name, sizeof(name), "/proc/%u", pid);
-
- if ((fd = open(name, O_RDONLY)) >= 0)
- {
- prstatus_t prstatus;
- prpsinfo_t prpsinfo;
-
- if (ioctl(fd, PIOCSTATUS, &prstatus) >= 0 &&
- ioctl(fd, PIOCPSINFO, &prpsinfo) >= 0)
- {
- if (Fields & osl_Process_CPUTIMES)
- {
- pInfo->UserTime.Seconds = prstatus.pr_utime.tv_sec;
- pInfo->UserTime.Nanosec = prstatus.pr_utime.tv_nsec;
- pInfo->SystemTime.Seconds = prstatus.pr_stime.tv_sec;
- pInfo->SystemTime.Nanosec = prstatus.pr_stime.tv_nsec;
-
- pInfo->Fields |= osl_Process_CPUTIMES;
- }
-
- if (Fields & osl_Process_HEAPUSAGE)
- {
- int pagesize = getpagesize();
-
- pInfo->HeapUsage = prpsinfo.pr_size*pagesize;
-
- pInfo->Fields |= osl_Process_HEAPUSAGE;
- }
-
- close(fd);
-
- return (pInfo->Fields == Fields) ? osl_Process_E_None : osl_Process_E_Unknown;
- }
- else
- close(fd);
- }
-
#elif defined(LINUX)
if ( (Fields & osl_Process_CPUTIMES) || (Fields & osl_Process_HEAPUSAGE) )
diff --git a/sal/osl/unx/profile.c b/sal/osl/unx/profile.c
index a01d292e23b6..a0ea4c59ffdd 100644
--- a/sal/osl/unx/profile.c
+++ b/sal/osl/unx/profile.c
@@ -263,12 +263,9 @@ static oslProfile SAL_CALL osl_psz_openProfile(const sal_Char *pszProfileName, o
pProfile->m_Stamp = OslProfile_getFileStamp(pFile);
bRet=loadProfile(pFile, pProfile);
+ bRet &= realpath(pszProfileName, pProfile->m_FileName) != NULL;
OSL_ASSERT(bRet);
- /* #109261# using osl profiles is deprecated */
- /* OSL_VERIFY(NULL != realpath(pszProfileName, pProfile->m_FileName)); */
- realpath(pszProfileName, pProfile->m_FileName);
-
if (pProfile->m_pFile == NULL)
closeFileImpl(pFile,pProfile->m_Flags);
@@ -1338,6 +1335,7 @@ static osl_TStamp closeFileImpl(osl_TFile* pFile, oslProfileOption Flags)
static sal_Bool OslProfile_rewindFile(osl_TFile* pFile, sal_Bool bTruncate)
{
+ sal_Bool bRet = sal_True;
#ifdef TRACE_OSL_PROFILE
OSL_TRACE("In osl_OslProfile_rewindFile\n");
#endif
@@ -1349,14 +1347,14 @@ static sal_Bool OslProfile_rewindFile(osl_TFile* pFile, sal_Bool bTruncate)
#ifdef DEBUG_OSL_PROFILE
OSL_TRACE("rewinding\n");
#endif
- lseek(pFile->m_Handle, SEEK_SET, 0L);
+ bRet = (lseek(pFile->m_Handle, SEEK_SET, 0L) == 0L);
if (bTruncate)
{
#ifdef DEBUG_OSL_PROFILE
OSL_TRACE("truncating\n");
#endif
- ftruncate(pFile->m_Handle, 0L);
+ bRet &= (ftruncate(pFile->m_Handle, 0L) == 0);
}
}
@@ -1364,7 +1362,7 @@ static sal_Bool OslProfile_rewindFile(osl_TFile* pFile, sal_Bool bTruncate)
#ifdef TRACE_OSL_PROFILE
OSL_TRACE("Out osl_OslProfile_rewindFile [ok]\n");
#endif
- return (sal_True);
+ return bRet;
}
diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index 310dd57592f5..362f3b0f2644 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -48,7 +48,7 @@
#undef HAVE_POLL_H
#endif
-#if defined(LINUX) || defined (IRIX) || defined(NETBSD) || defined ( FREEBSD ) || defined (MACOSX)
+#if defined(LINUX) || defined(NETBSD) || defined ( FREEBSD ) || defined (MACOSX)
#include <sys/poll.h>
#define HAVE_POLL_H
#endif /* HAVE_POLL_H */
@@ -1869,10 +1869,13 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket)
if ( pSocket->m_bIsAccepting == sal_True )
{
int nConnFD;
- struct sockaddr aSockAddr;
- socklen_t nSockLen = sizeof(aSockAddr);
+ union {
+ struct sockaddr aSockAddr;
+ struct sockaddr_in aSockAddrIn;
+ } s;
+ socklen_t nSockLen = sizeof(s.aSockAddr);
- nRet = getsockname(nFD, &aSockAddr, &nSockLen);
+ nRet = getsockname(nFD, &s.aSockAddr, &nSockLen);
#if OSL_DEBUG_LEVEL > 1
if ( nRet < 0 )
{
@@ -1880,13 +1883,11 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket)
}
#endif /* OSL_DEBUG_LEVEL */
- if ( aSockAddr.sa_family == AF_INET )
+ if ( s.aSockAddr.sa_family == AF_INET )
{
- struct sockaddr_in* pSockAddrIn = (struct sockaddr_in*) &aSockAddr;
-
- if ( pSockAddrIn->sin_addr.s_addr == htonl(INADDR_ANY) )
+ if ( s.aSockAddrIn.sin_addr.s_addr == htonl(INADDR_ANY) )
{
- pSockAddrIn->sin_addr.s_addr = htonl(INADDR_LOOPBACK);
+ s.aSockAddrIn.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
}
nConnFD = socket(AF_INET, SOCK_STREAM, 0);
@@ -1897,7 +1898,7 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket)
}
#endif /* OSL_DEBUG_LEVEL */
- nRet = connect(nConnFD, &aSockAddr, sizeof(aSockAddr));
+ nRet = connect(nConnFD, &s.aSockAddr, sizeof(s.aSockAddr));
#if OSL_DEBUG_LEVEL > 1
if ( nRet < 0 )
{
diff --git a/sal/osl/unx/system.h b/sal/osl/unx/system.h
index c2e01126fb58..91f3b9fb7ae0 100644
--- a/sal/osl/unx/system.h
+++ b/sal/osl/unx/system.h
@@ -270,34 +270,6 @@ extern unsigned int nanosleep(unsigned int);
# define PTHREAD_SIGACTION cma_sigaction
#endif
-#ifdef IRIX
-# define AF_IPX -1
-# include <pthread.h>
-# include <semaphore.h>
-# include <sched.h>
-# include <sys/socket.h>
-# include <sys/un.h>
-# include <sys/stropts.h>
-# include <netinet/tcp.h>
-# include <sys/endian.h>
-# if BYTE_ORDER == LITTLE_ENDIAN
-# undef _BIG_ENDIAN
-# undef _PDP_ENDIAN
-# elif BYTE_ORDER == BIG_ENDIAN
-# undef _LITTLE_ENDIAN
-# undef _PDP_ENDIAN
-# elif BYTE_ORDER == PDP_ENDIAN
-# undef _LITTLE_ENDIAN
-# undef _BIG_ENDIAN
-# endif
-# define SA_FAMILY_DECL \
- union { struct { short sa_family2; } sa_generic; } sa_union
-# define NO_PTHREAD_PRIORITY
-# include <dlfcn.h>
-# define IOCHANNEL_TRANSFER_BSD
-extern char *strdup(const char *);
-#endif
-
#ifdef SOLARIS
# include <shadow.h>
# include <sys/un.h>
@@ -364,8 +336,7 @@ int macxp_resolveAlias(char *path, int buflen);
#if !defined(_WIN32) && !defined(_WIN16) && !defined(OS2) && \
!defined(LINUX) && !defined(NETBSD) && !defined(FREEBSD) && !defined(SCO) && \
!defined(AIX) && !defined(HPUX) && \
- !defined(SOLARIS) && !defined(IRIX) && \
- !defined(MACOSX)
+ !defined(SOLARIS) && !defined(MACOSX)
# error "Target platform not specified!"
#endif
diff --git a/sal/osl/w32/dllentry.c b/sal/osl/w32/dllentry.c
index 11928a3b6458..ac47b1ac6050 100644
--- a/sal/osl/w32/dllentry.c
+++ b/sal/osl/w32/dllentry.c
@@ -255,7 +255,7 @@ void do_cleanup( void )
*/
-#ifdef PRODUCT
+#ifndef DBG_UTIL
__try
#endif
{
@@ -267,7 +267,7 @@ void do_cleanup( void )
rtl_cache_fini();
rtl_arena_fini();
}
-#ifdef PRODUCT
+#ifndef DBG_UTIL
__except( EXCEPTION_EXECUTE_HANDLER )
{
}
diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx
index 34deba2293da..60c51cfb3a73 100644
--- a/sal/osl/w32/file.cxx
+++ b/sal/osl/w32/file.cxx
@@ -400,6 +400,7 @@ oslFileError FileHandle_Impl::readFileAt (
oslFileError result = syncFile();
if (result != osl_File_E_None)
return (result);
+ m_bufptr = -1, m_buflen = 0;
if (nBytesRequested >= m_bufsiz)
{
@@ -472,6 +473,7 @@ oslFileError FileHandle_Impl::writeFileAt (
oslFileError result = syncFile();
if (result != osl_File_E_None)
return (result);
+ m_bufptr = -1, m_buflen = 0;
if (nBytesToWrite >= m_bufsiz)
{
diff --git a/sal/qa/ByteSequence/ByteSequence.cxx b/sal/qa/ByteSequence/ByteSequence.cxx
index 16283a48da92..f1105298deaf 100644
--- a/sal/qa/ByteSequence/ByteSequence.cxx
+++ b/sal/qa/ByteSequence/ByteSequence.cxx
@@ -36,7 +36,7 @@
#include <rtl/byteseq.hxx>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
using namespace rtl;
diff --git a/sal/qa/ByteSequence/makefile.mk b/sal/qa/ByteSequence/makefile.mk
index a2ecbd5ccef1..0f1b88ac6e6a 100644
--- a/sal/qa/ByteSequence/makefile.mk
+++ b/sal/qa/ByteSequence/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -47,17 +47,10 @@ CXXFLAGS+= $(LFS_CFLAGS)
#----------------------------------- OStringBuffer -----------------------------------
SHL1OBJS= \
- $(SLO)$/ByteSequence.obj
+ $(SLO)$/ByteSequence.obj
SHL1TARGET= rtl_ByteSequence
-SHL1STDLIBS=\
- $(SALLIB)
-.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
-SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
-.ENDIF
-.IF "$(GUI)" == "UNX"
-SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
-.ENDIF
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
@@ -70,9 +63,7 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
SHL2OBJS= \
$(SLO)$/rtl_old_testbyteseq.obj
SHL2TARGET= rtl_old_testbyteseq
-SHL2STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL2IMPLIB= i$(SHL2TARGET)
diff --git a/sal/qa/ByteSequence/rtl_old_testbyteseq.cxx b/sal/qa/ByteSequence/rtl_old_testbyteseq.cxx
index 1c49a316c537..2cea6fa3a878 100644
--- a/sal/qa/ByteSequence/rtl_old_testbyteseq.cxx
+++ b/sal/qa/ByteSequence/rtl_old_testbyteseq.cxx
@@ -42,7 +42,7 @@
using namespace ::rtl;
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
namespace rtl_testbyteseq
diff --git a/sal/qa/OStringBuffer/makefile.mk b/sal/qa/OStringBuffer/makefile.mk
index be0f891cf8fc..d20c011a552e 100644
--- a/sal/qa/OStringBuffer/makefile.mk
+++ b/sal/qa/OStringBuffer/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -56,16 +56,7 @@ SHL1OBJS= \
$(SLO)$/rtl_String_Utils.obj
SHL1TARGET= rtl_OStringBuffer
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
-
-# .IF "$(GUI)" == "WNT"
-# SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
-# .ENDIF
-# .IF "$(GUI)" == "UNX"
-# SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
-# .ENDIF
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
diff --git a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
index df97eccf751e..2b3bbfd6caa3 100644
--- a/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
+++ b/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx
@@ -38,7 +38,7 @@
#include <rtl/strbuf.hxx>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
using namespace rtl;
diff --git a/sal/qa/osl/condition/makefile.mk b/sal/qa/osl/condition/makefile.mk
index fd58c9e633a3..586908e93032 100644
--- a/sal/qa/osl/condition/makefile.mk
+++ b/sal/qa/osl/condition/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -44,19 +44,12 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:Condition by codegen.pl
+# auto generated Target:Condition by codegen.pl
SHL1OBJS= \
$(SLO)$/osl_Condition.obj
SHL1TARGET= osl_Condition
-SHL1STDLIBS=\
- $(SALLIB)
-.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
-SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
-.ENDIF
-.IF "$(GUI)" == "UNX"
-SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
-.ENDIF
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
diff --git a/sal/qa/osl/condition/osl_Condition_Const.h b/sal/qa/osl/condition/osl_Condition_Const.h
index c04261176ee6..608bd38e3a64 100644
--- a/sal/qa/osl/condition/osl_Condition_Const.h
+++ b/sal/qa/osl/condition/osl_Condition_Const.h
@@ -59,7 +59,7 @@
#include <unistd.h>
#endif
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#define OSLTEST_DECLARE_USTRING( str_name, str_value ) \
::rtl::OUString a##str_name = rtl::OUString::createFromAscii( str_value )
diff --git a/sal/qa/osl/file/makefile.mk b/sal/qa/osl/file/makefile.mk
index 7c6d1232c1a0..0d83a06b7124 100644
--- a/sal/qa/osl/file/makefile.mk
+++ b/sal/qa/osl/file/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -47,15 +47,7 @@ CXXFLAGS+= $(LFS_CFLAGS)
SHL1OBJS= \
$(SLO)$/osl_File.obj
SHL1TARGET= osl_File
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
-# .IF "$(GUI)" == "WNT"
-# SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
-# .ENDIF
-# .IF "$(GUI)" == "UNX"
-# SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
-# .ENDIF
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
@@ -66,13 +58,7 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
SHL2OBJS=$(SLO)$/test_cpy_wrt_file.obj
SHL2TARGET=tcwf
-SHL2STDLIBS=$(SALLIB)
-.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
-SHL2STDLIBS+=$(SOLARLIBDIR)$/cppunit.lib
-.ENDIF
-.IF "$(GUI)" == "UNX"
-SHL2STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
-.ENDIF
+SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL2IMPLIB=i$(SHL2TARGET)
SHL2DEF=$(MISC)$/$(SHL2TARGET).def
SHL2VERSIONMAP = $(PRJ)$/qa$/export.map
@@ -85,9 +71,7 @@ DEF2NAME =$(SHL2TARGET)
SHL3OBJS= \
$(SLO)$/osl_old_test_file.obj
SHL3TARGET= osl_old_test_file
-SHL3STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL3STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL3IMPLIB= i$(SHL3TARGET)
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index 3a44c565d162..a1cb3fa54e9e 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -44,7 +44,7 @@
#include <osl/file.hxx>
#include <osl_File_Const.h>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
// #ifdef WNT
// # define UNICODE
diff --git a/sal/qa/osl/file/osl_old_test_file.cxx b/sal/qa/osl/file/osl_old_test_file.cxx
index 18be1d38e40c..64258b8e9006 100644
--- a/sal/qa/osl/file/osl_old_test_file.cxx
+++ b/sal/qa/osl/file/osl_old_test_file.cxx
@@ -51,7 +51,7 @@
#define TEST_VOLUME "c:/"
#endif
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
namespace osl_test_file
{
diff --git a/sal/qa/osl/file/test_cpy_wrt_file.cxx b/sal/qa/osl/file/test_cpy_wrt_file.cxx
index 6c4986f485b3..05910ea3ddd7 100755
--- a/sal/qa/osl/file/test_cpy_wrt_file.cxx
+++ b/sal/qa/osl/file/test_cpy_wrt_file.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sal.hxx"
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include <osl/file.hxx>
#include <osl/thread.h>
#include <rtl/ustring.hxx>
diff --git a/sal/qa/osl/module/makefile.mk b/sal/qa/osl/module/makefile.mk
index d3500d267020..40f597bdbbc7 100644
--- a/sal/qa/osl/module/makefile.mk
+++ b/sal/qa/osl/module/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -48,7 +48,7 @@ CXXFLAGS+= $(LFS_CFLAGS)
# --- test dll ------------------------------------------------------
SHL1TARGET = Module_DLL
SHL1OBJS = $(SLO)$/osl_Module_DLL.obj
-SHL1STDLIBS = $(SALLIB)
+SHL1STDLIBS = $(SALLIB)
SHL1IMPLIB = i$(SHL1TARGET)
SHL1DEF = $(MISC)$/$(SHL1TARGET).def
DEF1NAME = $(SHL1TARGET)
@@ -59,21 +59,16 @@ SHL1VERSIONMAP = export_dll.map
SHL2OBJS= $(SLO)$/osl_Module.obj
SHL2TARGET= osl_Module
-SHL2STDLIBS= $(SALLIB)
+SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
.IF "$(GUI)" == "WNT"
-SHL2STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
SHL2STDLIBS+=i$(SHL2TARGET).lib
.ENDIF
-.IF "$(GUI)" == "OS2"
-SHL2STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
-.ENDIF
.IF "$(GUI)" == "UNX"
-SHL2STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
APP3STDLIBS+=-l$(SHL2TARGET)
.ENDIF
-SHL2DEPN= $(SHL1OBJS)
+SHL2DEPN= $(SHL1OBJS)
SHL2IMPLIB= i$(SHL2TARGET)
SHL2DEF= $(MISC)$/$(SHL2TARGET).def
diff --git a/sal/qa/osl/module/osl_Module_Const.h b/sal/qa/osl/module/osl_Module_Const.h
index beeb4a800a11..ad954b5cb4ad 100644
--- a/sal/qa/osl/module/osl_Module_Const.h
+++ b/sal/qa/osl/module/osl_Module_Const.h
@@ -37,7 +37,7 @@
#include <osl/module.hxx>
#include <osl/file.hxx>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#if ( defined UNX ) || ( defined OS2 ) //Unix
# include <unistd.h>
diff --git a/sal/qa/osl/module/osl_Module_DLL.cxx b/sal/qa/osl/module/osl_Module_DLL.cxx
index ed7874eb11b5..46610f35f22c 100644
--- a/sal/qa/osl/module/osl_Module_DLL.cxx
+++ b/sal/qa/osl/module/osl_Module_DLL.cxx
@@ -33,7 +33,7 @@
#include <stdio.h>
#include <sal/types.h>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
extern "C" sal_Bool SAL_CALL firstfunc( sal_Bool bRes )
{
diff --git a/sal/qa/osl/mutex/makefile.mk b/sal/qa/osl/mutex/makefile.mk
index 44c5b6b46f7f..7c8cfeb39037 100755
--- a/sal/qa/osl/mutex/makefile.mk
+++ b/sal/qa/osl/mutex/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -44,22 +44,16 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:Socket by codegen.pl
+# auto generated Target:Socket by codegen.pl
SHL1OBJS= \
$(SLO)$/osl_Mutex.obj
SHL1TARGET= osl_Mutex
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
.IF "$(GUI)" == "WNT"
SHL1STDLIBS += $(WS2_32LIB)
.ENDIF
-.IF "$(GUI)" == "OS2"
-SHL1STDLIBS += $(SOLARLIBDIR)$/cppunit.lib
-.ENDIF
-
.IF "$(GUI)" == "UNX"
SHL1STDLIBS += -ldl -lnsl
.ENDIF
diff --git a/sal/qa/osl/mutex/osl_Mutex_Const.h b/sal/qa/osl/mutex/osl_Mutex_Const.h
index 789b9e91c007..a13f40ab9605 100755
--- a/sal/qa/osl/mutex/osl_Mutex_Const.h
+++ b/sal/qa/osl/mutex/osl_Mutex_Const.h
@@ -49,7 +49,7 @@
#endif
#include <osl/time.h>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#ifdef UNX
#include <unistd.h>
diff --git a/sal/qa/osl/pipe/makefile.mk b/sal/qa/osl/pipe/makefile.mk
index 636bdde7de82..3d0df14bbd69 100644
--- a/sal/qa/osl/pipe/makefile.mk
+++ b/sal/qa/osl/pipe/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -44,21 +44,12 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:Pipe by codegen.pl
+# auto generated Target:Pipe by codegen.pl
SHL1OBJS= \
$(SLO)$/osl_Pipe.obj
SHL1TARGET= osl_Pipe
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
-
-#.IF "$(GUI)" == "WNT"
-#SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
-#.ENDIF
-#.IF "$(GUI)" == "UNX"
-#SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
-#.ENDIF
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
diff --git a/sal/qa/osl/pipe/osl_Pipe.cxx b/sal/qa/osl/pipe/osl_Pipe.cxx
index 4f0da4ea686e..c2b2ae740527 100644
--- a/sal/qa/osl/pipe/osl_Pipe.cxx
+++ b/sal/qa/osl/pipe/osl_Pipe.cxx
@@ -35,7 +35,7 @@
// include files
//------------------------------------------------------------------------
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include <sal/types.h>
#include <rtl/ustring.hxx>
diff --git a/sal/qa/osl/process/makefile.mk b/sal/qa/osl/process/makefile.mk
index 17f6ab46bd5a..32e97f3c162d 100644
--- a/sal/qa/osl/process/makefile.mk
+++ b/sal/qa/osl/process/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -45,7 +45,7 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:testjob by codegen.pl
+# auto generated Target:testjob by codegen.pl
.IF "$(GUI)" == "WNT"
CFLAGS+=/Ob1
@@ -55,17 +55,7 @@ SHL1OBJS= \
$(SLO)$/osl_Thread.obj
SHL1TARGET= osl_Thread
-SHL1STDLIBS=\
- $(SALLIB)
-.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
-SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
-.ENDIF
-.IF "$(GUI)" == "UNX"
-SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
-# .IF "$(OS)" == "SOLARIS"
-# SHL1STDLIBS += -lrt -laio
-# .ENDIF
-.ENDIF
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
@@ -82,14 +72,7 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
SHL2OBJS=$(SLO)$/osl_process.obj
SHL2TARGET=osl_process
-SHL2STDLIBS=$(SALLIB)
-
-.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
-SHL2STDLIBS+=$(SOLARLIBDIR)$/cppunit.lib
-.ENDIF
-.IF "$(GUI)" == "UNX"
-SHL2STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
-.ENDIF
+SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL2IMPLIB=i$(SHL2TARGET)
SHL2DEF=$(MISC)$/$(SHL2TARGET).def
@@ -98,7 +81,7 @@ DEF2EXPORTFILE=export.exp
# END ------------------------------------------------------------------
-OBJ3FILES=$(OBJ)$/osl_process_child.obj
+OBJ3FILES=$(OBJ)$/osl_process_child.obj
APP3TARGET=osl_process_child
APP3OBJS=$(OBJ3FILES)
diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx
index 9f666acc9659..88f796b6728c 100644
--- a/sal/qa/osl/process/osl_Thread.cxx
+++ b/sal/qa/osl/process/osl_Thread.cxx
@@ -52,7 +52,7 @@
#endif
#include <osl/time.h>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
using namespace osl;
using namespace rtl;
diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx
index 7fb794925ed2..a0fe5182daa1 100644
--- a/sal/qa/osl/process/osl_process.cxx
+++ b/sal/qa/osl/process/osl_process.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sal.hxx"
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include <osl/process.h>
#include <osl/file.hxx>
#include <osl/thread.h>
diff --git a/sal/qa/osl/profile/makefile.mk b/sal/qa/osl/profile/makefile.mk
index d685655feb86..482bc69276a2 100644
--- a/sal/qa/osl/profile/makefile.mk
+++ b/sal/qa/osl/profile/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -48,9 +48,7 @@ SHL1OBJS= \
$(SLO)$/osl_old_testprofile.obj
SHL1TARGET= osl_old_testprofile
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
DEF1NAME =$(SHL1TARGET)
@@ -61,7 +59,7 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
#------------------------------- All object files -------------------------------
# do this here, so we get right dependencies
SLOFILES=\
- $(SHL1OBJS)
+ $(SHL1OBJS)
# --- Targets ------------------------------------------------------
diff --git a/sal/qa/osl/profile/osl_old_testprofile.cxx b/sal/qa/osl/profile/osl_old_testprofile.cxx
index d5a6b3d92468..27e4cbe6b35b 100644
--- a/sal/qa/osl/profile/osl_old_testprofile.cxx
+++ b/sal/qa/osl/profile/osl_old_testprofile.cxx
@@ -40,7 +40,7 @@
#include <stdio.h>
#include <osl/profile.h>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
//==================================================================================================
// -----------------------------------------------------------------------------
diff --git a/sal/qa/osl/security/makefile.mk b/sal/qa/osl/security/makefile.mk
index 5896f1b6108d..6bcc6fc9f6d3 100755
--- a/sal/qa/osl/security/makefile.mk
+++ b/sal/qa/osl/security/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -44,23 +44,15 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:Security by codegen.pl
+# auto generated Target:Security by codegen.pl
SHL1OBJS= \
$(SLO)$/osl_Security.obj
SHL1TARGET= osl_Security
-SHL1STDLIBS=\
- $(SALLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
.IF "$(GUI)" == "WNT"
-SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
SHL1STDLIBS+= $(ADVAPI32LIB)
.ENDIF
-.IF "$(GUI)" == "OS2"
-SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
-.ENDIF
-.IF "$(GUI)" == "UNX"
-SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
-.ENDIF
SHL1IMPLIB= i$(SHL1TARGET)
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
diff --git a/sal/qa/osl/security/osl_Security_Const.h b/sal/qa/osl/security/osl_Security_Const.h
index 428d6bb30fc6..ca08e3025b38 100755
--- a/sal/qa/osl/security/osl_Security_Const.h
+++ b/sal/qa/osl/security/osl_Security_Const.h
@@ -57,7 +57,7 @@
#include <pwd.h>
#endif
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
// LLA: #include <testshl2/cmdlinebits.hxx>
diff --git a/sal/qa/osl/semaphore/makefile.mk b/sal/qa/osl/semaphore/makefile.mk
index d5ad5e532626..a8918dcfb12b 100644
--- a/sal/qa/osl/semaphore/makefile.mk
+++ b/sal/qa/osl/semaphore/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -44,19 +44,12 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:Semaphore by codegen.pl
+# auto generated Target:Semaphore by codegen.pl
SHL1OBJS= \
$(SLO)$/osl_Semaphore.obj
SHL1TARGET= osl_Semaphore
-SHL1STDLIBS=\
- $(SALLIB)
-.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
-SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
-.ENDIF
-.IF "$(GUI)" == "UNX"
-SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
-.ENDIF
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
diff --git a/sal/qa/osl/semaphore/osl_Semaphore_Const.h b/sal/qa/osl/semaphore/osl_Semaphore_Const.h
index f1aafa3a6244..c9f1149674f4 100644
--- a/sal/qa/osl/semaphore/osl_Semaphore_Const.h
+++ b/sal/qa/osl/semaphore/osl_Semaphore_Const.h
@@ -51,7 +51,7 @@
#endif
#include <osl/time.h>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#ifdef UNX
#include <unistd.h>
diff --git a/sal/qa/osl/socket/makefile.mk b/sal/qa/osl/socket/makefile.mk
index 5bcb252d187a..134bcadb55aa 100755
--- a/sal/qa/osl/socket/makefile.mk
+++ b/sal/qa/osl/socket/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -44,22 +44,18 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:Socket by codegen.pl
+# auto generated Target:Socket by codegen.pl
SHL1OBJS= \
$(SLO)$/osl_Socket.obj
SHL1TARGET=osl_SocketOld
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $CPPUNITLIB) $(TESTSHL2LIB)
.IF "$(GUI)" == "WNT"
-#SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
SHL1STDLIBS+= $(WS2_32LIB)
.ENDIF
.IF "$(GUI)" == "UNX"
-#SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
SHL1STDLIBS+= -ldl -lnsl
.ENDIF
@@ -75,9 +71,7 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
SHL2OBJS= \
$(SLO)$/osl_Socket_tests.obj
SHL2TARGET= osl_Socket_tests
-SHL2STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL2STDLIBS= $(SALLIB) $CPPUNITLIB) $(TESTSHL2LIB)
SHL2IMPLIB= i$(SHL2TARGET)
DEF2NAME= $(SHL2TARGET)
@@ -86,15 +80,13 @@ SHL2VERSIONMAP = $(PRJ)$/qa$/export.map
# END --------------------------------------------------------------
# BEGIN ----------------------------------------------------------------
-# auto generated Target:Socket by codegen.pl
+# auto generated Target:Socket by codegen.pl
SHL3OBJS= \
$(SLO)$/sockethelper.obj \
$(SLO)$/osl_StreamSocket.obj
SHL3TARGET= osl_StreamSocket
-SHL3STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL3STDLIBS= $(SALLIB) $CPPUNITLIB) $(TESTSHL2LIB)
.IF "$(GUI)" == "WNT"
SHL3STDLIBS += $(WS2_32LIB)
@@ -111,15 +103,13 @@ SHL3VERSIONMAP = $(PRJ)$/qa$/export.map
# END ------------------------------------------------------------------
# BEGIN ----------------------------------------------------------------
-# auto generated Target:Socket by codegen.pl
+# auto generated Target:Socket by codegen.pl
SHL4OBJS= \
$(SLO)$/sockethelper.obj \
$(SLO)$/osl_DatagramSocket.obj
SHL4TARGET= osl_DatagramSocket
-SHL4STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL4STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
.IF "$(GUI)" == "WNT"
SHL4STDLIBS += $(WS2_32LIB)
@@ -136,15 +126,13 @@ SHL4VERSIONMAP = $(PRJ)$/qa$/export.map
# END ------------------------------------------------------------------
# BEGIN ----------------------------------------------------------------
-# auto generated Target:Socket by codegen.pl
+# auto generated Target:Socket by codegen.pl
SHL5OBJS= \
$(SLO)$/sockethelper.obj \
$(SLO)$/osl_SocketAddr.obj
SHL5TARGET= osl_SocketAddr
-SHL5STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL5STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
.IF "$(GUI)" == "WNT"
SHL5STDLIBS += $(WS2_32LIB)
@@ -161,15 +149,13 @@ SHL5VERSIONMAP = $(PRJ)$/qa$/export.map
# END ------------------------------------------------------------------
# BEGIN ----------------------------------------------------------------
-# auto generated Target:Socket by codegen.pl
+# auto generated Target:Socket by codegen.pl
SHL6OBJS= \
$(SLO)$/sockethelper.obj \
$(SLO)$/osl_Socket2.obj
SHL6TARGET= osl_Socket2
-SHL6STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL6STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
.IF "$(GUI)" == "WNT"
SHL6STDLIBS += $(WS2_32LIB)
@@ -186,15 +172,13 @@ SHL6VERSIONMAP = $(PRJ)$/qa$/export.map
# END ------------------------------------------------------------------
# BEGIN ----------------------------------------------------------------
-# auto generated Target:Socket by codegen.pl
+# auto generated Target:Socket by codegen.pl
SHL7OBJS= \
$(SLO)$/sockethelper.obj \
$(SLO)$/osl_ConnectorSocket.obj
SHL7TARGET= osl_ConnectorSocket
-SHL7STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL7STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
.IF "$(GUI)" == "WNT"
SHL7STDLIBS += $(WS2_32LIB)
@@ -211,15 +195,13 @@ SHL7VERSIONMAP = $(PRJ)$/qa$/export.map
# END ------------------------------------------------------------------
# BEGIN ----------------------------------------------------------------
-# auto generated Target:Socket by codegen.pl
+# auto generated Target:Socket by codegen.pl
SHL8OBJS= \
$(SLO)$/sockethelper.obj \
$(SLO)$/osl_AcceptorSocket.obj
SHL8TARGET= osl_AcceptorSocket
-SHL8STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL8STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
.IF "$(GUI)" == "WNT"
SHL8STDLIBS += $(WS2_32LIB)
diff --git a/sal/qa/osl/socket/osl_AcceptorSocket.cxx b/sal/qa/osl/socket/osl_AcceptorSocket.cxx
index 002e27efbd0e..6325385b62ee 100644
--- a/sal/qa/osl/socket/osl_AcceptorSocket.cxx
+++ b/sal/qa/osl/socket/osl_AcceptorSocket.cxx
@@ -61,7 +61,7 @@
// include files
//------------------------------------------------------------------------
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include "osl_Socket_Const.h"
#include "sockethelper.hxx"
diff --git a/sal/qa/osl/socket/osl_ConnectorSocket.cxx b/sal/qa/osl/socket/osl_ConnectorSocket.cxx
index e3f4ad3e5bea..52c1b12b687e 100644
--- a/sal/qa/osl/socket/osl_ConnectorSocket.cxx
+++ b/sal/qa/osl/socket/osl_ConnectorSocket.cxx
@@ -61,7 +61,7 @@
// include files
//------------------------------------------------------------------------
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include "osl_Socket_Const.h"
#include "sockethelper.hxx"
diff --git a/sal/qa/osl/socket/osl_DatagramSocket.cxx b/sal/qa/osl/socket/osl_DatagramSocket.cxx
index 4e714d0b655b..4cf27a90ad90 100644
--- a/sal/qa/osl/socket/osl_DatagramSocket.cxx
+++ b/sal/qa/osl/socket/osl_DatagramSocket.cxx
@@ -61,7 +61,7 @@
// include files
//------------------------------------------------------------------------
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
//#include "osl_Socket_Const.h"
#include "sockethelper.hxx"
diff --git a/sal/qa/osl/socket/osl_Socket.cxx b/sal/qa/osl/socket/osl_Socket.cxx
index 20f2a80d04da..ccc87ee23a1d 100755
--- a/sal/qa/osl/socket/osl_Socket.cxx
+++ b/sal/qa/osl/socket/osl_Socket.cxx
@@ -66,7 +66,7 @@
#include <osl_Socket_Const_orig.h>
#endif
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
using namespace osl;
using namespace rtl;
diff --git a/sal/qa/osl/socket/osl_Socket2.cxx b/sal/qa/osl/socket/osl_Socket2.cxx
index 29a7924c5503..a7b0ecfa1ef7 100644
--- a/sal/qa/osl/socket/osl_Socket2.cxx
+++ b/sal/qa/osl/socket/osl_Socket2.cxx
@@ -61,7 +61,7 @@
// include files
//------------------------------------------------------------------------
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
//#include "osl_Socket_Const.h"
#include "sockethelper.hxx"
diff --git a/sal/qa/osl/socket/osl_SocketAddr.cxx b/sal/qa/osl/socket/osl_SocketAddr.cxx
index e9db614bade8..63ca58f67936 100644
--- a/sal/qa/osl/socket/osl_SocketAddr.cxx
+++ b/sal/qa/osl/socket/osl_SocketAddr.cxx
@@ -61,7 +61,7 @@
// include files
//------------------------------------------------------------------------
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
//#include "osl_Socket_Const.h"
#include "sockethelper.hxx"
diff --git a/sal/qa/osl/socket/osl_Socket_tests.cxx b/sal/qa/osl/socket/osl_Socket_tests.cxx
index 3122b27b1f1a..7f0fb5bbe87e 100644
--- a/sal/qa/osl/socket/osl_Socket_tests.cxx
+++ b/sal/qa/osl/socket/osl_Socket_tests.cxx
@@ -36,7 +36,7 @@
//------------------------------------------------------------------------
#include <osl_Socket_Const.h>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include <osl/socket.hxx>
//------------------------------------------------------------------------
// helper functions
diff --git a/sal/qa/osl/socket/osl_StreamSocket.cxx b/sal/qa/osl/socket/osl_StreamSocket.cxx
index 0d5a1e54739f..9769d13adb0f 100644
--- a/sal/qa/osl/socket/osl_StreamSocket.cxx
+++ b/sal/qa/osl/socket/osl_StreamSocket.cxx
@@ -61,7 +61,7 @@
// include files
//------------------------------------------------------------------------
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
//#include "osl_Socket_Const.h"
#include "sockethelper.hxx"
diff --git a/sal/qa/osl/socket/sockethelper.cxx b/sal/qa/osl/socket/sockethelper.cxx
index c10ebcb2c8ca..681858f15dc1 100644
--- a/sal/qa/osl/socket/sockethelper.cxx
+++ b/sal/qa/osl/socket/sockethelper.cxx
@@ -32,7 +32,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sal.hxx"
#include "sockethelper.hxx"
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
//------------------------------------------------------------------------
// Ip version definition
diff --git a/sal/qa/osl/thread/makefile.mk b/sal/qa/osl/thread/makefile.mk
index e74400ba6aff..86551fc6771b 100644
--- a/sal/qa/osl/thread/makefile.mk
+++ b/sal/qa/osl/thread/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -41,7 +41,7 @@ DLLPRE = # no leading "lib" on .so files
SHL1TARGET = $(TARGET)
SHL1OBJS = $(SLO)$/test_thread.obj
-SHL1STDLIBS = $(CPPUNITLIB) $(SALLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1VERSIONMAP = version.map
SHL1IMPLIB = i$(SHL1TARGET)
DEF1NAME = $(SHL1TARGET)
diff --git a/sal/qa/osl/thread/test_thread.cxx b/sal/qa/osl/thread/test_thread.cxx
index 59c857c82b2f..21fd2e297fe0 100644
--- a/sal/qa/osl/thread/test_thread.cxx
+++ b/sal/qa/osl/thread/test_thread.cxx
@@ -33,7 +33,7 @@
#include "sal/config.h"
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include "osl/conditn.hxx"
#include "osl/thread.hxx"
#include "osl/time.h"
diff --git a/sal/qa/rtl/alloc/makefile.mk b/sal/qa/rtl/alloc/makefile.mk
index 4fad638942fb..ce88442a5574 100755
--- a/sal/qa/rtl/alloc/makefile.mk
+++ b/sal/qa/rtl/alloc/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -45,20 +45,12 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:jobfile by codegen.pl
+# auto generated Target:jobfile by codegen.pl
SHL1OBJS= \
$(SLO)$/rtl_alloc.obj
SHL1TARGET= rtl_Alloc
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
-# .IF "$(GUI)" == "WNT"
-# SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
-# .ENDIF
-# .IF "$(GUI)" == "UNX"
-# SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
-# .ENDIF
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
diff --git a/sal/qa/rtl/alloc/rtl_alloc.cxx b/sal/qa/rtl/alloc/rtl_alloc.cxx
index 75173f3aaf86..ae9a1e9e9587 100755
--- a/sal/qa/rtl/alloc/rtl_alloc.cxx
+++ b/sal/qa/rtl/alloc/rtl_alloc.cxx
@@ -34,7 +34,7 @@
// autogenerated file with codegen.pl
#include <rtl/alloc.h>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
namespace rtl_alloc
{
diff --git a/sal/qa/rtl/bootstrap/makefile.mk b/sal/qa/rtl/bootstrap/makefile.mk
index ff47fa6c78d2..a492af8dd3c5 100644
--- a/sal/qa/rtl/bootstrap/makefile.mk
+++ b/sal/qa/rtl/bootstrap/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -55,14 +55,12 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:joblist by codegen.pl
+# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
$(SLO)$/rtl_Bootstrap.obj
SHL1TARGET= rtl_Bootstrap
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
@@ -72,7 +70,7 @@ DEF1NAME =$(SHL1TARGET)
SHL1VERSIONMAP= $(PRJ)$/qa$/export.map
# END ------------------------------------------------------------------
-OBJ2FILES=$(OBJ)$/bootstrap_process.obj
+OBJ2FILES=$(OBJ)$/bootstrap_process.obj
APP2TARGET=bootstrap_process
APP2OBJS=$(OBJ2FILES)
diff --git a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx
index 85efcfa55b34..520c1298030f 100644
--- a/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx
+++ b/sal/qa/rtl/bootstrap/rtl_Bootstrap.cxx
@@ -39,9 +39,9 @@
#include <stdlib.h>
#include <algorithm> // STL
-#include "cppunit/stringhelper.hxx"
+#include "testshl/stringhelper.hxx"
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
//#include "stringhelper.hxx"
//#include "valueequal.hxx"
#include <rtl/bootstrap.hxx>
diff --git a/sal/qa/rtl/cipher/makefile.mk b/sal/qa/rtl/cipher/makefile.mk
index c8d508f8b9ef..fc7a975651f5 100644
--- a/sal/qa/rtl/cipher/makefile.mk
+++ b/sal/qa/rtl/cipher/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -45,14 +45,12 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:joblist by codegen.pl
+# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
$(SLO)$/rtl_cipher.obj
SHL1TARGET= rtl_cipher
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
diff --git a/sal/qa/rtl/cipher/rtl_cipher.cxx b/sal/qa/rtl/cipher/rtl_cipher.cxx
index c51344cdc83e..a55f4a20d6fe 100644
--- a/sal/qa/rtl/cipher/rtl_cipher.cxx
+++ b/sal/qa/rtl/cipher/rtl_cipher.cxx
@@ -32,7 +32,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sal.hxx"
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include <rtl/strbuf.hxx>
#include <rtl/cipher.h>
diff --git a/sal/qa/rtl/crc32/makefile.mk b/sal/qa/rtl/crc32/makefile.mk
index aa24d698ea30..8b1ee4a6f350 100755
--- a/sal/qa/rtl/crc32/makefile.mk
+++ b/sal/qa/rtl/crc32/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -45,19 +45,12 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:jobfile by codegen.pl
+# auto generated Target:jobfile by codegen.pl
SHL1OBJS= \
$(SLO)$/rtl_crc32.obj
SHL1TARGET= rtl_crc32
-SHL1STDLIBS=\
- $(SALLIB)
-.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
-SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
-.ENDIF
-.IF "$(GUI)" == "UNX"
-SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
-.ENDIF
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
diff --git a/sal/qa/rtl/crc32/rtl_crc32.cxx b/sal/qa/rtl/crc32/rtl_crc32.cxx
index fa5870c9c8dd..09f492376ba2 100755
--- a/sal/qa/rtl/crc32/rtl_crc32.cxx
+++ b/sal/qa/rtl/crc32/rtl_crc32.cxx
@@ -33,7 +33,7 @@
#include "precompiled_sal.hxx"
// autogenerated file with codegen.pl
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include <rtl/crc.h>
namespace rtl_CRC32
diff --git a/sal/qa/rtl/digest/makefile.mk b/sal/qa/rtl/digest/makefile.mk
index a80835047d8b..7786522901ee 100644
--- a/sal/qa/rtl/digest/makefile.mk
+++ b/sal/qa/rtl/digest/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -48,12 +48,10 @@ CXXFLAGS+= $(LFS_CFLAGS)
#----------------------------------- OStringBuffer -----------------------------------
SHL1OBJS= \
- $(SLO)$/rtl_digest.obj
+ $(SLO)$/rtl_digest.obj
SHL1TARGET= rtl_digest
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
DEF1NAME= $(SHL1TARGET)
diff --git a/sal/qa/rtl/digest/rtl_digest.cxx b/sal/qa/rtl/digest/rtl_digest.cxx
index 151b01f8994c..9f8dd3f24542 100644
--- a/sal/qa/rtl/digest/rtl_digest.cxx
+++ b/sal/qa/rtl/digest/rtl_digest.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sal.hxx"
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include <rtl/digest.h>
#include <rtl/ustring.hxx>
diff --git a/sal/qa/rtl/doublelock/makefile.mk b/sal/qa/rtl/doublelock/makefile.mk
index 7ee93688eff2..b46518fb2e68 100644
--- a/sal/qa/rtl/doublelock/makefile.mk
+++ b/sal/qa/rtl/doublelock/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -45,7 +45,7 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:testjob by codegen.pl
+# auto generated Target:testjob by codegen.pl
.IF "$(GUI)" == "WNT"
CFLAGS+=/Ob1
@@ -55,9 +55,7 @@ SHL1OBJS= \
$(SLO)$/rtl_doublelocking.obj
SHL1TARGET= rtl_doublelocking
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
DEF1NAME =$(SHL1TARGET)
diff --git a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
index 2f3f004dbabc..cbcc334d3134 100644
--- a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
+++ b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx
@@ -46,7 +46,7 @@
#include <rtl/instance.hxx>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
// -----------------------------------------------------------------------------
#define CONST_TEST_STRING "gregorian"
diff --git a/sal/qa/rtl/locale/makefile.mk b/sal/qa/rtl/locale/makefile.mk
index 6ad4991bcfd9..8e4710c5ac6b 100644
--- a/sal/qa/rtl/locale/makefile.mk
+++ b/sal/qa/rtl/locale/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -45,14 +45,12 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:locale by codegen.pl
+# auto generated Target:locale by codegen.pl
SHL1OBJS= \
$(SLO)$/rtl_locale.obj
SHL1TARGET= rtl_locale
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
diff --git a/sal/qa/rtl/locale/rtl_locale.cxx b/sal/qa/rtl/locale/rtl_locale.cxx
index 91fb285db98a..c677259038f3 100644
--- a/sal/qa/rtl/locale/rtl_locale.cxx
+++ b/sal/qa/rtl/locale/rtl_locale.cxx
@@ -33,7 +33,7 @@
#include "precompiled_sal.hxx"
// autogenerated file with codegen.pl
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include <rtl/locale.hxx>
#include <osl/thread.h>
diff --git a/sal/qa/rtl/logfile/makefile.mk b/sal/qa/rtl/logfile/makefile.mk
index 23a5979237d9..da70d7533fa0 100644
--- a/sal/qa/rtl/logfile/makefile.mk
+++ b/sal/qa/rtl/logfile/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -47,9 +47,7 @@ CXXFLAGS+= $(LFS_CFLAGS)
SHL1OBJS= \
$(SLO)$/rtl_logfile.obj
SHL1TARGET= rtl_logfile
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
DEF1NAME =$(SHL1TARGET)
diff --git a/sal/qa/rtl/logfile/rtl_logfile.cxx b/sal/qa/rtl/logfile/rtl_logfile.cxx
index 9ed83adf9c09..d589cfb2bf04 100644
--- a/sal/qa/rtl/logfile/rtl_logfile.cxx
+++ b/sal/qa/rtl/logfile/rtl_logfile.cxx
@@ -46,7 +46,7 @@
#endif
#include <rtl/logfile.hxx>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
// #ifndef _OSL_MODULE_HXX_
// #include <osl/module.hxx>
diff --git a/sal/qa/rtl/math/makefile.mk b/sal/qa/rtl/math/makefile.mk
index 14e8cec2ec9c..5db3ffdd2028 100644
--- a/sal/qa/rtl/math/makefile.mk
+++ b/sal/qa/rtl/math/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -48,17 +48,10 @@ CXXFLAGS+= $(LFS_CFLAGS)
#----------------------------------- OStringBuffer -----------------------------------
SHL1OBJS= \
- $(SLO)$/test_rtl_math.obj
+ $(SLO)$/test_rtl_math.obj
SHL1TARGET= rtl_math
-SHL1STDLIBS=\
- $(SALLIB)
-.IF "$(GUI)" == "WNT" || "$(GUI)" == "OS2"
-SHL1STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
-.ENDIF
-.IF "$(GUI)" == "UNX"
-SHL1STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
-.ENDIF
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
@@ -71,9 +64,7 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
SHL2OBJS= \
$(SLO)$/rtl_math.obj
SHL2TARGET= rtl_math2
-SHL2STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL2IMPLIB= i$(SHL2TARGET)
DEF2NAME= $(SHL2TARGET)
@@ -90,14 +81,12 @@ SHL2VERSIONMAP = $(PRJ)$/qa$/export.map
# SHL3OBJS= \
# $(SLO)$/rtl_old_testint64.obj
# SHL3TARGET= rtl_old_testint64
-# SHL3STDLIBS=\
-# $(SALLIB) \
-# $(CPPUNITLIB)
-#
+# SHL3STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
+#
# SHL3IMPLIB= i$(SHL3TARGET)
# DEF3NAME= $(SHL3TARGET)
# SHL3VERSIONMAP = $(PRJ)$/qa$/export.map
-#
+#
#------------------------------- All object files -------------------------------
# do this here, so we get right dependencies
diff --git a/sal/qa/rtl/math/rtl_math.cxx b/sal/qa/rtl/math/rtl_math.cxx
index 34d851b4f2e7..a9c16541e524 100644
--- a/sal/qa/rtl/math/rtl_math.cxx
+++ b/sal/qa/rtl/math/rtl_math.cxx
@@ -37,7 +37,7 @@
#endif
#include <math.h>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include <rtl/math.h>
#include <rtl/string.hxx>
diff --git a/sal/qa/rtl/math/rtl_old_testint64.cxx b/sal/qa/rtl/math/rtl_old_testint64.cxx
index e0059b200db6..923c464186f3 100644
--- a/sal/qa/rtl/math/rtl_old_testint64.cxx
+++ b/sal/qa/rtl/math/rtl_old_testint64.cxx
@@ -49,7 +49,7 @@
// #define TEST_ENSURE(c, m) OSL_VERIFY(c)
// #endif
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
// -----------------------------------------------------------------------------
namespace rtl_math
diff --git a/sal/qa/rtl/ostring/makefile.mk b/sal/qa/rtl/ostring/makefile.mk
index 279697313cf1..d2c6049afcbc 100644
--- a/sal/qa/rtl/ostring/makefile.mk
+++ b/sal/qa/rtl/ostring/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -45,14 +45,12 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:joblist by codegen.pl
+# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
$(SLO)$/rtl_OString2.obj
SHL1TARGET= rtl_OString2
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
@@ -68,9 +66,7 @@ SHL2OBJS= \
$(SLO)$/rtl_str.obj
SHL2TARGET= rtl_str
-SHL2STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL2IMPLIB= i$(SHL2TARGET)
DEF2NAME =$(SHL2TARGET)
@@ -82,9 +78,7 @@ SHL3OBJS= \
$(SLO)$/rtl_string.obj
SHL3TARGET= rtl_string
-SHL3STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL3STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL3IMPLIB= i$(SHL3TARGET)
DEF3NAME =$(SHL3TARGET)
diff --git a/sal/qa/rtl/ostring/rtl_OString2.cxx b/sal/qa/rtl/ostring/rtl_OString2.cxx
index 8421346f84a7..2ff2ca6b434b 100644
--- a/sal/qa/rtl/ostring/rtl_OString2.cxx
+++ b/sal/qa/rtl/ostring/rtl_OString2.cxx
@@ -34,7 +34,7 @@
// autogenerated file with codegen.pl
// There exist some more test code in sal/qa/rtl_strings/rtl_OString.cxx
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include "valueequal.hxx"
namespace rtl_OString
diff --git a/sal/qa/rtl/ostring/rtl_str.cxx b/sal/qa/rtl/ostring/rtl_str.cxx
index 5e34b034bffb..6ce43ae0bb9b 100644
--- a/sal/qa/rtl/ostring/rtl_str.cxx
+++ b/sal/qa/rtl/ostring/rtl_str.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sal.hxx"
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
namespace rtl_str
{
diff --git a/sal/qa/rtl/ostring/rtl_string.cxx b/sal/qa/rtl/ostring/rtl_string.cxx
index 549555d0e10a..a1fc88037f51 100644
--- a/sal/qa/rtl/ostring/rtl_string.cxx
+++ b/sal/qa/rtl/ostring/rtl_string.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sal.hxx"
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
namespace rtl_string
{
diff --git a/sal/qa/rtl/oustring/makefile.mk b/sal/qa/rtl/oustring/makefile.mk
index dedaa650107d..40e4ba4a0b58 100644
--- a/sal/qa/rtl/oustring/makefile.mk
+++ b/sal/qa/rtl/oustring/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -45,14 +45,12 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:joblist by codegen.pl
+# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
$(SLO)$/rtl_OUString2.obj
SHL1TARGET= rtl_OUString2
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
@@ -68,9 +66,7 @@ SHL2OBJS= \
$(SLO)$/rtl_ustr.obj
SHL2TARGET= rtl_ustr
-SHL2STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL2IMPLIB= i$(SHL2TARGET)
DEF2NAME =$(SHL2TARGET)
diff --git a/sal/qa/rtl/oustring/rtl_OUString2.cxx b/sal/qa/rtl/oustring/rtl_OUString2.cxx
index 9606ae0859c3..8632a159ab85 100644
--- a/sal/qa/rtl/oustring/rtl_OUString2.cxx
+++ b/sal/qa/rtl/oustring/rtl_OUString2.cxx
@@ -38,7 +38,7 @@
#include <algorithm> // STL
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include "stringhelper.hxx"
#include "valueequal.hxx"
diff --git a/sal/qa/rtl/oustring/rtl_ustr.cxx b/sal/qa/rtl/oustring/rtl_ustr.cxx
index 5cc28ea1f389..43610d0461f4 100644
--- a/sal/qa/rtl/oustring/rtl_ustr.cxx
+++ b/sal/qa/rtl/oustring/rtl_ustr.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sal.hxx"
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
/** print a UNI_CODE file name.
*/
diff --git a/sal/qa/rtl/oustringbuffer/makefile.mk b/sal/qa/rtl/oustringbuffer/makefile.mk
index 9737d998a768..a910d7222773 100644
--- a/sal/qa/rtl/oustringbuffer/makefile.mk
+++ b/sal/qa/rtl/oustringbuffer/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -45,14 +45,12 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:joblist by codegen.pl
+# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
$(SLO)$/rtl_OUStringBuffer2.obj
SHL1TARGET= rtl_OUStringBuffer2
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
diff --git a/sal/qa/rtl/oustringbuffer/rtl_OUStringBuffer2.cxx b/sal/qa/rtl/oustringbuffer/rtl_OUStringBuffer2.cxx
index d259e63174f8..febaa2a9d552 100644
--- a/sal/qa/rtl/oustringbuffer/rtl_OUStringBuffer2.cxx
+++ b/sal/qa/rtl/oustringbuffer/rtl_OUStringBuffer2.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sal.hxx"
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include "stringhelper.hxx"
#include <rtl/ustrbuf.hxx>
#include <rtl/uri.hxx>
diff --git a/sal/qa/rtl/process/makefile.mk b/sal/qa/rtl/process/makefile.mk
index c1f5d9cad7eb..ac8d66e24b7d 100644
--- a/sal/qa/rtl/process/makefile.mk
+++ b/sal/qa/rtl/process/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -45,14 +45,12 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:joblist by codegen.pl
+# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
$(SLO)$/rtl_Process.obj
SHL1TARGET= rtl_Process
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
@@ -62,7 +60,7 @@ DEF1NAME =$(SHL1TARGET)
SHL1VERSIONMAP= $(PRJ)$/qa$/export.map
# END ------------------------------------------------------------------
-OBJ3FILES=$(OBJ)$/child_process.obj
+OBJ3FILES=$(OBJ)$/child_process.obj
APP3TARGET=child_process
APP3OBJS=$(OBJ3FILES)
@@ -74,7 +72,7 @@ APP3OBJS=$(OBJ3FILES)
#.ENDIF
APP3STDLIBS=$(SALLIB)
-OBJ4FILES=$(OBJ)$/child_process_id.obj
+OBJ4FILES=$(OBJ)$/child_process_id.obj
APP4TARGET=child_process_id
APP4OBJS=$(OBJ4FILES)
diff --git a/sal/qa/rtl/process/rtl_Process.cxx b/sal/qa/rtl/process/rtl_Process.cxx
index 78360186fea7..e14d52905c32 100644
--- a/sal/qa/rtl/process/rtl_Process.cxx
+++ b/sal/qa/rtl/process/rtl_Process.cxx
@@ -36,7 +36,7 @@
#include <string.h>
#include <sal/types.h>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include <rtl/ustring.hxx>
#include <rtl/string.hxx>
#include <rtl/process.h>
diff --git a/sal/qa/rtl/random/makefile.mk b/sal/qa/rtl/random/makefile.mk
index 61cd9b676351..0fc2e5e5a7f8 100644
--- a/sal/qa/rtl/random/makefile.mk
+++ b/sal/qa/rtl/random/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -45,14 +45,12 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:job by codegen.pl
+# auto generated Target:job by codegen.pl
SHL1OBJS= \
$(SLO)$/rtl_random.obj
SHL1TARGET= rtl_Random
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
DEF1NAME =$(SHL1TARGET)
diff --git a/sal/qa/rtl/random/rtl_random.cxx b/sal/qa/rtl/random/rtl_random.cxx
index 7e3c56115b33..ae3845bd16b9 100644
--- a/sal/qa/rtl/random/rtl_random.cxx
+++ b/sal/qa/rtl/random/rtl_random.cxx
@@ -35,7 +35,7 @@
#include <algorithm> // STL
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include <rtl/random.h>
namespace rtl_random
diff --git a/sal/qa/rtl/strings/makefile.mk b/sal/qa/rtl/strings/makefile.mk
index 16abc6b7e118..8b2a62b82d13 100644
--- a/sal/qa/rtl/strings/makefile.mk
+++ b/sal/qa/rtl/strings/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -49,7 +49,7 @@ SHL1OBJS := \
$(SLO)$/test_oustring_endswith.obj \
$(SLO)$/test_oustring_noadditional.obj
SHL1IMPLIB := i$(SHL1TARGET)
-SHL1STDLIBS := $(CPPUNITLIB) $(SALLIB)
+SHL1STDLIBS := $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1VERSIONMAP := $(PRJ)$/qa$/export.map
DEF1NAME := $(SHL1TARGET)
diff --git a/sal/qa/rtl/strings/test_oustring_compare.cxx b/sal/qa/rtl/strings/test_oustring_compare.cxx
index a19c3360145c..582dd6a21b7a 100644
--- a/sal/qa/rtl/strings/test_oustring_compare.cxx
+++ b/sal/qa/rtl/strings/test_oustring_compare.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sal.hxx"
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include "rtl/string.h"
#include "rtl/ustring.hxx"
diff --git a/sal/qa/rtl/strings/test_oustring_convert.cxx b/sal/qa/rtl/strings/test_oustring_convert.cxx
index b579da99ee27..e1219c3024d6 100644
--- a/sal/qa/rtl/strings/test_oustring_convert.cxx
+++ b/sal/qa/rtl/strings/test_oustring_convert.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sal.hxx"
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include "rtl/strbuf.hxx"
#include "rtl/string.hxx"
#include "rtl/ustring.hxx"
diff --git a/sal/qa/rtl/strings/test_oustring_endswith.cxx b/sal/qa/rtl/strings/test_oustring_endswith.cxx
index 83714ff6fe71..467878697fd2 100644
--- a/sal/qa/rtl/strings/test_oustring_endswith.cxx
+++ b/sal/qa/rtl/strings/test_oustring_endswith.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sal.hxx"
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include "rtl/strbuf.hxx"
#include "rtl/string.h"
#include "rtl/string.hxx"
diff --git a/sal/qa/rtl/strings/test_oustring_noadditional.cxx b/sal/qa/rtl/strings/test_oustring_noadditional.cxx
index 26db4917f096..dd30871b7622 100644
--- a/sal/qa/rtl/strings/test_oustring_noadditional.cxx
+++ b/sal/qa/rtl/strings/test_oustring_noadditional.cxx
@@ -31,6 +31,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sal.hxx"
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
NOADDITIONAL;
diff --git a/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx b/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx
index ca05cbf514b7..71fb6def0b31 100644
--- a/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx
+++ b/sal/qa/rtl/strings/test_oustringbuffer_utf32.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sal.hxx"
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include "rtl/ustrbuf.hxx"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
diff --git a/sal/qa/rtl/textenc/makefile.mk b/sal/qa/rtl/textenc/makefile.mk
index c2b9a836ab3b..31f700b7b96a 100644
--- a/sal/qa/rtl/textenc/makefile.mk
+++ b/sal/qa/rtl/textenc/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -47,9 +47,7 @@ CXXFLAGS+= $(LFS_CFLAGS)
SHL1OBJS= \
$(SLO)$/rtl_textcvt.obj
SHL1TARGET= rtl_textcvt
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
DEF1NAME =$(SHL1TARGET)
@@ -65,9 +63,7 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
SHL2OBJS= \
$(SLO)$/rtl_tencinfo.obj
SHL2TARGET= rtl_tencinfo
-SHL2STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL2IMPLIB= i$(SHL2TARGET)
DEF2NAME =$(SHL2TARGET)
diff --git a/sal/qa/rtl/textenc/rtl_tencinfo.cxx b/sal/qa/rtl/textenc/rtl_tencinfo.cxx
index 8f5fa28defda..2bc3f930af42 100644
--- a/sal/qa/rtl/textenc/rtl_tencinfo.cxx
+++ b/sal/qa/rtl/textenc/rtl_tencinfo.cxx
@@ -36,7 +36,7 @@
#include <osl/thread.h>
#include <rtl/tencinfo.h>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
// -----------------------------------------------------------------------------
diff --git a/sal/qa/rtl/textenc/rtl_textcvt.cxx b/sal/qa/rtl/textenc/rtl_textcvt.cxx
index 0e4a1a306949..2129815a6779 100644
--- a/sal/qa/rtl/textenc/rtl_textcvt.cxx
+++ b/sal/qa/rtl/textenc/rtl_textcvt.cxx
@@ -36,7 +36,7 @@
#include <cstddef>
#include <cstring>
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include "rtl/string.hxx"
#include "rtl/tencinfo.h"
#include "rtl/textcvt.h"
diff --git a/sal/qa/rtl/uri/makefile.mk b/sal/qa/rtl/uri/makefile.mk
index 95ba01debd1e..2c536da484d7 100644
--- a/sal/qa/rtl/uri/makefile.mk
+++ b/sal/qa/rtl/uri/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -47,9 +47,7 @@ CXXFLAGS+= $(LFS_CFLAGS)
SHL1OBJS= \
$(SLO)$/rtl_Uri.obj
SHL1TARGET= rtl_uri_simple
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
DEF1NAME =$(SHL1TARGET)
@@ -61,9 +59,7 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
SHL2OBJS= \
$(SLO)$/rtl_testuri.obj
SHL2TARGET= rtl_Uri
-SHL2STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL2IMPLIB= i$(SHL2TARGET)
DEF2NAME =$(SHL2TARGET)
diff --git a/sal/qa/rtl/uri/rtl_Uri.cxx b/sal/qa/rtl/uri/rtl_Uri.cxx
index 794074e18d0f..cc27f956b573 100644
--- a/sal/qa/rtl/uri/rtl_Uri.cxx
+++ b/sal/qa/rtl/uri/rtl_Uri.cxx
@@ -38,7 +38,7 @@
#include <osl/thread.h>
#include <osl/file.hxx>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
// -----------------------------------------------------------------------------
diff --git a/sal/qa/rtl/uri/rtl_testuri.cxx b/sal/qa/rtl/uri/rtl_testuri.cxx
index 956c5ccbaacb..4d1d80830dd3 100644
--- a/sal/qa/rtl/uri/rtl_testuri.cxx
+++ b/sal/qa/rtl/uri/rtl_testuri.cxx
@@ -39,7 +39,7 @@
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include <cstddef>
#include <stdio.h>
diff --git a/sal/qa/rtl/uuid/makefile.mk b/sal/qa/rtl/uuid/makefile.mk
index ed780dd82ec1..554c2034d0cd 100644
--- a/sal/qa/rtl/uuid/makefile.mk
+++ b/sal/qa/rtl/uuid/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -45,14 +45,12 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:joblist by codegen.pl
+# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
$(SLO)$/rtl_Uuid.obj
SHL1TARGET= rtl_Uuid
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
diff --git a/sal/qa/rtl/uuid/rtl_Uuid.cxx b/sal/qa/rtl/uuid/rtl_Uuid.cxx
index 508a1127b60e..a77c4e8d90de 100644
--- a/sal/qa/rtl/uuid/rtl_Uuid.cxx
+++ b/sal/qa/rtl/uuid/rtl_Uuid.cxx
@@ -34,7 +34,7 @@
#include <math.h>
#include <stdio.h>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include <rtl/uuid.h>
#include <rtl/ustring.h>
#include <rtl/ustring.hxx>
diff --git a/sal/qa/rtl_strings/makefile.mk b/sal/qa/rtl_strings/makefile.mk
index 4cd99ba3aec9..166ef568debc 100644
--- a/sal/qa/rtl_strings/makefile.mk
+++ b/sal/qa/rtl_strings/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -44,15 +44,13 @@ CFLAGS+= $(LFS_CFLAGS)
CXXFLAGS+= $(LFS_CFLAGS)
# BEGIN ----------------------------------------------------------------
-# auto generated Target:FileBase by codegen.pl
+# auto generated Target:FileBase by codegen.pl
SHL1OBJS= \
$(SLO)$/rtl_String_Utils.obj \
$(SLO)$/rtl_OString.obj
SHL1TARGET= rtl_OString
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
@@ -65,15 +63,13 @@ SHL1VERSIONMAP = $(PRJ)$/qa$/export.map
# END ------------------------------------------------------------------
# BEGIN ----------------------------------------------------------------
-# auto generated Target:FileBase by codegen.pl
+# auto generated Target:FileBase by codegen.pl
SHL2OBJS= \
$(SLO)$/rtl_String_Utils.obj \
$(SLO)$/rtl_OUString.obj
SHL2TARGET= rtl_OUString
-SHL2STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL2STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL2IMPLIB= i$(SHL2TARGET)
# SHL2DEF= $(MISC)$/$(SHL2TARGET).def
@@ -86,22 +82,13 @@ SHL2VERSIONMAP = $(PRJ)$/qa$/export.map
# END ------------------------------------------------------------------
# BEGIN ----------------------------------------------------------------
-# auto generated Target:FileBase by codegen.pl
+# auto generated Target:FileBase by codegen.pl
SHL3OBJS= \
$(SLO)$/rtl_String_Utils.obj \
$(SLO)$/rtl_OUStringBuffer.obj
SHL3TARGET= rtl_OUStringBuffer
-SHL3STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
-
-# .IF "$(GUI)" == "WNT"
-# SHL3STDLIBS+= $(SOLARLIBDIR)$/cppunit.lib
-# .ENDIF
-# .IF "$(GUI)" == "UNX"
-# SHL3STDLIBS+=$(SOLARLIBDIR)$/libcppunit$(DLLPOSTFIX).a
-# .ENDIF
+SHL3STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL3IMPLIB= i$(SHL3TARGET)
# SHL3DEF= $(MISC)$/$(SHL3TARGET).def
@@ -115,12 +102,10 @@ SHL3VERSIONMAP = $(PRJ)$/qa$/export.map
# BEGIN ----------------------------------------------------------------
SHL4OBJS= \
- $(SLO)$/rtl_old_teststrbuf.obj
+ $(SLO)$/rtl_old_teststrbuf.obj
SHL4TARGET= rtl_old_teststrbuf
-SHL4STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL4STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL4IMPLIB= i$(SHL4TARGET)
DEF4NAME =$(SHL4TARGET)
@@ -130,12 +115,10 @@ SHL4VERSIONMAP = $(PRJ)$/qa$/export.map
# BEGIN ----------------------------------------------------------------
SHL5OBJS= \
- $(SLO)$/rtl_old_testowstring.obj
+ $(SLO)$/rtl_old_testowstring.obj
SHL5TARGET= rtl_old_testowstring
-SHL5STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL5STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL5IMPLIB= i$(SHL5TARGET)
DEF5NAME =$(SHL5TARGET)
@@ -145,12 +128,10 @@ SHL5VERSIONMAP = $(PRJ)$/qa$/export.map
# BEGIN ----------------------------------------------------------------
SHL6OBJS= \
- $(SLO)$/rtl_old_testostring.obj
+ $(SLO)$/rtl_old_testostring.obj
SHL6TARGET= rtl_old_testostring
-SHL6STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL6STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL6IMPLIB= i$(SHL6TARGET)
DEF6NAME =$(SHL6TARGET)
diff --git a/sal/qa/rtl_strings/rtl_old_testostring.cxx b/sal/qa/rtl_strings/rtl_old_testostring.cxx
index 6c481914127d..329eb71c7dc5 100644
--- a/sal/qa/rtl_strings/rtl_old_testostring.cxx
+++ b/sal/qa/rtl_strings/rtl_old_testostring.cxx
@@ -48,7 +48,7 @@
#include <rtl/string.hxx>
#endif
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#define TEST_ENSURE(c, m) CPPUNIT_ASSERT_MESSAGE((m), (c))
diff --git a/sal/qa/rtl_strings/rtl_old_testowstring.cxx b/sal/qa/rtl_strings/rtl_old_testowstring.cxx
index 6741deb06e84..938ec01f5fff 100644
--- a/sal/qa/rtl_strings/rtl_old_testowstring.cxx
+++ b/sal/qa/rtl_strings/rtl_old_testowstring.cxx
@@ -61,7 +61,7 @@
#include <rtl/locale.hxx>
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#define TEST_ENSURE(c, m) CPPUNIT_ASSERT_MESSAGE((m), (c))
// #if OSL_DEBUG_LEVEL > 0
diff --git a/sal/qa/rtl_strings/rtl_old_teststrbuf.cxx b/sal/qa/rtl_strings/rtl_old_teststrbuf.cxx
index 7f6a54478697..c277517d57b2 100644
--- a/sal/qa/rtl_strings/rtl_old_teststrbuf.cxx
+++ b/sal/qa/rtl_strings/rtl_old_teststrbuf.cxx
@@ -53,7 +53,7 @@
#include <rtl/ustrbuf.hxx>
#endif
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
using namespace rtl;
diff --git a/sal/qa/sal/makefile.mk b/sal/qa/sal/makefile.mk
index ebf7aa314ab7..61f279e226eb 100644
--- a/sal/qa/sal/makefile.mk
+++ b/sal/qa/sal/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -39,7 +39,7 @@ ENABLE_EXCEPTIONS := TRUE
SHL1TARGET = $(TARGET)_types
SHL1OBJS = $(SLO)$/test_types.obj
-SHL1STDLIBS = $(CPPUNITLIB) $(SALLIB)
+SHL1STDLIBS = $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1VERSIONMAP = version.map
SHL1IMPLIB = i$(SHL1TARGET)
DEF1NAME = $(SHL1TARGET)
diff --git a/sal/qa/sal/test_types.cxx b/sal/qa/sal/test_types.cxx
index fff05cb08106..5d72175bb8db 100644
--- a/sal/qa/sal/test_types.cxx
+++ b/sal/qa/sal/test_types.cxx
@@ -35,7 +35,7 @@
#include <stdio.h> // C99 snprintf not necessarily in <cstdio>
#include <string.h> // wntmsci10 does not know <cstring> std::strcmp
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include "sal/types.h"
namespace {
diff --git a/sal/qa/systools/makefile.mk b/sal/qa/systools/makefile.mk
index cde5b71c215c..035bef25c34a 100644
--- a/sal/qa/systools/makefile.mk
+++ b/sal/qa/systools/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -47,15 +47,12 @@ CXXFLAGS+= $(LFS_CFLAGS)
CFLAGS+=/Ob0
# BEGIN ----------------------------------------------------------------
-# auto generated Target:joblist by codegen.pl
+# auto generated Target:joblist by codegen.pl
SHL1OBJS= \
$(SLO)$/test_comtools.obj
SHL1TARGET= test_comtools
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)\
- uuid.lib
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB) uuid.lib
SHL1IMPLIB= i$(SHL1TARGET)
# SHL1DEF= $(MISC)$/$(SHL1TARGET).def
diff --git a/sal/qa/systools/test_comtools.cxx b/sal/qa/systools/test_comtools.cxx
index 1957d62d54f2..c61ff435d235 100644
--- a/sal/qa/systools/test_comtools.cxx
+++ b/sal/qa/systools/test_comtools.cxx
@@ -33,7 +33,7 @@
#include "precompiled_sal.hxx"
// autogenerated file with codegen.pl
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include <systools/win32/comtools.hxx>
class COMObject : public IUnknown
diff --git a/sal/qa/testHelperFunctions/makefile.mk b/sal/qa/testHelperFunctions/makefile.mk
index 0064cabef952..33c43f259081 100644
--- a/sal/qa/testHelperFunctions/makefile.mk
+++ b/sal/qa/testHelperFunctions/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -49,9 +49,7 @@ SHL1OBJS= \
$(SLO)$/testHelperFunctions2.obj
SHL1TARGET= testHelperFunctions
-SHL1STDLIBS=\
- $(SALLIB) \
- $(CPPUNITLIB)
+SHL1STDLIBS= $(SALLIB) $(CPPUNITLIB) $(TESTSHL2LIB)
SHL1IMPLIB= i$(SHL1TARGET)
DEF1NAME =$(SHL1TARGET)
diff --git a/sal/qa/testHelperFunctions/testHelperFunctions.cxx b/sal/qa/testHelperFunctions/testHelperFunctions.cxx
index 9272433d2e1f..9d96d91939ec 100644
--- a/sal/qa/testHelperFunctions/testHelperFunctions.cxx
+++ b/sal/qa/testHelperFunctions/testHelperFunctions.cxx
@@ -38,7 +38,7 @@
#include "stringhelper.hxx"
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
// void isJaBloed()
// {
diff --git a/sal/qa/testHelperFunctions/testHelperFunctions2.cxx b/sal/qa/testHelperFunctions/testHelperFunctions2.cxx
index 9ddc1031d7fa..1adae36ade2a 100644
--- a/sal/qa/testHelperFunctions/testHelperFunctions2.cxx
+++ b/sal/qa/testHelperFunctions/testHelperFunctions2.cxx
@@ -31,7 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sal.hxx"
-#include <cppunit/simpleheader.hxx>
+#include <testshl/simpleheader.hxx>
#include "stringhelper.hxx"
namespace testOfHelperFunctions
diff --git a/sal/rtl/source/alloc.c b/sal/rtl/source/alloc.c
index 98a4c061e42b..123406717275 100644
--- a/sal/rtl/source/alloc.c
+++ b/sal/rtl/source/alloc.c
@@ -78,7 +78,7 @@ static sal_Size __rtl_memory_vmpagesize (void)
/* xBSD */
return (sal_Size)(getpagesize());
}
-#elif defined(IRIX) || defined(LINUX) || defined(SOLARIS)
+#elif defined(LINUX) || defined(SOLARIS)
static sal_Size __rtl_memory_vmpagesize (void)
{
/* POSIX */
@@ -90,7 +90,7 @@ static sal_Size __rtl_memory_vmpagesize (void)
/* other */
return (sal_Size)(0x2000);
}
-#endif /* FREEBSD || NETBSD || MACOSX || IRIX || LINUX || SOLARIS */
+#endif /* FREEBSD || NETBSD || MACOSX || LINUX || SOLARIS */
#ifndef PROT_HEAP
#define PROT_HEAP (PROT_READ | PROT_WRITE | PROT_EXEC)
diff --git a/sal/rtl/source/bootstrap.cxx b/sal/rtl/source/bootstrap.cxx
index 23dab839d558..769251a6c4ec 100644
--- a/sal/rtl/source/bootstrap.cxx
+++ b/sal/rtl/source/bootstrap.cxx
@@ -820,8 +820,8 @@ void SAL_CALL rtl_bootstrap_set (
rtl_uString * pValue
) SAL_THROW_EXTERN_C()
{
- OUString const & name = *reinterpret_cast< OUString const * >( &pName );
- OUString const & value = *reinterpret_cast< OUString const * >( &pValue );
+ const OUString name( pName );
+ const OUString value( pValue );
osl::MutexGuard guard( osl::Mutex::getGlobalMutex() );
diff --git a/sal/rtl/source/macro.hxx b/sal/rtl/source/macro.hxx
index a007d9e1cdab..ba274844952e 100644
--- a/sal/rtl/source/macro.hxx
+++ b/sal/rtl/source/macro.hxx
@@ -49,8 +49,6 @@
#define THIS_OS "NetBSD"
#elif defined FREEBSD
#define THIS_OS "FreeBSD"
-#elif defined IRIX
-#define THIS_OS "Irix"
#endif
#if ! defined THIS_OS
@@ -76,8 +74,6 @@ this is inserted for the case that the preprocessor ignores error
#else
# define THIS_ARCH "SPARC"
#endif
-#elif defined IRIX
-# define THIS_ARCH "MIPS"
#elif defined MIPS
# ifdef OSL_BIGENDIAN
# define THIS_ARCH "MIPS_EB"
@@ -94,6 +90,8 @@ this is inserted for the case that the preprocessor ignores error
# define THIS_ARCH "IA64"
#elif defined M68K
# define THIS_ARCH "M68K"
+#elif defined HPPA
+# define THIS_ARCH "HPPA"
#endif
#if ! defined THIS_ARCH
diff --git a/sal/rtl/source/math.cxx b/sal/rtl/source/math.cxx
index a255ca21b13a..012046c9e5c8 100644
--- a/sal/rtl/source/math.cxx
+++ b/sal/rtl/source/math.cxx
@@ -879,8 +879,13 @@ inline double stringToDouble(CharT const * pBegin, CharT const * pEnd,
rtl::math::setNan( &fVal );
if (bSign)
{
- reinterpret_cast< sal_math_Double * >(&fVal)->w32_parts.msw
- |= 0x80000000; // create negative NaN
+ union {
+ double sd;
+ sal_math_Double md;
+ } m;
+ m.sd = fVal;
+ m.md.w32_parts.msw |= 0x80000000; // create negative NaN
+ fVal = m.sd;
bSign = false; // don't negate again
}
// Eat any further digits:
diff --git a/sal/typesconfig/typesconfig.c b/sal/typesconfig/typesconfig.c
index 932d80fd979a..c9d6ede62cb7 100644
--- a/sal/typesconfig/typesconfig.c
+++ b/sal/typesconfig/typesconfig.c
@@ -163,7 +163,7 @@ int check( TestFunc func, Type eT, void* p )
|* Letzte Aenderung
|*
*************************************************************************/
-#if defined(IA64) || defined(ARM32)
+#if defined(IA64) || defined(ARM32) || defined(HPPA)
int forceerror()
{
diff --git a/sal/util/makefile.mk b/sal/util/makefile.mk
index bc8026aa860f..a43f09e2e0e0 100644
--- a/sal/util/makefile.mk
+++ b/sal/util/makefile.mk
@@ -127,9 +127,6 @@ SHL1STDLIBS= -Bdynamic -ldl -lpthread -lposix4 -lsocket -lnsl
SHL1STDLIBS+= -z allextract -staticlib=Crun -z defaultextract
.ENDIF # C50
.ENDIF # SOLARIS
-.IF "$(OS)"=="IRIX"
-SHL1STDLIBS= -lexc
-.ENDIF
.ENDIF # UNX
.IF "$(GUI)"=="OS2"
diff --git a/salhelper/qa/makefile.mk b/salhelper/qa/makefile.mk
index 9987b3a276cd..4589338a5316 100644
--- a/salhelper/qa/makefile.mk
+++ b/salhelper/qa/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -39,7 +39,7 @@ ENABLE_EXCEPTIONS := TRUE
SHL1TARGET = $(TARGET)
SHL1OBJS = $(SLO)$/test_api.obj
-SHL1STDLIBS = $(CPPUNITLIB) $(SALLIB) $(SALHELPERLIB)
+SHL1STDLIBS = $(CPPUNITLIB) $(SALLIB) $(SALHELPERLIB) $(TESTSHL2LIB)
SHL1IMPLIB = i$(SHL1TARGET)
SHL1VERSIONMAP = version.map
DEF1NAME = $(SHL1TARGET)
@@ -51,4 +51,4 @@ SLOFILES = $(SHL1OBJS)
ALLTAR: test
test .PHONY: $(SHL1TARGETN)
- cd $(SHL1TARGETN:d) && testshl2 $(SHL1TARGETN:f)
+ cd $(SHL1TARGETN:d) && $(TESTSHL2) $(SHL1TARGETN:f)
diff --git a/salhelper/qa/test_api.cxx b/salhelper/qa/test_api.cxx
index 9957f6a56cf1..83df7ec084c6 100644
--- a/salhelper/qa/test_api.cxx
+++ b/salhelper/qa/test_api.cxx
@@ -59,7 +59,7 @@ std::type_info const & getSimpleReferenceObjectTypeInfo()
}
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include "osl/mutex.hxx"
#include "salhelper/condition.hxx"
#include "salhelper/dynload.hxx"
diff --git a/salhelper/source/simplereferenceobject.cxx b/salhelper/source/simplereferenceobject.cxx
index 2d80f246d171..36036feb5986 100755
--- a/salhelper/source/simplereferenceobject.cxx
+++ b/salhelper/source/simplereferenceobject.cxx
@@ -69,7 +69,7 @@ void SimpleReferenceObject::operator delete(void * pPtr) SAL_THROW(())
void SimpleReferenceObject::operator delete(void * pPtr, std::nothrow_t const &)
SAL_THROW(())
{
-#if defined WNT || (defined IRIX && !defined GCC)
+#if defined WNT
::operator delete(pPtr); // WNT lacks a global nothrow operator delete...
#else // WNT
::operator delete(pPtr, std::nothrow);
diff --git a/stoc/test/javavm/testapplet/TestApplet.java b/stoc/test/javavm/testapplet/TestApplet.java
index 07467cc54c0f..55916cff784b 100644
--- a/stoc/test/javavm/testapplet/TestApplet.java
+++ b/stoc/test/javavm/testapplet/TestApplet.java
@@ -5,7 +5,6 @@ import java.io.IOException;
import java.net.URL;
import java.io.InputStream;
import java.net.MalformedURLException;
-import com.sun.star.lib.sandbox.*;
/*
* TestApplet.java
*
diff --git a/stoc/test/javavm/testapplet/makefile.mk b/stoc/test/javavm/testapplet/makefile.mk
index 706180655f06..da5a21e4f166 100644
--- a/stoc/test/javavm/testapplet/makefile.mk
+++ b/stoc/test/javavm/testapplet/makefile.mk
@@ -40,7 +40,7 @@ TARGET = TestApplet
#.INCLUDE : $(PRJ)$/util$/makefile.pmk
.INCLUDE : settings.mk
# Files --------------------------------------------------------
-JARFILES = sandbox.jar ridl.jar jurt.jar unoil.jar
+JARFILES = ridl.jar jurt.jar unoil.jar
JAVAFILES= $(subst,$(CLASSDIR)$/$(PACKAGE)$/, $(subst,.class,.java $(JAVACLASSFILES)))
diff --git a/stoc/test/javavm/testcomponent/TestComponent.java b/stoc/test/javavm/testcomponent/TestComponent.java
index a0fb1d01a858..5622ba087d7a 100644
--- a/stoc/test/javavm/testcomponent/TestComponent.java
+++ b/stoc/test/javavm/testcomponent/TestComponent.java
@@ -4,7 +4,7 @@ import com.sun.star.uno.*;
import com.sun.star.registry.XRegistryKey;
import java.io.*;
import java.net.*;
-import com.sun.star.lib.sandbox.*;
+//import com.sun.star.lib.sandbox.*;
/** This component implements XTypeProvider for use with StarBasic.
@@ -74,10 +74,11 @@ public class TestComponent implements XServiceInfo, XTypeProvider
}catch( IOException e) {
String s= e.getMessage();
System.out.println(s);
- }catch( SandboxSecurityException sse) {
+ }/*catch( SandboxSecurityException sse) {
String s= sse.getMessage();
System.out.println("s");
}
+*/
return __serviceName;
}
diff --git a/stoc/test/javavm/testcomponent/makefile.mk b/stoc/test/javavm/testcomponent/makefile.mk
index 68f3f5bd6431..9fcd390b02a1 100644
--- a/stoc/test/javavm/testcomponent/makefile.mk
+++ b/stoc/test/javavm/testcomponent/makefile.mk
@@ -40,7 +40,7 @@ TARGET = JavaTestComponent
#.INCLUDE : $(PRJ)$/util$/makefile.pmk
.INCLUDE : settings.mk
# Files --------------------------------------------------------
-JARFILES = sandbox.jar ridl.jar jurt.jar unoil.jar
+JARFILES = ridl.jar jurt.jar unoil.jar
CUSTOMMANIFESTFILE= manifest
diff --git a/stoc/test/uriproc/makefile.mk b/stoc/test/uriproc/makefile.mk
index 85e3a294f434..78b54bb2a5a2 100644
--- a/stoc/test/uriproc/makefile.mk
+++ b/stoc/test/uriproc/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2008 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -56,7 +56,7 @@ UNOTYPES = \
SHL1TARGET = $(TARGET)
SHL1OBJS = $(SLO)$/test_uriproc.obj
-SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB)
+SHL1STDLIBS = $(CPPULIB) $(CPPUHELPERLIB) $(CPPUNITLIB) $(SALLIB) $(TESTSHL2LIB)
SHL1VERSIONMAP = version.map
SHL1IMPLIB = i$(SHL1TARGET)
DEF1NAME = $(SHL1TARGET)
diff --git a/stoc/test/uriproc/test_uriproc.cxx b/stoc/test/uriproc/test_uriproc.cxx
index f1032276eb89..71f92e504d64 100644
--- a/stoc/test/uriproc/test_uriproc.cxx
+++ b/stoc/test/uriproc/test_uriproc.cxx
@@ -47,7 +47,7 @@
#include "com/sun/star/uri/XVndSunStarScriptUrlReference.hpp"
#include "com/sun/star/util/XMacroExpander.hpp"
#include "cppuhelper/servicefactory.hxx"
-#include "cppunit/simpleheader.hxx"
+#include "testshl/simpleheader.hxx"
#include "osl/diagnose.h"
#include "osl/thread.h"
#include "rtl/string.h"
diff --git a/store/source/stordata.hxx b/store/source/stordata.hxx
index 1b6c74c371fd..4610bac425fd 100644
--- a/store/source/stordata.hxx
+++ b/store/source/stordata.hxx
@@ -93,7 +93,7 @@ struct OStoreDataPageData : public store::OStorePageData
{
base::m_aGuard.m_nMagic = store::htonl(self::theTypeId);
base::m_aDescr.m_nUsed = store::htons(self::thePageSize);
- memset (m_pData, 0, capacity());
+ if (capacity()) memset (m_pData, 0, capacity());
}
/** guard (external representation).
diff --git a/xml2cmp/source/xcd/xmlelem.cxx b/xml2cmp/source/xcd/xmlelem.cxx
index 4b642e1d30cc..aa80459ccead 100644
--- a/xml2cmp/source/xcd/xmlelem.cxx
+++ b/xml2cmp/source/xcd/xmlelem.cxx
@@ -36,15 +36,6 @@
#include <parse.hxx>
#include <cr_html.hxx>
-#if OSL_DEBUG_LEVEL == 0
-# ifndef NDEBUG
-# define NDEBUG
-# endif
-#endif
-#include <assert.h>
-
-
-
XmlElement::XmlElement( const char * i_sName )
: sName(i_sName)
{
@@ -160,7 +151,6 @@ ListElement::Write2Html( HtmlCreator & io_rHC ) const
XmlElement *
ListElement::Create_and_Add_NewElement()
{
- assert(fCreateNewElement != 0);
XmlElement * pNew = (*fCreateNewElement)(Name());
Children().push_back( pNew );
return pNew;