From 8646ab97dc37c0606b19057686bf3d610f9c15ee Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 10 Feb 2017 14:05:21 +0100 Subject: Remove MinGW support In OOo times, there'd originally been efforts to allow building on Windows with MinGW. Later, in LO times, this has been shifted to an attempt of cross- compiling for Windows on Linux. That attempt can be considered abandoned, and the relevant code rotting. Due to this heritage, there are now three kinds of MinGW-specific code in LO: * Code from the original OOo native Windows effort that is no longer relevant for the LO cross-compilation effort, but has never been removed properly. * Code from the original OOo native Windows effort that is re-purposed for the LO cross-compilation effort. * Code that has been added specifially for the LO cross-compilation effort. All three kinds of code are removed. (An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing --with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.) Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568 Reviewed-on: https://gerrit.libreoffice.org/34127 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- shell/inc/thumbviewer.hxx | 5 ----- shell/inc/utilities.hxx | 24 ---------------------- shell/source/win32/shlxthandler/classfactory.cxx | 3 --- .../source/win32/shlxthandler/ooofilt/ooofilt.cxx | 4 ---- .../win32/shlxthandler/prophdl/propertyhdl.cxx | 4 ---- .../win32/shlxthandler/util/iso8601_converter.cxx | 19 ----------------- 6 files changed, 59 deletions(-) (limited to 'shell') diff --git a/shell/inc/thumbviewer.hxx b/shell/inc/thumbviewer.hxx index d5a314c26fce..81698f084871 100644 --- a/shell/inc/thumbviewer.hxx +++ b/shell/inc/thumbviewer.hxx @@ -26,11 +26,6 @@ #endif #include #include -#ifdef __MINGW32__ -#include -using std::min; -using std::max; -#endif #ifndef DONT_HAVE_GDIPLUS #include #endif diff --git a/shell/inc/utilities.hxx b/shell/inc/utilities.hxx index 551089afd600..9d772ec9872a 100644 --- a/shell/inc/utilities.hxx +++ b/shell/inc/utilities.hxx @@ -35,32 +35,8 @@ #include #define STRSAFE_NO_DEPRECATE -#ifdef __MINGW32__ - -// Work around lack of strsafe library in mingw-w64, do let their -// strsafe.h provide inlines of StringCchVPrintfA etc, avoid linking -// errors in a debug build. -#ifdef __CRT__NO_INLINE -#undef __CRT__NO_INLINE -#define DID_UNDEFINE__CRT__NO_INLINE -#endif - -extern "C" { - -#endif - #include -#ifdef __MINGW32__ -} - -#ifdef DID_UNDEFINE__CRT__NO_INLINE -#define __CRT__NO_INLINE -#endif - -#endif - - /** Convert a string to a wstring using CP_ACP */ diff --git a/shell/source/win32/shlxthandler/classfactory.cxx b/shell/source/win32/shlxthandler/classfactory.cxx index e64f87a87a33..3f2640c04dd7 100644 --- a/shell/source/win32/shlxthandler/classfactory.cxx +++ b/shell/source/win32/shlxthandler/classfactory.cxx @@ -22,9 +22,6 @@ #include "infotips.hxx" #include "propsheets.hxx" #include "columninfo.hxx" -#ifdef __MINGW32__ -#include -#endif #include "thumbviewer.hxx" #include "shlxthdl.hxx" diff --git a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx index f6f2516b6260..d308f3457a1f 100644 --- a/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx +++ b/shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx @@ -61,10 +61,6 @@ #include #include #include "propspec.hxx" -#ifdef __MINGW32__ -#include -using ::std::min; -#endif #include "stream_helper.hxx" diff --git a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx index 1dd38a0973ea..340985a0f239 100644 --- a/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx +++ b/shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx @@ -207,11 +207,7 @@ HRESULT STDMETHODCALLTYPE CPropertyHdl::Initialize( IStream *pStream, DWORD grfM if ( !m_pCache ) { -#ifdef __MINGW32__ - if ( FAILED( PSCreateMemoryPropertyStore( IID_IPropertyStoreCache, reinterpret_cast(&m_pCache) ) ) ) -#else if ( FAILED( PSCreateMemoryPropertyStore( IID_PPV_ARGS( &m_pCache ) ) ) ) -#endif OutputDebugStringFormatA( "CPropertyHdl::Initialize: PSCreateMemoryPropertyStore failed" ); BufferStream tmpStream(pStream); diff --git a/shell/source/win32/shlxthandler/util/iso8601_converter.cxx b/shell/source/win32/shlxthandler/util/iso8601_converter.cxx index 932b44b0655a..d8c6ddcf6bad 100644 --- a/shell/source/win32/shlxthandler/util/iso8601_converter.cxx +++ b/shell/source/win32/shlxthandler/util/iso8601_converter.cxx @@ -147,30 +147,11 @@ std::wstring iso8601_duration_to_local_duration(const std::wstring& iso8601durat hours = buff; } -#if defined(_MSC_VER) //&& defined(_M_X64) std::wostringstream oss; oss << std::setw(2) << std::setfill(wchar_t('0')) << hours << L":" << std::setw(2) << std::setfill(wchar_t('0')) << minutes << L":" << std::setw(2) << std::setfill(wchar_t('0')) << seconds; return oss.str(); -#elif defined( __MINGW32__ ) -#define ADD_AS_PREFILLED( st, out ) \ - if ( st.length() == 0 ) \ - out += L"00"; \ - else if ( st.length() == 1 ) \ - out += L"0"; \ - out += st; - - std::wstring result; - ADD_AS_PREFILLED( hours, result ) - result += L":"; - ADD_AS_PREFILLED( minutes, result ) - result += L":"; - ADD_AS_PREFILLED( seconds, result ) - - return result; -#undef ADD_AS_PREFILLED -#endif } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3