diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-11-23 11:27:05 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-11-23 11:59:30 +0100 |
commit | 832e6d22935040fe61504c90838415fa55feb24d (patch) | |
tree | cdc9a346feecb0bb92c293902984aa6b36042707 /sal | |
parent | 6cdbf1cc9bc3fd97acdba981bad04d552dafc627 (diff) |
Some trivial fixes for MinGW with -std=c++0x enabled; not finished.
Diffstat (limited to 'sal')
-rw-r--r-- | sal/inc/sal/mathconf.h | 8 | ||||
-rw-r--r-- | sal/osl/w32/module.cxx | 2 | ||||
-rw-r--r-- | sal/osl/w32/procimpl.cxx | 8 |
3 files changed, 12 insertions, 6 deletions
diff --git a/sal/inc/sal/mathconf.h b/sal/inc/sal/mathconf.h index d673f34ed473..1e4b11b112b4 100644 --- a/sal/inc/sal/mathconf.h +++ b/sal/inc/sal/mathconf.h @@ -37,6 +37,10 @@ #include <ieeefp.h> #endif /* SOLARIS */ +#if defined(__cplusplus) && ( defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L ) +#include <cmath> +#endif + #if defined __cplusplus extern "C" { #endif /* __cplusplus */ @@ -59,7 +63,9 @@ extern "C" { /* SAL_MATH_FINITE(d): test double d on INFINITY, NaN et al. */ -#if defined( WNT) +#if defined(__cplusplus) && ( defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L ) +#define SAL_MATH_FINITE(d) std::isfinite(d) +#elif defined( WNT) #define SAL_MATH_FINITE(d) _finite(d) #elif defined IOS /* C++ is so nice. This is the only way I could come up with making diff --git a/sal/osl/w32/module.cxx b/sal/osl/w32/module.cxx index 07f750e49724..026cf514b50f 100644 --- a/sal/osl/w32/module.cxx +++ b/sal/osl/w32/module.cxx @@ -79,7 +79,7 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 /*nRtldM //on Windows XP and ERROR_INSUFFICIENT_BUFFER on Windows 7 (64bit) if (hInstance == NULL && Module->length > 260) { - std::vector<sal_Unicode, rtl::Allocator<sal_Unicode> > vec(Module->length + 1); + std::vector<sal_Unicode> vec(Module->length + 1); DWORD len = GetShortPathNameW(reinterpret_cast<LPCWSTR>(Module->buffer), reinterpret_cast<LPWSTR>(&vec[0]), Module->length + 1); if (len ) diff --git a/sal/osl/w32/procimpl.cxx b/sal/osl/w32/procimpl.cxx index 7ef6fb62ad8c..676c0e8b58cd 100644 --- a/sal/osl/w32/procimpl.cxx +++ b/sal/osl/w32/procimpl.cxx @@ -68,11 +68,11 @@ const rtl::OUString QUOTE(RTL_CONSTASCII_USTRINGPARAM("\"")); namespace /* private */ { //################################################# - typedef std::list<rtl::OUString, rtl::Allocator<rtl::OUString> > string_container_t; + typedef std::list<rtl::OUString> string_container_t; typedef string_container_t::iterator string_container_iterator_t; typedef string_container_t::const_iterator string_container_const_iterator_t; typedef std::pair<string_container_iterator_t, string_container_iterator_t> iterator_pair_t; - typedef std::vector<sal_Unicode, rtl::Allocator<sal_Unicode> > environment_container_t; + typedef std::vector<sal_Unicode> environment_container_t; //################################################# /* Function object that compares two strings that are @@ -312,7 +312,7 @@ namespace /* private */ rtl::OUString ret(path); if (path.getLength() > 260) { - std::vector<sal_Unicode, rtl::Allocator<sal_Unicode> > vec(path.getLength() + 1); + std::vector<sal_Unicode> vec(path.getLength() + 1); //GetShortPathNameW only works if the file can be found! const DWORD len = GetShortPathNameW( reinterpret_cast<LPCWSTR>(path.getStr()), reinterpret_cast<LPWSTR>(&vec[0]), path.getLength() + 1); @@ -321,7 +321,7 @@ namespace /* private */ && extension.getLength()) { const rtl::OUString extPath(path + extension); - std::vector<sal_Unicode, rtl::Allocator<sal_Unicode> > vec2( + std::vector<sal_Unicode> vec2( extPath.getLength() + 1); const DWORD len2 = GetShortPathNameW( reinterpret_cast<LPCWSTR>(extPath.getStr()), reinterpret_cast<LPWSTR>(&vec2[0]), extPath.getLength() + 1); |