diff options
author | Andre Fischer <af@openoffice.org> | 2010-07-01 18:06:39 +0200 |
---|---|---|
committer | Andre Fischer <af@openoffice.org> | 2010-07-01 18:06:39 +0200 |
commit | c02af39487a0da878bb5952b28d3ecd62d02e2c0 (patch) | |
tree | b7174bf39aa54ba76ab283b7d82642e30216a8f4 /tools | |
parent | cd4385a9aecd65ed1c360708614eff7f6fe381bb (diff) | |
parent | be588658ea127a6a05390435126f1d739a477b58 (diff) |
renaissance1: merge with DEV300_m84
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bootstrp/makefile.mk | 9 | ||||
-rw-r--r-- | tools/bootstrp/rscdep.cxx | 59 | ||||
-rw-r--r-- | tools/inc/tools/color.hxx | 2 | ||||
-rw-r--r-- | tools/inc/tools/diagnose_ex.h | 29 | ||||
-rw-r--r-- | tools/inc/tools/gen.hxx | 15 | ||||
-rw-r--r-- | tools/inc/tools/preextstl.h | 15 | ||||
-rw-r--r-- | tools/inc/tools/solar.h | 24 | ||||
-rw-r--r-- | tools/inc/tools/svborder.hxx | 8 | ||||
-rw-r--r-- | tools/inc/tools/svlibrary.hxx | 42 | ||||
-rw-r--r-- | tools/inc/tools/wintypes.hxx | 1 | ||||
-rw-r--r-- | tools/prj/d.lst | 1 | ||||
-rw-r--r-- | tools/source/generic/makefile.mk | 3 | ||||
-rw-r--r-- | tools/source/generic/svlibrary.cxx | 129 | ||||
-rw-r--r-- | tools/source/stream/strmunx.cxx | 4 |
14 files changed, 263 insertions, 78 deletions
diff --git a/tools/bootstrp/makefile.mk b/tools/bootstrp/makefile.mk index b592cb900630..41188d2117d0 100644 --- a/tools/bootstrp/makefile.mk +++ b/tools/bootstrp/makefile.mk @@ -38,6 +38,10 @@ LIBTARGET=NO CDEFS+=-D_TOOLS_STRINGLIST +.IF "$(HAVE_GETOPT)" == "YES" +CDEFS += -DHAVE_GETOPT +.ENDIF + # --- Files -------------------------------------------------------- OBJFILES= \ @@ -83,6 +87,11 @@ APP2TARGET= rscdep APP2OBJS= $(OBJ)$/rscdep.obj APP2LIBS= $(LB)$/$(TARGET).lib $(LB)$/$(TARGET1).lib APP2STDLIBS= $(SALLIB) $(VOSLIB) $(TOOLSLIB) $(BASEGFXLIB) $(UCBHELPERLIB) $(CPPULIB) $(COMPHELPERLIB) $(I18NISOLANGLIB) $(CPPUHELPERLIB) $(SALHELPERLIB) +.IF "$(HAVE_GETOPT)" != "YES" +.IF "$(OS)"=="WNT" +APP2STDLIBS+=gnu_getopt.lib +.ENDIF +.ENDIF APP2RPATH= NONE APP2RPATH= NONE APP2RPATH= NONE diff --git a/tools/bootstrp/rscdep.cxx b/tools/bootstrp/rscdep.cxx index 5c18793c9833..37edfc6a8c18 100644 --- a/tools/bootstrp/rscdep.cxx +++ b/tools/bootstrp/rscdep.cxx @@ -45,6 +45,16 @@ #include "cppdep.hxx" +#if defined WNT +#if !defined HAVE_GETOPT +#define __STDC__ 1 +#define __GNU_LIBRARY__ +#include <external/glibc/getopt.h> +#else +#include <getopt.h> +#endif +#endif + class RscHrcDep : public CppDep { public: @@ -70,15 +80,6 @@ void RscHrcDep::Execute() //static String aDelim; -/* poor man's getopt() */ -int simple_getopt(char *argv[], const char *optstring); -#if defined(WNT) || defined(OS2) -static char *optarg = NULL; -static int optind = 1; -static int optopt = 0; -static int opterr = 0; -#endif - SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv ) { int c; @@ -179,7 +180,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv ) while( 1 ) { - c = simple_getopt( argv, + c = getopt( argc, argv, "_abcdefghi:jklmnopqrstuvwxyzABCDEFGHI:JKLMNOPQRSTUVWXYZ1234567890/-+=.\\()\""); if ( c == -1 ) break; @@ -296,41 +297,3 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv ) return 0; } -/* my very simple minded implementation of getopt() - * it's too sad that getopt() is not available everywhere - * note: this is not a full POSIX conforming getopt() - */ -int simple_getopt(char *argv[], const char *optstring) -{ - char *arg = argv[optind]; - - /* skip all response file arguments */ - if ( arg ) { - while ( *arg == '@' ) - arg = argv[++optind]; - - if ( arg[0] == '-' && arg[1] != '\0' ) { - const char *popt; - int c = arg[1]; - if ( (popt = strchr(optstring, c)) == NULL ) { - optopt = c; - if ( opterr ) - fprintf(stderr, "Unknown option character `\\x%x'.\n", optopt); - return '?'; - } - if ( *(++popt) == ':') { - if ( arg[2] != '\0' ) { - optarg = ++arg; - } else { - optarg = argv[++optind]; - } - } else { - optarg = NULL; - } - ++optind; - return c; - } - } - return -1; -} - diff --git a/tools/inc/tools/color.hxx b/tools/inc/tools/color.hxx index 56d596453740..a99ad1dd11c4 100644 --- a/tools/inc/tools/color.hxx +++ b/tools/inc/tools/color.hxx @@ -78,7 +78,7 @@ typedef UINT32 ColorData; #define COL_YELLOW RGB_COLORDATA( 0xFF, 0xFF, 0x00 ) #define COL_WHITE RGB_COLORDATA( 0xFF, 0xFF, 0xFF ) #define COL_TRANSPARENT TRGB_COLORDATA( 0xFF, 0xFF, 0xFF, 0xFF ) -#define COL_AUTO (UINT32)0xFFFFFFFF +#define COL_AUTO (ColorData)0xFFFFFFFF #define COL_AUTHOR1_DARK RGB_COLORDATA(198, 146, 0) #define COL_AUTHOR1_NORMAL RGB_COLORDATA(255, 255, 158) #define COL_AUTHOR1_LIGHT RGB_COLORDATA(255, 255, 195) diff --git a/tools/inc/tools/diagnose_ex.h b/tools/inc/tools/diagnose_ex.h index fac739b32583..b244d11dc305 100644 --- a/tools/inc/tools/diagnose_ex.h +++ b/tools/inc/tools/diagnose_ex.h @@ -130,6 +130,17 @@ #define ENSURE_OR_RETURN_FALSE(c, m) \ ENSURE_OR_RETURN(c, m, false) +/** This macro asserts the given condition (in debug mode), and + returns afterwards, without return value "void". + */ +#define ENSURE_OR_RETURN_VOID( c, m ) \ + if( !(c) ) \ + { \ + OSL_ENSURE( c, m ); \ + return; \ + } + + /** This macro asserts the given condition (in debug mode), and returns afterwards, without return value "void". @@ -141,6 +152,24 @@ return; \ } +/** asserts a given condition (in debug mode), and continues the most-inner + loop if the condition is not met +*/ +#define ENSURE_OR_CONTINUE( c, m ) \ + if ( !(c) ) \ + { \ + OSL_ENSURE( false, m ); \ + continue; \ + } +/** asserts a given condition (in debug mode), and continues the most-inner + loop if the condition is not met +*/ +#define ENSURE_OR_BREAK( c, m ) \ + if ( !(c) ) \ + { \ + OSL_ENSURE( false, m ); \ + break; \ + } #endif // TOOLS_DIAGNOSE_EX_H diff --git a/tools/inc/tools/gen.hxx b/tools/inc/tools/gen.hxx index 85da22126b77..308cc02165ce 100644 --- a/tools/inc/tools/gen.hxx +++ b/tools/inc/tools/gen.hxx @@ -420,6 +420,7 @@ public: Point Center() const; void Move( long nHorzMove, long nVertMove ); + inline void Transpose(); inline void SetPos( const Point& rPoint ); void SetSize( const Size& rSize ); inline Size GetSize() const; @@ -578,6 +579,20 @@ inline void Rectangle::Move( long nHorzMove, long nVertMove ) nBottom += nVertMove; } +void Rectangle::Transpose() +{ + if ( !IsEmpty() ) + { + long swap( nLeft ); + nLeft = nTop; + nTop = swap; + + swap = nRight; + nRight = nBottom; + nBottom = swap; + } +} + inline void Rectangle::SetPos( const Point& rPoint ) { if ( nRight != RECT_EMPTY ) diff --git a/tools/inc/tools/preextstl.h b/tools/inc/tools/preextstl.h index 4d0418d01c57..27aed38686f0 100644 --- a/tools/inc/tools/preextstl.h +++ b/tools/inc/tools/preextstl.h @@ -24,8 +24,11 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ - +//1. Force inclusion of a std:: using header to ensure the stlport define +//of std as "stlport" +#include <algorithm> #if defined(ADAPT_EXT_STL) +//2. Force inclusion of stlport headers to get their stlport:: definitions # include <ostream> # include <istream> # include <fstream> @@ -33,12 +36,14 @@ # include <vector> # include <list> # include <map> -# include <algorithm> +//3. Now force inclusion of native headers to get their std:: definitions # if defined(std) # define std_was_redefined_as_stlport std # undef std # define _STLP_OUTERMOST_HEADER_ID 0xdeadbeaf -# pragma GCC visibility push(default) +# if defined(_GNUC__) +# pragma GCC visibility push(default) +# endif # include _STLP_NATIVE_HEADER(exception_defines.h) # include _STLP_NATIVE_HEADER(limits) # include _STLP_NATIVE_HEADER(memory) @@ -56,7 +61,9 @@ # include _STLP_NATIVE_HEADER(vector) # include _STLP_NATIVE_HEADER(list) # include _STLP_NATIVE_HEADER(map) -# pragma GCC visibility pop +# if defined(_GNUC__) +# pragma GCC visibility pop +# endif # endif #endif //ext_std resolves to the std that external c++ libs, e.g. Graphite were built diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h index 2ae0fa5f2f32..096d34d05b9e 100644 --- a/tools/inc/tools/solar.h +++ b/tools/inc/tools/solar.h @@ -122,23 +122,13 @@ typedef BYTE SVBT64[8]; #ifdef __cplusplus inline BYTE SVBT8ToByte ( const SVBT8 p ) { return p[0]; } -#if defined OSL_LITENDIAN && SAL_TYPES_ALIGNMENT2 == 1 -inline USHORT SVBT16ToShort( const SVBT16 p ) { return *(USHORT*)p; } -#else inline USHORT SVBT16ToShort( const SVBT16 p ) { return (USHORT)p[0] + ((USHORT)p[1] << 8); } -#endif -#if defined OSL_LITENDIAN && SAL_TYPES_ALIGNMENT4 == 1 -inline sal_uInt32 SVBT32ToUInt32 ( const SVBT32 p ) { return *(sal_uInt32*)p; } -#else inline sal_uInt32 SVBT32ToUInt32 ( const SVBT32 p ) { return (sal_uInt32)p[0] + ((sal_uInt32)p[1] << 8) + ((sal_uInt32)p[2] << 16) + ((sal_uInt32)p[3] << 24); } -#endif -#if defined OSL_LITENDIAN && SAL_TYPES_ALIGNMENT8 == 1 -inline double SVBT64ToDouble( const SVBT64 p ) { return *(double*)p; } -#elif defined OSL_LITENDIAN +#if defined OSL_LITENDIAN inline double SVBT64ToDouble( const SVBT64 p ) { double n; ((BYTE*)&n)[0] = p[0]; ((BYTE*)&n)[1] = p[1]; @@ -163,23 +153,13 @@ inline double SVBT64ToDouble( const SVBT64 p ) { double n; #endif inline void ByteToSVBT8 ( BYTE n, SVBT8 p ) { p[0] = n; } -#if defined OSL_LITENDIAN && SAL_TYPES_ALIGNMENT2 == 1 -inline void ShortToSVBT16( USHORT n, SVBT16 p ) { *(USHORT*)p = n; } -#else inline void ShortToSVBT16( USHORT n, SVBT16 p ) { p[0] = (BYTE) n; p[1] = (BYTE)(n >> 8); } -#endif -#if defined OSL_LITENDIAN && SAL_TYPES_ALIGNMENT4 == 1 -inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p ) { *(sal_uInt32*)p = n; } -#else inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p ) { p[0] = (BYTE) n; p[1] = (BYTE)(n >> 8); p[2] = (BYTE)(n >> 16); p[3] = (BYTE)(n >> 24); } -#endif -#if defined OSL_LITENDIAN && SAL_TYPES_ALIGNMENT8 == 1 -inline void DoubleToSVBT64( double n, SVBT64 p ) { *(double*)p = n; } -#elif defined OSL_LITENDIAN +#if defined OSL_LITENDIAN inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((BYTE*)&n)[0]; p[1] = ((BYTE*)&n)[1]; p[2] = ((BYTE*)&n)[2]; diff --git a/tools/inc/tools/svborder.hxx b/tools/inc/tools/svborder.hxx index 9523a71a060f..a0509bcc89be 100644 --- a/tools/inc/tools/svborder.hxx +++ b/tools/inc/tools/svborder.hxx @@ -49,6 +49,14 @@ public: } BOOL operator != ( const SvBorder & rObj ) const { return !(*this == rObj); } + SvBorder & operator = ( const SvBorder & rBorder ) + { + Left() = rBorder.Left(); + Top() = rBorder.Top(); + Right() = rBorder.Right(); + Bottom() = rBorder.Bottom(); + return *this; + } SvBorder & operator += ( const SvBorder & rBorder ) { Left() += rBorder.Left(); diff --git a/tools/inc/tools/svlibrary.hxx b/tools/inc/tools/svlibrary.hxx new file mode 100644 index 000000000000..fa8ff7c8068b --- /dev/null +++ b/tools/inc/tools/svlibrary.hxx @@ -0,0 +1,42 @@ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * 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 _SVLIBRARY_HXX +#define _SVLIBRARY_HXX + +#include "tools/toolsdllapi.h" + +#include <osl/module.hxx> +#include <rtl/ustring.hxx> + +class TOOLS_DLLPUBLIC SvLibrary +{ +public: + static bool LoadModule( osl::Module&, const rtl::OUString& rLibName, ::oslGenericFunction baseModule, ::sal_Int32 mode = SAL_LOADMODULE_DEFAULT ); +}; + +#endif + diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx index 8f13af8fd842..7d6296b76e8c 100644 --- a/tools/inc/tools/wintypes.hxx +++ b/tools/inc/tools/wintypes.hxx @@ -215,6 +215,7 @@ typedef sal_Int64 WinBits; // Window-Bits for CheckBox #define WB_CBLINESTYLE ((WinBits)SAL_CONST_INT64(0x2000000000)) +#define WB_EARLYTOGGLE ((WinBits)SAL_CONST_INT64(0x4000000000)) // Window-Bits for Edit #define WB_PASSWORD ((WinBits)0x01000000) diff --git a/tools/prj/d.lst b/tools/prj/d.lst index 6b4a99a3a676..e0291c2f8ad0 100644 --- a/tools/prj/d.lst +++ b/tools/prj/d.lst @@ -37,6 +37,7 @@ mkdir: %_DEST%\inc%_EXT%\bootstrp ..\inc\tools\postextstl.h %_DEST%\inc%_EXT%\tools\postextstl.h ..\inc\tools\preextstl.h %_DEST%\inc%_EXT%\tools\preextstl.h +..\inc\tools\svlibrary.hxx %_DEST%\inc%_EXT%\tools\svlibrary.hxx ..\inc\tools\solarmutex.hxx %_DEST%\inc%_EXT%\tools\solarmutex.hxx ..\inc\tools\wintypes.hxx %_DEST%\inc%_EXT%\tools\wintypes.hxx ..\inc\tools\mapunit.hxx %_DEST%\inc%_EXT%\tools\mapunit.hxx diff --git a/tools/source/generic/makefile.mk b/tools/source/generic/makefile.mk index 5cdaa02065ae..07bab82f32b0 100644 --- a/tools/source/generic/makefile.mk +++ b/tools/source/generic/makefile.mk @@ -37,9 +37,10 @@ TARGET=gen # --- Files -------------------------------------------------------- -EXCEPTIONSFILES = $(SLO)$/poly.obj $(OBJ)$/poly.obj +EXCEPTIONSFILES = $(SLO)$/poly.obj $(OBJ)$/poly.obj $(SLO)$/svlibrary.obj SLOFILES= $(SLO)$/toolsin.obj \ + $(SLO)$/svlibrary.obj \ $(SLO)$/b3dtrans.obj \ $(SLO)$/link.obj \ $(SLO)$/bigint.obj \ diff --git a/tools/source/generic/svlibrary.cxx b/tools/source/generic/svlibrary.cxx new file mode 100644 index 000000000000..6ebfd0086b5c --- /dev/null +++ b/tools/source/generic/svlibrary.cxx @@ -0,0 +1,129 @@ +/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * 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.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_tools.hxx"
+
+#include <tools/svlibrary.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/util/XMacroExpander.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <comphelper/processfactory.hxx>
+#include <tools/string.hxx>
+#include <rtl/uri.hxx>
+
+using namespace com::sun::star;
+
+static uno::Sequence< rtl::OUString > GetMultiPaths_Impl()
+{
+ uno::Sequence< rtl::OUString > aRes;
+ uno::Sequence< rtl::OUString > aInternalPaths;
+ uno::Sequence< rtl::OUString > aUserPaths;
+
+ bool bSuccess = true;
+ uno::Reference< lang::XMultiServiceFactory > xMgr( comphelper::getProcessServiceFactory() );
+ if (xMgr.is())
+ {
+ try
+ {
+ String aInternal;
+ aInternal.AppendAscii("Libraries");
+ String aUser;
+ aUser.AppendAscii("Libraries");
+ aInternal .AppendAscii( "_internal" );
+ aUser .AppendAscii( "_user" );
+
+ uno::Reference< beans::XPropertySet > xPathSettings( xMgr->createInstance(
+ rtl::OUString::createFromAscii( "com.sun.star.util.PathSettings" ) ), uno::UNO_QUERY_THROW );
+ xPathSettings->getPropertyValue( aInternal ) >>= aInternalPaths;
+ xPathSettings->getPropertyValue( aUser ) >>= aUserPaths;
+ }
+ catch (uno::Exception &)
+ {
+ bSuccess = false;
+ }
+ }
+ if (bSuccess)
+ {
+ sal_Int32 nMaxEntries = aInternalPaths.getLength() + aUserPaths.getLength();
+ aRes.realloc( nMaxEntries );
+ rtl::OUString *pRes = aRes.getArray();
+ sal_Int32 nCount = 0; // number of actually added entries
+ for (int i = 0; i < 2; ++i)
+ {
+ const uno::Sequence< rtl::OUString > &rPathSeq = i == 0 ? aUserPaths : aInternalPaths;
+ const rtl::OUString *pPathSeq = rPathSeq.getConstArray();
+ for (sal_Int32 k = 0; k < rPathSeq.getLength(); ++k)
+ {
+ const bool bAddUser = (&rPathSeq == &aUserPaths);
+ const bool bAddInternal = (&rPathSeq == &aInternalPaths);
+ if ((bAddUser || bAddInternal) && pPathSeq[k].getLength() > 0)
+ pRes[ nCount++ ] = pPathSeq[k];
+ }
+ }
+ aRes.realloc( nCount );
+ }
+
+ return aRes;
+}
+
+bool SvLibrary::LoadModule( osl::Module& rModule, const rtl::OUString& rLibName, ::oslGenericFunction baseModule, ::sal_Int32 mode )
+{
+ static uno::Sequence < rtl::OUString > aPaths = GetMultiPaths_Impl();
+ bool bLoaded = false;
+
+ for (sal_Int32 n=0; n<aPaths.getLength(); n++)
+ {
+ rtl::OUString aMod = aPaths[n];
+ if ( aPaths[n].indexOfAsciiL("vnd.sun.star.expand",19) == 0)
+ {
+ uno::Reference< uno::XComponentContext > xComponentContext = comphelper::getProcessComponentContext();
+ uno::Reference< util::XMacroExpander > xMacroExpander;
+ xComponentContext->getValueByName(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.util.theMacroExpander") ) )
+ >>= xMacroExpander;
+
+ aMod = aMod.copy( sizeof("vnd.sun.star.expand:") -1 );
+ aMod = ::rtl::Uri::decode( aMod, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
+ aMod = xMacroExpander->expandMacros( aMod );
+ }
+
+ aMod += ::rtl::OUString( sal_Unicode('/') );
+ aMod += rLibName;
+ bLoaded = rModule.load( aMod, mode );
+ if ( bLoaded )
+ break;
+ }
+
+ if (!bLoaded )
+ bLoaded = rModule.loadRelative( baseModule, rLibName, mode );
+
+ return bLoaded;
+}
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx index 9e4f501d1823..88ccb2113e0d 100644 --- a/tools/source/stream/strmunx.cxx +++ b/tools/source/stream/strmunx.cxx @@ -209,7 +209,7 @@ static sal_uInt32 GetSvError( int nErrno ) { 0, SVSTREAM_OK }, { EACCES, SVSTREAM_ACCESS_DENIED }, { EBADF, SVSTREAM_INVALID_HANDLE }, -#if defined( RS6000 ) || defined( ALPHA ) || defined( HP9000 ) || defined( NETBSD ) || defined(FREEBSD) || defined(MACOSX) +#if defined( RS6000 ) || defined( ALPHA ) || defined( HP9000 ) || defined( NETBSD ) || defined(FREEBSD) || defined(MACOSX) || defined(__FreeBSD_kernel__) { EDEADLK, SVSTREAM_LOCKING_VIOLATION }, #else { EDEADLOCK, SVSTREAM_LOCKING_VIOLATION }, @@ -223,7 +223,7 @@ static sal_uInt32 GetSvError( int nErrno ) { EAGAIN, SVSTREAM_LOCKING_VIOLATION }, { EISDIR, SVSTREAM_PATH_NOT_FOUND }, { ELOOP, SVSTREAM_PATH_NOT_FOUND }, -#if ! defined( RS6000 ) && ! defined( ALPHA ) && ! defined( NETBSD ) && ! defined (FREEBSD) && ! defined (MACOSX) +#if ! defined( RS6000 ) && ! defined( ALPHA ) && ! defined( NETBSD ) && ! defined (FREEBSD) && ! defined (MACOSX) && ! defined(__FreeBSD_kernel__) { EMULTIHOP, SVSTREAM_PATH_NOT_FOUND }, { ENOLINK, SVSTREAM_PATH_NOT_FOUND }, #endif |