autodoc/source/exes/adc_uni/main.cxx    |    2 +-
 rdbmaker/source/rdbmaker/rdbmaker.cxx   |    2 +-
 registry/tools/regmerge.cxx             |    2 +-
 registry/tools/regview.cxx              |    2 +-
 sal/inc/sal/mathconf.h                  |    8 +++++++-
 sal/osl/w32/module.cxx                  |    2 +-
 sal/osl/w32/procimpl.cxx                |    8 ++++----
 solenv/gbuild/platform/WNT_INTEL_GCC.mk |    5 +++++
 solenv/inc/wntgcci.mk                   |    5 +++++
 9 files changed, 26 insertions(+), 10 deletions(-)

New commits:
commit 832e6d22935040fe61504c90838415fa55feb24d
Author: Jan Holesovsky <ke...@suse.cz>
Date:   Wed Nov 23 11:27:05 2011 +0100

    Some trivial fixes for MinGW with -std=c++0x enabled; not finished.

diff --git a/autodoc/source/exes/adc_uni/main.cxx 
b/autodoc/source/exes/adc_uni/main.cxx
index 6e5a11a..c119bb6 100644
--- a/autodoc/source/exes/adc_uni/main.cxx
+++ b/autodoc/source/exes/adc_uni/main.cxx
@@ -37,7 +37,7 @@
 
 int
 #ifdef WNT
-    _cdecl
+    __cdecl
 #endif
 main( int        argc,
       char *     argv[] )
diff --git a/rdbmaker/source/rdbmaker/rdbmaker.cxx 
b/rdbmaker/source/rdbmaker/rdbmaker.cxx
index b20043e..fba8469 100644
--- a/rdbmaker/source/rdbmaker/rdbmaker.cxx
+++ b/rdbmaker/source/rdbmaker/rdbmaker.cxx
@@ -300,7 +300,7 @@ sal_Bool produceAllTypes(const OString& typeName,
 #if (defined UNX)
 int main( int argc, char * argv[] )
 #else
-int _cdecl main( int argc, char * argv[] )
+int __cdecl main( int argc, char * argv[] )
 #endif
 {
     RdbOptions options;
diff --git a/registry/tools/regmerge.cxx b/registry/tools/regmerge.cxx
index 193209b..7b5997d 100644
--- a/registry/tools/regmerge.cxx
+++ b/registry/tools/regmerge.cxx
@@ -95,7 +95,7 @@ bool Options_Impl::initOptions_Impl (std::vector< std::string 
> & rArgs)
 #if (defined UNX)
 int main( int argc, char * argv[] )
 #else
-int _cdecl main( int argc, char * argv[] )
+int __cdecl main( int argc, char * argv[] )
 #endif
 {
     Options_Impl options(argv[0]);
diff --git a/registry/tools/regview.cxx b/registry/tools/regview.cxx
index 2cb11b8..57ebcea 100644
--- a/registry/tools/regview.cxx
+++ b/registry/tools/regview.cxx
@@ -43,7 +43,7 @@ using namespace registry::tools;
 #if (defined UNX)
 int main( int argc, char * argv[] )
 #else
-int _cdecl main( int argc, char * argv[] )
+int __cdecl main( int argc, char * argv[] )
 #endif
 {
     RegHandle       hReg;
diff --git a/sal/inc/sal/mathconf.h b/sal/inc/sal/mathconf.h
index d673f34..1e4b11b 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 07f750e..026cf51 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 7ef6fb6..676c0e8 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);
diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk 
b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
index b0b2bdb..6c50a9c 100644
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
@@ -80,6 +80,11 @@ gb_CXXFLAGS += --sysroot=$(SYSBASE)
 gb_CFLAGS += --sysroot=$(SYSBASE)
 endif
 
+ifeq ($(HAVE_CXX0X),TRUE)
+# We can turn on additional useful checks with c++0x
+# FIXME still does not compile fully gb_CXXFLAGS += -std=c++0x
+endif
+
 gb_LinkTarget_EXCEPTIONFLAGS += \
        -fno-enforce-eh-specs \
 
diff --git a/solenv/inc/wntgcci.mk b/solenv/inc/wntgcci.mk
index 3831c85..d36bee6 100644
--- a/solenv/inc/wntgcci.mk
+++ b/solenv/inc/wntgcci.mk
@@ -46,6 +46,11 @@ CFLAGS+=-fmessage-length=0 -c
 
 CFLAGSCC=-pipe $(ARCH_FLAGS)
 CFLAGSCXX=-pipe $(ARCH_FLAGS)
+
+.IF "$(HAVE_CXX0X)" == "TRUE"
+# FIXME still does not compile fully CFLAGSCXX+=-std=c++0x
+.ENDIF
+
 CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs
 CFLAGS_NO_EXCEPTIONS=-fno-exceptions
 PICSWITCH:=
_______________________________________________
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to