summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-02-10 14:05:21 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-02-10 18:01:27 +0000
commit8646ab97dc37c0606b19057686bf3d610f9c15ee (patch)
tree17b3df6f5cf55cb1091c4aa70930dd415d9ea0e3 /include
parent09e9274fc080b471393b806617eb03124db67590 (diff)
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 <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/cppuhelper/implementationentry.hxx16
-rw-r--r--include/oox/helper/helper.hxx2
-rw-r--r--include/rtl/ustrbuf.hxx3
-rw-r--r--include/sal/config.h3
-rw-r--r--include/sal/types.h21
-rw-r--r--include/systools/win32/comptr.hxx4
-rw-r--r--include/systools/win32/snprintf.h5
-rw-r--r--include/systools/win32/uwinapi.h7
-rw-r--r--include/wntgcci/jni_md.h35
-rw-r--r--include/wntgcci/sehandler.hxx128
-rw-r--r--include/wntgccx/jni_md.h35
-rw-r--r--include/wntgccx/sehandler.hxx46
12 files changed, 8 insertions, 297 deletions
diff --git a/include/cppuhelper/implementationentry.hxx b/include/cppuhelper/implementationentry.hxx
index e7bb34b838a6..36bf15af138d 100644
--- a/include/cppuhelper/implementationentry.hxx
+++ b/include/cppuhelper/implementationentry.hxx
@@ -22,16 +22,6 @@
#include <cppuhelper/factory.hxx>
#include <cppuhelper/cppuhelperdllapi.h>
-// MinGW wants it the one way around while MSVC wants it the other (cf.
-// <sourceforge.net/support/tracker.php?aid=3514133> "Syntactic __cdecl
-// incompatibility with MSVC"; and everywhere else, SAL_CALL is empty, so
-// doesn't matter):
-#if defined __GNUC__
-#define MY_FN_PTR(name) SAL_CALL (* name)
-#else
-#define MY_FN_PTR(name) (SAL_CALL * name)
-#endif
-
namespace cppu
{
/** One struct instance represents all data necessary for registering one service implementation.
@@ -46,12 +36,12 @@ struct SAL_WARN_UNUSED ImplementationEntry
/** Function that returns the implementation-name of the implementation
(same as XServiceInfo.getImplementationName() ).
*/
- rtl::OUString MY_FN_PTR( getImplementationName )();
+ rtl::OUString (SAL_CALL * getImplementationName)();
/** Function that returns all supported servicenames of the implementation
( same as XServiceInfo.getSupportedServiceNames() ).
*/
- css::uno::Sequence< rtl::OUString > MY_FN_PTR( getSupportedServiceNames ) ();
+ css::uno::Sequence< rtl::OUString > (SAL_CALL * getSupportedServiceNames) ();
/** Function that creates a SingleComponentFactory.
@@ -59,7 +49,7 @@ struct SAL_WARN_UNUSED ImplementationEntry
removed library unloading feature; always set to null.
*/
css::uno::Reference< css::lang::XSingleComponentFactory >
- MY_FN_PTR( createFactory )(
+ (SAL_CALL * createFactory)(
ComponentFactoryFunc fptr,
::rtl::OUString const & rImplementationName,
css::uno::Sequence< ::rtl::OUString > const & rServiceNames,
diff --git a/include/oox/helper/helper.hxx b/include/oox/helper/helper.hxx
index 1d9d1c480c9c..afbbef5322bd 100644
--- a/include/oox/helper/helper.hxx
+++ b/include/oox/helper/helper.hxx
@@ -208,7 +208,7 @@ public:
#ifdef OSL_BIGENDIAN
static void convertLittleEndian( sal_Int8& ) {} // present for usage in templates
static void convertLittleEndian( sal_uInt8& ) {} // present for usage in templates
-#if !defined SAL_W32 || defined __MINGW32__ // cf. sal/types.h sal_Unicode
+#if !defined SAL_W32 // cf. sal/types.h sal_Unicode
static void convertLittleEndian( char16_t& rnValue ) { swap2( reinterpret_cast< sal_uInt8* >( &rnValue ) ); }
#endif
static void convertLittleEndian( sal_Int16& rnValue ) { swap2( reinterpret_cast< sal_uInt8* >( &rnValue ) ); }
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx
index 57c73a8012f8..a313307dd7d6 100644
--- a/include/rtl/ustrbuf.hxx
+++ b/include/rtl/ustrbuf.hxx
@@ -779,8 +779,7 @@ public:
return append( &c, 1 );
}
-#if LIBO_INTERNAL_ONLY && \
- (!defined SAL_W32 || defined __MINGW32__ || defined __clang__)
+#if LIBO_INTERNAL_ONLY && (!defined SAL_W32 || defined __clang__)
// cf. sal/types.h sal_Unicode
void append(sal_uInt16) = delete;
#endif
diff --git a/include/sal/config.h b/include/sal/config.h
index a363b1922533..24612f70ec18 100644
--- a/include/sal/config.h
+++ b/include/sal/config.h
@@ -44,9 +44,6 @@
#endif /* defined _MSC_VER */
/* Provide ISO C99 compatible versions of snprint and vsnprintf */
-#ifdef __MINGW32__
-#define LO_SNPRINTF_DLLIMPORT
-#endif
#ifndef _SNPRINTF_H
#include <systools/win32/snprintf.h>
#endif
diff --git a/include/sal/types.h b/include/sal/types.h
index 0aee64874fb6..a2e7b121b7c6 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -31,15 +31,6 @@
extern "C" {
#endif
-#if defined ( __MINGW32__ ) && !defined ( __USE_MINGW_ANSI_STDIO )
-/* Define to use the C99 formatting string for coherence reasons.
- * In mingw-w64 some functions are ported to the ms formatting string
- * some are not yet. This is the only way to make the formatting
- * strings work all the time
- */
-#define __USE_MINGW_ANSI_STDIO 1
-#endif
-
/********************************************************************************/
/* Data types
*/
@@ -141,11 +132,9 @@ typedef signed char sal_sChar;
*/
typedef unsigned char sal_uChar;
-#if ( defined(SAL_W32) && !defined(__MINGW32__) )
+#if defined(SAL_W32)
// http://msdn.microsoft.com/en-us/library/s3f49ktz%28v=vs.80%29.aspx
// "By default wchar_t is a typedef for unsigned short."
- // But MinGW has a native wchar_t, and on many places, we cannot deal with
- // that, so sal_Unicode has to be explicitly typedef'd as sal_uInt16 there.
typedef wchar_t sal_Unicode;
#else
#define SAL_UNICODE_NOTEQUAL_WCHAR_T
@@ -241,14 +230,10 @@ typedef void * sal_Handle;
#define SAL_MAX_ENUM 0x7fffffff
-#if defined(_MSC_VER) || defined(__MINGW32__)
+#if defined(_MSC_VER)
# define SAL_DLLPUBLIC_EXPORT __declspec(dllexport)
# define SAL_JNI_EXPORT __declspec(dllexport)
-#if defined(_MSC_VER)
# define SAL_DLLPUBLIC_IMPORT __declspec(dllimport)
-#else
-# define SAL_DLLPUBLIC_IMPORT
-#endif // defined(_MSC_VER)
# define SAL_DLLPRIVATE
# define SAL_DLLPUBLIC_TEMPLATE
# define SAL_DLLPUBLIC_RTTI
@@ -299,7 +284,7 @@ typedef void * sal_Handle;
These macros are used for inline declarations of exception classes, as in
rtl/malformeduriexception.hxx.
*/
-#if defined(__GNUC__) && ! defined(__MINGW32__)
+#if defined(__GNUC__)
# if defined(DISABLE_DYNLOADING)
# define SAL_EXCEPTION_DLLPUBLIC_EXPORT __attribute__((visibility("default")))
# else
diff --git a/include/systools/win32/comptr.hxx b/include/systools/win32/comptr.hxx
index db027274bc63..2a56ec92422a 100644
--- a/include/systools/win32/comptr.hxx
+++ b/include/systools/win32/comptr.hxx
@@ -174,15 +174,11 @@ class ComPtr
}
}
-#ifndef __MINGW32__
-
template< class T_QUERYINTERFACE >
HRESULT query(T_QUERYINTERFACE** pQuery)
{
return m_pInterface->QueryInterface(__uuidof(T_QUERYINTERFACE), (void**)pQuery);
}
-#endif
-
HRESULT query(REFIID rIID ,
void** pQuery)
diff --git a/include/systools/win32/snprintf.h b/include/systools/win32/snprintf.h
index 4342add2f76d..94799d085e20 100644
--- a/include/systools/win32/snprintf.h
+++ b/include/systools/win32/snprintf.h
@@ -66,9 +66,6 @@ extern "C" {
even if the buffer wasn't large
enough to hold the string. */
-
-#if !defined(__MINGW32__) || defined (__NO_ISOCEXT)
-
/* VS 2015 and above support ISO C snprintf */
#if _MSC_VER < 1900
@@ -80,8 +77,6 @@ LO_SNPRINTF_DLLIMPORT int __cdecl snprintf( char *buffer, size_t count, const ch
#endif
-#endif
-
/* Conflict with STL_port inline implementation */
#ifdef __cplusplus
diff --git a/include/systools/win32/uwinapi.h b/include/systools/win32/uwinapi.h
index cf89806f87fb..b441f3af6200 100644
--- a/include/systools/win32/uwinapi.h
+++ b/include/systools/win32/uwinapi.h
@@ -30,13 +30,6 @@
#include "prewin.h"
#include "postwin.h"
-#ifdef __MINGW32__
-#include <basetyps.h>
-#ifdef _UWINAPI_
-#define WINBASEAPI
-#endif
-#endif
-
#ifdef __cplusplus
inline bool IsValidHandle(HANDLE handle)
diff --git a/include/wntgcci/jni_md.h b/include/wntgcci/jni_md.h
deleted file mode 100644
index 3e596f45ac65..000000000000
--- a/include/wntgcci/jni_md.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-/* Fake jni_md.h for use when cross-compiling to Windows */
-
-#ifndef INCLUDED_WNTGCCI_JNI_MD_H
-#define INCLUDED_WNTGCCI_JNI_MD_H
-
-#define JNIEXPORT __declspec (dllexport)
-#define JNIIMPORT __declspec (dllimport)
-#define JNICALL __stdcall
-
-typedef long jint;
-typedef __int64 jlong;
-typedef char jbyte;
-
-#endif // INCLUDED_WNTGCCI_JNI_MD_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/wntgcci/sehandler.hxx b/include/wntgcci/sehandler.hxx
deleted file mode 100644
index 5ba2ec1f2402..000000000000
--- a/include/wntgcci/sehandler.hxx
+++ /dev/null
@@ -1,128 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-
-// Provenance of this code unclear. From crosswin32-dtrans-mingw.diff,
-// but from where it got there, I don't know.
-
-
-#ifndef INCLUDED_WNTGCCI_SEHANDLER_HXX
-#define INCLUDED_WNTGCCI_SEHANDLER_HXX
-
-#if !defined( __MINGW32__ ) || defined ( _WIN64 )
-#error This file should be included only in a 32-bit MinGW compilation
-#endif
-
-#include <windows.h>
-#include <setjmp.h>
-
-#ifndef EH_UNWINDING
-// See _EH_UNWINDING in MSVS9/VC/crt/src/except.inc
-#define EH_UNWINDING 2
-#endif
-
-namespace {
-class __SEHandler
-{
-public:
- __SEHandler() {}
- ~__SEHandler() {}
- typedef int (*PF)(void *, LPEXCEPTION_POINTERS);
- typedef void (*PH)(void *, LPEXCEPTION_POINTERS);
- typedef void (*PN)(void *);
- void Set(jmp_buf jb, void *pdata=NULL, PF pfilter=NULL, PH phandlerbody=NULL, PN pfinal=NULL)
- {
- __builtin_memcpy(m_jmpbuf, jb, sizeof(jmp_buf));
- m_pData=pdata;
- switch (reinterpret_cast<int>(pfilter))
- {
- default:
- m_filter=pfilter;
- break;
- case EXCEPTION_CONTINUE_EXECUTION:
- m_filter=DefaultFilterContinueExecution;
- break;
- case EXCEPTION_EXECUTE_HANDLER:
- m_filter=DefaultFilterExecuteHandler;
- break;
- case EXCEPTION_CONTINUE_SEARCH:
- m_filter=DefaultFilterContinueSearch;
- break;
- }
- if (phandlerbody)
- m_handlerbody=phandlerbody;
- else
- m_handlerbody=DefaultHandler;
- if (pfinal)
- m_final=pfinal;
- else
- m_final=DefaultFinal;
- m_ER.pHandlerClass = this;
- m_ER.hp = handler;
- asm("movl %%fs:0, %%eax\n\t"
- "movl %%eax, %0": "=m" (m_ER.prev): : "%eax" );
- asm("movl %0, %%eax\n\t"
- "movl %%eax, %%fs:0": : "r" (&m_ER): "%eax" );
- }
- void Reset()
- {
- m_final(m_pData);
- asm("movl %0, %%eax \n\t"
- "movl %%eax, %%fs:0"
- : : "m" (m_ER.prev): "%eax");
- }
-private:
- __SEHandler(const __SEHandler&);
- __SEHandler& operator=(const __SEHandler&);
- struct _ER {
- _ER* prev;
- PEXCEPTION_HANDLER hp;
- __SEHandler *pHandlerClass;
- };
- static EXCEPTION_DISPOSITION handler(struct _EXCEPTION_RECORD *pExceptionRecord,
- void * EstablisherFrame,
- struct _CONTEXT *ContextRecord,
- void * /*DispatcherContext*/)
- {
- __SEHandler* pThis = reinterpret_cast< _ER * >(EstablisherFrame)->pHandlerClass;
- if (pExceptionRecord->ExceptionFlags & EH_UNWINDING)
- {
- pThis->m_final(pThis->m_pData);
- return ExceptionContinueSearch;
- }
- EXCEPTION_POINTERS ep={pExceptionRecord, ContextRecord};
- switch (pThis->m_filter(pThis->m_pData, &ep))
- {
- case EXCEPTION_EXECUTE_HANDLER:
- RtlUnwind(EstablisherFrame, &&__set_label, pExceptionRecord, 0);
- __set_label:
- pThis->m_handlerbody(pThis->m_pData, &ep);
- ContextRecord->Ebp = pThis->m_jmpbuf[0];
- ContextRecord->Eip = pThis->m_jmpbuf[1];
- ContextRecord->Esp = pThis->m_jmpbuf[2];
- return ExceptionContinueExecution;
- case EXCEPTION_CONTINUE_SEARCH:
- return ExceptionContinueSearch;
- case EXCEPTION_CONTINUE_EXECUTION:
- return ExceptionContinueExecution;
- }
- return ExceptionContinueExecution;
- }
- static int DefaultFilterContinueSearch(void *, LPEXCEPTION_POINTERS) { return EXCEPTION_CONTINUE_SEARCH; }
- static int DefaultFilterContinueExecution(void *, LPEXCEPTION_POINTERS) { return EXCEPTION_CONTINUE_EXECUTION; }
- static int DefaultFilterExecuteHandler(void *, LPEXCEPTION_POINTERS) { return EXCEPTION_EXECUTE_HANDLER; }
- static void DefaultHandler(void *, LPEXCEPTION_POINTERS) {}
- static void DefaultFinal(void *) {}
- typedef int (*handler_p)(struct _EXCEPTION_RECORD *ExceptionRecord,
- void * EstablisherFrame,
- struct _CONTEXT *ContextRecord,
- void * DispatcherContext);
- _ER m_ER;
- void *m_pData;
- PN m_final;
- PH m_handlerbody;
- PF m_filter;
- jmp_buf m_jmpbuf;
-};
-
-} // namespace {
-
-#endif // INCLUDED_WNTGCCI_SEHANDLER_HXX
diff --git a/include/wntgccx/jni_md.h b/include/wntgccx/jni_md.h
deleted file mode 100644
index add4e2640d8a..000000000000
--- a/include/wntgccx/jni_md.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-/* Fake jni_md.h for use when cross-compiling to Windows */
-
-#ifndef INCLUDED_WNTGCCX_JNI_MD_H
-#define INCLUDED_WNTGCCX_JNI_MD_H
-
-#define JNIEXPORT __declspec (dllexport)
-#define JNIIMPORT __declspec (dllimport)
-#define JNICALL
-
-typedef long jint;
-typedef __int64 jlong;
-typedef char jbyte;
-
-#endif // INCLUDED_WNTGCCX_JNI_MD_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/wntgccx/sehandler.hxx b/include/wntgccx/sehandler.hxx
deleted file mode 100644
index e80a8283e429..000000000000
--- a/include/wntgccx/sehandler.hxx
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-
-/* From mingw-w64 excpt.h */
-
-#ifndef INCLUDED_WNTGCCX_SEHANDLER_HXX
-#define INCLUDED_WNTGCCX_SEHANDLER_HXX
-
-#if !defined( __MINGW32__ ) || !defined ( _WIN64 )
-#error This file should be included only in a 64-bit MinGW compilation
-#endif
-
-#ifdef __try
-#undef __try
-#endif
-
-#if 0
-#define __try \
- __asm__ __volatile__ ("\t.l_startw:\n" \
- );
-#else
-#define __try \
- if (true)
-#endif
-
-#ifdef __except
-#undef __except
-#endif
-
-#if 0
-#define __except(exvalue) \
- __asm__ __volatile__ ("\tnop\n" \
- "\t.seh_handler __C_specific_handler, @except\n" \
- "\t.seh_handlerdata\n" \
- "\t.long 1\n" \
- "\t.rva .l_startw, .l_endw, " __MINGW64_STRINGIFY(exvalue) " ,.l_endw\n" \
- "\t.text\n" \
- "\t.l_endw: nop\n" \
- );
-#else
-#define __except(exvalue) \
- if (false)
-#endif
-
-
-#endif // INCLUDED_WNTGCCX_SEHANDLER_HXX
-