Yuri Dario wrote:
Hi,
just hit another problem while building io
project:
E:/rd/OpenOffice/OOo_2.0beta2/solver/680/os2gcci.pro/inc/com/sun/star/un
o/Sequence.hxx: In
function `const com::sun::star::uno::Type& getCppuType(const
com::sun::star::uno::Sequence<E>*) [with E =
sal_Unicode]':
E:/rd/OpenOffice/OOo_2.0beta2/solver/680/os2gcci.pro/inc/com/sun/star/un
o/Sequence.hxx:101: instantiated from
`com::sun::star::uno::Sequence<E>::Sequence() [with E =
sal_Unicode]'
E:/rd/OpenOffice/OOo_2.0beta2/io/source/TextInputStream/TextInputStream.
cxx:201: instantiated from
here
E:/rd/OpenOffice/OOo_2.0beta2/solver/680/os2gcci.pro/inc/com/sun/star/un
o/Sequence.hxx:278: error: call
of overloaded `getCppuType(const sal_Unicode*)' is
ambiguous
E:/rd/OpenOffice/OOo_2.0beta2/solver/680/os2gcci.pro/inc/com/sun/star/un
o/Type.hxx:208: error: candidates
are: const com::sun::star::uno::Type& getCppuType(const sal_Int16*)
<near
match>
E:/rd/OpenOffice/OOo_2.0beta2/solver/680/os2gcci.pro/inc/com/sun/star/un
o/Type.hxx:214: error:
const com::sun::star::uno::Type& getCppuType(const
sal_uInt16*) <near match>
Actually sal/types.h defines sal_unicode as wchar_t
#if defined(SAL_W32) || defined(SAL_OS2)
typedef wchar_t sal_Unicode;
#else
#define SAL_UNICODE_NOTEQUAL_WCHAR_T
typedef sal_uInt16 sal_Unicode;
#endif
and wchar_t is an unsigned short. Since this code compiles under Win32,
I think wchar_t is differently defined on this platform.
Before messing with libc unicode functions, I prefer to ask here.
What do you think: use sal_uInt16 also under OS/2 or something else?
In C++, wchar_t is an integral type distinct from all other integral
types, it is not a typedef. However, the Microsoft C++ compiler in its
default mode (which we use; i.e., no /Zc:wchar_t) treats wchar_t as a
typedef (typically to unsigned short). The net effect is thus that
sal_Unicode is a typedef for unsigned short on all platforms except your
OS2 version built with GCC. I would assume everything works ok if you
remove "|| defined(SAL_OS2)" from sal/types.h.
-Stephan
TIA,
Bye,
Yuri Dario
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]