1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
Index: bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx
===================================================================
RCS file: /cvs/udk/bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx,v
retrieving revision 1.3
diff -u -r1.3 cpp2uno.cxx
--- bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx 28 Apr 2003 16:28:20 -0000 1.3
+++ bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx 8 Jan 2007 00:45:53 -0000
@@ -59,9 +59,9 @@
*
************************************************************************/
+#include <stdlib.h>
#include <hash_map>
-#include <sal/alloca.h>
#include <rtl/alloc.h>
#include <osl/mutex.hxx>
Index: bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx
===================================================================
RCS file: /cvs/udk/bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx,v
retrieving revision 1.4
diff -u -r1.4 except.cxx
--- bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx 28 Apr 2003 16:41:25 -0000 1.4
+++ bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx 8 Jan 2007 00:45:53 -0000
@@ -63,6 +63,7 @@
#include <dlfcn.h>
#include <cxxabi.h>
#include <hash_map>
+#include <sys/param.h>
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
@@ -147,7 +148,11 @@
};
//__________________________________________________________________________________________________
RTTI::RTTI() SAL_THROW( () )
+#if __FreeBSD_version < 602103 /* #i22253# */
+ : m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) )
+#else
: m_hApp( dlopen( 0, RTLD_LAZY ) )
+#endif
{
}
//__________________________________________________________________________________________________
@@ -182,7 +187,11 @@
buf.append( 'E' );
OString symName( buf.makeStringAndClear() );
+#if __FreeBSD_version < 602103 /* #i22253# */
+ rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() );
+#else
rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
+#endif
if (rtti)
{
@@ -253,7 +262,7 @@
//==================================================================================================
void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
{
-#if defined DEBUG
+#if OSL_DEBUG_LEVEL > 1
OString cstr(
OUStringToOString(
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
@@ -275,7 +284,7 @@
*reinterpret_cast< OUString const * >( &pUnoExc->pType->pTypeName ),
Reference< XInterface >() );
}
-
+
pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp );
@@ -321,16 +330,16 @@
Reference< XInterface >() );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
-#if defined _DEBUG
+#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 defined DEBUG
+#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
@@ -342,7 +351,7 @@
Reference< XInterface >() );
Type const & rType = ::getCppuType( &aRE );
uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
-#if defined _DEBUG
+#if OSL_DEBUG_LEVEL > 0
OString cstr( OUStringToOString( aRE.Message, RTL_TEXTENCODING_ASCII_US ) );
OSL_ENSURE( 0, cstr.getStr() );
#endif
Index: bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx
===================================================================
RCS file: /cvs/udk/bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx,v
retrieving revision 1.4
diff -u -r1.4 uno2cpp.cxx
--- bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx 28 Apr 2003 16:28:35 -0000 1.4
+++ bridges/source/cpp_uno/gcc3_freebsd_intel/uno2cpp.cxx 8 Jan 2007 00:45:53 -0000
@@ -59,7 +59,7 @@
*
************************************************************************/
-#include <sal/alloca.h>
+#include <stdlib.h>
#include <rtl/alloc.h>
#include <uno/data.h>
|