summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Repository.mk4
-rw-r--r--RepositoryExternal.mk21
-rw-r--r--RepositoryFixes.mk17
-rw-r--r--avmedia/source/win/interface.hxx6
-rw-r--r--basic/Library_sb.mk13
-rw-r--r--basic/source/runtime/wnt-mingw.s44
-rw-r--r--basic/source/sbx/sbxdec.hxx5
-rw-r--r--bridges/Library_cpp_uno.mk16
-rw-r--r--bridges/Library_java_uno.mk8
-rw-r--r--bridges/inc/cppinterfaceproxy.hxx2
-rw-r--r--bridges/source/cpp_uno/mingw_intel/call.s279
-rw-r--r--bridges/source/cpp_uno/mingw_intel/callvirtualmethod.cxx137
-rw-r--r--bridges/source/cpp_uno/mingw_intel/callvirtualmethod.hxx40
-rw-r--r--bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx507
-rw-r--r--bridges/source/cpp_uno/mingw_intel/dllinit.cxx45
-rw-r--r--bridges/source/cpp_uno/mingw_intel/except.cxx293
-rw-r--r--bridges/source/cpp_uno/mingw_intel/share.hxx95
-rw-r--r--bridges/source/cpp_uno/mingw_intel/smallstruct.cxx71
-rw-r--r--bridges/source/cpp_uno/mingw_intel/smallstruct.hxx32
-rw-r--r--bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx378
-rw-r--r--bridges/source/cpp_uno/mingw_x86-64/abi.cxx327
-rw-r--r--bridges/source/cpp_uno/mingw_x86-64/abi.hxx61
-rw-r--r--bridges/source/cpp_uno/mingw_x86-64/call.s115
-rw-r--r--bridges/source/cpp_uno/mingw_x86-64/callvirtualmethod.cxx166
-rw-r--r--bridges/source/cpp_uno/mingw_x86-64/callvirtualmethod.hxx41
-rw-r--r--bridges/source/cpp_uno/mingw_x86-64/cpp2uno.cxx512
-rw-r--r--bridges/source/cpp_uno/mingw_x86-64/except.cxx293
-rw-r--r--bridges/source/cpp_uno/mingw_x86-64/share.hxx90
-rw-r--r--bridges/source/cpp_uno/mingw_x86-64/uno2cpp.cxx438
-rw-r--r--bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx2
-rw-r--r--bridges/source/jni_uno/jni_java2uno.cxx42
-rw-r--r--bridges/source/jni_uno/jni_uno2java.cxx16
-rw-r--r--codemaker/Executable_cppumaker.mk2
-rw-r--r--config_host.mk.in8
-rw-r--r--configure.ac791
-rw-r--r--connectivity/Library_postgresql-sdbc-impl.mk2
-rw-r--r--connectivity/source/drivers/ado/AKeys.cxx4
-rw-r--r--connectivity/source/inc/ado/Aolevariant.hxx3
-rw-r--r--dbaccess/Library_dbu.mk6
-rw-r--r--dbaccess/source/ui/dlg/adodatalinks.cxx6
-rw-r--r--dbaccess/win32/source/odbcconfig/odbcconfig.cxx4
-rw-r--r--desktop/win32/source/applauncher/launcher.cxx4
-rw-r--r--desktop/win32/source/guiloader/genericloader.cxx10
-rw-r--r--desktop/win32/source/guistdio/guistdio.inc9
-rw-r--r--desktop/win32/source/officeloader/officeloader.cxx4
-rw-r--r--desktop/win32/source/unoinfo.cxx9
-rw-r--r--distro-configs/LibreOfficeMinGW.conf31
-rw-r--r--distro-configs/LibreOfficeMinGW64.conf32
-rw-r--r--dtrans/source/win32/clipb/MtaOleClipb.cxx6
-rw-r--r--dtrans/source/win32/dnd/idroptarget.cxx7
-rw-r--r--dtrans/source/win32/dnd/source.cxx7
-rw-r--r--dtrans/source/win32/dtobj/APNDataObject.cxx6
-rw-r--r--dtrans/source/win32/dtobj/XNotifyingDataObject.cxx7
-rw-r--r--dtrans/source/win32/dtobj/XTDataObject.cxx7
-rw-r--r--dtrans/source/win32/misc/ImplHelper.cxx76
-rw-r--r--editeng/source/editeng/impedit2.cxx6
-rw-r--r--embedserv/source/embed/esdll.cxx4
-rw-r--r--embedserv/source/embed/register.cxx3
-rw-r--r--embedserv/source/inc/embeddocaccess.hxx2
-rw-r--r--embedserv/source/inc/embservconst.h17
-rw-r--r--embedserv/source/inc/stdafx.h5
-rw-r--r--embedserv/source/inprocserv/dllentry.cxx16
-rw-r--r--extensions/source/activex/StdAfx2.cxx3
-rw-r--r--extensions/source/ole/comifaces.hxx5
-rw-r--r--extensions/source/ole/oledll.cxx3
-rw-r--r--extensions/source/ole/oleobjw.cxx8
-rw-r--r--extensions/source/ole/servprov.cxx5
-rw-r--r--extensions/source/ole/unoconversionutilities.hxx24
-rw-r--r--extensions/source/ole/unoobjw.cxx12
-rw-r--r--extensions/source/ole/unotypewrapper.cxx8
-rw-r--r--extensions/source/update/check/onlinecheck.cxx4
-rw-r--r--external/Module_external.mk4
-rw-r--r--external/breakpad/Module_breakpad.mk2
-rw-r--r--external/cairo/ExternalProject_cairo.mk2
-rw-r--r--external/cairo/ExternalProject_pixman.mk2
-rw-r--r--external/cairo/UnpackedTarball_pixman.mk2
-rw-r--r--external/clucene/UnpackedTarball_clucene.mk8
-rw-r--r--external/clucene/configs/clucene-config-MINGW-atomic.h150
-rw-r--r--external/clucene/configs/clucene-config-MINGW.h150
-rw-r--r--external/cppunit/ExternalProject_cppunit.mk6
-rw-r--r--external/curl/ExternalPackage_curl.mk4
-rw-r--r--external/curl/ExternalProject_curl.mk15
-rw-r--r--external/curl/UnpackedTarball_curl.mk1
-rw-r--r--external/curl/curl-7.26.0_mingw.patch24
-rw-r--r--external/expat/Module_expat.mk9
-rw-r--r--external/expat/StaticLibrary_expat.mk2
-rw-r--r--external/firebird/ExternalPackage_firebird.mk2
-rw-r--r--external/firebird/UnpackedTarball_firebird.mk2
-rw-r--r--external/freetype/ExternalProject_freetype.mk2
-rw-r--r--external/hunspell/ExternalProject_hunspell.mk1
-rw-r--r--external/icu/ExternalProject_icu.mk18
-rw-r--r--external/lcms2/ExternalProject_lcms2.mk1
-rw-r--r--external/libcmis/UnpackedTarball_cmis.mk2
-rw-r--r--external/liblangtag/ExternalProject_langtag.mk5
-rw-r--r--external/liblangtag/UnpackedTarball_langtag.mk8
-rw-r--r--external/liblangtag/liblangtag-0.5.1-mingw.patch64
-rw-r--r--external/libxml2/ExternalProject_xml2.mk15
-rw-r--r--external/libxmlsec/ExternalProject_xmlsec.mk16
-rw-r--r--external/libxmlsec/xmlsec1-configure.patch.12
-rw-r--r--external/libxmlsec/xmlsec1-customkeymanage.patch.16
-rw-r--r--external/libxslt/ExternalProject_xslt.mk14
-rw-r--r--external/lpsolve/ExternalProject_lpsolve.mk10
-rw-r--r--external/mingw-externals/CustomTarget_jawt.mk33
-rw-r--r--external/mingw-externals/Module_mingw-externals.mk20
-rw-r--r--external/mingw-externals/Package_mingw_dlls.mk16
-rw-r--r--external/mingw-externals/Package_mingw_gccdlls.mk19
-rw-r--r--external/mysqlcppconn/Library_mysqlcppconn.mk2
-rw-r--r--external/neon/neon.patch11
-rw-r--r--external/nss/ExternalProject_nss.mk21
-rw-r--r--external/nss/UnpackedTarball_nss.mk9
-rw-r--r--external/nss/nspr-4.9-build.patch.3285
-rw-r--r--external/nss/nss-3.13.3-build.patch.3231
-rw-r--r--external/nss/nss.mingw.patch.3106
-rw-r--r--external/openssl/ExternalProject_openssl.mk6
-rw-r--r--external/openssl/UnpackedTarball_openssl.mk1
-rw-r--r--external/openssl/opensslmingw.patch123
-rw-r--r--external/poppler/poppler-snprintf.patch.127
-rw-r--r--external/postgresql/ExternalProject_postgresql.mk2
-rw-r--r--external/python3/ExternalPackage_python3.mk8
-rw-r--r--external/python3/ExternalProject_python3.mk5
-rw-r--r--external/python33/ExternalPackage_python3.mk8
-rw-r--r--external/python33/ExternalProject_python3.mk5
-rw-r--r--external/python33/UnpackedTarball_python3.mk2
-rw-r--r--external/redland/ExternalPackage_raptor.mk2
-rw-r--r--external/redland/ExternalPackage_rasqal.mk2
-rw-r--r--external/redland/ExternalPackage_redland.mk2
-rw-r--r--external/redland/ExternalProject_raptor.mk18
-rw-r--r--external/redland/ExternalProject_rasqal.mk21
-rw-r--r--external/redland/ExternalProject_redland.mk22
-rw-r--r--external/redland/UnpackedTarball_raptor.mk1
-rw-r--r--external/redland/UnpackedTarball_rasqal.mk1
-rw-r--r--external/redland/UnpackedTarball_redland.mk1
-rw-r--r--external/redland/raptor/raptor-mingw.patch.113
-rw-r--r--external/redland/rasqal/rasqal-mingw.patch.113
-rw-r--r--external/redland/redland/redland-mingw.patch.113
-rw-r--r--external/redland/redland/redland-msvc.patch.112
-rw-r--r--forms/source/xforms/datatypes.cxx6
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx33
-rw-r--r--fpicker/source/win32/filepicker/comptr.hxx4
-rw-r--r--fpicker/source/win32/folderpicker/MtaFop.hxx3
-rw-r--r--i18npool/source/breakiterator/breakiterator_unicode.cxx1
-rw-r--r--i18npool/source/collator/collator_unicode.cxx6
-rw-r--r--i18npool/source/collator/gencoll_rule.cxx2
-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
-rw-r--r--m4/mingw.m490
-rw-r--r--odk/CustomTarget_check.mk3
-rw-r--r--odk/util/check.pl6
-rw-r--r--postprocess/signing/no_signing.txt1
-rw-r--r--pyuno/CustomTarget_pyuno_pythonloader_ini.mk2
-rw-r--r--pyuno/CustomTarget_zipcore.mk34
-rw-r--r--pyuno/GeneratedPackage_python-core.mk20
-rw-r--r--pyuno/Module_pyuno.mk15
-rw-r--r--pyuno/Package_zipcore.mk18
-rw-r--r--pyuno/zipcore/python.cxx45
-rw-r--r--registry/source/regimpl.cxx3
-rw-r--r--sal/osl/w32/dllentry.c91
-rw-r--r--sal/osl/w32/file.cxx5
-rw-r--r--sal/osl/w32/file_dirvol.cxx3
-rw-r--r--sal/osl/w32/interlck.c4
-rw-r--r--sal/osl/w32/signal.cxx2
-rw-r--r--sal/osl/w32/system.h51
-rw-r--r--sal/osl/w32/tempfile.cxx4
-rw-r--r--sal/qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx3
-rw-r--r--sal/qa/rtl/strings/test_oustring_stringliterals.cxx3
-rw-r--r--sal/systools/win32/uwinapi/sntprintf.c31
-rw-r--r--scp2/InstallModule_ooo.mk8
-rw-r--r--scp2/InstallModule_python.mk8
-rw-r--r--scp2/InstallModule_ure.mk5
-rw-r--r--scp2/source/ooo/mingw_dlls.scp43
-rw-r--r--scp2/source/ooo/scpaction_ooo.scp15
-rw-r--r--scp2/source/ooo/ure.scp28
-rw-r--r--scp2/source/python/file_python.scp42
-rw-r--r--scp2/source/python/module_python.scp3
-rw-r--r--sd/source/ui/remotecontrol/BluetoothServer.cxx5
-rw-r--r--setup_native/CustomTarget_wintools.mk38
-rw-r--r--setup_native/Module_setup_native.mk13
-rw-r--r--setup_native/Package_wintools.mk22
-rw-r--r--setup_native/source/win32/wintools/makecab/makecab.c379
-rw-r--r--setup_native/source/win32/wintools/makecab/parseddf.c386
-rw-r--r--setup_native/source/win32/wintools/makecab/parseddf.h46
-rw-r--r--setup_native/source/win32/wintools/msidb/msidb.c620
-rw-r--r--setup_native/source/win32/wintools/msiinfo/msiinfo.c254
-rw-r--r--setup_native/source/win32/wintools/msimsp/msimsp.c86
-rw-r--r--setup_native/source/win32/wintools/msitran/msitran.c122
-rw-r--r--sfx2/source/doc/syspathw32.cxx2
-rw-r--r--shell/inc/thumbviewer.hxx5
-rw-r--r--shell/inc/utilities.hxx24
-rw-r--r--shell/source/win32/shlxthandler/classfactory.cxx3
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/ooofilt.cxx4
-rw-r--r--shell/source/win32/shlxthandler/prophdl/propertyhdl.cxx4
-rw-r--r--shell/source/win32/shlxthandler/util/iso8601_converter.cxx19
-rw-r--r--solenv/gbuild/platform/WNT_INTEL_GCC.mk47
-rw-r--r--solenv/gbuild/platform/WNT_X86_64_GCC.mk33
-rw-r--r--solenv/gbuild/platform/mingw.mk378
-rw-r--r--svx/source/gengal/gengal.cxx7
-rw-r--r--sw/source/core/text/frmcrsr.cxx2
-rw-r--r--sw/source/core/text/porlay.cxx2
-rw-r--r--vcl/Library_vcl.mk1
-rw-r--r--vcl/source/edit/texteng.cxx2
-rw-r--r--vcl/source/gdi/sallayout.cxx2
-rw-r--r--vcl/win/app/salinst.cxx32
-rw-r--r--vcl/win/app/saltimer.cxx19
-rw-r--r--vcl/win/gdi/gdiimpl.cxx11
-rw-r--r--vcl/win/gdi/salprn.cxx20
-rw-r--r--vcl/win/window/salframe.cxx20
-rw-r--r--xmlsecurity/Library_xmlsecurity.mk2
-rw-r--r--xmlsecurity/Library_xsec_xmlsec.mk11
218 files changed, 338 insertions, 10121 deletions
diff --git a/Repository.mk b/Repository.mk
index a74522c13a83..c7f054a994b9 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -794,10 +794,6 @@ $(eval $(call gb_Helper_register_packages, \
$(if $(filter DESKTOP,$(BUILD_TYPE)),desktop_scripts_install) \
extras_fonts \
extras_wordbook \
- $(if $(filter WNTGCC,$(OS)$(COM)), \
- mingw_dlls \
- mingw_gccdlls \
- ) \
$(if $(filter MSC,$(COM)),msvc_dlls) \
more_fonts_conf \
instsetoo_native_setup \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 24f3975aa2d5..3871080d2530 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -720,32 +720,13 @@ endif # SYSTEM_CMIS
ifeq ($(ENABLE_JAVA),TRUE)
-ifeq ($(OS)$(COM),WNTGCC)
-
define gb_LinkTarget__use_jawt
-$(call gb_LinkTarget_use_custom_headers,$(1),external/jawt)
-
-$(call gb_LinkTarget_add_ldflags,$(1),\
- -L$(call gb_CustomTarget_get_workdir,external/jawt) \
-)
-
$(call gb_LinkTarget_add_libs,$(1),\
$(JAWTLIB) \
)
endef
-else # $(OS)$(COM) != WNTGCC
-
-define gb_LinkTarget__use_jawt
-$(call gb_LinkTarget_add_libs,$(1),\
- $(JAWTLIB) \
-)
-
-endef
-
-endif # $(OS)$(COM) = WNTGCC
-
else # !ENABLE_JAVA
gb_LinkTarget__use_jawt :=
@@ -2986,7 +2967,7 @@ $(call gb_LinkTarget_add_libs,$(1),\
$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
)
-ifeq ($(OS)$(COM),WNTMSC)
+ifeq ($(OS),WNT)
$(call gb_LinkTarget_use_external,$(1),openssl)
$(call gb_LinkTarget_use_system_win32_libs,$(1),\
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index b232f1af9798..82c0701e59dd 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -80,21 +80,6 @@ gb_Library_FILENAMES := $(patsubst rdf:rdf%,rdf:librdf%,$(gb_Library_FILENAMES))
# libpyuno_wrapper.dll => pyuno.pyd
gb_Library_FILENAMES := $(patsubst pyuno:pyuno.dll,pyuno:pyuno$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd,$(gb_Library_FILENAMES))
-ifeq ($(COM),GCC)
-gb_Library_ILIBFILENAMES := $(patsubst libexttextcat:liblibext%,libexttextcat:libilibext%,$(gb_Library_ILIBFILENAMES))
-gb_Library_ILIBFILENAMES := $(patsubst z:iz%,z:zlib%,$(gb_Library_ILIBFILENAMES))
-
-# Libraries not provided by mingw(-w64), available only in the Windows
-# SDK. So if these actually are liked with somewhere, we can't
-# cross-compile that module then using MinGW. That needs to be fixed
-# then, and we need to use these libraries through run-time lookup of
-# APIs. Or something.
-gb_Library_SDKLIBFILENAMES:=
-
-gb_Library_FILENAMES := $(filter-out $(foreach lib,$(gb_Library_SDKLIBFILENAMES),$(lib):%),$(gb_Library_FILENAMES))
-gb_Library_FILENAMES += $(foreach lib,$(gb_Library_SDKLIBFILENAMES),$(lib):$(WINDOWS_SDK_HOME)/lib/$(lib).lib)
-
-else # $(COM) != GCC
gb_Library_ILIBFILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_ILIBFILENAMES))
# these have prefix "lib" instead of "i"
@@ -110,8 +95,6 @@ gb_Library_ILIBFILENAMES += \
gb_Library_FILENAMES := $(filter-out $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):%),$(gb_Library_FILENAMES))
gb_Library_FILENAMES += $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):lib$(lib).dll)
-endif # ifeq ($(COM),GCC)
-
endif # ifeq ($(OS),WNT)
# vim: set noet sw=4 ts=4:
diff --git a/avmedia/source/win/interface.hxx b/avmedia/source/win/interface.hxx
index 41dcad42ae8f..08584777c7e6 100644
--- a/avmedia/source/win/interface.hxx
+++ b/avmedia/source/win/interface.hxx
@@ -25,9 +25,7 @@ extern "C" const IID IID_IMediaDet;
struct ISampleGrabber;
struct
-#ifndef __MINGW32__
__declspec(uuid("65BD0710-24D2-4ff7-9324-ED2E5D3ABAFA")) __declspec(novtable)
-#endif
IMediaDet : public IUnknown
{
public:
@@ -77,9 +75,7 @@ protected:
extern "C" const IID IID_ISampleGrabberCB;
struct
-#ifndef __MINGW32__
__declspec(uuid("0579154A-2B53-4994-B0D0-E773148EFF85")) __declspec(novtable)
-#endif
ISampleGrabberCB : public IUnknown
{
public:
@@ -97,9 +93,7 @@ protected:
extern "C" const IID IID_ISampleGrabber;
struct
-#ifndef __MINGW32__
__declspec(uuid("6B652FFF-11FE-4fce-92AD-0266B5D7C78F")) __declspec(novtable)
-#endif
ISampleGrabber : public IUnknown
{
public:
diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk
index 0501c5d2035e..20892a3b7826 100644
--- a/basic/Library_sb.mk
+++ b/basic/Library_sb.mk
@@ -144,6 +144,9 @@ ifeq ($(OS)$(CPUNAME),WNTINTEL)
$(eval $(call gb_Library_add_exception_objects,sb,\
basic/source/runtime/dllmgr-x86 \
))
+$(eval $(call gb_Library_add_asmobjects,sb,\
+ basic/source/runtime/wnt-x86 \
+))
else
ifeq ($(OS)$(CPUNAME),WNTX86_64)
$(eval $(call gb_Library_add_exception_objects,sb,\
@@ -155,16 +158,6 @@ $(eval $(call gb_Library_add_exception_objects,sb,\
))
endif
endif
-ifeq ($(OS)$(COM)$(CPUNAME),WNTMSCINTEL)
-$(eval $(call gb_Library_add_asmobjects,sb,\
- basic/source/runtime/wnt-x86 \
-))
-endif
-ifeq ($(OS)$(COM)$(CPUNAME),WNTGCCINTEL)
-$(eval $(call gb_Library_add_asmobjects,sb,\
- basic/source/runtime/wnt-mingw \
-))
-endif
# Runtime dependency for unit-tests
$(eval $(call gb_Library_use_restarget,sb,sb))
diff --git a/basic/source/runtime/wnt-mingw.s b/basic/source/runtime/wnt-mingw.s
deleted file mode 100644
index 7d591da9afc0..000000000000
--- a/basic/source/runtime/wnt-mingw.s
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# 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 .
-#
-
-.intel_syntax
-
-.globl _DllMgr_call32@12
-.globl _DllMgr_callFp@12
-
-_DllMgr_call32@12:
-_DllMgr_callFp@12:
- push ebp
- mov ebp, esp
- push esi
- push edi
- mov ecx, [ebp+16]
- jecxz $1
- sub esp, ecx
- mov edi, esp
- mov esi, [ebp+12]
- shr ecx, 2
- rep movsd
-$1: call DWORD PTR [ebp+8]
- # for extra safety, do not trust esp after call (in case the Basic Declare
- # signature is wrong):
- mov edi, [ebp-8]
- mov esi, [ebp-4]
- mov esp, ebp
- pop ebp
- ret 12
diff --git a/basic/source/sbx/sbxdec.hxx b/basic/source/sbx/sbxdec.hxx
index 1c3461a219ee..6b2aeab1b925 100644
--- a/basic/source/sbx/sbxdec.hxx
+++ b/basic/source/sbx/sbxdec.hxx
@@ -24,13 +24,10 @@
#ifdef _WIN32
#include <prewin.h>
#include <postwin.h>
-
-#ifndef __MINGW32__
#include <comutil.h>
-#endif
#include <oleauto.h>
-
#endif
+
#endif
#include <basic/sbx.hxx>
diff --git a/bridges/Library_cpp_uno.mk b/bridges/Library_cpp_uno.mk
index d7ec27dd1ea5..6486ea2cbda4 100644
--- a/bridges/Library_cpp_uno.mk
+++ b/bridges/Library_cpp_uno.mk
@@ -81,11 +81,6 @@ else ifeq ($(COM),MSC)
bridges_SELECTED_BRIDGE := msvc_win32_intel
bridge_exception_objects := cpp2uno dllinit uno2cpp
bridge_noopt_objects := except
-else ifeq ($(OS)$(COM),WNTGCC)
-bridges_SELECTED_BRIDGE := mingw_intel
-bridge_asm_objects := call
-bridge_noopt_objects := uno2cpp
-bridge_exception_objects := callvirtualmethod cpp2uno dllinit except smallstruct
endif
else ifeq ($(CPUNAME),M68K)
@@ -182,11 +177,6 @@ bridges_SELECTED_BRIDGE := msvc_win32_x86-64
bridge_exception_objects := cpp2uno dllinit uno2cpp
bridge_noopt_objects := except
bridge_asm_objects := call
-else ifeq ($(OS)$(COM),WNTGCC)
-bridges_SELECTED_BRIDGE := mingw_x86-64
-bridge_asm_objects := call
-bridge_noncallexception_noopt_objects := callvirtualmethod
-bridge_exception_objects := abi cpp2uno except uno2cpp
endif
endif
@@ -207,13 +197,9 @@ $(eval $(call gb_Library_add_defs,$(gb_CPPU_ENV)_uno,\
endif
ifeq ($(OS),WNT)
$(eval $(call gb_Library_add_defs,$(gb_CPPU_ENV)_uno,\
- $(if $(filter GCC,$(COM)),\
- $(if $(filter sjlj,$(EXCEPTIONS)),\
- -DBROKEN_ALLOCA \
- ), \
$(if $(cppu_no_leak)$(bndchk),,\
-DLEAK_STATIC_DATA \
- )) \
+ ) \
))
endif
diff --git a/bridges/Library_java_uno.mk b/bridges/Library_java_uno.mk
index 178a008192eb..8d70e2195ca6 100644
--- a/bridges/Library_java_uno.mk
+++ b/bridges/Library_java_uno.mk
@@ -9,14 +9,6 @@
$(eval $(call gb_Library_Library,java_uno))
-ifeq ($(OS)$(COM),WNTGCC)
-ifeq ($(EXCEPTIONS),sjlj)
-$(eval $(call gb_Library_add_defs,java_uno,\
- -DBROKEN_ALLOCA \
-))
-endif
-endif
-
$(eval $(call gb_Library_use_internal_comprehensive_api,java_uno,\
udkapi \
))
diff --git a/bridges/inc/cppinterfaceproxy.hxx b/bridges/inc/cppinterfaceproxy.hxx
index 069e2521b6c2..ccd83660059a 100644
--- a/bridges/inc/cppinterfaceproxy.hxx
+++ b/bridges/inc/cppinterfaceproxy.hxx
@@ -32,7 +32,7 @@ namespace com { namespace sun { namespace star { namespace uno {
class XInterface;
} } } }
-#if !defined __GNUG__ || defined __MINGW32__
+#if !defined __GNUG__
void dso_init();
void dso_exit();
#endif
diff --git a/bridges/source/cpp_uno/mingw_intel/call.s b/bridges/source/cpp_uno/mingw_intel/call.s
deleted file mode 100644
index 345efb870686..000000000000
--- a/bridges/source/cpp_uno/mingw_intel/call.s
+++ /dev/null
@@ -1,279 +0,0 @@
-/*
- * 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 .
- */
-
- .text
-
-.globl _privateSnippetExecutorGeneral
-_privateSnippetExecutorGeneral:
-.LFBg:
- movl %esp,%ecx
- pushl %ebp # proper stack frame needed for exception handling
-.LCFIg0:
- movl %esp,%ebp
-.LCFIg1:
- subl $0x4,%esp # 32bit returnValue
- pushl %esp # 32bit &returnValue
- pushl %ecx # 32bit pCallStack
- pushl %edx # 32bit nVtableOffset
- pushl %eax # 32bit nFunctionIndex
- call _cpp_vtable_call
- movl 16(%esp),%eax # 32bit returnValue
- leave
- ret
-.LFEg:
- .long .-_privateSnippetExecutorGeneral
-
-.globl _privateSnippetExecutorVoid
-_privateSnippetExecutorVoid:
-.LFBv:
- movl %esp,%ecx
- pushl %ebp # proper stack frame needed for exception handling
-.LCFIv0:
- movl %esp,%ebp
-.LCFIv1:
- pushl $0 # 32bit null pointer (returnValue not used)
- pushl %ecx # 32bit pCallStack
- pushl %edx # 32bit nVtableOffset
- pushl %eax # 32bit nFunctionIndex
- call _cpp_vtable_call
- leave
- ret
-.LFEv:
- .long .-_privateSnippetExecutorVoid
-
-.globl _privateSnippetExecutorHyper
-_privateSnippetExecutorHyper:
-.LFBh:
- movl %esp,%ecx
- pushl %ebp # proper stack frame needed for exception handling
-.LCFIh0:
- movl %esp,%ebp
-.LCFIh1:
- subl $0x8,%esp # 64bit returnValue
- pushl %esp # 32bit &returnValue
- pushl %ecx # 32bit pCallStack
- pushl %edx # 32bit nVtableOffset
- pushl %eax # 32bit nFunctionIndex
- call _cpp_vtable_call
- movl 16(%esp),%eax # 64bit returnValue, lower half
- movl 20(%esp),%edx # 64bit returnValue, upper half
- leave
- ret
-.LFEh:
- .long .-_privateSnippetExecutorHyper
-
-.globl _privateSnippetExecutorFloat
-_privateSnippetExecutorFloat:
-.LFBf:
- movl %esp,%ecx
- pushl %ebp # proper stack frame needed for exception handling
-.LCFIf0:
- movl %esp,%ebp
-.LCFIf1:
- subl $0x4,%esp # 32bit returnValue
- pushl %esp # 32bit &returnValue
- pushl %ecx # 32bit pCallStack
- pushl %edx # 32bit nVtableOffset
- pushl %eax # 32bit nFunctionIndex
- call _cpp_vtable_call
- flds 16(%esp) # 32bit returnValue
- leave
- ret
-.LFEf:
- .long .-_privateSnippetExecutorFloat
-
-.globl _privateSnippetExecutorDouble
-_privateSnippetExecutorDouble:
-.LFBd:
- movl %esp,%ecx
- pushl %ebp # proper stack frame needed for exception handling
-.LCFId0:
- movl %esp,%ebp
-.LCFId1:
- subl $0x8,%esp # 64bit returnValue
- pushl %esp # 32bit &returnValue
- pushl %ecx # 32bit pCallStack
- pushl %edx # 32bit nVtableOffset
- pushl %eax # 32bit nFunctionIndex
- call _cpp_vtable_call
- fldl 16(%esp) # 64bit returnValue
- leave
- ret
-.LFEd:
- .long .-_privateSnippetExecutorDouble
-
-.globl _privateSnippetExecutorClass
-_privateSnippetExecutorClass:
-.LFBc:
- movl %esp,%ecx
- pushl %ebp # proper stack frame needed for exception handling
-.LCFIc0:
- movl %esp,%ebp
-.LCFIc1:
- subl $0x4,%esp # 32bit returnValue
- pushl %esp # 32bit &returnValue
- pushl %ecx # 32bit pCallStack
- pushl %edx # 32bit nVtableOffset
- pushl %eax # 32bit nFunctionIndex
- call _cpp_vtable_call
- movl 16(%esp),%eax # 32bit returnValue
- leave
- ret $4
-.LFEc:
- .long .-_privateSnippetExecutorClass
-
- .section .eh_frame,"dr"
-.Lframe1:
- .long .LECIE1-.LSCIE1 # length
-.LSCIE1:
- .long 0 # CIE_ID
- .byte 1 # version
- .string "zR" # augmentation
- .uleb128 1 # code_alignment_factor
- .sleb128 -4 # data_alignment_factor
- .byte 8 # return_address_register
- .uleb128 1 # augmentation size 1:
- .byte 0x1B # FDE Encoding (pcrel sdata4)
- # initial_instructions:
- .byte 0x0C # DW_CFA_def_cfa %esp, 4
- .uleb128 4
- .uleb128 4
- .byte 0x88 # DW_CFA_offset ret, 1
- .uleb128 1
- .align 4
-.LECIE1:
-.LSFDEg:
- .long .LEFDEg-.LASFDEg # length
-.LASFDEg:
- .long .LASFDEg-.Lframe1 # CIE_pointer
- .long .LFBg-. # initial_location
- .long .LFEg-.LFBg # address_range
- .uleb128 0 # augmentation size 0
- # instructions:
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIg0-.LFBg
- .byte 0x0E # DW_CFA_def_cfa_offset 8
- .uleb128 8
- .byte 0x85 # DW_CFA_offset %ebp, 2
- .uleb128 2
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIg1-.LCFIg0
- .byte 0x0D # DW_CFA_def_cfa_register %ebp
- .uleb128 5
- .align 4
-.LEFDEg:
-.LSFDEv:
- .long .LEFDEv-.LASFDEv # length
-.LASFDEv:
- .long .LASFDEv-.Lframe1 # CIE_pointer
- .long .LFBv-. # initial_location
- .long .LFEv-.LFBv # address_range
- .uleb128 0 # augmentation size 0
- # instructions:
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIv0-.LFBv
- .byte 0x0E # DW_CFA_def_cfa_offset 8
- .uleb128 8
- .byte 0x85 # DW_CFA_offset %ebp, 2
- .uleb128 2
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIv1-.LCFIv0
- .byte 0x0D # DW_CFA_def_cfa_register %ebp
- .uleb128 5
- .align 4
-.LEFDEv:
-.LSFDEh:
- .long .LEFDEh-.LASFDEh # length
-.LASFDEh:
- .long .LASFDEh-.Lframe1 # CIE_pointer
- .long .LFBh-. # initial_location
- .long .LFEh-.LFBh # address_range
- .uleb128 0 # augmentation size 0
- # instructions:
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIh0-.LFBh
- .byte 0x0E # DW_CFA_def_cfa_offset 8
- .uleb128 8
- .byte 0x85 # DW_CFA_offset %ebp, 2
- .uleb128 2
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIh1-.LCFIh0
- .byte 0x0D # DW_CFA_def_cfa_register %ebp
- .uleb128 5
- .align 4
-.LEFDEh:
-.LSFDEf:
- .long .LEFDEf-.LASFDEf # length
-.LASFDEf:
- .long .LASFDEf-.Lframe1 # CIE_pointer
- .long .LFBf-. # initial_location
- .long .LFEf-.LFBf # address_range
- .uleb128 0 # augmentation size 0
- # instructions:
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIf0-.LFBf
- .byte 0x0E # DW_CFA_def_cfa_offset 8
- .uleb128 8
- .byte 0x85 # DW_CFA_offset %ebp, 2
- .uleb128 2
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIf1-.LCFIf0
- .byte 0x0D # DW_CFA_def_cfa_register %ebp
- .uleb128 5
- .align 4
-.LEFDEf:
-.LSFDEd:
- .long .LEFDEd-.LASFDEd # length
-.LASFDEd:
- .long .LASFDEd-.Lframe1 # CIE_pointer
- .long .LFBd-. # initial_location
- .long .LFEd-.LFBd # address_range
- .uleb128 0 # augmentation size 0
- # instructions:
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFId0-.LFBd
- .byte 0x0E # DW_CFA_def_cfa_offset 8
- .uleb128 8
- .byte 0x85 # DW_CFA_offset %ebp, 2
- .uleb128 2
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFId1-.LCFId0
- .byte 0x0D # DW_CFA_def_cfa_register %ebp
- .uleb128 5
- .align 4
-.LEFDEd:
-.LSFDEc:
- .long .LEFDEc-.LASFDEc # length
-.LASFDEc:
- .long .LASFDEc-.Lframe1 # CIE_pointer
- .long .LFBc-. # initial_location
- .long .LFEc-.LFBc # address_range
- .uleb128 0 # augmentation size 0
- # instructions:
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIc0-.LFBc
- .byte 0x0E # DW_CFA_def_cfa_offset 8
- .uleb128 8
- .byte 0x85 # DW_CFA_offset %ebp, 2
- .uleb128 2
- .byte 0x04 # DW_CFA_advance_loc4
- .long .LCFIc1-.LCFIc0
- .byte 0x0D # DW_CFA_def_cfa_register %ebp
- .uleb128 5
- .align 4
-.LEFDEc:
diff --git a/bridges/source/cpp_uno/mingw_intel/callvirtualmethod.cxx b/bridges/source/cpp_uno/mingw_intel/callvirtualmethod.cxx
deleted file mode 100644
index 9b826bfc4abb..000000000000
--- a/bridges/source/cpp_uno/mingw_intel/callvirtualmethod.cxx
+++ /dev/null
@@ -1,137 +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 .
- */
-
-#include "sal/config.h"
-
-#include "cppu/macros.hxx"
-#include "sal/types.h"
-#include "typelib/typeclass.h"
-#include "typelib/typedescription.h"
-
-#include "callvirtualmethod.hxx"
-#include "share.hxx"
-#include "smallstruct.hxx"
-
-// For some reason, callVirtualMethod needs to be in a source file of its own,
-// so that stack unwinding upon a thrown exception from within the asm block
-// call works, at least with GCC 4.7.0 and --enable-dbgutil.
-
-// The call instruction within the asm section of callVirtualMethod may throw
-// exceptions. So that the compiler handles this correctly, it is important
-// that (a) callVirtualMethod might call dummy_can_throw_anything (although this
-// never happens at runtime), which in turn can throw exceptions, and (b)
-// callVirtualMethod is not inlined at its call site (so that any exceptions are
-// caught which are thrown from the instruction calling callVirtualMethod). [It
-// is unclear how much of this comment is still relevant -- see the above
-// comment.]
-void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
- void * pAdjustedThisPtr, sal_Int32 nVtableIndex, void * pRegisterReturn,
- typelib_TypeDescription const * returnType, sal_Int32 * pStackLongs,
- sal_Int32 nStackLongs)
-{
- // parameter list is mixed list of * and values
- // reference parameters are pointers
-
- assert(pStackLongs && pAdjustedThisPtr);
- static_assert( (sizeof(void *) == 4) && (sizeof(sal_Int32) == 4), "### unexpected size of int!");
- assert(nStackLongs && pStackLongs && "### no stack in callVirtualMethod !");
-
- // never called
- if (! pAdjustedThisPtr) CPPU_CURRENT_NAMESPACE::dummy_can_throw_anything("xxx"); // address something
-
- long edx, eax; // for register returns
- void * stackptr;
- asm volatile (
- "mov %%esp, %2\n\t"
- // copy values
- "mov %3, %%eax\n\t"
- "mov %%eax, %%edx\n\t"
- "dec %%edx\n\t"
- "shl $2, %%edx\n\t"
- "add %4, %%edx\n"
- "Lcopy:\n\t"
- "pushl 0(%%edx)\n\t"
- "sub $4, %%edx\n\t"
- "dec %%eax\n\t"
- "jne Lcopy\n\t"
- // do the actual call
- "mov %5, %%edx\n\t"
- "mov 0(%%edx), %%edx\n\t"
- "mov %6, %%eax\n\t"
- "shl $2, %%eax\n\t"
- "add %%eax, %%edx\n\t"
- "mov 0(%%edx), %%edx\n\t"
- "call *%%edx\n\t"
- // save return registers
- "mov %%eax, %0\n\t"
- "mov %%edx, %1\n\t"
- // cleanup stack
- "mov %2, %%esp\n\t"
- : "=m"(eax), "=m"(edx), "=m"(stackptr)
- : "m"(nStackLongs), "m"(pStackLongs), "m"(pAdjustedThisPtr), "m"(nVtableIndex)
- : "eax", "ecx", "edx" );
- switch( returnType->eTypeClass )
- {
- case typelib_TypeClass_VOID:
- break;
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- ((long*)pRegisterReturn)[1] = edx;
- case typelib_TypeClass_LONG:
- case typelib_TypeClass_UNSIGNED_LONG:
- case typelib_TypeClass_CHAR:
- case typelib_TypeClass_ENUM:
- ((long*)pRegisterReturn)[0] = eax;
- break;
- case typelib_TypeClass_SHORT:
- case typelib_TypeClass_UNSIGNED_SHORT:
- *(unsigned short*)pRegisterReturn = eax;
- break;
- case typelib_TypeClass_BOOLEAN:
- case typelib_TypeClass_BYTE:
- *(unsigned char*)pRegisterReturn = eax;
- break;
- case typelib_TypeClass_FLOAT:
- asm ( "fstps %0" : : "m"(*(char *)pRegisterReturn) );
- break;
- case typelib_TypeClass_DOUBLE:
- asm ( "fstpl %0\n\t" : : "m"(*(char *)pRegisterReturn) );
- break;
- case typelib_TypeClass_STRUCT:
- if (bridges::cpp_uno::shared::isSmallStruct(returnType)) {
- if (returnType->nSize <= 1) {
- *(unsigned char*)pRegisterReturn = eax;
- }
- else if (returnType->nSize <= 2) {
- *(unsigned short*)pRegisterReturn = eax;
- }
- else if (returnType->nSize <= 8) {
- ((long*)pRegisterReturn)[0] = eax;
- if (returnType->nSize > 4) {
- ((long*)pRegisterReturn)[1] = edx;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_intel/callvirtualmethod.hxx b/bridges/source/cpp_uno/mingw_intel/callvirtualmethod.hxx
deleted file mode 100644
index 76df8d96421c..000000000000
--- a/bridges/source/cpp_uno/mingw_intel/callvirtualmethod.hxx
+++ /dev/null
@@ -1,40 +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 .
- */
-
-#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_MINGW_INTEL_CALLVIRTUALMETHOD_HXX
-#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_MINGW_INTEL_CALLVIRTUALMETHOD_HXX
-
-#include "sal/config.h"
-
-#include "cppu/macros.hxx"
-#include "sal/types.h"
-#include "typelib/typedescription.h"
-
-namespace CPPU_CURRENT_NAMESPACE {
-
-void callVirtualMethod(
- void * pAdjustedThisPtr, sal_Int32 nVtableIndex, void * pRegisterReturn,
- typelib_TypeDescription const * returnType, sal_Int32 * pStackLongs,
- sal_Int32 nStackLongs);
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx b/bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx
deleted file mode 100644
index 33d5590a5b90..000000000000
--- a/bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx
+++ /dev/null
@@ -1,507 +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 .
- */
-
-
-#include <com/sun/star/uno/genfunc.hxx>
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include <uno/data.h>
-#include <typelib/typedescription.hxx>
-#include <sal/alloca.h>
-#include <sal/log.hxx>
-
-#include "bridge.hxx"
-#include "cppinterfaceproxy.hxx"
-#include "types.hxx"
-#include "vtablefactory.hxx"
-
-#include "share.hxx"
-#include "smallstruct.hxx"
-
-using namespace ::com::sun::star::uno;
-
-namespace
-{
-
-void cpp2uno_call(
- bridges::cpp_uno::shared::CppInterfaceProxy * pThis,
- const typelib_TypeDescription * pMemberTypeDescr,
- typelib_TypeDescriptionReference * pReturnTypeRef, // 0 indicates void return
- sal_Int32 nParams, typelib_MethodParameter * pParams,
- void ** pCallStack,
- void * pReturnValue )
-{
- // pCallStack: ret, [return ptr], this, params
- char * pCppStack = (char *)(pCallStack +1);
-
- // return
- typelib_TypeDescription * pReturnTypeDescr = 0;
- if (pReturnTypeRef)
- TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
- void * pUnoReturn = 0;
- void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
- if (pReturnTypeDescr)
- {
- if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
- {
- pUnoReturn = pReturnValue; // direct way for simple types
- }
- else // complex return via ptr (pCppReturn)
- {
- if (!bridges::cpp_uno::shared::isSmallStruct(pReturnTypeDescr)) {
- pCppReturn = *(void **)pCppStack;
- pCppStack += sizeof(void *);
- }
- else {
- pCppReturn = pReturnValue;
- }
-
- pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType(
- pReturnTypeDescr )
- ? alloca( pReturnTypeDescr->nSize )
- : pCppReturn); // direct way
- }
- }
- // pop this
- pCppStack += sizeof( void* );
-
- // stack space
- static_assert(sizeof(void *) == sizeof(sal_Int32), "### unexpected size!");
- // parameters
- void ** pUnoArgs = (void **)alloca( 4 * sizeof(void *) * nParams );
- void ** pCppArgs = pUnoArgs + nParams;
- // indices of values this have to be converted (interface conversion cpp<=>uno)
- sal_Int32 * pTempIndices = (sal_Int32 *)(pUnoArgs + (2 * nParams));
- // type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
-
- sal_Int32 nTempIndices = 0;
-
- for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
- {
- const typelib_MethodParameter & rParam = pParams[nPos];
- typelib_TypeDescription * pParamTypeDescr = 0;
- TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
- if (!rParam.bOut
- && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
- // value
- {
- pCppArgs[nPos] = pCppStack;
- pUnoArgs[nPos] = pCppStack;
- switch (pParamTypeDescr->eTypeClass)
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- case typelib_TypeClass_DOUBLE:
- pCppStack += sizeof(sal_Int32); // extra long
- break;
- default:
- break;
- }
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- else // ptr to complex value | ref
- {
- pCppArgs[nPos] = *(void **)pCppStack;
-
- if (! rParam.bIn) // is pure out
- {
- // uno out is unconstructed mem!
- pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize );
- pTempIndices[nTempIndices] = nPos;
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndices++] = pParamTypeDescr;
- }
- // is in/inout
- else if (bridges::cpp_uno::shared::relatesToInterfaceType(
- pParamTypeDescr ))
- {
- uno_copyAndConvertData( pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- *(void **)pCppStack, pParamTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- pTempIndices[nTempIndices] = nPos; // has to be reconverted
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndices++] = pParamTypeDescr;
- }
- else // direct way
- {
- pUnoArgs[nPos] = *(void **)pCppStack;
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- }
- pCppStack += sizeof(sal_Int32); // standard parameter length
- }
-
- // ExceptionHolder
- uno_Any aUnoExc; // Any will be constructed by callee
- uno_Any * pUnoExc = &aUnoExc;
-
- // invoke uno dispatch call
- (*pThis->getUnoI()->pDispatcher)(
- pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-
- // in case an exception occurred...
- if (pUnoExc)
- {
- // destruct temporary in/inout params
- for ( ; nTempIndices--; )
- {
- sal_Int32 nIndex = pTempIndices[nTempIndices];
-
- if (pParams[nIndex].bIn) // is in/inout => was constructed
- uno_destructData( pUnoArgs[nIndex], ppTempParamTypeDescr[nTempIndices], 0 );
- TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndices] );
- }
- if (pReturnTypeDescr)
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
-
- CPPU_CURRENT_NAMESPACE::raiseException(
- &aUnoExc, pThis->getBridge()->getUno2Cpp() );
- // has to destruct the any
- }
- else // else no exception occurred...
- {
- // temporary params
- for ( ; nTempIndices--; )
- {
- sal_Int32 nIndex = pTempIndices[nTempIndices];
- typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndices];
-
- if (pParams[nIndex].bOut) // inout/out
- {
- // convert and assign
- uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
- uno_copyAndConvertData( pCppArgs[nIndex], pUnoArgs[nIndex], pParamTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
- }
- // destroy temp uno param
- uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- // return
- if (pCppReturn) // has complex return
- {
- if (pUnoReturn != pCppReturn) // needs reconversion
- {
- uno_copyAndConvertData( pCppReturn, pUnoReturn, pReturnTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
- // destroy temp uno return
- uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
- }
- if (pReturnValue != pCppReturn)
- // complex return ptr is set to eax
- *static_cast< void ** >(pReturnValue) = pCppReturn;
- }
- if (pReturnTypeDescr)
- {
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
- }
- }
-}
-
-
-extern "C" void cpp_vtable_call(
- int nFunctionIndex, int nVtableOffset, void** pCallStack,
- void * pReturnValue )
-{
- static_assert(sizeof(sal_Int32)==sizeof(void *), "### unexpected!");
-
- // pCallStack: ret adr, [ret *], this, params
- void * pThis;
- if( nFunctionIndex & 0x80000000 )
- {
- nFunctionIndex &= 0x7fffffff;
- pThis = pCallStack[2];
- }
- else
- {
- pThis = pCallStack[1];
- }
- pThis = static_cast< char * >(pThis) - nVtableOffset;
- bridges::cpp_uno::shared::CppInterfaceProxy * pCppI
- = bridges::cpp_uno::shared::CppInterfaceProxy::castInterfaceToProxy(
- pThis);
-
- typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
-
- if (nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex)
- {
- SAL_WARN(
- "bridges",
- "illegal " << OUString::unacquired(&pTypeDescr->aBase.pTypeName)
- << " vtable index " << nFunctionIndex << "/"
- << pTypeDescr->nMapFunctionIndexToMemberIndex);
- throw RuntimeException(
- ("illegal " + OUString::unacquired(&pTypeDescr->aBase.pTypeName)
- + " vtable index " + OUString::number(nFunctionIndex) + "/"
- + OUString::number(pTypeDescr->nMapFunctionIndexToMemberIndex)),
- (XInterface *)pThis);
- }
-
- // determine called method
- sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
- assert(nMemberPos < pTypeDescr->nAllMembers);
-
- TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
-
- switch (aMemberDescr.get()->eTypeClass)
- {
- case typelib_TypeClass_INTERFACE_ATTRIBUTE:
- {
- if (pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos] == nFunctionIndex)
- {
- // is GET method
- cpp2uno_call(
- pCppI, aMemberDescr.get(),
- ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef,
- 0, 0, // no params
- pCallStack, pReturnValue );
- }
- else
- {
- // is SET method
- typelib_MethodParameter aParam;
- aParam.pTypeRef =
- ((typelib_InterfaceAttributeTypeDescription *)aMemberDescr.get())->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
- cpp2uno_call(
- pCppI, aMemberDescr.get(),
- 0, // indicates void return
- 1, &aParam,
- pCallStack, pReturnValue );
- }
- break;
- }
- case typelib_TypeClass_INTERFACE_METHOD:
- {
- // is METHOD
- switch (nFunctionIndex)
- {
- case 1: // acquire()
- pCppI->acquireProxy(); // non virtual call!
- break;
- case 2: // release()
- pCppI->releaseProxy(); // non virtual call!
- break;
- case 0: // queryInterface() opt
- {
- typelib_TypeDescription * pTD = 0;
- TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pCallStack[3] )->getTypeLibType() );
- if (pTD)
- {
- XInterface * pInterface = 0;
- (*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)(
- pCppI->getBridge()->getCppEnv(),
- (void **)&pInterface, pCppI->getOid().pData,
- (typelib_InterfaceTypeDescription *)pTD );
-
- if (pInterface)
- {
- ::uno_any_construct(
- reinterpret_cast< uno_Any * >( pCallStack[1] ),
- &pInterface, pTD, cpp_acquire );
- pInterface->release();
- TYPELIB_DANGER_RELEASE( pTD );
- *static_cast< void ** >(pReturnValue) = pCallStack[1];
- break;
- }
- TYPELIB_DANGER_RELEASE( pTD );
- }
- } // else perform queryInterface()
- default:
- cpp2uno_call(
- pCppI, aMemberDescr.get(),
- ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pReturnTypeRef,
- ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->nParams,
- ((typelib_InterfaceMethodTypeDescription *)aMemberDescr.get())->pParams,
- pCallStack, pReturnValue );
- }
- break;
- }
- default:
- {
- throw RuntimeException( "no member description found!", (XInterface *)pThis );
- }
- }
-}
-
-extern "C" typedef void (*PrivateSnippetExecutor)();
-
-int const codeSnippetSize = 16;
-
-unsigned char * codeSnippet(
- unsigned char * code, sal_Int32 functionIndex, sal_Int32 vtableOffset,
- typelib_TypeDescriptionReference * returnType)
-{
- typelib_TypeDescription * returnTypeDescr = 0;
- if (returnType)
- TYPELIB_DANGER_GET( &returnTypeDescr, returnType );
-
- typelib_TypeClass returnTypeClass = returnType ? returnType->eTypeClass : typelib_TypeClass_VOID;
- if (!bridges::cpp_uno::shared::isSimpleType(returnTypeClass) &&
- !bridges::cpp_uno::shared::isSmallStruct(returnTypeDescr)) {
- functionIndex |= 0x80000000;
- }
- PrivateSnippetExecutor exec = privateSnippetExecutorGeneral;
- switch (returnTypeClass) {
- case typelib_TypeClass_VOID:
- exec = privateSnippetExecutorVoid;
- break;
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- exec = privateSnippetExecutorHyper;
- break;
- case typelib_TypeClass_FLOAT:
- exec = privateSnippetExecutorFloat;
- break;
- case typelib_TypeClass_DOUBLE:
- exec = privateSnippetExecutorDouble;
- break;
- case typelib_TypeClass_STRUCT:
- if (bridges::cpp_uno::shared::isSmallStruct(returnTypeDescr)) {
- if (returnType->pType->nSize <= 4) {
- exec = privateSnippetExecutorGeneral;
- }
- else if (returnType->pType->nSize <= 8) {
- exec = privateSnippetExecutorHyper;
- }
- }
- else {
- exec = privateSnippetExecutorClass;
- }
- break;
- case typelib_TypeClass_STRING:
- case typelib_TypeClass_TYPE:
- case typelib_TypeClass_ANY:
- case typelib_TypeClass_SEQUENCE:
- case typelib_TypeClass_INTERFACE:
- exec = privateSnippetExecutorClass;
- break;
- default:
- exec = privateSnippetExecutorGeneral;
- break;
- }
- if (returnType)
- TYPELIB_DANGER_RELEASE( returnTypeDescr );
- unsigned char * p = code;
- static_assert(sizeof (sal_Int32) == 4, "boo");
- // mov function_index, %eax:
- *p++ = 0xB8;
- *reinterpret_cast< sal_Int32 * >(p) = functionIndex;
- p += sizeof (sal_Int32);
- // mov vtable_offset, %edx:
- *p++ = 0xBA;
- *reinterpret_cast< sal_Int32 * >(p) = vtableOffset;
- p += sizeof (sal_Int32);
- // jmp privateSnippetExecutor:
- *p++ = 0xE9;
- *reinterpret_cast< sal_Int32 * >(p)
- = ((unsigned char *) exec) - p - sizeof (sal_Int32);
- p += sizeof (sal_Int32);
- assert(p - code <= codeSnippetSize);
- return code + codeSnippetSize;
-}
-
-}
-
-struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
-
-bridges::cpp_uno::shared::VtableFactory::Slot *
-bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
-{
- return static_cast< Slot * >(block) + 2;
-}
-
-std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
- sal_Int32 slotCount)
-{
- return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
-}
-
-bridges::cpp_uno::shared::VtableFactory::Slot *
-bridges::cpp_uno::shared::VtableFactory::initializeBlock(
- void * block, sal_Int32 slotCount, sal_Int32,
- typelib_InterfaceTypeDescription *)
-{
- Slot * slots = mapBlockToVtable(block);
- slots[-2].fn = 0;
- slots[-1].fn = 0;
- return slots + slotCount;
-}
-
-unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
- Slot ** slots, unsigned char * code,
- typelib_InterfaceTypeDescription const * type, sal_Int32 functionOffset,
- sal_Int32 functionCount, sal_Int32 vtableOffset)
-{
- (*slots) -= functionCount;
- Slot * s = *slots;
- for (sal_Int32 i = 0; i < type->nMembers; ++i) {
- typelib_TypeDescription * member = 0;
- TYPELIB_DANGER_GET(&member, type->ppMembers[i]);
- assert(member != 0);
- switch (member->eTypeClass) {
- case typelib_TypeClass_INTERFACE_ATTRIBUTE:
- // Getter:
- (s++)->fn = code;
- code = codeSnippet(
- code, functionOffset++, vtableOffset,
- reinterpret_cast< typelib_InterfaceAttributeTypeDescription * >(
- member)->pAttributeTypeRef);
- // Setter:
- if (!reinterpret_cast<
- typelib_InterfaceAttributeTypeDescription * >(
- member)->bReadOnly)
- {
- (s++)->fn = code;
- code = codeSnippet(
- code, functionOffset++, vtableOffset,
- NULL);
- }
- break;
-
- case typelib_TypeClass_INTERFACE_METHOD:
- (s++)->fn = code;
- code = codeSnippet(
- code, functionOffset++, vtableOffset,
- reinterpret_cast< typelib_InterfaceMethodTypeDescription * >(
- member)->pReturnTypeRef);
- break;
-
- default:
- assert(false);
- break;
- }
- TYPELIB_DANGER_RELEASE(member);
- }
- return code;
-}
-
-void bridges::cpp_uno::shared::VtableFactory::flushCode(
- unsigned char const *, unsigned char const *)
-{}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_intel/dllinit.cxx b/bridges/source/cpp_uno/mingw_intel/dllinit.cxx
deleted file mode 100644
index 5b9bb38eaa26..000000000000
--- a/bridges/source/cpp_uno/mingw_intel/dllinit.cxx
+++ /dev/null
@@ -1,45 +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 .
- */
-
-#include <windows.h>
-
-
-void dso_init();
-void dso_exit();
-
-
-extern "C" BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
-{
- switch(dwReason) {
- case DLL_PROCESS_ATTACH:
- DisableThreadLibraryCalls(hModule);
-
- dso_init();
- break;
-
- case DLL_PROCESS_DETACH:
- if (!lpvReserved)
- dso_exit();
- break;
- }
-
- return TRUE;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_intel/except.cxx b/bridges/source/cpp_uno/mingw_intel/except.cxx
deleted file mode 100644
index 2798122f78f9..000000000000
--- a/bridges/source/cpp_uno/mingw_intel/except.cxx
+++ /dev/null
@@ -1,293 +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 .
- */
-
-
-#include <stdio.h>
-#include <string.h>
-
-#include <cxxabi.h>
-#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h
-#define _GLIBCXX_CDTOR_CALLABI
-#endif
-
-#include <rtl/strbuf.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <sal/log.hxx>
-#include <osl/mutex.hxx>
-
-#include <com/sun/star/uno/genfunc.hxx>
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include <typelib/typedescription.hxx>
-#include <uno/any2.h>
-#include <unordered_map>
-#include "share.hxx"
-
-
-using namespace ::std;
-using namespace ::osl;
-using namespace ::com::sun::star::uno;
-using namespace ::__cxxabiv1;
-
-
-namespace CPPU_CURRENT_NAMESPACE
-{
-
-void dummy_can_throw_anything( char const * )
-{
-}
-
-static OUString toUNOname( char const * p )
-{
-#if OSL_DEBUG_LEVEL > 1
- char const * start = p;
-#endif
-
- // example: N3com3sun4star4lang24IllegalArgumentExceptionE
-
- OUStringBuffer buf( 64 );
- assert( 'N' == *p );
- ++p; // skip N
-
- while ('E' != *p)
- {
- // read chars count
- long n = (*p++ - '0');
- while ('0' <= *p && '9' >= *p)
- {
- n *= 10;
- n += (*p++ - '0');
- }
- buf.appendAscii( p, n );
- p += n;
- if ('E' != *p)
- buf.append( '.' );
- }
-
-#if OSL_DEBUG_LEVEL > 1
- OUString ret( buf.makeStringAndClear() );
- OString c_ret( OUStringToOString( ret, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> toUNOname(): %s => %s\n", start, c_ret.getStr() );
- return ret;
-#else
- return buf.makeStringAndClear();
-#endif
-}
-
-class RTTI
-{
- typedef std::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
-
- Mutex m_mutex;
- t_rtti_map m_rttis;
- t_rtti_map m_generatedRttis;
-
-public:
- RTTI();
- ~RTTI();
-
- type_info * getRTTI( typelib_CompoundTypeDescription * );
-};
-
-RTTI::RTTI()
-{
-}
-
-RTTI::~RTTI()
-{
-}
-
-
-type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr )
-{
- type_info * rtti;
-
- OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName;
-
- MutexGuard guard( m_mutex );
- t_rtti_map::const_iterator iRttiFind( m_rttis.find( unoName ) );
- if (iRttiFind == m_rttis.end())
- {
- // RTTI symbol
- OStringBuffer buf( 64 );
- buf.append( "__ZTIN" );
- sal_Int32 index = 0;
- do
- {
- OUString token( unoName.getToken( 0, '.', index ) );
- buf.append( token.getLength() );
- OString c_token( OUStringToOString( token, RTL_TEXTENCODING_ASCII_US ) );
- buf.append( c_token );
- }
- while (index >= 0);
- buf.append( 'E' );
-
- OString symName( buf.makeStringAndClear() );
- // try to lookup the symbol in the generated rtti map
- t_rtti_map::const_iterator iFind( m_generatedRttis.find( unoName ) );
- if (iFind == m_generatedRttis.end())
- {
- // we must generate it !
- // symbol and rtti-name is nearly identical,
- // the symbol is prefixed with __ZTI
- char const * rttiName = symName.getStr() +5;
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr,"generated rtti for %s\n", rttiName );
-#endif
- if (pTypeDescr->pBaseTypeDescription)
- {
- // ensure availability of base
- type_info * base_rtti = getRTTI(
- (typelib_CompoundTypeDescription *)pTypeDescr->pBaseTypeDescription );
- rtti = new __si_class_type_info(
- strdup( rttiName ), (__class_type_info *)base_rtti );
- }
- else
- {
- // this class has no base class
- rtti = new __class_type_info( strdup( rttiName ) );
- }
-
- pair< t_rtti_map::iterator, bool > insertion(
- m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
- assert(insertion.second && "### inserting new generated rtti failed?!");
- }
- else // taking already generated rtti
- {
- rtti = iFind->second;
- }
- }
- else
- {
- rtti = iRttiFind->second;
- }
-
- return rtti;
-}
-
-
-extern "C" {
-static void _GLIBCXX_CDTOR_CALLABI deleteException( void * pExc )
-{
- __cxa_exception const * header = ((__cxa_exception const *)pExc - 1);
- typelib_TypeDescription * pTD = 0;
- OUString unoName( toUNOname( header->exceptionType->name() ) );
- ::typelib_typedescription_getByName( &pTD, unoName.pData );
- assert(pTD && "### unknown exception type! leaving out destruction => leaking!!!");
- if (pTD)
- {
- ::uno_destructData( pExc, pTD, cpp_release );
- ::typelib_typedescription_release( pTD );
- }
-}
-}
-
-void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
-{
-#if OSL_DEBUG_LEVEL > 1
- OString cstr(
- OUStringToOString(
- OUString::unacquired( &pUnoExc->pType->pTypeName ),
- RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() );
-#endif
- void * pCppExc;
- type_info * rtti;
-
- {
- // construct cpp exception object
- typelib_TypeDescription * pTypeDescr = 0;
- TYPELIB_DANGER_GET( &pTypeDescr, pUnoExc->pType );
- assert(pTypeDescr);
- if (! pTypeDescr)
- {
- throw RuntimeException(
- OUString("cannot get typedescription for type ") +
- OUString::unacquired( &pUnoExc->pType->pTypeName ) );
- }
-
- pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
- ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp );
-
- // destruct uno exception
- ::uno_any_destruct( pUnoExc, 0 );
- // avoiding locked counts
- static RTTI * s_rtti = 0;
- if (! s_rtti)
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if (! s_rtti)
- {
-#ifdef LEAK_STATIC_DATA
- s_rtti = new RTTI();
-#else
- static RTTI rtti_data;
- s_rtti = &rtti_data;
-#endif
- }
- }
- rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- assert(rtti && "### no rtti for throwing exception!");
- if (! rtti)
- {
- throw RuntimeException(
- OUString("no rtti for type ") +
- OUString::unacquired( &pUnoExc->pType->pTypeName ) );
- }
- }
-
- __cxa_throw( pCppExc, rtti, deleteException );
-}
-
-void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping * pCpp2Uno )
-{
- if (! header)
- {
- RuntimeException aRE( "no exception header!" );
- Type const & rType = cppu::UnoType<decltype(aRE)>::get();
- uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
- SAL_WARN("bridges", aRE.Message);
- return;
- }
-
- typelib_TypeDescription * pExcTypeDescr = 0;
- OUString unoName( toUNOname( header->exceptionType->name() ) );
-#if OSL_DEBUG_LEVEL > 1
- OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() );
-#endif
- typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
- if (0 == pExcTypeDescr)
- {
- RuntimeException aRE( OUString("exception type not found: ") + unoName );
- Type const & rType = cppu::UnoType<decltype(aRE)>::get();
- uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
- SAL_WARN("bridges", aRE.Message);
- }
- else
- {
- // construct uno exception any
- uno_any_constructAndConvert( pUnoExc, header->adjustedPtr, pExcTypeDescr, pCpp2Uno );
- typelib_typedescription_release( pExcTypeDescr );
- }
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_intel/share.hxx b/bridges/source/cpp_uno/mingw_intel/share.hxx
deleted file mode 100644
index 0ce7423f82de..000000000000
--- a/bridges/source/cpp_uno/mingw_intel/share.hxx
+++ /dev/null
@@ -1,95 +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 .
- */
-#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_MINGW_INTEL_SHARE_HXX
-#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_MINGW_INTEL_SHARE_HXX
-
-#include "uno/mapping.h"
-
-#include <typeinfo>
-#include <exception>
-#include <cstddef>
-
-#include "cppu/macros.hxx"
-#include "uno/any2.h"
-
-namespace CPPU_CURRENT_NAMESPACE
-{
-
-void dummy_can_throw_anything( char const * );
-
-// ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
-
-struct _Unwind_Exception
-{
- unsigned exception_class __attribute__((__mode__(__DI__)));
- void * exception_cleanup;
- unsigned private_1 __attribute__((__mode__(__word__)));
- unsigned private_2 __attribute__((__mode__(__word__)));
-} __attribute__((__aligned__));
-
-struct __cxa_exception
-{
- ::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
- ::std::unexpected_handler unexpectedHandler;
- ::std::terminate_handler terminateHandler;
-
- __cxa_exception *nextException;
-
- int handlerCount;
-
- int handlerSwitchValue;
- const unsigned char *actionRecord;
- const unsigned char *languageSpecificData;
- void *catchTemp;
- void *adjustedPtr;
-
- _Unwind_Exception unwindHeader;
-};
-
-struct __cxa_eh_globals
-{
- __cxa_exception *caughtExceptions;
- unsigned int uncaughtExceptions;
-};
-
-}
-
-extern "C" void privateSnippetExecutorGeneral();
-extern "C" void privateSnippetExecutorVoid();
-extern "C" void privateSnippetExecutorHyper();
-extern "C" void privateSnippetExecutorFloat();
-extern "C" void privateSnippetExecutorDouble();
-extern "C" void privateSnippetExecutorClass();
-
-extern "C" CPPU_CURRENT_NAMESPACE::__cxa_eh_globals *__cxa_get_globals () throw();
-
-namespace CPPU_CURRENT_NAMESPACE
-{
-
-void raiseException(
- uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
-
-void fillUnoException(
- __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
-}
-
-#endif
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_intel/smallstruct.cxx b/bridges/source/cpp_uno/mingw_intel/smallstruct.cxx
deleted file mode 100644
index 58c0338630f2..000000000000
--- a/bridges/source/cpp_uno/mingw_intel/smallstruct.cxx
+++ /dev/null
@@ -1,71 +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 .
- */
-
-
-#include "types.hxx"
-
-#include "typelib/typeclass.h"
-#include "typelib/typedescription.h"
-
-namespace bridges { namespace cpp_uno { namespace shared {
-
-namespace {
-bool isSimpleStruct(typelib_TypeDescription const * type) {
- switch (type->eTypeClass) {
- case typelib_TypeClass_STRUCT:
- {
- typelib_CompoundTypeDescription const * p
- = reinterpret_cast< typelib_CompoundTypeDescription const * >(
- type);
- for (sal_Int32 i = 0; i < p->nMembers; ++i) {
- switch (p->ppTypeRefs[i]->eTypeClass) {
- case typelib_TypeClass_STRUCT:
- {
- typelib_TypeDescription * t = 0;
- TYPELIB_DANGER_GET(&t, p->ppTypeRefs[i]);
- bool b = isSimpleStruct(t);
- TYPELIB_DANGER_RELEASE(t);
- if (!b) {
- return false;
- }
- }
- break;
-
- default:
- if (!isSimpleType(p->ppTypeRefs[i]->eTypeClass))
- return false;
- break;
- }
- }
- }
- return true;
-
- default:
- return false;
- }
-}
-}
-
-bool isSmallStruct(typelib_TypeDescription const * type) {
- return (type->nSize <= 8 && isSimpleStruct(type));
-}
-
-} } }
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_intel/smallstruct.hxx b/bridges/source/cpp_uno/mingw_intel/smallstruct.hxx
deleted file mode 100644
index 0ee407941de6..000000000000
--- a/bridges/source/cpp_uno/mingw_intel/smallstruct.hxx
+++ /dev/null
@@ -1,32 +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 .
- */
-#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_MINGW_INTEL_SMALLSTRUCT_HXX
-#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_MINGW_INTEL_SMALLSTRUCT_HXX
-
-#include "typelib/typeclass.h"
-#include "typelib/typedescription.h"
-
-namespace bridges { namespace cpp_uno { namespace shared {
-
-bool isSmallStruct(typelib_TypeDescription const * type);
-
-} } }
-
-#endif
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx b/bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx
deleted file mode 100644
index 5353da36848a..000000000000
--- a/bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx
+++ /dev/null
@@ -1,378 +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 .
- */
-
-
-#include <com/sun/star/uno/genfunc.hxx>
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include <uno/data.h>
-#include <sal/alloca.h>
-
-#include "bridge.hxx"
-#include "types.hxx"
-#include "unointerfaceproxy.hxx"
-#include "vtables.hxx"
-
-#include "callvirtualmethod.hxx"
-#include "share.hxx"
-#include "smallstruct.hxx"
-
-using namespace ::com::sun::star::uno;
-
-namespace
-{
-
-static void cpp_call(
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
- bridges::cpp_uno::shared::VtableSlot aVtableSlot,
- typelib_TypeDescriptionReference * pReturnTypeRef,
- sal_Int32 nParams, typelib_MethodParameter * pParams,
- void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
-{
- // max space for: [complex ret ptr], values|ptr ...
- char * pCppStack =
-#ifdef BROKEN_ALLOCA
- (char *)malloc( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
-#else
- (char *)alloca( sizeof(sal_Int32) + ((nParams+2) * sizeof(sal_Int64)) );
-#endif
- char * pCppStackStart = pCppStack;
-
- // return
- typelib_TypeDescription * pReturnTypeDescr = 0;
- TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
- assert(pReturnTypeDescr);
-
- void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion
-
- if (pReturnTypeDescr)
- {
- if (bridges::cpp_uno::shared::isSimpleType( pReturnTypeDescr ))
- {
- pCppReturn = pUnoReturn; // direct way for simple types
- }
- else
- {
- // complex return via ptr
- pCppReturn
- = (bridges::cpp_uno::shared::relatesToInterfaceType(
- pReturnTypeDescr )
-#ifdef BROKEN_ALLOCA
- ? malloc( pReturnTypeDescr->nSize )
-#else
- ? alloca( pReturnTypeDescr->nSize )
-#endif
- : pUnoReturn); // direct way
- if (!bridges::cpp_uno::shared::isSmallStruct(pReturnTypeDescr)) {
- *(void **)pCppStack = pCppReturn;
- pCppStack += sizeof(void *);
- }
- }
- }
- // push this
- void * pAdjustedThisPtr = reinterpret_cast< void ** >(pThis->getCppI())
- + aVtableSlot.offset;
- *(void**)pCppStack = pAdjustedThisPtr;
- pCppStack += sizeof( void* );
-
- // stack space
- static_assert(sizeof(void *) == sizeof(sal_Int32), "### unexpected size!");
- // args
-#ifdef BROKEN_ALLOCA
- void ** pCppArgs = (void **)malloc( 3 * sizeof(void *) * nParams );
-#else
- void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams );
-#endif
- // indices of values this have to be converted (interface conversion cpp<=>uno)
- sal_Int32 * pTempIndices = (sal_Int32 *)(pCppArgs + nParams);
- // type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
-
- sal_Int32 nTempIndices = 0;
-
- for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
- {
- const typelib_MethodParameter & rParam = pParams[nPos];
- typelib_TypeDescription * pParamTypeDescr = 0;
- TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
- if (!rParam.bOut
- && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
- {
- uno_copyAndConvertData( pCppArgs[nPos] = pCppStack, pUnoArgs[nPos], pParamTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
-
- switch (pParamTypeDescr->eTypeClass)
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- case typelib_TypeClass_DOUBLE:
- pCppStack += sizeof(sal_Int32); // extra long
- break;
- default:
- break;
- }
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- else // ptr to complex value | ref
- {
- if (! rParam.bIn) // is pure out
- {
- // cpp out is constructed mem, uno out is not!
- uno_constructData(
-#ifdef BROKEN_ALLOCA
- *(void **)pCppStack = pCppArgs[nPos] = malloc( pParamTypeDescr->nSize ),
-#else
- *(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
-#endif
- pParamTypeDescr );
- pTempIndices[nTempIndices] = nPos; // default constructed for cpp call
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndices++] = pParamTypeDescr;
- }
- // is in/inout
- else if (bridges::cpp_uno::shared::relatesToInterfaceType(
- pParamTypeDescr ))
- {
- uno_copyAndConvertData(
-#ifdef BROKEN_ALLOCA
- *(void **)pCppStack = pCppArgs[nPos] = malloc( pParamTypeDescr->nSize ),
-#else
- *(void **)pCppStack = pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
-#endif
- pUnoArgs[nPos], pParamTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
-
- pTempIndices[nTempIndices] = nPos; // has to be reconverted
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndices++] = pParamTypeDescr;
- }
- else // direct way
- {
- *(void **)pCppStack = pCppArgs[nPos] = pUnoArgs[nPos];
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- }
- pCppStack += sizeof(sal_Int32); // standard parameter length
- }
-
- try
- {
- assert( !( (pCppStack - pCppStackStart ) & 3) && "UNALIGNED STACK !!! (Please DO panic)" );
- CPPU_CURRENT_NAMESPACE::callVirtualMethod(
- pAdjustedThisPtr, aVtableSlot.index,
- pCppReturn, pReturnTypeDescr,
- (sal_Int32 *)pCppStackStart, (pCppStack - pCppStackStart) / sizeof(sal_Int32) );
- // NO exception occurred...
- *ppUnoExc = 0;
-
- // reconvert temporary params
- for ( ; nTempIndices--; )
- {
- sal_Int32 nIndex = pTempIndices[nTempIndices];
- typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndices];
-
- if (pParams[nIndex].bIn)
- {
- if (pParams[nIndex].bOut) // inout
- {
- uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 ); // destroy uno value
- uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- }
- }
- else // pure out
- {
- uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- }
- // destroy temp cpp param => cpp: every param was constructed
- uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-#ifdef BROKEN_ALLOCA
- free( pCppArgs[nIndex] );
-#endif
-
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- // return value
- if (pCppReturn && pUnoReturn != pCppReturn)
- {
- uno_copyAndConvertData( pUnoReturn, pCppReturn, pReturnTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- uno_destructData( pCppReturn, pReturnTypeDescr, cpp_release );
- }
- }
- catch (...)
- {
- // fill uno exception
- fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
- // temporary params
- for ( ; nTempIndices--; )
- {
- sal_Int32 nIndex = pTempIndices[nTempIndices];
- // destroy temp cpp param => cpp: every param was constructed
- uno_destructData( pCppArgs[nIndex], ppTempParamTypeDescr[nTempIndices], cpp_release );
- TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndices] );
-#ifdef BROKEN_ALLOCA
- free( pCppArgs[nIndex] );
-#endif
- }
- // return type
- if (pReturnTypeDescr)
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
- }
- if (pCppReturn && pUnoReturn != pCppReturn)
- {
-#ifdef BROKEN_ALLOCA
- free( pCppReturn );
-#endif
- }
-#ifdef BROKEN_ALLOCA
- free( pCppStackStart );
-#endif
-}
-
-}
-
-namespace bridges { namespace cpp_uno { namespace shared {
-
-void unoInterfaceProxyDispatch(
- uno_Interface * pUnoI, const typelib_TypeDescription * pMemberDescr,
- void * pReturn, void * pArgs[], uno_Any ** ppException )
-{
- // is my surrogate
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
- = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
-
- switch (pMemberDescr->eTypeClass)
- {
- case typelib_TypeClass_INTERFACE_ATTRIBUTE:
- {
- VtableSlot aVtableSlot(
- getVtableSlot(
- reinterpret_cast<
- typelib_InterfaceAttributeTypeDescription const * >(
- pMemberDescr)));
- if (pReturn)
- {
- // dependent dispatch
- cpp_call(
- pThis, aVtableSlot,
- ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef,
- 0, 0, // no params
- pReturn, pArgs, ppException );
- }
- else
- {
- // is SET
- typelib_MethodParameter aParam;
- aParam.pTypeRef =
- ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
- typelib_TypeDescriptionReference * pReturnTypeRef = 0;
- OUString aVoidName("void");
- typelib_typedescriptionreference_new(
- &pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
-
- // dependent dispatch
- aVtableSlot.index += 1; // get, then set method
- cpp_call(
- pThis, aVtableSlot,
- pReturnTypeRef,
- 1, &aParam,
- pReturn, pArgs, ppException );
-
- typelib_typedescriptionreference_release( pReturnTypeRef );
- }
-
- break;
- }
- case typelib_TypeClass_INTERFACE_METHOD:
- {
- VtableSlot aVtableSlot(
- getVtableSlot(
- reinterpret_cast<
- typelib_InterfaceMethodTypeDescription const * >(
- pMemberDescr)));
- switch (aVtableSlot.index)
- {
- // standard calls
- case 1: // acquire uno interface
- (*pUnoI->acquire)( pUnoI );
- *ppException = 0;
- break;
- case 2: // release uno interface
- (*pUnoI->release)( pUnoI );
- *ppException = 0;
- break;
- case 0: // queryInterface() opt
- {
- typelib_TypeDescription * pTD = 0;
- TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pArgs[0] )->getTypeLibType() );
- if (pTD)
- {
- uno_Interface * pInterface = 0;
- (*pThis->pBridge->getUnoEnv()->getRegisteredInterface)(
- pThis->pBridge->getUnoEnv(),
- (void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
- if (pInterface)
- {
- ::uno_any_construct(
- reinterpret_cast< uno_Any * >( pReturn ),
- &pInterface, pTD, 0 );
- (*pInterface->release)( pInterface );
- TYPELIB_DANGER_RELEASE( pTD );
- *ppException = 0;
- break;
- }
- TYPELIB_DANGER_RELEASE( pTD );
- }
- } // else perform queryInterface()
- default:
- // dependent dispatch
- cpp_call(
- pThis, aVtableSlot,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pReturnTypeRef,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->nParams,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pParams,
- pReturn, pArgs, ppException );
- }
- break;
- }
- default:
- {
- ::com::sun::star::uno::RuntimeException aExc(
- OUString("illegal member type description!"),
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
- Type const & rExcType = cppu::UnoType<decltype(aExc)>::get();
- // binary identical null reference
- ::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
- }
- }
-}
-
-} } }
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_x86-64/abi.cxx b/bridges/source/cpp_uno/mingw_x86-64/abi.cxx
deleted file mode 100644
index aaf657f2de22..000000000000
--- a/bridges/source/cpp_uno/mingw_x86-64/abi.cxx
+++ /dev/null
@@ -1,327 +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 .
- */
-
-
-// This is an implementation of the x86-64 ABI as described in 'System V
-// Application Binary Interface, AMD64 Architecture Processor Supplement'
-// (http://www.x86-64.org/documentation/abi-0.95.pdf)
-//
-// The code in this file is a modification of src/x86/ffi64.c from libffi
-// (http://sources.redhat.com/libffi/) which is under the following license:
-
-/* -----------------------------------------------------------------------
- ffi.c - Copyright (c) 2002 Bo Thorsen <bo@suse.de>
-
- x86-64 Foreign Function Interface
-
- Permission is hereby granted, free of charge, to any person obtaining
- a copy of this software and associated documentation files (the
- ``Software''), to deal in the Software without restriction, including
- without limitation the rights to use, copy, modify, merge, publish,
- distribute, sublicense, and/or sell copies of the Software, and to
- permit persons to whom the Software is furnished to do so, subject to
- the following conditions:
-
- The above copyright notice and this permission notice shall be included
- in all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
- IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR
- OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- OTHER DEALINGS IN THE SOFTWARE.
- ----------------------------------------------------------------------- */
-
-#include "sal/config.h"
-
-#include "abi.hxx"
-
-#include <sal/log.hxx>
-
-using namespace x86_64;
-
-/* Register class used for passing given 64bit part of the argument.
- These represent classes as documented by the PS ABI, with the exception
- of SSESF, SSEDF classes, that are basically SSE class, just gcc will
- use SF or DFmode move instead of DImode to avoid reformating penalties.
-
- Similary we play games with INTEGERSI_CLASS to use cheaper SImode moves
- whenever possible (upper half does contain padding).
- */
-enum x86_64_reg_class
-{
- X86_64_NO_CLASS,
- X86_64_INTEGER_CLASS,
- X86_64_INTEGERSI_CLASS,
- X86_64_SSE_CLASS,
- X86_64_SSESF_CLASS,
- X86_64_SSEDF_CLASS,
- X86_64_SSEUP_CLASS,
- X86_64_X87_CLASS,
- X86_64_X87UP_CLASS,
- X86_64_MEMORY_CLASS
-};
-
-#define MAX_CLASSES 4
-
-/* x86-64 register passing implementation. See x86-64 ABI for details. Goal
- of this code is to classify each 8bytes of incoming argument by the register
- class and assign registers accordingly. */
-
-/* Return the union class of CLASS1 and CLASS2.
- See the x86-64 PS ABI for details. */
-
-static enum x86_64_reg_class
-merge_classes (enum x86_64_reg_class class1, enum x86_64_reg_class class2)
- throw ()
-{
- /* Rule #1: If both classes are equal, this is the resulting class. */
- if (class1 == class2)
- return class1;
-
- /* Rule #2: If one of the classes is NO_CLASS, the resulting class is
- the other class. */
- if (class1 == X86_64_NO_CLASS)
- return class2;
- if (class2 == X86_64_NO_CLASS)
- return class1;
-
- /* Rule #3: If one of the classes is MEMORY, the result is MEMORY. */
- if (class1 == X86_64_MEMORY_CLASS || class2 == X86_64_MEMORY_CLASS)
- return X86_64_MEMORY_CLASS;
-
- /* Rule #4: If one of the classes is INTEGER, the result is INTEGER. */
- if ((class1 == X86_64_INTEGERSI_CLASS && class2 == X86_64_SSESF_CLASS)
- || (class2 == X86_64_INTEGERSI_CLASS && class1 == X86_64_SSESF_CLASS))
- return X86_64_INTEGERSI_CLASS;
- if (class1 == X86_64_INTEGER_CLASS || class1 == X86_64_INTEGERSI_CLASS
- || class2 == X86_64_INTEGER_CLASS || class2 == X86_64_INTEGERSI_CLASS)
- return X86_64_INTEGER_CLASS;
-
- /* Rule #5: If one of the classes is X87 or X87UP class, MEMORY is used. */
- if (class1 == X86_64_X87_CLASS || class1 == X86_64_X87UP_CLASS
- || class2 == X86_64_X87_CLASS || class2 == X86_64_X87UP_CLASS)
- return X86_64_MEMORY_CLASS;
-
- /* Rule #6: Otherwise class SSE is used. */
- return X86_64_SSE_CLASS;
-}
-
-/* Classify the argument of type TYPE and mode MODE.
- CLASSES will be filled by the register class used to pass each word
- of the operand. The number of words is returned. In case the parameter
- should be passed in memory, 0 is returned. As a special case for zero
- sized containers, classes[0] will be NO_CLASS and 1 is returned.
-
- See the x86-64 PS ABI for details.
-*/
-static int
-classify_argument( typelib_TypeDescriptionReference *pTypeRef, enum x86_64_reg_class classes[], int byteOffset ) throw ()
-{
- switch ( pTypeRef->eTypeClass )
- {
- case typelib_TypeClass_VOID:
- classes[0] = X86_64_NO_CLASS;
- return 1;
- case typelib_TypeClass_CHAR:
- case typelib_TypeClass_BOOLEAN:
- case typelib_TypeClass_BYTE:
- case typelib_TypeClass_SHORT:
- case typelib_TypeClass_UNSIGNED_SHORT:
- case typelib_TypeClass_LONG:
- case typelib_TypeClass_UNSIGNED_LONG:
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- case typelib_TypeClass_ENUM:
- if ( ( byteOffset % 8 + pTypeRef->pType->nSize ) <= 4 )
- classes[0] = X86_64_INTEGERSI_CLASS;
- else
- classes[0] = X86_64_INTEGER_CLASS;
- return 1;
- case typelib_TypeClass_FLOAT:
- if ( ( byteOffset % 8 ) == 0 )
- classes[0] = X86_64_SSESF_CLASS;
- else
- classes[0] = X86_64_SSE_CLASS;
- return 1;
- case typelib_TypeClass_DOUBLE:
- classes[0] = X86_64_SSEDF_CLASS;
- return 1;
- /*case LONGDOUBLE:
- classes[0] = X86_64_X87_CLASS;
- classes[1] = X86_64_X87UP_CLASS;
- return 2;*/
- case typelib_TypeClass_STRING:
- case typelib_TypeClass_TYPE:
- case typelib_TypeClass_ANY:
- case typelib_TypeClass_TYPEDEF:
- case typelib_TypeClass_SEQUENCE:
- case typelib_TypeClass_INTERFACE:
- return 0;
- case typelib_TypeClass_STRUCT:
- case typelib_TypeClass_EXCEPTION:
- {
- typelib_TypeDescription * pTypeDescr = 0;
- TYPELIB_DANGER_GET( &pTypeDescr, pTypeRef );
-
- const int UNITS_PER_WORD = 8;
- int words = ( pTypeDescr->nSize + UNITS_PER_WORD - 1 ) / UNITS_PER_WORD;
- enum x86_64_reg_class subclasses[MAX_CLASSES];
-
- /* If the struct is larger than 16 bytes, pass it on the stack. */
- if ( pTypeDescr->nSize > 16 )
- {
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- return 0;
- }
-
- for ( int i = 0; i < words; i++ )
- classes[i] = X86_64_NO_CLASS;
-
- const typelib_CompoundTypeDescription *pStruct = reinterpret_cast<const typelib_CompoundTypeDescription*>( pTypeDescr );
-
- /* Merge the fields of structure. */
- for ( sal_Int32 nMember = 0; nMember < pStruct->nMembers; ++nMember )
- {
- typelib_TypeDescriptionReference *pTypeInStruct = pStruct->ppTypeRefs[ nMember ];
- int offset = byteOffset + pStruct->pMemberOffsets[ nMember ];
-
- int num = classify_argument( pTypeInStruct, subclasses, offset );
-
- if ( num == 0 )
- {
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- return 0;
- }
-
- for ( int i = 0; i < num; i++ )
- {
- int pos = offset / 8;
- classes[i + pos] = merge_classes( subclasses[i], classes[i + pos] );
- }
- }
-
- TYPELIB_DANGER_RELEASE( pTypeDescr );
-
- /* Final merger cleanup. */
- for ( int i = 0; i < words; i++ )
- {
- /* If one class is MEMORY, everything should be passed in
- memory. */
- if ( classes[i] == X86_64_MEMORY_CLASS )
- return 0;
-
- /* The X86_64_SSEUP_CLASS should be always preceded by
- X86_64_SSE_CLASS. */
- if ( classes[i] == X86_64_SSEUP_CLASS
- && ( i == 0 || classes[i - 1] != X86_64_SSE_CLASS ) )
- classes[i] = X86_64_SSE_CLASS;
-
- /* X86_64_X87UP_CLASS should be preceded by X86_64_X87_CLASS. */
- if ( classes[i] == X86_64_X87UP_CLASS
- && ( i == 0 || classes[i - 1] != X86_64_X87_CLASS ) )
- classes[i] = X86_64_SSE_CLASS;
- }
- return words;
- }
-
- default:
- SAL_WARN("bridges", "Unhandled case: pType->eTypeClass == "
- << pTypeRef->eTypeClass);
- assert(false);
- }
- return 0; /* Never reached. */
-}
-
-/* Examine the argument and return set number of register required in each
- class. Return 0 iff parameter should be passed in memory. */
-bool x86_64::examine_argument( typelib_TypeDescriptionReference *pTypeRef, bool bInReturn, int &nUsedGPR, int &nUsedSSE ) throw ()
-{
- enum x86_64_reg_class classes[MAX_CLASSES];
- int n;
-
- n = classify_argument( pTypeRef, classes, 0 );
-
- if ( n == 0 )
- return false;
-
- nUsedGPR = 0;
- nUsedSSE = 0;
- for ( n--; n >= 0; n-- )
- switch ( classes[n] )
- {
- case X86_64_INTEGER_CLASS:
- case X86_64_INTEGERSI_CLASS:
- nUsedGPR++;
- break;
- case X86_64_SSE_CLASS:
- case X86_64_SSESF_CLASS:
- case X86_64_SSEDF_CLASS:
- nUsedSSE++;
- break;
- case X86_64_NO_CLASS:
- case X86_64_SSEUP_CLASS:
- break;
- case X86_64_X87_CLASS:
- case X86_64_X87UP_CLASS:
- if ( !bInReturn )
- return false;
- break;
- default:
- SAL_WARN("bridges", "Unhandled case: classes[n] == " << classes[n]);
- assert(false);
- }
- return true;
-}
-
-bool x86_64::return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef ) throw ()
-{
- int g, s;
-
- return examine_argument( pTypeRef, true, g, s ) == 0;
-}
-
-void x86_64::fill_struct( typelib_TypeDescriptionReference *pTypeRef, const sal_uInt64 *pGPR, const double *pSSE, void *pStruct ) throw ()
-{
- enum x86_64_reg_class classes[MAX_CLASSES];
- int n;
-
- n = classify_argument( pTypeRef, classes, 0 );
-
- sal_uInt64 *pStructAlign = reinterpret_cast<sal_uInt64 *>( pStruct );
- for ( n--; n >= 0; n-- )
- switch ( classes[n] )
- {
- case X86_64_INTEGER_CLASS:
- case X86_64_INTEGERSI_CLASS:
- *pStructAlign++ = *pGPR++;
- break;
- case X86_64_SSE_CLASS:
- case X86_64_SSESF_CLASS:
- case X86_64_SSEDF_CLASS:
- *pStructAlign++ = *reinterpret_cast<const sal_uInt64 *>( pSSE++ );
- break;
- default:
- break;
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_x86-64/abi.hxx b/bridges/source/cpp_uno/mingw_x86-64/abi.hxx
deleted file mode 100644
index 09d2c97c9f2e..000000000000
--- a/bridges/source/cpp_uno/mingw_x86-64/abi.hxx
+++ /dev/null
@@ -1,61 +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 .
- */
-
-#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_MINGW_X86_64_ABI_HXX
-#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_MINGW_X86_64_ABI_HXX
-
-// This is an implementation of the x86-64 ABI as described in 'System V
-// Application Binary Interface, AMD64 Architecture Processor Supplement'
-// (http://www.x86-64.org/documentation/abi-0.95.pdf)
-
-#include <typelib/typedescription.hxx>
-
-namespace x86_64
-{
-
-/* 6 general purpose registers are used for parameter passing */
-const sal_uInt32 MAX_GPR_REGS = 6;
-
-/* 8 SSE registers are used for parameter passing */
-const sal_uInt32 MAX_SSE_REGS = 8;
-
-/* Count number of required registers.
-
- Examine the argument and return set number of register required in each
- class.
-
- Return false iff parameter should be passed in memory.
-*/
-bool examine_argument( typelib_TypeDescriptionReference *pTypeRef, bool bInReturn, int &nUsedGPR, int &nUsedSSE ) throw ();
-
-/** Does function that returns this type use a hidden parameter, or registers?
-
- The value can be returned either in a hidden 1st parameter (which is a
- pointer to a structure allocated by the caller), or in registers (rax, rdx
- for the integers, xmm0, xmm1 for the floating point numbers).
-*/
-bool return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef ) throw ();
-
-void fill_struct( typelib_TypeDescriptionReference *pTypeRef, const sal_uInt64* pGPR, const double* pSSE, void *pStruct ) throw ();
-
-} // namespace x86_64
-
-#endif // INCLUDED_BRIDGES_SOURCE_CPP_UNO_MINGW_X86_64_ABI_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_x86-64/call.s b/bridges/source/cpp_uno/mingw_x86-64/call.s
deleted file mode 100644
index 88d568c599d4..000000000000
--- a/bridges/source/cpp_uno/mingw_x86-64/call.s
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * 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 .
- */
-
- .text
- .align 2
-.globl privateSnippetExecutor
-privateSnippetExecutor:
-.LFB3:
- pushq %rbp
-.LCFI0:
- movq %rsp, %rbp
-.LCFI1:
- subq $160, %rsp
-.LCFI2:
- movq %r10, -152(%rbp) # Save (nVtableOffset << 32) + nFunctionIndex
-
- movq %rdi, -112(%rbp) # Save GP registers
- movq %rsi, -104(%rbp)
- movq %rdx, -96(%rbp)
- movq %rcx, -88(%rbp)
- movq %r8 , -80(%rbp)
- movq %r9 , -72(%rbp)
-
- movsd %xmm0, -64(%rbp) # Save FP registers
- movsd %xmm1, -56(%rbp)
- movsd %xmm2, -48(%rbp)
- movsd %xmm3, -40(%rbp)
- movsd %xmm4, -32(%rbp)
- movsd %xmm5, -24(%rbp)
- movsd %xmm6, -16(%rbp)
- movsd %xmm7, -8(%rbp)
-
- leaq -144(%rbp), %r9 # 6th param: sal_uInt64 * pRegisterReturn
- leaq 16(%rbp), %r8 # 5rd param: void ** ovrflw
- leaq -64(%rbp), %rcx # 4th param: void ** fpreg
- leaq -112(%rbp), %rdx # 3rd param: void ** gpreg
- movl -148(%rbp), %esi # 2nd param: sal_int32 nVtableOffset
- movl -152(%rbp), %edi # 1st param: sal_int32 nFunctionIndex
-
- call cpp_vtable_call
-
- cmp $10, %rax # typelib_TypeClass_FLOAT
- je .Lfloat
- cmp $11, %rax # typelib_TypeClass_DOUBLE
- je .Lfloat
-
- movq -144(%rbp), %rax # Return value (int case)
- movq -136(%rbp), %rdx # Return value (int case)
- movq -144(%rbp), %xmm0 # Return value (int case)
- movq -136(%rbp), %xmm1 # Return value (int case)
- jmp .Lfinish
-.Lfloat:
- movlpd -144(%rbp), %xmm0 # Return value (float/double case)
-
-.Lfinish:
- leave
- ret
-.LFE3:
- .long .-privateSnippetExecutor
- # see http://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html
- # for details of the .eh_frame, the "Common Information Entry" and "Frame Description Entry" formats
- # and http://mentorembedded.github.io/cxx-abi/exceptions.pdf for more info
- .section .eh_frame,"a"
-.Lframe1:
- .long .LECIE1-.LSCIE1
-.LSCIE1:
- .long 0x0
- .byte 0x1
- .string "zR"
- .uleb128 0x1
- .sleb128 -8
- .byte 0x10
- .uleb128 0x1
- .byte 0x1b
- .byte 0xc
- .uleb128 0x7
- .uleb128 0x8
- .byte 0x90
- .uleb128 0x1
- .align 8
-.LECIE1:
-.LSFDE1:
- .long .LEFDE1-.LASFDE1
-.LASFDE1:
- .long .LASFDE1-.Lframe1
- .long .LFB3-.
- .long .LFE3-.LFB3
- .uleb128 0x0
- .byte 0x4
- .long .LCFI0-.LFB3
- .byte 0xe
- .uleb128 0x10
- .byte 0x86
- .uleb128 0x2
- .byte 0x4
- .long .LCFI1-.LCFI0
- .byte 0xd
- .uleb128 0x6
- .align 8
-.LEFDE1:
diff --git a/bridges/source/cpp_uno/mingw_x86-64/callvirtualmethod.cxx b/bridges/source/cpp_uno/mingw_x86-64/callvirtualmethod.cxx
deleted file mode 100644
index 47b8f13a9c29..000000000000
--- a/bridges/source/cpp_uno/mingw_x86-64/callvirtualmethod.cxx
+++ /dev/null
@@ -1,166 +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 .
- */
-
-#include "sal/config.h"
-
-#include <cstring>
-
-#include "cppu/macros.hxx"
-#include "sal/types.h"
-#include "typelib/typeclass.h"
-#include "typelib/typedescription.h"
-
-#include "abi.hxx"
-#include "callvirtualmethod.hxx"
-
-// The call instruction within the asm block of callVirtualMethod may throw
-// exceptions. At least GCC 4.7.0 with -O0 would create (unnecessary)
-// .gcc_exception_table call-site table entries around all other calls in this
-// function that can throw, leading to std::terminate if the asm call throws an
-// exception and the unwinding C++ personality routine finds the unexpected hole
-// in the .gcc_exception_table. Therefore, make sure this function explicitly
-// only calls nothrow-functions (so GCC 4.7.0 with -O0 happens to not create a
-// .gcc_exception_table section at all for this function). For some reason,
-// this also needs to be in a source file of its own.
-//
-// Also, this file should be compiled with -fnon-call-exceptions, and ideally
-// there would be a way to tell the compiler that the asm block contains calls
-// to functions that can potentially throw; see the mail thread starting at
-// <http://gcc.gnu.org/ml/gcc/2012-03/msg00454.html> "C++: Letting compiler know
-// asm block can call function that can throw?"
-
-void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
- void * pThis, sal_uInt32 nVtableIndex, void * pRegisterReturn,
- typelib_TypeDescriptionReference * pReturnTypeRef, bool bSimpleReturn,
- sal_uInt64 *pStack, sal_uInt32 nStack, sal_uInt64 *pGPR, sal_uInt32 nGPR,
- double * pFPR, sal_uInt32 nFPR)
-{
- // Should not happen, but...
- if ( nFPR > x86_64::MAX_SSE_REGS )
- nFPR = x86_64::MAX_SSE_REGS;
- if ( nGPR > x86_64::MAX_GPR_REGS )
- nGPR = x86_64::MAX_GPR_REGS;
-
- // Get pointer to method
- sal_uInt64 pMethod = *((sal_uInt64 *)pThis);
- pMethod += 8 * nVtableIndex;
- pMethod = *((sal_uInt64 *)pMethod);
-
- // Load parameters to stack, if necessary
- sal_uInt64* pCallStack = NULL;
- if ( nStack )
- {
- // 16-bytes aligned
- sal_uInt32 nStackBytes = ( ( nStack + 1 ) >> 1 ) * 16;
- pCallStack = (sal_uInt64 *) __builtin_alloca( nStackBytes );
- std::memcpy( pCallStack, pStack, nStackBytes );
- }
-
- // Return values
- sal_uInt64 rax;
- sal_uInt64 rdx;
- double xmm0;
- double xmm1;
-
- asm volatile (
-
- // Fill the xmm registers
- "movq %6, %%rax\n\t"
-
- "movsd (%%rax), %%xmm0\n\t"
- "movsd 8(%%rax), %%xmm1\n\t"
- "movsd 16(%%rax), %%xmm2\n\t"
- "movsd 24(%%rax), %%xmm3\n\t"
- "movsd 32(%%rax), %%xmm4\n\t"
- "movsd 40(%%rax), %%xmm5\n\t"
- "movsd 48(%%rax), %%xmm6\n\t"
- "movsd 56(%%rax), %%xmm7\n\t"
-
- // Fill the general purpose registers
- "movq %5, %%rax\n\t"
-
- "movq (%%rax), %%rdi\n\t"
- "movq 8(%%rax), %%rsi\n\t"
- "movq 16(%%rax), %%rdx\n\t"
- "movq 24(%%rax), %%rcx\n\t"
- "movq 32(%%rax), %%r8\n\t"
- "movq 40(%%rax), %%r9\n\t"
-
- // Perform the call
- "movq %4, %%r11\n\t"
- "movq %7, %%rax\n\t"
- "call *%%r11\n\t"
-
- // Fill the return values
- "movq %%rax, %0\n\t"
- "movq %%rdx, %1\n\t"
- "movsd %%xmm0, %2\n\t"
- "movsd %%xmm1, %3\n\t"
- : "=m" ( rax ), "=m" ( rdx ), "=m" ( xmm0 ), "=m" ( xmm1 )
- : "m" ( pMethod ), "m" ( pGPR ), "m" ( pFPR ), "m" ( nFPR ),
- "m" ( pCallStack ) // dummy input to prevent the compiler from optimizing the alloca out
- : "rax", "rdi", "rsi", "rdx", "rcx", "r8", "r9", "r10", "r11",
- "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7",
- "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15"
- );
-
- switch (pReturnTypeRef->eTypeClass)
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- *reinterpret_cast<sal_uInt64 *>( pRegisterReturn ) = rax;
- break;
- case typelib_TypeClass_LONG:
- case typelib_TypeClass_UNSIGNED_LONG:
- case typelib_TypeClass_ENUM:
- *reinterpret_cast<sal_uInt32 *>( pRegisterReturn ) = *reinterpret_cast<sal_uInt32*>( &rax );
- break;
- case typelib_TypeClass_CHAR:
- case typelib_TypeClass_SHORT:
- case typelib_TypeClass_UNSIGNED_SHORT:
- *reinterpret_cast<sal_uInt16 *>( pRegisterReturn ) = *reinterpret_cast<sal_uInt16*>( &rax );
- break;
- case typelib_TypeClass_BOOLEAN:
- case typelib_TypeClass_BYTE:
- *reinterpret_cast<sal_uInt8 *>( pRegisterReturn ) = *reinterpret_cast<sal_uInt8*>( &rax );
- break;
- case typelib_TypeClass_FLOAT:
- case typelib_TypeClass_DOUBLE:
- *reinterpret_cast<double *>( pRegisterReturn ) = xmm0;
- break;
- default:
- {
- sal_Int32 const nRetSize = pReturnTypeRef->pType->nSize;
- if (bSimpleReturn && nRetSize <= 16 && nRetSize > 0)
- {
- sal_uInt64 longs[2];
- longs[0] = rax;
- longs[1] = rdx;
-
- double doubles[2];
- doubles[0] = xmm0;
- doubles[1] = xmm1;
- x86_64::fill_struct( pReturnTypeRef, &longs[0], &doubles[0], pRegisterReturn);
- }
- break;
- }
- }
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_x86-64/callvirtualmethod.hxx b/bridges/source/cpp_uno/mingw_x86-64/callvirtualmethod.hxx
deleted file mode 100644
index a7c25b3e517f..000000000000
--- a/bridges/source/cpp_uno/mingw_x86-64/callvirtualmethod.hxx
+++ /dev/null
@@ -1,41 +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 .
- */
-
-#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_MINGW_X86_64_CALLVIRTUALMETHOD_HXX
-#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_MINGW_X86_64_CALLVIRTUALMETHOD_HXX
-
-#include "sal/config.h"
-
-#include "cppu/macros.hxx"
-#include "sal/types.h"
-#include "typelib/typedescription.h"
-
-namespace CPPU_CURRENT_NAMESPACE {
-
-void callVirtualMethod(
- void * pThis, sal_uInt32 nVtableIndex, void * pRegisterReturn,
- typelib_TypeDescriptionReference * pReturnTypeRef, bool bSimpleReturn,
- sal_uInt64 *pStack, sal_uInt32 nStack, sal_uInt64 *pGPR, sal_uInt32 nGPR,
- double * pFPR, sal_uInt32 nFPR);
-
-}
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_x86-64/cpp2uno.cxx b/bridges/source/cpp_uno/mingw_x86-64/cpp2uno.cxx
deleted file mode 100644
index c0b8dfa286dd..000000000000
--- a/bridges/source/cpp_uno/mingw_x86-64/cpp2uno.cxx
+++ /dev/null
@@ -1,512 +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 .
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <rtl/alloc.h>
-#include <sal/log.hxx>
-#include <osl/mutex.hxx>
-
-#include <com/sun/star/uno/genfunc.hxx>
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include <uno/data.h>
-#include <typelib/typedescription.hxx>
-
-#include "bridge.hxx"
-#include "cppinterfaceproxy.hxx"
-#include "types.hxx"
-#include "vtablefactory.hxx"
-
-#include "abi.hxx"
-#include "share.hxx"
-
-using namespace ::osl;
-using namespace ::com::sun::star::uno;
-
-
-// Perform the UNO call
-//
-// We must convert the parameters stored in gpreg, fpreg and ovrflw to UNO
-// arguments and call pThis->getUnoI()->pDispatcher.
-//
-// gpreg: [ret *], this, [gpr params]
-// fpreg: [fpr params]
-// ovrflw: [gpr or fpr params (properly aligned)]
-//
-// [ret *] is present when we are returning a structure bigger than 16 bytes
-// Simple types are returned in rax, rdx (int), or xmm0, xmm1 (fp).
-// Similarly structures <= 16 bytes are in rax, rdx, xmm0, xmm1 as necessary.
-static typelib_TypeClass cpp2uno_call(
- bridges::cpp_uno::shared::CppInterfaceProxy * pThis,
- const typelib_TypeDescription * pMemberTypeDescr,
- typelib_TypeDescriptionReference * pReturnTypeRef, // 0 indicates void return
- sal_Int32 nParams, typelib_MethodParameter * pParams,
- void ** gpreg, void ** fpreg, void ** ovrflw,
- sal_uInt64 * pRegisterReturn /* space for register return */ )
-{
- unsigned int nr_gpr = 0; //number of gpr registers used
- unsigned int nr_fpr = 0; //number of fpr registers used
-
- // return
- typelib_TypeDescription * pReturnTypeDescr = 0;
- if (pReturnTypeRef)
- TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
-
- void * pUnoReturn = 0;
- void * pCppReturn = 0; // complex return ptr: if != 0 && != pUnoReturn, reconversion need
-
- if ( pReturnTypeDescr )
- {
- if ( x86_64::return_in_hidden_param( pReturnTypeRef ) )
- {
- pCppReturn = *gpreg++;
- nr_gpr++;
-
- pUnoReturn = ( bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )
- ? alloca( pReturnTypeDescr->nSize )
- : pCppReturn ); // direct way
- }
- else
- pUnoReturn = pRegisterReturn; // direct way for simple types
- }
-
- // pop this
- gpreg++;
- nr_gpr++;
-
- // stack space
- // parameters
- void ** pUnoArgs = (void **)alloca( 4 * sizeof(void *) * nParams );
- void ** pCppArgs = pUnoArgs + nParams;
- // indices of values this have to be converted (interface conversion cpp<=>uno)
- sal_Int32 * pTempIndices = (sal_Int32 *)(pUnoArgs + (2 * nParams));
- // type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pUnoArgs + (3 * nParams));
-
- sal_Int32 nTempIndices = 0;
-
- for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
- {
- const typelib_MethodParameter & rParam = pParams[nPos];
-
- int nUsedGPR = 0;
- int nUsedSSE = 0;
-#if OSL_DEBUG_LEVEL > 0
- bool bFitsRegisters =
-#endif
- x86_64::examine_argument( rParam.pTypeRef, false, nUsedGPR, nUsedSSE );
- if ( !rParam.bOut && bridges::cpp_uno::shared::isSimpleType( rParam.pTypeRef ) ) // value
- {
- // Simple types must fit exactly one register on x86_64
- assert( bFitsRegisters && ( ( nUsedSSE == 1 && nUsedGPR == 0 ) || ( nUsedSSE == 0 && nUsedGPR == 1 ) ) );
-
- if ( nUsedSSE == 1 )
- {
- if ( nr_fpr < x86_64::MAX_SSE_REGS )
- {
- pCppArgs[nPos] = pUnoArgs[nPos] = fpreg++;
- nr_fpr++;
- }
- else
- pCppArgs[nPos] = pUnoArgs[nPos] = ovrflw++;
- }
- else if ( nUsedGPR == 1 )
- {
- if ( nr_gpr < x86_64::MAX_GPR_REGS )
- {
- pCppArgs[nPos] = pUnoArgs[nPos] = gpreg++;
- nr_gpr++;
- }
- else
- pCppArgs[nPos] = pUnoArgs[nPos] = ovrflw++;
- }
- }
- else // struct <= 16 bytes || ptr to complex value || ref
- {
- typelib_TypeDescription * pParamTypeDescr = 0;
- TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
- void *pCppStack;
- if ( nr_gpr < x86_64::MAX_GPR_REGS )
- {
- pCppArgs[nPos] = pCppStack = *gpreg++;
- nr_gpr++;
- }
- else
- pCppArgs[nPos] = pCppStack = *ovrflw++;
-
- if (! rParam.bIn) // is pure out
- {
- // uno out is unconstructed mem!
- pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize );
- pTempIndices[nTempIndices] = nPos;
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndices++] = pParamTypeDescr;
- }
- else if ( bridges::cpp_uno::shared::relatesToInterfaceType( pParamTypeDescr ) ) // is in/inout
- {
- uno_copyAndConvertData( pUnoArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pCppStack, pParamTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- pTempIndices[nTempIndices] = nPos; // has to be reconverted
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndices++] = pParamTypeDescr;
- }
- else // direct way
- {
- pUnoArgs[nPos] = pCppStack;
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- }
- }
-
- // ExceptionHolder
- uno_Any aUnoExc; // Any will be constructed by callee
- uno_Any * pUnoExc = &aUnoExc;
-
- // invoke uno dispatch call
- (*pThis->getUnoI()->pDispatcher)( pThis->getUnoI(), pMemberTypeDescr, pUnoReturn, pUnoArgs, &pUnoExc );
-
- // in case an exception occurred...
- if ( pUnoExc )
- {
- // destruct temporary in/inout params
- for ( ; nTempIndices--; )
- {
- sal_Int32 nIndex = pTempIndices[nTempIndices];
-
- if (pParams[nIndex].bIn) // is in/inout => was constructed
- uno_destructData( pUnoArgs[nIndex], ppTempParamTypeDescr[nTempIndices], 0 );
- TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndices] );
- }
- if (pReturnTypeDescr)
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
-
- CPPU_CURRENT_NAMESPACE::raiseException( &aUnoExc, pThis->getBridge()->getUno2Cpp() ); // has to destruct the any
- // is here for dummy
- return typelib_TypeClass_VOID;
- }
- else // else no exception occurred...
- {
- // temporary params
- for ( ; nTempIndices--; )
- {
- sal_Int32 nIndex = pTempIndices[nTempIndices];
- typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndices];
-
- if ( pParams[nIndex].bOut ) // inout/out
- {
- // convert and assign
- uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
- uno_copyAndConvertData( pCppArgs[nIndex], pUnoArgs[nIndex], pParamTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
- }
- // destroy temp uno param
- uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 );
-
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- // return
- if ( pCppReturn ) // has complex return
- {
- if ( pUnoReturn != pCppReturn ) // needs reconversion
- {
- uno_copyAndConvertData( pCppReturn, pUnoReturn, pReturnTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
- // destroy temp uno return
- uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
- }
- // complex return ptr is set to return reg
- *(void **)pRegisterReturn = pCppReturn;
- }
- if ( pReturnTypeDescr )
- {
- typelib_TypeClass eRet = (typelib_TypeClass)pReturnTypeDescr->eTypeClass;
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
- return eRet;
- }
- else
- return typelib_TypeClass_VOID;
- }
-}
-
-
-extern "C" typelib_TypeClass cpp_vtable_call(
- sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
- void ** gpreg, void ** fpreg, void ** ovrflw,
- sal_uInt64 * pRegisterReturn /* space for register return */ )
-{
- // gpreg: [ret *], this, [other gpr params]
- // fpreg: [fpr params]
- // ovrflw: [gpr or fpr params (properly aligned)]
- void * pThis;
- if ( nFunctionIndex & 0x80000000 )
- {
- nFunctionIndex &= 0x7fffffff;
- pThis = gpreg[1];
- }
- else
- {
- pThis = gpreg[0];
- }
- pThis = static_cast<char *>( pThis ) - nVtableOffset;
-
- bridges::cpp_uno::shared::CppInterfaceProxy * pCppI =
- bridges::cpp_uno::shared::CppInterfaceProxy::castInterfaceToProxy( pThis );
-
- typelib_InterfaceTypeDescription * pTypeDescr = pCppI->getTypeDescr();
-
- if ( nFunctionIndex >= pTypeDescr->nMapFunctionIndexToMemberIndex )
- {
- SAL_WARN(
- "bridges",
- "illegal " << OUString::unacquired(&pTypeDescr->aBase.pTypeName)
- << " vtable index " << nFunctionIndex << "/"
- << pTypeDescr->nMapFunctionIndexToMemberIndex);
- throw RuntimeException(
- ("illegal " + OUString::unacquired(&pTypeDescr->aBase.pTypeName)
- + " vtable index " + OUString::number(nFunctionIndex) + "/"
- + OUString::number(pTypeDescr->nMapFunctionIndexToMemberIndex)),
- reinterpret_cast<XInterface *>( pCppI ) );
- }
-
- // determine called method
- sal_Int32 nMemberPos = pTypeDescr->pMapFunctionIndexToMemberIndex[nFunctionIndex];
- assert(nMemberPos < pTypeDescr->nAllMembers);
-
- TypeDescription aMemberDescr( pTypeDescr->ppAllMembers[nMemberPos] );
-
- typelib_TypeClass eRet;
- switch ( aMemberDescr.get()->eTypeClass )
- {
- case typelib_TypeClass_INTERFACE_ATTRIBUTE:
- {
- typelib_TypeDescriptionReference *pAttrTypeRef =
- reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>( aMemberDescr.get() )->pAttributeTypeRef;
-
- if ( pTypeDescr->pMapMemberIndexToFunctionIndex[nMemberPos] == nFunctionIndex )
- {
- // is GET method
- eRet = cpp2uno_call( pCppI, aMemberDescr.get(), pAttrTypeRef,
- 0, 0, // no params
- gpreg, fpreg, ovrflw, pRegisterReturn );
- }
- else
- {
- // is SET method
- typelib_MethodParameter aParam;
- aParam.pTypeRef = pAttrTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
- eRet = cpp2uno_call( pCppI, aMemberDescr.get(),
- 0, // indicates void return
- 1, &aParam,
- gpreg, fpreg, ovrflw, pRegisterReturn );
- }
- break;
- }
- case typelib_TypeClass_INTERFACE_METHOD:
- {
- // is METHOD
- switch ( nFunctionIndex )
- {
- case 1: // acquire()
- pCppI->acquireProxy(); // non virtual call!
- eRet = typelib_TypeClass_VOID;
- break;
- case 2: // release()
- pCppI->releaseProxy(); // non virtual call!
- eRet = typelib_TypeClass_VOID;
- break;
- case 0: // queryInterface() opt
- {
- typelib_TypeDescription * pTD = 0;
- TYPELIB_DANGER_GET( &pTD, reinterpret_cast<Type *>( gpreg[2] )->getTypeLibType() );
- if ( pTD )
- {
- XInterface * pInterface = 0;
- (*pCppI->getBridge()->getCppEnv()->getRegisteredInterface)
- ( pCppI->getBridge()->getCppEnv(),
- (void **)&pInterface,
- pCppI->getOid().pData,
- reinterpret_cast<typelib_InterfaceTypeDescription *>( pTD ) );
-
- if ( pInterface )
- {
- ::uno_any_construct( reinterpret_cast<uno_Any *>( gpreg[0] ),
- &pInterface, pTD, cpp_acquire );
-
- pInterface->release();
- TYPELIB_DANGER_RELEASE( pTD );
-
- reinterpret_cast<void **>( pRegisterReturn )[0] = gpreg[0];
- eRet = typelib_TypeClass_ANY;
- break;
- }
- TYPELIB_DANGER_RELEASE( pTD );
- }
- } // else perform queryInterface()
- default:
- {
- typelib_InterfaceMethodTypeDescription *pMethodTD =
- reinterpret_cast<typelib_InterfaceMethodTypeDescription *>( aMemberDescr.get() );
-
- eRet = cpp2uno_call( pCppI, aMemberDescr.get(),
- pMethodTD->pReturnTypeRef,
- pMethodTD->nParams,
- pMethodTD->pParams,
- gpreg, fpreg, ovrflw, pRegisterReturn );
- }
- }
- break;
- }
- default:
- {
- throw RuntimeException("no member description found!",
- reinterpret_cast<XInterface *>( pCppI ) );
- }
- }
-
- return eRet;
-}
-
-const int codeSnippetSize = 24;
-
-// Generate a trampoline that redirects method calls to
-// privateSnippetExecutor().
-//
-// privateSnippetExecutor() saves all the registers that are used for
-// parameter passing on x86_64, and calls the cpp_vtable_call().
-// When it returns, privateSnippetExecutor() sets the return value.
-//
-// Note: The code snippet we build here must not create a stack frame,
-// otherwise the UNO exceptions stop working thanks to non-existing
-// unwinding info.
-unsigned char * codeSnippet( unsigned char * code,
- sal_Int32 nFunctionIndex, sal_Int32 nVtableOffset,
- bool bHasHiddenParam )
-{
- sal_uInt64 nOffsetAndIndex = ( ( (sal_uInt64) nVtableOffset ) << 32 ) | ( (sal_uInt64) nFunctionIndex );
-
- if ( bHasHiddenParam )
- nOffsetAndIndex |= 0x80000000;
-
- // movq $<nOffsetAndIndex>, %r10
- *reinterpret_cast<sal_uInt16 *>( code ) = 0xba49;
- *reinterpret_cast<sal_uInt64 *>( code + 2 ) = nOffsetAndIndex;
-
- // movq $<address of the privateSnippetExecutor>, %r11
- *reinterpret_cast<sal_uInt16 *>( code + 10 ) = 0xbb49;
- *reinterpret_cast<sal_uInt64 *>( code + 12 ) = reinterpret_cast<sal_uInt64>( privateSnippetExecutor );
-
- // jmpq *%r11
- *reinterpret_cast<sal_uInt32 *>( code + 20 ) = 0x00e3ff49;
-
-#if OSL_DEBUG_LEVEL > 1
- fprintf(stderr,
- "==> codeSnippet, functionIndex=%d%s, vtableOffset=%d\n",
- nFunctionIndex, (bHasHiddenParam ? "|0x80000000":""), nVtableOffset);
-#endif
-
- return code + codeSnippetSize;
-}
-
-struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
-
-bridges::cpp_uno::shared::VtableFactory::Slot *
-bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
-{
- return static_cast< Slot * >(block) + 2;
-}
-
-std::size_t bridges::cpp_uno::shared::VtableFactory::getBlockSize(
- sal_Int32 slotCount)
-{
- return (slotCount + 2) * sizeof (Slot) + slotCount * codeSnippetSize;
-}
-
-bridges::cpp_uno::shared::VtableFactory::Slot *
-bridges::cpp_uno::shared::VtableFactory::initializeBlock(
- void * block, sal_Int32 slotCount, sal_Int32,
- typelib_InterfaceTypeDescription *)
-{
- Slot * slots = mapBlockToVtable(block);
- slots[-2].fn = 0;
- slots[-1].fn = 0;
- return slots + slotCount;
-}
-
-
-unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
- Slot ** slots, unsigned char * code, typelib_InterfaceTypeDescription const * type,
- sal_Int32 nFunctionOffset, sal_Int32 functionCount, sal_Int32 nVtableOffset )
-{
- (*slots) -= functionCount;
- Slot * s = *slots;
- for ( sal_Int32 nPos = 0; nPos < type->nMembers; ++nPos )
- {
- typelib_TypeDescription * pTD = 0;
-
- TYPELIB_DANGER_GET( &pTD, type->ppMembers[ nPos ] );
- assert(pTD);
-
- if ( typelib_TypeClass_INTERFACE_ATTRIBUTE == pTD->eTypeClass )
- {
- typelib_InterfaceAttributeTypeDescription *pAttrTD =
- reinterpret_cast<typelib_InterfaceAttributeTypeDescription *>( pTD );
-
- // get method
- (s++)->fn = code;
- code = codeSnippet( code, nFunctionOffset++, nVtableOffset,
- x86_64::return_in_hidden_param( pAttrTD->pAttributeTypeRef ) );
-
- if ( ! pAttrTD->bReadOnly )
- {
- // set method
- (s++)->fn = code;
- code = codeSnippet( code, nFunctionOffset++, nVtableOffset, false );
- }
- }
- else if ( typelib_TypeClass_INTERFACE_METHOD == pTD->eTypeClass )
- {
- typelib_InterfaceMethodTypeDescription *pMethodTD =
- reinterpret_cast<typelib_InterfaceMethodTypeDescription *>( pTD );
-
- (s++)->fn = code;
- code = codeSnippet( code, nFunctionOffset++, nVtableOffset,
- x86_64::return_in_hidden_param( pMethodTD->pReturnTypeRef ) );
- }
- else
- assert(false);
-
- TYPELIB_DANGER_RELEASE( pTD );
- }
- return code;
-}
-
-void bridges::cpp_uno::shared::VtableFactory::flushCode(
- SAL_UNUSED_PARAMETER unsigned char const *,
- SAL_UNUSED_PARAMETER unsigned char const * )
-{}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_x86-64/except.cxx b/bridges/source/cpp_uno/mingw_x86-64/except.cxx
deleted file mode 100644
index 2798122f78f9..000000000000
--- a/bridges/source/cpp_uno/mingw_x86-64/except.cxx
+++ /dev/null
@@ -1,293 +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 .
- */
-
-
-#include <stdio.h>
-#include <string.h>
-
-#include <cxxabi.h>
-#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h
-#define _GLIBCXX_CDTOR_CALLABI
-#endif
-
-#include <rtl/strbuf.hxx>
-#include <rtl/ustrbuf.hxx>
-#include <sal/log.hxx>
-#include <osl/mutex.hxx>
-
-#include <com/sun/star/uno/genfunc.hxx>
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include <typelib/typedescription.hxx>
-#include <uno/any2.h>
-#include <unordered_map>
-#include "share.hxx"
-
-
-using namespace ::std;
-using namespace ::osl;
-using namespace ::com::sun::star::uno;
-using namespace ::__cxxabiv1;
-
-
-namespace CPPU_CURRENT_NAMESPACE
-{
-
-void dummy_can_throw_anything( char const * )
-{
-}
-
-static OUString toUNOname( char const * p )
-{
-#if OSL_DEBUG_LEVEL > 1
- char const * start = p;
-#endif
-
- // example: N3com3sun4star4lang24IllegalArgumentExceptionE
-
- OUStringBuffer buf( 64 );
- assert( 'N' == *p );
- ++p; // skip N
-
- while ('E' != *p)
- {
- // read chars count
- long n = (*p++ - '0');
- while ('0' <= *p && '9' >= *p)
- {
- n *= 10;
- n += (*p++ - '0');
- }
- buf.appendAscii( p, n );
- p += n;
- if ('E' != *p)
- buf.append( '.' );
- }
-
-#if OSL_DEBUG_LEVEL > 1
- OUString ret( buf.makeStringAndClear() );
- OString c_ret( OUStringToOString( ret, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> toUNOname(): %s => %s\n", start, c_ret.getStr() );
- return ret;
-#else
- return buf.makeStringAndClear();
-#endif
-}
-
-class RTTI
-{
- typedef std::unordered_map< OUString, type_info *, OUStringHash > t_rtti_map;
-
- Mutex m_mutex;
- t_rtti_map m_rttis;
- t_rtti_map m_generatedRttis;
-
-public:
- RTTI();
- ~RTTI();
-
- type_info * getRTTI( typelib_CompoundTypeDescription * );
-};
-
-RTTI::RTTI()
-{
-}
-
-RTTI::~RTTI()
-{
-}
-
-
-type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr )
-{
- type_info * rtti;
-
- OUString const & unoName = *(OUString const *)&pTypeDescr->aBase.pTypeName;
-
- MutexGuard guard( m_mutex );
- t_rtti_map::const_iterator iRttiFind( m_rttis.find( unoName ) );
- if (iRttiFind == m_rttis.end())
- {
- // RTTI symbol
- OStringBuffer buf( 64 );
- buf.append( "__ZTIN" );
- sal_Int32 index = 0;
- do
- {
- OUString token( unoName.getToken( 0, '.', index ) );
- buf.append( token.getLength() );
- OString c_token( OUStringToOString( token, RTL_TEXTENCODING_ASCII_US ) );
- buf.append( c_token );
- }
- while (index >= 0);
- buf.append( 'E' );
-
- OString symName( buf.makeStringAndClear() );
- // try to lookup the symbol in the generated rtti map
- t_rtti_map::const_iterator iFind( m_generatedRttis.find( unoName ) );
- if (iFind == m_generatedRttis.end())
- {
- // we must generate it !
- // symbol and rtti-name is nearly identical,
- // the symbol is prefixed with __ZTI
- char const * rttiName = symName.getStr() +5;
-#if OSL_DEBUG_LEVEL > 1
- fprintf( stderr,"generated rtti for %s\n", rttiName );
-#endif
- if (pTypeDescr->pBaseTypeDescription)
- {
- // ensure availability of base
- type_info * base_rtti = getRTTI(
- (typelib_CompoundTypeDescription *)pTypeDescr->pBaseTypeDescription );
- rtti = new __si_class_type_info(
- strdup( rttiName ), (__class_type_info *)base_rtti );
- }
- else
- {
- // this class has no base class
- rtti = new __class_type_info( strdup( rttiName ) );
- }
-
- pair< t_rtti_map::iterator, bool > insertion(
- m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
- assert(insertion.second && "### inserting new generated rtti failed?!");
- }
- else // taking already generated rtti
- {
- rtti = iFind->second;
- }
- }
- else
- {
- rtti = iRttiFind->second;
- }
-
- return rtti;
-}
-
-
-extern "C" {
-static void _GLIBCXX_CDTOR_CALLABI deleteException( void * pExc )
-{
- __cxa_exception const * header = ((__cxa_exception const *)pExc - 1);
- typelib_TypeDescription * pTD = 0;
- OUString unoName( toUNOname( header->exceptionType->name() ) );
- ::typelib_typedescription_getByName( &pTD, unoName.pData );
- assert(pTD && "### unknown exception type! leaving out destruction => leaking!!!");
- if (pTD)
- {
- ::uno_destructData( pExc, pTD, cpp_release );
- ::typelib_typedescription_release( pTD );
- }
-}
-}
-
-void raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp )
-{
-#if OSL_DEBUG_LEVEL > 1
- OString cstr(
- OUStringToOString(
- OUString::unacquired( &pUnoExc->pType->pTypeName ),
- RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> uno exception occurred: %s\n", cstr.getStr() );
-#endif
- void * pCppExc;
- type_info * rtti;
-
- {
- // construct cpp exception object
- typelib_TypeDescription * pTypeDescr = 0;
- TYPELIB_DANGER_GET( &pTypeDescr, pUnoExc->pType );
- assert(pTypeDescr);
- if (! pTypeDescr)
- {
- throw RuntimeException(
- OUString("cannot get typedescription for type ") +
- OUString::unacquired( &pUnoExc->pType->pTypeName ) );
- }
-
- pCppExc = __cxa_allocate_exception( pTypeDescr->nSize );
- ::uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp );
-
- // destruct uno exception
- ::uno_any_destruct( pUnoExc, 0 );
- // avoiding locked counts
- static RTTI * s_rtti = 0;
- if (! s_rtti)
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if (! s_rtti)
- {
-#ifdef LEAK_STATIC_DATA
- s_rtti = new RTTI();
-#else
- static RTTI rtti_data;
- s_rtti = &rtti_data;
-#endif
- }
- }
- rtti = (type_info *)s_rtti->getRTTI( (typelib_CompoundTypeDescription *) pTypeDescr );
- TYPELIB_DANGER_RELEASE( pTypeDescr );
- assert(rtti && "### no rtti for throwing exception!");
- if (! rtti)
- {
- throw RuntimeException(
- OUString("no rtti for type ") +
- OUString::unacquired( &pUnoExc->pType->pTypeName ) );
- }
- }
-
- __cxa_throw( pCppExc, rtti, deleteException );
-}
-
-void fillUnoException( __cxa_exception * header, uno_Any * pUnoExc, uno_Mapping * pCpp2Uno )
-{
- if (! header)
- {
- RuntimeException aRE( "no exception header!" );
- Type const & rType = cppu::UnoType<decltype(aRE)>::get();
- uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
- SAL_WARN("bridges", aRE.Message);
- return;
- }
-
- typelib_TypeDescription * pExcTypeDescr = 0;
- OUString unoName( toUNOname( header->exceptionType->name() ) );
-#if OSL_DEBUG_LEVEL > 1
- OString cstr_unoName( OUStringToOString( unoName, RTL_TEXTENCODING_ASCII_US ) );
- fprintf( stderr, "> c++ exception occurred: %s\n", cstr_unoName.getStr() );
-#endif
- typelib_typedescription_getByName( &pExcTypeDescr, unoName.pData );
- if (0 == pExcTypeDescr)
- {
- RuntimeException aRE( OUString("exception type not found: ") + unoName );
- Type const & rType = cppu::UnoType<decltype(aRE)>::get();
- uno_type_any_constructAndConvert( pUnoExc, &aRE, rType.getTypeLibType(), pCpp2Uno );
- SAL_WARN("bridges", aRE.Message);
- }
- else
- {
- // construct uno exception any
- uno_any_constructAndConvert( pUnoExc, header->adjustedPtr, pExcTypeDescr, pCpp2Uno );
- typelib_typedescription_release( pExcTypeDescr );
- }
-}
-
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_x86-64/share.hxx b/bridges/source/cpp_uno/mingw_x86-64/share.hxx
deleted file mode 100644
index 8093820182f5..000000000000
--- a/bridges/source/cpp_uno/mingw_x86-64/share.hxx
+++ /dev/null
@@ -1,90 +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 .
- */
-#ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_MINGW_X86_64_SHARE_HXX
-#define INCLUDED_BRIDGES_SOURCE_CPP_UNO_MINGW_X86_64_SHARE_HXX
-
-#include "uno/mapping.h"
-
-#include <typeinfo>
-#include <exception>
-#include <cstddef>
-
-#include "cppu/macros.hxx"
-#include "uno/any2.h"
-
-namespace CPPU_CURRENT_NAMESPACE
-{
-
-void dummy_can_throw_anything( char const * );
-
-// ----- following decl from libstdc++-v3/libsupc++/unwind-cxx.h and unwind.h
-
-struct _Unwind_Exception
-{
- unsigned exception_class __attribute__((__mode__(__DI__)));
- void * exception_cleanup;
- unsigned private_1 __attribute__((__mode__(__word__)));
- unsigned private_2 __attribute__((__mode__(__word__)));
-} __attribute__((__aligned__));
-
-struct __cxa_exception
-{
- ::std::type_info *exceptionType;
- void (*exceptionDestructor)(void *);
-
- ::std::unexpected_handler unexpectedHandler;
- ::std::terminate_handler terminateHandler;
-
- __cxa_exception *nextException;
-
- int handlerCount;
-
- int handlerSwitchValue;
- const unsigned char *actionRecord;
- const unsigned char *languageSpecificData;
- void *catchTemp;
- void *adjustedPtr;
-
- _Unwind_Exception unwindHeader;
-};
-
-struct __cxa_eh_globals
-{
- __cxa_exception *caughtExceptions;
- unsigned int uncaughtExceptions;
-};
-
-}
-
-extern "C" void privateSnippetExecutor( ... );
-
-extern "C" CPPU_CURRENT_NAMESPACE::__cxa_eh_globals *__cxa_get_globals () throw();
-
-namespace CPPU_CURRENT_NAMESPACE
-{
-
-void raiseException(
- uno_Any * pUnoExc, uno_Mapping * pUno2Cpp );
-
-void fillUnoException(
- __cxa_exception * header, uno_Any *, uno_Mapping * pCpp2Uno );
-}
-
-#endif
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/mingw_x86-64/uno2cpp.cxx b/bridges/source/cpp_uno/mingw_x86-64/uno2cpp.cxx
deleted file mode 100644
index 88dc1532a2cf..000000000000
--- a/bridges/source/cpp_uno/mingw_x86-64/uno2cpp.cxx
+++ /dev/null
@@ -1,438 +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 .
- */
-
-#include <exception>
-#include <typeinfo>
-
-#include "rtl/alloc.h"
-#include "rtl/ustrbuf.hxx"
-
-#include <com/sun/star/uno/genfunc.hxx>
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include <uno/data.h>
-#include <sal/alloca.h>
-
-#include <bridge.hxx>
-#include <types.hxx>
-#include "unointerfaceproxy.hxx"
-#include "vtables.hxx"
-
-#include "abi.hxx"
-#include "callvirtualmethod.hxx"
-#include "share.hxx"
-
-using namespace ::com::sun::star::uno;
-
-// Macros for easier insertion of values to registers or stack
-// pSV - pointer to the source
-// nr - order of the value [will be increased if stored to register]
-// pFPR, pGPR - pointer to the registers
-// pDS - pointer to the stack [will be increased if stored here]
-
-// The value in %xmm register is already prepared to be retrieved as a float,
-// thus we treat float and double the same
-#define INSERT_FLOAT_DOUBLE( pSV, nr, pFPR, pDS ) \
- if ( nr < x86_64::MAX_SSE_REGS ) \
- pFPR[nr++] = *reinterpret_cast<double *>( pSV ); \
- else \
- *pDS++ = *reinterpret_cast<sal_uInt64 *>( pSV ); // verbatim!
-
-#define INSERT_INT64( pSV, nr, pGPR, pDS ) \
- if ( nr < x86_64::MAX_GPR_REGS ) \
- pGPR[nr++] = *reinterpret_cast<sal_uInt64 *>( pSV ); \
- else \
- *pDS++ = *reinterpret_cast<sal_uInt64 *>( pSV );
-
-#define INSERT_INT32( pSV, nr, pGPR, pDS ) \
- if ( nr < x86_64::MAX_GPR_REGS ) \
- pGPR[nr++] = *reinterpret_cast<sal_uInt32 *>( pSV ); \
- else \
- *pDS++ = *reinterpret_cast<sal_uInt32 *>( pSV );
-
-#define INSERT_INT16( pSV, nr, pGPR, pDS ) \
- if ( nr < x86_64::MAX_GPR_REGS ) \
- pGPR[nr++] = *reinterpret_cast<sal_uInt16 *>( pSV ); \
- else \
- *pDS++ = *reinterpret_cast<sal_uInt16 *>( pSV );
-
-#define INSERT_INT8( pSV, nr, pGPR, pDS ) \
- if ( nr < x86_64::MAX_GPR_REGS ) \
- pGPR[nr++] = *reinterpret_cast<sal_uInt8 *>( pSV ); \
- else \
- *pDS++ = *reinterpret_cast<sal_uInt8 *>( pSV );
-
-
-namespace {
-
-void appendCString(OUStringBuffer & buffer, char const * text) {
- if (text != 0) {
- buffer.append(
- OStringToOUString(OString(text), RTL_TEXTENCODING_ISO_8859_1));
- // use 8859-1 to avoid conversion failure
- }
-}
-
-}
-
-static void cpp_call(
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis,
- bridges::cpp_uno::shared::VtableSlot aVtableSlot,
- typelib_TypeDescriptionReference * pReturnTypeRef,
- sal_Int32 nParams, typelib_MethodParameter * pParams,
- void * pUnoReturn, void * pUnoArgs[], uno_Any ** ppUnoExc )
-{
- // Maxium space for [complex ret ptr], values | ptr ...
- // (but will be used less - some of the values will be in pGPR and pFPR)
- sal_uInt64 *pStack = (sal_uInt64 *)__builtin_alloca( (nParams + 3) * sizeof(sal_uInt64) );
- sal_uInt64 *pStackStart = pStack;
-
- sal_uInt64 pGPR[x86_64::MAX_GPR_REGS];
- sal_uInt32 nGPR = 0;
-
- double pFPR[x86_64::MAX_SSE_REGS];
- sal_uInt32 nFPR = 0;
-
- // Return
- typelib_TypeDescription * pReturnTypeDescr = 0;
- TYPELIB_DANGER_GET( &pReturnTypeDescr, pReturnTypeRef );
- assert(pReturnTypeDescr);
-
- void * pCppReturn = 0; // if != 0 && != pUnoReturn, needs reconversion (see below)
-
- bool bSimpleReturn = true;
- if ( pReturnTypeDescr )
- {
- if ( x86_64::return_in_hidden_param( pReturnTypeRef ) )
- bSimpleReturn = false;
-
- if ( bSimpleReturn )
- pCppReturn = pUnoReturn; // direct way for simple types
- else
- {
- // complex return via ptr
- pCppReturn = bridges::cpp_uno::shared::relatesToInterfaceType( pReturnTypeDescr )?
- __builtin_alloca( pReturnTypeDescr->nSize ) : pUnoReturn;
- INSERT_INT64( &pCppReturn, nGPR, pGPR, pStack );
- }
- }
-
- // Push "this" pointer
- void * pAdjustedThisPtr = reinterpret_cast< void ** >( pThis->getCppI() ) + aVtableSlot.offset;
- INSERT_INT64( &pAdjustedThisPtr, nGPR, pGPR, pStack );
-
- // Args
- void ** pCppArgs = (void **)alloca( 3 * sizeof(void *) * nParams );
- // Indices of values this have to be converted (interface conversion cpp<=>uno)
- sal_Int32 * pTempIndices = (sal_Int32 *)(pCppArgs + nParams);
- // Type descriptions for reconversions
- typelib_TypeDescription ** ppTempParamTypeDescr = (typelib_TypeDescription **)(pCppArgs + (2 * nParams));
-
- sal_Int32 nTempIndices = 0;
-
- for ( sal_Int32 nPos = 0; nPos < nParams; ++nPos )
- {
- const typelib_MethodParameter & rParam = pParams[nPos];
- typelib_TypeDescription * pParamTypeDescr = 0;
- TYPELIB_DANGER_GET( &pParamTypeDescr, rParam.pTypeRef );
-
- if (!rParam.bOut && bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
- {
- uno_copyAndConvertData( pCppArgs[nPos] = alloca( 8 ), pUnoArgs[nPos], pParamTypeDescr,
- pThis->getBridge()->getUno2Cpp() );
-
- switch (pParamTypeDescr->eTypeClass)
- {
- case typelib_TypeClass_HYPER:
- case typelib_TypeClass_UNSIGNED_HYPER:
- INSERT_INT64( pCppArgs[nPos], nGPR, pGPR, pStack );
- break;
- case typelib_TypeClass_LONG:
- case typelib_TypeClass_UNSIGNED_LONG:
- case typelib_TypeClass_ENUM:
- INSERT_INT32( pCppArgs[nPos], nGPR, pGPR, pStack );
- break;
- case typelib_TypeClass_SHORT:
- case typelib_TypeClass_CHAR:
- case typelib_TypeClass_UNSIGNED_SHORT:
- INSERT_INT16( pCppArgs[nPos], nGPR, pGPR, pStack );
- break;
- case typelib_TypeClass_BOOLEAN:
- case typelib_TypeClass_BYTE:
- INSERT_INT8( pCppArgs[nPos], nGPR, pGPR, pStack );
- break;
- case typelib_TypeClass_FLOAT:
- case typelib_TypeClass_DOUBLE:
- INSERT_FLOAT_DOUBLE( pCppArgs[nPos], nFPR, pFPR, pStack );
- break;
- default:
- break;
- }
-
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- else // ptr to complex value | ref
- {
- if (! rParam.bIn) // is pure out
- {
- // cpp out is constructed mem, uno out is not!
- uno_constructData(
- pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pParamTypeDescr );
- pTempIndices[nTempIndices] = nPos; // default constructed for cpp call
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndices++] = pParamTypeDescr;
- }
- // is in/inout
- else if (bridges::cpp_uno::shared::relatesToInterfaceType( pParamTypeDescr ))
- {
- uno_copyAndConvertData(
- pCppArgs[nPos] = alloca( pParamTypeDescr->nSize ),
- pUnoArgs[nPos], pParamTypeDescr, pThis->getBridge()->getUno2Cpp() );
-
- pTempIndices[nTempIndices] = nPos; // has to be reconverted
- // will be released at reconversion
- ppTempParamTypeDescr[nTempIndices++] = pParamTypeDescr;
- }
- else // direct way
- {
- pCppArgs[nPos] = pUnoArgs[nPos];
- // no longer needed
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- INSERT_INT64( &(pCppArgs[nPos]), nGPR, pGPR, pStack );
- }
- }
-
- try
- {
- try {
- CPPU_CURRENT_NAMESPACE::callVirtualMethod(
- pAdjustedThisPtr, aVtableSlot.index,
- pCppReturn, pReturnTypeRef, bSimpleReturn,
- pStackStart, ( pStack - pStackStart ),
- pGPR, nGPR,
- pFPR, nFPR );
- } catch (const Exception &) {
- throw;
- } catch (const std::exception & e) {
- OUStringBuffer buf;
- buf.append("C++ code threw ");
- appendCString(buf, typeid(e).name());
- buf.append(": ");
- appendCString(buf, e.what());
- throw RuntimeException(buf.makeStringAndClear());
- } catch (...) {
- throw RuntimeException("C++ code threw unknown exception");
- }
-
- *ppUnoExc = 0;
-
- // reconvert temporary params
- for ( ; nTempIndices--; )
- {
- sal_Int32 nIndex = pTempIndices[nTempIndices];
- typelib_TypeDescription * pParamTypeDescr = ppTempParamTypeDescr[nTempIndices];
-
- if (pParams[nIndex].bIn)
- {
- if (pParams[nIndex].bOut) // inout
- {
- uno_destructData( pUnoArgs[nIndex], pParamTypeDescr, 0 ); // destroy uno value
- uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- }
- }
- else // pure out
- {
- uno_copyAndConvertData( pUnoArgs[nIndex], pCppArgs[nIndex], pParamTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- }
- // destroy temp cpp param => cpp: every param was constructed
- uno_destructData( pCppArgs[nIndex], pParamTypeDescr, cpp_release );
-
- TYPELIB_DANGER_RELEASE( pParamTypeDescr );
- }
- // return value
- if (pCppReturn && pUnoReturn != pCppReturn)
- {
- uno_copyAndConvertData( pUnoReturn, pCppReturn, pReturnTypeDescr,
- pThis->getBridge()->getCpp2Uno() );
- uno_destructData( pCppReturn, pReturnTypeDescr, cpp_release );
- }
- }
- catch (...)
- {
- // fill uno exception
- fillUnoException( __cxa_get_globals()->caughtExceptions, *ppUnoExc, pThis->getBridge()->getCpp2Uno() );
-
- // temporary params
- for ( ; nTempIndices--; )
- {
- sal_Int32 nIndex = pTempIndices[nTempIndices];
- // destroy temp cpp param => cpp: every param was constructed
- uno_destructData( pCppArgs[nIndex], ppTempParamTypeDescr[nTempIndices], cpp_release );
- TYPELIB_DANGER_RELEASE( ppTempParamTypeDescr[nTempIndices] );
- }
- // return type
- if (pReturnTypeDescr)
- TYPELIB_DANGER_RELEASE( pReturnTypeDescr );
- }
-}
-
-
-namespace bridges { namespace cpp_uno { namespace shared {
-
-void unoInterfaceProxyDispatch(
- uno_Interface * pUnoI, const typelib_TypeDescription * pMemberDescr,
- void * pReturn, void * pArgs[], uno_Any ** ppException )
-{
- // is my surrogate
- bridges::cpp_uno::shared::UnoInterfaceProxy * pThis
- = static_cast< bridges::cpp_uno::shared::UnoInterfaceProxy * >(pUnoI);
-#if OSL_DEBUG_LEVEL > 0
- typelib_InterfaceTypeDescription * pTypeDescr = pThis->pTypeDescr;
-#endif
-
- switch (pMemberDescr->eTypeClass)
- {
- case typelib_TypeClass_INTERFACE_ATTRIBUTE:
- {
-#if OSL_DEBUG_LEVEL > 0
- // determine vtable call index
- sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
- assert(nMemberPos < pTypeDescr->nAllMembers);
-#endif
- VtableSlot aVtableSlot(
- getVtableSlot(
- reinterpret_cast<
- typelib_InterfaceAttributeTypeDescription const * >(
- pMemberDescr)));
-
- if (pReturn)
- {
- // dependent dispatch
- cpp_call(
- pThis, aVtableSlot,
- ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef,
- 0, 0, // no params
- pReturn, pArgs, ppException );
- }
- else
- {
- // is SET
- typelib_MethodParameter aParam;
- aParam.pTypeRef =
- ((typelib_InterfaceAttributeTypeDescription *)pMemberDescr)->pAttributeTypeRef;
- aParam.bIn = sal_True;
- aParam.bOut = sal_False;
-
- typelib_TypeDescriptionReference * pReturnTypeRef = 0;
- OUString aVoidName("void");
- typelib_typedescriptionreference_new(
- &pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
-
- // dependent dispatch
- aVtableSlot.index += 1; // get, then set method
- cpp_call(
- pThis, aVtableSlot, // get, then set method
- pReturnTypeRef,
- 1, &aParam,
- pReturn, pArgs, ppException );
-
- typelib_typedescriptionreference_release( pReturnTypeRef );
- }
-
- break;
- }
- case typelib_TypeClass_INTERFACE_METHOD:
- {
-#if OSL_DEBUG_LEVEL > 0
- // determine vtable call index
- sal_Int32 nMemberPos = ((typelib_InterfaceMemberTypeDescription *)pMemberDescr)->nPosition;
- assert( nMemberPos < pTypeDescr->nAllMembers);
-#endif
- VtableSlot aVtableSlot(
- getVtableSlot(
- reinterpret_cast<
- typelib_InterfaceMethodTypeDescription const * >(
- pMemberDescr)));
-
- switch (aVtableSlot.index)
- {
- // standard calls
- case 1: // acquire uno interface
- (*pUnoI->acquire)( pUnoI );
- *ppException = 0;
- break;
- case 2: // release uno interface
- (*pUnoI->release)( pUnoI );
- *ppException = 0;
- break;
- case 0: // queryInterface() opt
- {
- typelib_TypeDescription * pTD = 0;
- TYPELIB_DANGER_GET( &pTD, reinterpret_cast< Type * >( pArgs[0] )->getTypeLibType() );
- if (pTD)
- {
- uno_Interface * pInterface = 0;
- (*pThis->getBridge()->getUnoEnv()->getRegisteredInterface)(
- pThis->getBridge()->getUnoEnv(),
- (void **)&pInterface, pThis->oid.pData, (typelib_InterfaceTypeDescription *)pTD );
-
- if (pInterface)
- {
- ::uno_any_construct(
- reinterpret_cast< uno_Any * >( pReturn ),
- &pInterface, pTD, 0 );
- (*pInterface->release)( pInterface );
- TYPELIB_DANGER_RELEASE( pTD );
- *ppException = 0;
- break;
- }
- TYPELIB_DANGER_RELEASE( pTD );
- }
- } // else perform queryInterface()
- default:
- // dependent dispatch
- cpp_call(
- pThis, aVtableSlot,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pReturnTypeRef,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->nParams,
- ((typelib_InterfaceMethodTypeDescription *)pMemberDescr)->pParams,
- pReturn, pArgs, ppException );
- }
- break;
- }
- default:
- {
- ::com::sun::star::uno::RuntimeException aExc(
- OUString("illegal member type description!"),
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >() );
-
- Type const & rExcType = cppu::UnoType<decltype(aExc)>::get();
- // binary identical null reference
- ::uno_type_any_construct( *ppException, &aExc, rExcType.getTypeLibType(), 0 );
- }
- }
-}
-
-} } }
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
index f7f2eda4777e..c06f5775f2a8 100644
--- a/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
+++ b/bridges/source/cpp_uno/shared/cppinterfaceproxy.cxx
@@ -37,7 +37,7 @@
static bridges::cpp_uno::shared::VtableFactory * pInstance;
-#if defined(__GNUG__) && !defined(__MINGW32__)
+#if defined(__GNUG__)
extern "C" void dso_init() __attribute__((constructor));
extern "C" void dso_exit() __attribute__((destructor));
#endif
diff --git a/bridges/source/jni_uno/jni_java2uno.cxx b/bridges/source/jni_uno/jni_java2uno.cxx
index 079695405d56..98fb8f5bcd00 100644
--- a/bridges/source/jni_uno/jni_java2uno.cxx
+++ b/bridges/source/jni_uno/jni_java2uno.cxx
@@ -178,11 +178,7 @@ jobject Bridge::call_uno(
break;
}
-#ifdef BROKEN_ALLOCA
- char * mem = static_cast<char *>(malloc(
-#else
char * mem = static_cast<char *>(alloca(
-#endif
(nParams * sizeof (void *)) +
return_size + (nParams * sizeof (largest)) ));
void ** uno_args = reinterpret_cast<void **>(mem);
@@ -203,11 +199,7 @@ jobject Bridge::call_uno(
TypeDescr td( type );
if (sal::static_int_cast< sal_uInt32 >(td.get()->nSize)
> sizeof (largest))
-#ifdef BROKEN_ALLOCA
- uno_args[ nPos ] = malloc( td.get()->nSize );
-#else
uno_args[ nPos ] = alloca( td.get()->nSize );
-#endif
}
if (param.bIn)
@@ -235,14 +227,7 @@ jobject Bridge::call_uno(
uno_type_destructData(
uno_args[ n ], p.pTypeRef, nullptr );
}
-#ifdef BROKEN_ALLOCA
- if (uno_args[ nPos ] && uno_args[ nPos ] != &uno_args_mem[ nPos ])
- free( uno_args[ nPos ] );
-#endif
}
-#ifdef BROKEN_ALLOCA
- free( mem );
-#endif
throw;
}
}
@@ -281,16 +266,9 @@ jobject Bridge::call_uno(
{
uno_type_destructData(
uno_args[ n ], pParams[ n ].pTypeRef, nullptr );
-#ifdef BROKEN_ALLOCA
- if (uno_args[ nPos ] && uno_args[ nPos ] != &uno_args_mem[ nPos ])
- free( uno_args[ nPos ] );
-#endif
}
// cleanup uno return value
uno_type_destructData( uno_ret, return_type, nullptr );
-#ifdef BROKEN_ALLOCA
- free( mem );
-#endif
throw;
}
}
@@ -298,10 +276,6 @@ jobject Bridge::call_uno(
typelib_TypeClass_ENUM != type->eTypeClass) // opt
{
uno_type_destructData( uno_args[ nPos ], type, nullptr );
-#ifdef BROKEN_ALLOCA
- if (uno_args[ nPos ] && uno_args[ nPos ] != &uno_args_mem[ nPos ])
- free( uno_args[ nPos ] );
-#endif
}
}
@@ -319,9 +293,6 @@ jobject Bridge::call_uno(
catch (...)
{
uno_type_destructData( uno_ret, return_type, nullptr );
-#ifdef BROKEN_ALLOCA
- free( mem );
-#endif
throw;
}
if (typelib_TypeClass_DOUBLE < return_type->eTypeClass &&
@@ -329,14 +300,8 @@ jobject Bridge::call_uno(
{
uno_type_destructData( uno_ret, return_type, nullptr );
}
-#ifdef BROKEN_ALLOCA
- free( mem );
-#endif
return java_ret.l;
}
-#ifdef BROKEN_ALLOCA
- free( mem );
-#endif
return nullptr; // void return
}
else // exception occurred
@@ -347,16 +312,9 @@ jobject Bridge::call_uno(
typelib_MethodParameter const & param = pParams[ nPos ];
if (param.bIn)
uno_type_destructData( uno_args[ nPos ], param.pTypeRef, nullptr );
-#ifdef BROKEN_ALLOCA
- if (uno_args[ nPos ] && uno_args[ nPos ] != &uno_args_mem[ nPos ])
- free( uno_args[ nPos ] );
-#endif
}
handle_uno_exc( jni, uno_exc );
-#ifdef BROKEN_ALLOCA
- free( mem );
-#endif
return nullptr;
}
}
diff --git a/bridges/source/jni_uno/jni_uno2java.cxx b/bridges/source/jni_uno/jni_uno2java.cxx
index 80667e98fe10..730a9a338532 100644
--- a/bridges/source/jni_uno/jni_uno2java.cxx
+++ b/bridges/source/jni_uno/jni_uno2java.cxx
@@ -150,11 +150,7 @@ void Bridge::call_java(
}
// prepare java args, save param td
-#ifdef BROKEN_ALLOCA
- jvalue * java_args = (jvalue *) malloc( sizeof (jvalue) * nParams );
-#else
jvalue * java_args = static_cast<jvalue *>(alloca( sizeof (jvalue) * nParams ));
-#endif
sal_Int32 nPos;
for ( nPos = 0; nPos < nParams; ++nPos )
@@ -182,9 +178,6 @@ void Bridge::call_java(
jni->DeleteLocalRef( java_args[ n ].l );
}
}
-#ifdef BROKEN_ALLOCA
- free( java_args );
-#endif
throw;
}
}
@@ -344,9 +337,6 @@ void Bridge::call_java(
jni->DeleteLocalRef( java_args[ nPos ].l );
}
}
-#ifdef BROKEN_ALLOCA
- free( java_args );
-#endif
throw;
}
jni->DeleteLocalRef( java_args[ nPos ].l );
@@ -381,9 +371,6 @@ void Bridge::call_java(
uno_args[ i ], param.pTypeRef, nullptr );
}
}
-#ifdef BROKEN_ALLOCA
- free( java_args );
-#endif
throw;
}
} // else: already set integral uno return value
@@ -391,9 +378,6 @@ void Bridge::call_java(
// no exception occurred
*uno_exc = nullptr;
}
-#ifdef BROKEN_ALLOCA
- free( java_args );
-#endif
}
// an UNO proxy wrapping a Java interface
diff --git a/codemaker/Executable_cppumaker.mk b/codemaker/Executable_cppumaker.mk
index e392339d3729..41ca490718d7 100644
--- a/codemaker/Executable_cppumaker.mk
+++ b/codemaker/Executable_cppumaker.mk
@@ -33,7 +33,7 @@ $(eval $(call gb_Executable_add_exception_objects,cppumaker,\
codemaker/source/cppumaker/includes \
))
-ifeq ($(OS)$(COM),WNTMSC)
+ifeq ($(OS),WNT)
$(eval $(call gb_Executable_add_cxxflags,cppumaker,\
-Ob0 \
))
diff --git a/config_host.mk.in b/config_host.mk.in
index 02151ae69abc..c2d4298bb391 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -382,13 +382,6 @@ export MDDS_LIBS=$(gb_SPACE)@MDDS_LIBS@
export MERGELIBS=@MERGELIBS@
export MINGWCXX=@MINGWCXX@
export MINGWSTRIP=@MINGWSTRIP@
-export MINGW_DLLS=@MINGW_DLLS@
-export MINGW_GCCDLL=@MINGW_GCCDLL@
-export MINGW_GXXDLL=@MINGW_GXXDLL@
-export MINGW_SHARED_GCCLIB=@MINGW_SHARED_GCCLIB@
-export MINGW_SHARED_GXXLIB=@MINGW_SHARED_GXXLIB@
-export MINGW_SHARED_LIBSTDCPP=@MINGW_SHARED_LIBSTDCPP@
-export MINGW_SYSROOT=@MINGW_SYSROOT@
export ML_EXE=@ML_EXE@
export MOC4=@MOC4@
export MPL_SUBSET=@MPL_SUBSET@
@@ -599,7 +592,6 @@ export WINDOWS_SDK_VERSION=@WINDOWS_SDK_VERSION@
export WINDOWS_SDK_WILANGID=@WINDOWS_SDK_WILANGID@
export WINDOWS_X64=@WINDOWS_X64@
export WINDRES=@WINDRES@
-export WINEGCC=@WINEGCC@
export WITH_COMPAT_OOWRAPPERS=@WITH_COMPAT_OOWRAPPERS@
export WITH_EXTENSION_INTEGRATION=@WITH_EXTENSION_INTEGRATION@
export WITH_EXTRA_EXTENSIONS=@WITH_EXTRA_EXTENSIONS@
diff --git a/configure.ac b/configure.ac
index 58ece8aae510..7338bb5ec2b0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -679,7 +679,7 @@ gnu)
_os=GNU
;;
-cygwin*|interix*|mingw32*)
+cygwin*|interix*)
# When building on Windows normally with MSVC under Cygwin,
# configure thinks that the host platform (the platform the
@@ -692,10 +692,6 @@ cygwin*|interix*|mingw32*)
# look at $host etc that much, it mostly uses its own $_os
# variable, set here in this case statement.
- # When cross-compiling to Windows from Unix, the host platform
- # is "mingw32" (because in that case it is the MinGW
- # tool-chain that is used).
-
test_cups=no
test_dbus=no
test_randr=no
@@ -706,24 +702,6 @@ cygwin*|interix*|mingw32*)
DLLPOST=".dll"
LINKFLAGSNOUNDEFS=
-
- # If the host OS matches "mingw32*", that means we are using the
- # MinGW cross-compiler, because we don't see the point in building
- # LibreOffice using MinGW on Windows. If you want to build on
- # Windows, use MSVC. If you want to use MinGW, surely you want to
- # cross-compile (from Linux or some other Unix).
-
- case "$host_os" in
- mingw32*)
- WITH_MINGW=yes
- if test -z "$CC"; then
- CC="$host_cpu-$host_vendor-$host_os-gcc"
- fi
- if test -z "$CXX"; then
- CXX="$host_cpu-$host_vendor-$host_os-g++"
- fi
- ;;
- esac
;;
darwin*) # Mac OS X or iOS
@@ -930,14 +908,13 @@ fi
AC_SUBST(SDKDIRNAME)
-AC_SUBST(WITH_MINGW)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_LIBS)
dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
dnl Needs to precede the AC_SEARCH_LIBS call below, which apparently calls
dnl AC_PROG_CC internally.
-if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
+if test "$_os" != "WINNT"; then
# AC_PROG_CC sets CFLAGS to -g -O2 if not set, avoid that
save_CFLAGS=$CFLAGS
AC_PROG_CC
@@ -1448,12 +1425,6 @@ libo_FUZZ_ARG_ENABLE(firebird-sdbc,
[Disable the build of the Firebird-SDBC driver if it doesn't compile for you.]),
,test "${enable_firebird_sdbc+set}" = set || enable_firebird_sdbc=yes)
-AC_ARG_ENABLE(winegcc,
- AS_HELP_STRING([--enable-winegcc],
- [Enable use of winegcc during the build, in order to create msi* tools
- needed for MinGW cross-compilation.]),
-)
-
libo_FUZZ_ARG_ENABLE(liblangtag,
AS_HELP_STRING([--disable-liblangtag],
[Disable use of liblangtag, and instead use an own simple
@@ -2305,7 +2276,7 @@ dnl ===================================================================
dnl Test whether to sign Windows Build
dnl ===================================================================
AC_MSG_CHECKING([whether to sign windows build])
-if test "$enable_windows_build_signing" = "yes" -a "$_os" = "WINNT" -a "$WITH_MINGW" != "YES" ; then
+if test "$enable_windows_build_signing" = "yes" -a "$_os" = "WINNT"; then
AC_MSG_RESULT([yes])
WINDOWS_BUILD_SIGNING="TRUE"
else
@@ -2592,7 +2563,7 @@ AC_SUBST(WITH_GALLERY_BUILD)
dnl ===================================================================
dnl Checks if ccache is available
dnl ===================================================================
-if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
+if test "$_os" = "WINNT"; then
# on windows/VC build do not use ccache
CCACHE=""
elif test "$enable_ccache" = "yes" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \); then
@@ -2659,7 +2630,7 @@ dnl ===================================================================
dnl Checks for C compiler,
dnl The check for the C++ compiler is later on.
dnl ===================================================================
-if test "$_os" != "WINNT" -a "$WITH_MINGW" != "yes"; then
+if test "$_os" != "WINNT"; then
GCC_HOME_SET="true"
AC_MSG_CHECKING([gcc home])
if test -z "$with_gcc_home"; then
@@ -3234,7 +3205,7 @@ fi
AC_SUBST(ISYSTEM)
dnl ===================================================================
-dnl Check which Visual Studio or MinGW compiler is used
+dnl Check which Visual Studio compiler is used
dnl ===================================================================
map_vs_year_to_version()
@@ -3346,279 +3317,268 @@ SHOWINCLUDES_PREFIX=
MSBUILD_PATH=
DEVENV=
if test "$_os" = "WINNT"; then
- if test "$WITH_MINGW" != "yes"; then
- AC_MSG_CHECKING([Visual C++])
+ AC_MSG_CHECKING([Visual C++])
- find_msvc "$with_visual_studio"
- if test -z "$vctest"; then
- if test -n "$with_visual_studio"; then
- AC_MSG_ERROR([No Visual Studio $with_visual_studio installation found])
- else
- AC_MSG_ERROR([No Visual Studio 2013/2015 installation found])
- fi
+ find_msvc "$with_visual_studio"
+ if test -z "$vctest"; then
+ if test -n "$with_visual_studio"; then
+ AC_MSG_ERROR([No Visual Studio $with_visual_studio installation found])
+ else
+ AC_MSG_ERROR([No Visual Studio 2013/2015 installation found])
fi
+ fi
- if test "$BITNESS_OVERRIDE" = ""; then
- if test -f "$vctest/bin/cl.exe"; then
- VC_PRODUCT_DIR=$vctest
- else
- AC_MSG_ERROR([No compiler (cl.exe) in $vctest/bin/cl.exe])
- fi
+ if test "$BITNESS_OVERRIDE" = ""; then
+ if test -f "$vctest/bin/cl.exe"; then
+ VC_PRODUCT_DIR=$vctest
+ else
+ AC_MSG_ERROR([No compiler (cl.exe) in $vctest/bin/cl.exe])
+ fi
+ else
+ if test -f "$vctest/bin/amd64/cl.exe"; then
+ VC_PRODUCT_DIR=$vctest
else
- if test -f "$vctest/bin/amd64/cl.exe"; then
+ if test -f "$vctest/bin/x86_amd64/cl.exe" -a "$vcexpress" = "Express"; then
VC_PRODUCT_DIR=$vctest
else
- if test -f "$vctest/bin/x86_amd64/cl.exe" -a "$vcexpress" = "Express"; then
- VC_PRODUCT_DIR=$vctest
- else
- AC_MSG_ERROR([No compiler (cl.exe) in $vctest/bin/amd64/cl.exe or $vctest/bin/x86_amd64/cl.exe])
- fi
+ AC_MSG_ERROR([No compiler (cl.exe) in $vctest/bin/amd64/cl.exe or $vctest/bin/x86_amd64/cl.exe])
fi
fi
+ fi
+
+ VC_PRODUCT_DIR=`win_short_path_for_make "$VC_PRODUCT_DIR"`
+ AC_MSG_RESULT([$VC_PRODUCT_DIR])
- VC_PRODUCT_DIR=`win_short_path_for_make "$VC_PRODUCT_DIR"`
- AC_MSG_RESULT([$VC_PRODUCT_DIR])
+ AC_MSG_CHECKING([Is Visual C++ Express])
+ if test "$vcexpress" = "Express" ; then
+ AC_MSG_RESULT([Yes])
+ else
+ AC_MSG_RESULT([No])
+ fi
- AC_MSG_CHECKING([Is Visual C++ Express])
- if test "$vcexpress" = "Express" ; then
- AC_MSG_RESULT([Yes])
+ UCRTSDKDIR=
+ UCRTVERSION=
+
+ AC_MSG_CHECKING([whether UCRT is needed for this compiler version])
+ if test "$vcnum" = "120"; then
+ AC_MSG_RESULT([No])
+ else
+ AC_MSG_RESULT([Yes])
+ AC_MSG_CHECKING([for UCRT location])
+ find_ucrt
+ if test -n "$UCRTSDKDIR"; then
+ AC_MSG_RESULT([found])
+ PathFormat "${UCRTSDKDIR}Include/$UCRTVERSION/ucrt"
+ ucrtincpath_formatted=$formatted_path
+ # SOLARINC is used for external modules and must be set too.
+ # And no, it's not sufficient to set SOLARINC only, as configure
+ # itself doesn't honour it.
+ SOLARINC="$SOLARINC -I$ucrtincpath_formatted"
+ CFLAGS="$CFLAGS -I$ucrtincpath_formatted"
+ CXXFLAGS="$CXXFLAGS -I$ucrtincpath_formatted"
+ CPPFLAGS="$CPPFLAGS -I$ucrtincpath_formatted"
else
- AC_MSG_RESULT([No])
+ AC_MSG_ERROR([not found])
fi
+ fi
+ AC_SUBST(UCRTSDKDIR)
+ AC_SUBST(UCRTVERSION)
- UCRTSDKDIR=
- UCRTVERSION=
+ # Find the proper version of MSBuild.exe to use based on the VS version
+ reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MSBuild/$vcnumwithdot/MSBuildOverrideTasksPath
+ if test -n "$regvalue" ; then
+ MSBUILD_PATH=`win_short_path_for_make "$regvalue"`
+ fi
- AC_MSG_CHECKING([whether UCRT is needed for this compiler version])
+ # Find the version of devenv.exe
+ DEVENV="$VC_PRODUCT_DIR/../Common7/IDE/devenv.exe"
+ if test ! -e "$DEVENV" -a "$vcnum" = "120"; then
+ # for Visual Studio 2013 Express, fall back
+ DEVENV="$VC_PRODUCT_DIR/../Common7/IDE/WDExpress.exe"
+ fi
+ if test ! -e "$DEVENV"; then
+ AC_MSG_ERROR([No devenv.exe found, Visual Studio installation broken?])
+ fi
+
+ dnl ===========================================================
+ dnl Check for the corresponding mspdb*.dll
+ dnl ===========================================================
+
+ MSPDB_PATH=
+
+ if test "$BITNESS_OVERRIDE" = ""; then
if test "$vcnum" = "120"; then
- AC_MSG_RESULT([No])
+ MSPDB_PATH="$VC_PRODUCT_DIR/../VC/bin"
else
- AC_MSG_RESULT([Yes])
- AC_MSG_CHECKING([for UCRT location])
- find_ucrt
- if test -n "$UCRTSDKDIR"; then
- AC_MSG_RESULT([found])
- PathFormat "${UCRTSDKDIR}Include/$UCRTVERSION/ucrt"
- ucrtincpath_formatted=$formatted_path
- # SOLARINC is used for external modules and must be set too.
- # And no, it's not sufficient to set SOLARINC only, as configure
- # itself doesn't honour it.
- SOLARINC="$SOLARINC -I$ucrtincpath_formatted"
- CFLAGS="$CFLAGS -I$ucrtincpath_formatted"
- CXXFLAGS="$CXXFLAGS -I$ucrtincpath_formatted"
- CPPFLAGS="$CPPFLAGS -I$ucrtincpath_formatted"
- else
- AC_MSG_ERROR([not found])
- fi
+ MSPDB_PATH="$VC_PRODUCT_DIR/../Common7/IDE"
fi
- AC_SUBST(UCRTSDKDIR)
- AC_SUBST(UCRTVERSION)
-
- # Find the proper version of MSBuild.exe to use based on the VS version
- reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MSBuild/$vcnumwithdot/MSBuildOverrideTasksPath
- if test -n "$regvalue" ; then
- MSBUILD_PATH=`win_short_path_for_make "$regvalue"`
+ else
+ if test "$vcexpress" = "Express"; then
+ MSPDB_PATH="$VC_PRODUCT_DIR/bin"
+ else
+ MSPDB_PATH="$VC_PRODUCT_DIR/bin/amd64"
fi
+ fi
- # Find the version of devenv.exe
- DEVENV="$VC_PRODUCT_DIR/../Common7/IDE/devenv.exe"
- if test ! -e "$DEVENV" -a "$vcnum" = "120"; then
- # for Visual Studio 2013 Express, fall back
- DEVENV="$VC_PRODUCT_DIR/../Common7/IDE/WDExpress.exe"
- fi
- if test ! -e "$DEVENV"; then
- AC_MSG_ERROR([No devenv.exe found, Visual Studio installation broken?])
- fi
+ mspdbnum=$vcnum
- dnl ===========================================================
- dnl Check for the corresponding mspdb*.dll
- dnl ===========================================================
+ if test ! -e "$MSPDB_PATH/mspdb${mspdbnum}.dll"; then
+ AC_MSG_ERROR([No mspdb${mspdbnum}.dll in $MSPDB_PATH, Visual Studio installation broken?])
+ fi
- MSPDB_PATH=
+ MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
+ MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
+ dnl The path needs to be added before cl is called
+ PATH="$MSPDB_PATH:$PATH"
+
+ AC_MSG_CHECKING([cl.exe])
+
+ # Is there really ever a need to pass CC explicitly? Surely we can hope to get all the
+ # automagical niceness to work OK? If somebody has some unsupported compiler in some weird
+ # location, isn't it likely that lots of other things needs changes, too, and just setting CC
+ # is not enough?
+
+ if test -z "$CC"; then
if test "$BITNESS_OVERRIDE" = ""; then
- if test "$vcnum" = "120"; then
- MSPDB_PATH="$VC_PRODUCT_DIR/../VC/bin"
- else
- MSPDB_PATH="$VC_PRODUCT_DIR/../Common7/IDE"
+ if test -f "$VC_PRODUCT_DIR/bin/cl.exe"; then
+ CC="$VC_PRODUCT_DIR/bin/cl.exe"
fi
else
if test "$vcexpress" = "Express"; then
- MSPDB_PATH="$VC_PRODUCT_DIR/bin"
+ if test -f "$VC_PRODUCT_DIR/bin/x86_amd64/cl.exe"; then
+ CC="$VC_PRODUCT_DIR/bin/x86_amd64/cl.exe"
+ fi
else
- MSPDB_PATH="$VC_PRODUCT_DIR/bin/amd64"
+ if test -f "$VC_PRODUCT_DIR/bin/amd64/cl.exe"; then
+ CC="$VC_PRODUCT_DIR/bin/amd64/cl.exe"
+ fi
fi
fi
- mspdbnum=$vcnum
-
- if test ! -e "$MSPDB_PATH/mspdb${mspdbnum}.dll"; then
- AC_MSG_ERROR([No mspdb${mspdbnum}.dll in $MSPDB_PATH, Visual Studio installation broken?])
- fi
-
- MSPDB_PATH=`cygpath -d "$MSPDB_PATH"`
- MSPDB_PATH=`cygpath -u "$MSPDB_PATH"`
-
- dnl The path needs to be added before cl is called
- PATH="$MSPDB_PATH:$PATH"
-
- AC_MSG_CHECKING([cl.exe])
-
- # Is there really ever a need to pass CC explicitly? Surely we can hope to get all the
- # automagical niceness to work OK? If somebody has some unsupported compiler in some weird
- # location, isn't it likely that lots of other things needs changes, too, and just setting CC
- # is not enough?
+ # This gives us a posix path with 8.3 filename restrictions
+ CC=`win_short_path_for_make "$CC"`
+ fi
- if test -z "$CC"; then
- if test "$BITNESS_OVERRIDE" = ""; then
- if test -f "$VC_PRODUCT_DIR/bin/cl.exe"; then
- CC="$VC_PRODUCT_DIR/bin/cl.exe"
- fi
- else
- if test "$vcexpress" = "Express"; then
- if test -f "$VC_PRODUCT_DIR/bin/x86_amd64/cl.exe"; then
- CC="$VC_PRODUCT_DIR/bin/x86_amd64/cl.exe"
- fi
- else
- if test -f "$VC_PRODUCT_DIR/bin/amd64/cl.exe"; then
- CC="$VC_PRODUCT_DIR/bin/amd64/cl.exe"
- fi
- fi
+ if test -n "$CC"; then
+ # Remove /cl.exe from CC case insensitive
+ AC_MSG_RESULT([found Visual C++ $vcyear $vcexpress ($CC)])
+ if test "$BITNESS_OVERRIDE" = ""; then
+ COMPATH=`echo "$CC" | $SED -e 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]].*@@' -e 's@^.* @@'`
+ else
+ if test -n "$VC_PRODUCT_DIR"; then
+ COMPATH=$VC_PRODUCT_DIR
fi
-
- # This gives us a posix path with 8.3 filename restrictions
- CC=`win_short_path_for_make "$CC"`
fi
+ if test "$BITNESS_OVERRIDE" = ""; then
+ dnl since MSVC 2012, default for x86 is -arch:SSE2:
+ CC="$CC -arch:SSE"
+ fi
+ export INCLUDE=`cygpath -d "$COMPATH/Include"`
- if test -n "$CC"; then
- # Remove /cl.exe from CC case insensitive
- AC_MSG_RESULT([found Visual C++ $vcyear $vcexpress ($CC)])
- if test "$BITNESS_OVERRIDE" = ""; then
- COMPATH=`echo "$CC" | $SED -e 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]].*@@' -e 's@^.* @@'`
- else
- if test -n "$VC_PRODUCT_DIR"; then
- COMPATH=$VC_PRODUCT_DIR
- fi
- fi
- if test "$BITNESS_OVERRIDE" = ""; then
- dnl since MSVC 2012, default for x86 is -arch:SSE2:
- CC="$CC -arch:SSE"
- fi
- export INCLUDE=`cygpath -d "$COMPATH/Include"`
+ PathFormat "$COMPATH"
+ COMPATH="$formatted_path"
- PathFormat "$COMPATH"
- COMPATH="$formatted_path"
+ VCVER=$vcnum
+ MSVSVER=$vcyear
- VCVER=$vcnum
- MSVSVER=$vcyear
+ # The WINDOWS_SDK_ACCEPTABLE_VERSIONS is mostly an educated guess... Assuming newer ones
+ # are always "better", we list them in reverse chronological order.
- # The WINDOWS_SDK_ACCEPTABLE_VERSIONS is mostly an educated guess... Assuming newer ones
- # are always "better", we list them in reverse chronological order.
+ case $vcnum in
+ 120)
+ COMEX=15
+ WINDOWS_SDK_ACCEPTABLE_VERSIONS="8.1A 8.1 8.0 7.1A"
+ ;;
+ 140)
+ COMEX=19
+ WINDOWS_SDK_ACCEPTABLE_VERSIONS="10.0A 10.0 8.1A 8.1 8.0 7.1A"
+ ;;
+ esac
- case $vcnum in
- 120)
- COMEX=15
- WINDOWS_SDK_ACCEPTABLE_VERSIONS="8.1A 8.1 8.0 7.1A"
+ # The expectation is that --with-windows-sdk should not need to be used
+ if test -n "$with_windows_sdk"; then
+ case " $WINDOWS_SDK_ACCEPTABLE_VERSIONS " in
+ *" "$with_windows_sdk" "*)
+ WINDOWS_SDK_ACCEPTABLE_VERSIONS=$with_windows_sdk
;;
- 140)
- COMEX=19
- WINDOWS_SDK_ACCEPTABLE_VERSIONS="10.0A 10.0 8.1A 8.1 8.0 7.1A"
+ *)
+ AC_MSG_ERROR([Windows SDK $with_windows_sdk is not known to work with VS $MSVSVER])
;;
esac
+ fi
- # The expectation is that --with-windows-sdk should not need to be used
- if test -n "$with_windows_sdk"; then
- case " $WINDOWS_SDK_ACCEPTABLE_VERSIONS " in
- *" "$with_windows_sdk" "*)
- WINDOWS_SDK_ACCEPTABLE_VERSIONS=$with_windows_sdk
- ;;
- *)
- AC_MSG_ERROR([Windows SDK $with_windows_sdk is not known to work with VS $MSVSVER])
- ;;
- esac
- fi
+ # Make AC_COMPILE_IFELSE etc. work (set by AC_PROG_C, which we don't use for MSVC)
+ ac_objext=obj
+ ac_exeext=exe
- # Make AC_COMPILE_IFELSE etc. work (set by AC_PROG_C, which we don't use for MSVC)
- ac_objext=obj
- ac_exeext=exe
+ else
+ AC_MSG_ERROR([Visual C++ not found after all, huh])
+ fi
- else
- AC_MSG_ERROR([Visual C++ not found after all, huh])
- fi
-
- dnl We need to guess the prefix of the -showIncludes output, it can be
- dnl localized
- AC_MSG_CHECKING([the dependency generation prefix (cl.exe -showIncludes)])
- echo "#include <stdlib.h>" > conftest.c
- dnl Filter out -FIIntrin.h when CC points at clang-cl.exe and needs to
- dnl explicitly state that argument:
- my_CC=
- for i in $CC; do
- case $i in
- -FIIntrin.h)
- ;;
- *)
- my_CC="$my_CC $i"
- ;;
- esac
- done
- SHOWINCLUDES_PREFIX=`$my_CC $CFLAGS -c -showIncludes conftest.c 2>/dev/null | \
- grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
- rm -f conftest.c conftest.obj
- if test -z "$SHOWINCLUDES_PREFIX"; then
- AC_MSG_ERROR([cannot determine the -showIncludes prefix])
- else
- AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"])
- fi
+ dnl We need to guess the prefix of the -showIncludes output, it can be
+ dnl localized
+ AC_MSG_CHECKING([the dependency generation prefix (cl.exe -showIncludes)])
+ echo "#include <stdlib.h>" > conftest.c
+ dnl Filter out -FIIntrin.h when CC points at clang-cl.exe and needs to
+ dnl explicitly state that argument:
+ my_CC=
+ for i in $CC; do
+ case $i in
+ -FIIntrin.h)
+ ;;
+ *)
+ my_CC="$my_CC $i"
+ ;;
+ esac
+ done
+ SHOWINCLUDES_PREFIX=`$my_CC $CFLAGS -c -showIncludes conftest.c 2>/dev/null | \
+ grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
+ rm -f conftest.c conftest.obj
+ if test -z "$SHOWINCLUDES_PREFIX"; then
+ AC_MSG_ERROR([cannot determine the -showIncludes prefix])
+ else
+ AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"])
+ fi
- # Check for 64-bit (cross-)compiler to use to build the 64-bit
- # version of the Explorer extension (and maybe other small
- # bits, too) needed when installing a 32-bit LibreOffice on a
- # 64-bit OS. The 64-bit Explorer extension is a feature that
- # has been present since long in OOo. Don't confuse it with
- # building LibreOffice itself as 64-bit code.
+ # Check for 64-bit (cross-)compiler to use to build the 64-bit
+ # version of the Explorer extension (and maybe other small
+ # bits, too) needed when installing a 32-bit LibreOffice on a
+ # 64-bit OS. The 64-bit Explorer extension is a feature that
+ # has been present since long in OOo. Don't confuse it with
+ # building LibreOffice itself as 64-bit code.
- BUILD_X64=
- CXX_X64_BINARY=
- LINK_X64_BINARY=
+ BUILD_X64=
+ CXX_X64_BINARY=
+ LINK_X64_BINARY=
- if test "$BITNESS_OVERRIDE" = ""; then
- AC_MSG_CHECKING([for a x64 compiler and libraries for 64-bit Explorer extensions])
- if test -f "$VC_PRODUCT_DIR/atlmfc/lib/amd64/atls.lib"; then
- # Prefer native x64 compiler to cross-compiler, in case we are running
- # the build on a 64-bit OS.
- if "$VC_PRODUCT_DIR/bin/amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
- BUILD_X64=TRUE
- CXX_X64_BINARY="$VC_PRODUCT_DIR/bin/amd64/cl.exe"
- LINK_X64_BINARY="$VC_PRODUCT_DIR/bin/amd64/link.exe"
- elif "$VC_PRODUCT_DIR/bin/x86_amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
- BUILD_X64=TRUE
- CXX_X64_BINARY="$VC_PRODUCT_DIR/bin/x86_amd64/cl.exe"
- LINK_X64_BINARY="$VC_PRODUCT_DIR/bin/x86_amd64/link.exe"
- fi
- fi
- if test "$BUILD_X64" = TRUE; then
- AC_MSG_RESULT([found])
- else
- AC_MSG_RESULT([not found])
- AC_MSG_WARN([Installation set will not contain 64-bit Explorer extensions])
+ if test "$BITNESS_OVERRIDE" = ""; then
+ AC_MSG_CHECKING([for a x64 compiler and libraries for 64-bit Explorer extensions])
+ if test -f "$VC_PRODUCT_DIR/atlmfc/lib/amd64/atls.lib"; then
+ # Prefer native x64 compiler to cross-compiler, in case we are running
+ # the build on a 64-bit OS.
+ if "$VC_PRODUCT_DIR/bin/amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
+ BUILD_X64=TRUE
+ CXX_X64_BINARY="$VC_PRODUCT_DIR/bin/amd64/cl.exe"
+ LINK_X64_BINARY="$VC_PRODUCT_DIR/bin/amd64/link.exe"
+ elif "$VC_PRODUCT_DIR/bin/x86_amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then
+ BUILD_X64=TRUE
+ CXX_X64_BINARY="$VC_PRODUCT_DIR/bin/x86_amd64/cl.exe"
+ LINK_X64_BINARY="$VC_PRODUCT_DIR/bin/x86_amd64/link.exe"
fi
fi
- AC_SUBST(BUILD_X64)
-
- # These are passed to the environment and then used in gbuild/platform/com_MSC_class.mk
- AC_SUBST(CXX_X64_BINARY)
- AC_SUBST(LINK_X64_BINARY)
- else
- AC_MSG_CHECKING([the compiler is MinGW])
- MACHINE_PREFIX=`$CC -dumpmachine`
- if echo $MACHINE_PREFIX | $GREP -q mingw32; then
- COMPATH=`echo "$COMPATH" | sed -e 's,/bin$,,'`
- AC_MSG_RESULT([yes])
+ if test "$BUILD_X64" = TRUE; then
+ AC_MSG_RESULT([found])
else
- AC_MSG_ERROR([Compiler is not MinGW.])
+ AC_MSG_RESULT([not found])
+ AC_MSG_WARN([Installation set will not contain 64-bit Explorer extensions])
fi
fi
+ AC_SUBST(BUILD_X64)
+
+ # These are passed to the environment and then used in gbuild/platform/com_MSC_class.mk
+ AC_SUBST(CXX_X64_BINARY)
+ AC_SUBST(LINK_X64_BINARY)
fi
AC_SUBST(VCVER)
AC_SUBST(DEVENV)
@@ -3626,7 +3586,7 @@ PathFormat "$MSPDB_PATH"
MSPDB_PATH="$formatted_path"
AC_SUBST(SHOWINCLUDES_PREFIX)
-if test "$_os" = "WINNT" -a "$WITH_MINGW" != yes; then
+if test "$_os" = "WINNT"; then
AC_MSG_CHECKING([whether to use DirectX])
if test "$enable_directx" = "yes" -o "$enable_directx" = ""; then
ENABLE_DIRECTX="TRUE"
@@ -4360,33 +4320,6 @@ emscripten*)
PLATFORMID=linux_x86
;;
-mingw*)
- COM=GCC
- USING_X11=
- OS=WNT
- RTL_OS=Windows
- P_SEP=:
-
- case "$host_cpu" in
- i*86|x86_64)
- if test "$BITNESS_OVERRIDE" = 64; then
- CPUNAME=X86_64
- RTL_ARCH=X86_84
- PLATFORMID=windows_x86_64
- SOLARINC="$SOLARINC -I$SRC_ROOT/include/wntgccx"
- else
- CPUNAME=INTEL
- RTL_ARCH=x86
- PLATFORMID=windows_x86
- SOLARINC="$SOLARINC -I$SRC_ROOT/include/wntgcci"
- fi
- ;;
- *)
- AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
- ;;
- esac
- ;;
-
*netbsd*)
COM=GCC
USING_X11=TRUE
@@ -4602,17 +4535,6 @@ if test "$cross_compiling" = "yes"; then
test $with_junit = no && sub_conf_opts="$sub_conf_opts --without-junit"
test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION"
test "$with_system_icu_for_build" = "yes" -o "$with_system_icu_for_build" = "force" && sub_conf_opts="$sub_conf_opts --with-system-icu"
- # we need the msi build tools on mingw if we are creating the
- # installation set
- if test "$WITH_MINGW" = "yes"; then
- enable_winegcc_for_build=
- for pkgformat in $PKGFORMAT; do
- case "$pkgformat" in
- msi|native) enable_winegcc_for_build=yes ;;
- esac
- done
- test -n "$enable_winegcc_for_build" && sub_conf_opts="$sub_conf_opts --enable-winegcc"
- fi
sub_conf_opts="$sub_conf_opts $with_build_platform_configure_options"
# Don't bother having configure look for stuff not needed for the build platform anyway
./configure \
@@ -4920,7 +4842,7 @@ fi
AC_MSG_CHECKING([whether to enable pch feature])
if test "$enable_pch" != "no"; then
- if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
+ if test "$_os" = "WINNT"; then
ENABLE_PCH="TRUE"
AC_MSG_RESULT([yes])
elif test -n "$enable_pch" && test "$GCC" = "yes"; then
@@ -5128,11 +5050,11 @@ fi
dnl ===================================================================
dnl Check for pkg-config
dnl ===================================================================
-if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
+if test "$_os" != "WINNT"; then
PKG_PROG_PKG_CONFIG
fi
-if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
+if test "$_os" != "WINNT"; then
# If you use CC=/path/to/compiler/foo-gcc or even CC="ccache
# /path/to/compiler/foo-gcc" you need to set the AR etc env vars
@@ -5469,7 +5391,7 @@ fi
dnl ===================================================================
dnl Check if stdc headers are available excluding MSVC.
dnl ===================================================================
-if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
+if test "$_os" != "WINNT"; then
AC_HEADER_STDC
fi
@@ -5477,7 +5399,7 @@ dnl ===================================================================
dnl Testing for C++ compiler and version...
dnl ===================================================================
-if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
+if test "$_os" != "WINNT"; then
# AC_PROG_CXX sets CXXFLAGS to -g -O2 if not set, avoid that
save_CXXFLAGS=$CXXFLAGS
AC_PROG_CXX
@@ -5549,7 +5471,7 @@ dnl ===================================================================
dnl Find pre-processors.(should do that _after_ messing with CC/CXX)
dnl ===================================================================
-if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
+if test "$_os" != "WINNT"; then
AC_PROG_CXXCPP
dnl Check whether there's a C pre-processor.
@@ -5561,7 +5483,7 @@ dnl ===================================================================
dnl Find integral type sizes and alignments
dnl ===================================================================
-if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then
+if test "$_os" != "WINNT"; then
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(short)
@@ -5747,112 +5669,6 @@ fi
AC_CONFIG_HEADERS([config_host/config_probes.h])
dnl ===================================================================
-dnl Set the MinGW sys-root
-dnl ===================================================================
-if test "$WITH_MINGW" = "yes"; then
- AC_MSG_CHECKING([for MinGW sysroot])
- sysroot=`$CC -print-sysroot`
- AS_IF([test -d "$sysroot"/mingw],
- [MINGW_SYSROOT="$sysroot"/mingw
- AC_MSG_RESULT([$MINGW_SYSROOT])],
- [AC_MSG_RESULT([not found])
- AC_MSG_ERROR([cannot determine MinGW sysroot])])
-fi
-AC_SUBST([MINGW_DLLS])
-AC_SUBST([MINGW_SYSROOT])
-
-dnl ===================================================================
-dnl Set the MinGW include directories
-dnl ===================================================================
-if test "$WITH_MINGW" = "yes"; then
- AC_MSG_CHECKING([for MinGW include path])
- cat >conftest.$ac_ext <<_ACEOF
-#include <stddef.h>
-#include <bits/c++config.h>
-_ACEOF
- _mingw_lib_include_path=`$CXX -E -xc++ conftest.$ac_ext | $SED -n -e '/.*1*"\(.*\)\/stddef.h".*/s//\1/p' -e '/.*1*"\(.*\)\/bits\/c++config.h".*/s//\1/p' | sort -u | xargs echo`
- rm conftest.$ac_ext
- if test -z "$_mingw_lib_include_path"; then
- _mingw_lib_include_path="NO_LIB_INCLUDE"
- AC_MSG_RESULT([no MinGW include path])
- else
- AC_MSG_RESULT([$_mingw_lib_include_path])
- fi
- MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path"
- AC_SUBST(MINGW_LIB_INCLUDE_PATH)
-
- AC_LANG_PUSH([C++])
-
- AC_MSG_CHECKING([for dynamic libgcc])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <iostream>
-using namespace std;
-]], [[ try { throw 42; } catch (int e) { cout << "Yep, " << e << endl; } ]])],[
- MINGW_GCCDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libgcc' | $SED -e 's@.*DLL Name: @@'`
- if test -n "$MINGW_GCCDLL"; then
- MINGW_SHARED_GCCLIB=TRUE
- AC_MSG_RESULT([ $MINGW_GCCDLL])
- else
- MINGW_SHARED_GCCLIB=
- AC_MSG_RESULT([no])
- fi
- ],[ AC_MSG_RESULT([no])
-
- ])
-
- AC_MSG_CHECKING([for dynamic libstdc++])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <iostream>
-using namespace std;
-]], [[ cout << "Hello there." << endl; ]])],[
- MINGW_GXXDLL=`$OBJDUMP -p conftest.exe | grep 'DLL Name: libstdc++' | $SED -e 's@.*DLL Name: @@'`
- if test -n "$MINGW_GXXDLL"; then
- mingw_gxxdll_root=${MINGW_GXXDLL%.dll}
- mingw_gxxdll_root=${mingw_gxxdll_root#lib}
- if test "$CROSS_COMPILING" = "TRUE"; then
- dnl m4 escaping!
- mingw_gxxdll_root=${mingw_gxxdll_root%-[[0-9]]}
- fi
- MINGW_SHARED_LIBSTDCPP=-l$mingw_gxxdll_root
- MINGW_SHARED_GXXLIB=TRUE
- AC_MSG_RESULT([$MINGW_GXXDLL])
- else
- MINGW_SHARED_GXXLIB=
- AC_MSG_RESULT([no])
- fi
- ],[ AC_MSG_RESULT([no])
-
- ])
-
- AC_LANG_POP([C++])
-
- AC_SUBST(MINGW_SHARED_GCCLIB)
- AC_SUBST(MINGW_SHARED_GXXLIB)
- AC_SUBST(MINGW_SHARED_LIBSTDCPP)
- AC_SUBST(MINGW_GCCDLL)
- AC_SUBST(MINGW_GXXDLL)
-fi
-
-dnl *************************************************************
-dnl Testing for exception handling - dwarf2 or sjlj exceptions...
-dnl *************************************************************
-if test "$WITH_MINGW" = "yes"; then
- AC_MSG_CHECKING([exception type])
- AC_LANG_PUSH([C++])
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <iostream>
-
- extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__));
-
- ]], [[_Unwind_SjLj_RaiseException() ]])],[exceptions_type="sjlj"],[exceptions_type="dwarf2"
- ])
- AC_MSG_RESULT($exceptions_type)
- AC_LANG_POP([C++])
-fi
-
-EXCEPTIONS="$exceptions_type"
-AC_SUBST(EXCEPTIONS)
-
-dnl ===================================================================
dnl thread-safe statics
dnl ===================================================================
AC_MSG_CHECKING([whether $CXX supports thread safe statics])
@@ -6433,7 +6249,7 @@ AC_SUBST([HAVE_GCC_FNO_SIZED_DEALLOCATION])
dnl ===================================================================
dnl system stl sanity tests
dnl ===================================================================
-if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \); then
+if test "$_os" != "WINNT"; then
AC_LANG_PUSH([C++])
@@ -6538,7 +6354,7 @@ _ACEOF
else
case "$host_cpu" in
i?86|x86_64)
- if test "$_os" = "Darwin" -o "$WITH_MINGW" = "yes"; then
+ if test "$_os" = "Darwin"; then
gccvisbroken=no
else
if $EGREP -q '@PLT|@GOT' visibility.s || test "$ENABLE_LTO" = "TRUE"; then
@@ -6736,7 +6552,7 @@ fi
AC_SUBST([JITC_PROCESSOR_TYPE])
# Misc Windows Stuff
-if test $_os = "WINNT" -a "$WITH_MINGW" != yes; then
+if test $_os = "WINNT"; then
find_msvc_x64_dlls
find_msms
MSVC_DLL_PATH="$msvcdllpath"
@@ -7097,14 +6913,8 @@ if test -z "$JAWTLIB" -a -n "$ENABLE_JAVA" -a "$_os" != Android -a \
then
AC_MSG_CHECKING([for JAWT lib])
if test "$_os" = WINNT; then
- if test "$WITH_MINGW" = yes; then
- # The path is taken care of in gb_LinkTarget__use_jawt
- # in RepositoryExternal.mk:
- JAWTLIB=-ljawt
- else
- # The path to $JAVA_HOME/lib/$JAWTLIB is part of $ILIB:
- JAWTLIB=jawt.lib
- fi
+ # The path to $JAVA_HOME/lib/$JAWTLIB is part of $ILIB:
+ JAWTLIB=jawt.lib
else
case "$host_cpu" in
arm*)
@@ -7191,10 +7001,6 @@ if test -n "$ENABLE_JAVA" -a -z "$JAVAINC"; then
test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
;;
- mingw*)
- JAVAINC="-I$JAVA_HOME/include"
- ;;
-
*netbsd*)
JAVAINC="-I$JAVA_HOME/include"
JAVAINC="$JAVAINC -I$JAVA_HOME/include/netbsd"
@@ -7477,31 +7283,6 @@ else
fi
AC_SUBST(EPM)
-dnl ===================================================================
-dnl We need winegcc when building MinGW build to be able to cross-build msi tools
-dnl ===================================================================
-WINEGCC=
-if test "$enable_winegcc" = "yes"; then
- AC_PATH_PROG(WINEGCC, winegcc)
- if test "$WINEGCC" = ""; then
- AC_MSG_ERROR([winegcc was not found, please install wine-devel, or wine-devel-32bit])
- fi
- CC_save="$CC"
- ac_exeext_save="$ac_exeext"
- CC="$WINEGCC -m32"
- ac_exeext=".exe"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([
-#include <stdio.h>
- ],[
-printf ("hello world\n");
- ])],,
- [AC_MSG_ERROR([winegcc cannot build 32bit binaries, please install glibc-devel-32bit and gcc-32bit])]
- )
- CC="$CC_save"
- ac_exeext="$ac_exeext_save"
-fi
-AC_SUBST(WINEGCC)
-
if test $_os = iOS; then
enable_mpl_subset=yes
enable_lotuswordpro=no
@@ -7689,7 +7470,6 @@ if test "$with_system_jpeg" = "yes"; then
[AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ LIBJPEG_LIBS="-ljpeg" ],
[AC_MSG_ERROR(jpeg library not found or fuctional)], [])
- libo_MINGW_CHECK_DLL([libjpeg])
else
SYSTEM_JPEG=
if test "$with_jpeg_turbo" = "yes"; then
@@ -7799,7 +7579,7 @@ AC_SUBST(CLUCENE_LIBS)
dnl ===================================================================
dnl Check for system expat
dnl ===================================================================
-dnl we should use libo_CHECK_SYSTEM_MODULE, but e.g. the mingw tinderbox has no
+dnl we should use libo_CHECK_SYSTEM_MODULE, but e.g. the mingw tinderbox had no
dnl proper pkg-config for it. It should really be fixed on the tinderbox though.
AC_MSG_CHECKING([which expat to use])
if test "$with_system_expat" = "yes"; then
@@ -7809,7 +7589,6 @@ if test "$with_system_expat" = "yes"; then
[AC_MSG_ERROR(expat.h not found. install expat)], [])
AC_CHECK_LIB([expat], [XML_ParserCreate], [:],
[AC_MSG_RESULT(expat library not found or functional.)], [])
- libo_MINGW_CHECK_DLL([libexpat])
else
AC_MSG_RESULT([internal])
SYSTEM_EXPAT=
@@ -7893,9 +7672,7 @@ AC_SUBST(ENABLE_CMIS)
dnl ===================================================================
dnl Check for system lcms2
dnl ===================================================================
-if test "$with_system_lcms2" = "yes"; then
- libo_MINGW_CHECK_DLL([liblcms2])
-else
+if test "$with_system_lcms2" != "yes"; then
SYSTEM_LCMS2=
fi
libo_CHECK_SYSTEM_MODULE([lcms2],[LCMS2],[lcms2],["-I${WORKDIR}/UnpackedTarball/lcms2/include"],["-L${WORKDIR}/UnpackedTarball/lcms2/src/.libs -llcms2"])
@@ -7985,10 +7762,6 @@ if test "$with_system_libxml" = "yes"; then
if test "$XSLTPROC" = "no"; then
AC_MSG_ERROR([xsltproc is required])
fi
-
- libo_MINGW_CHECK_DLL([libxslt])
- libo_MINGW_CHECK_DLL([libexslt])
- libo_MINGW_TRY_DLL([iconv])
else
AC_MSG_RESULT([internal])
SYSTEM_LIBXSLT=
@@ -8042,9 +7815,6 @@ if test "$with_system_libxml" = "yes"; then
if test "$XMLLINT" = "no"; then
AC_MSG_ERROR([xmllint is required])
fi
-
- libo_MINGW_CHECK_DLL([libxml2])
- libo_MINGW_TRY_DLL([zlib1])
else
AC_MSG_RESULT([internal])
SYSTEM_LIBXML=
@@ -8105,10 +7875,6 @@ no|disable)
elif test $build_os = cygwin; then
dnl When building on Windows we don't attempt to use any installed
dnl "system" Python.
- dnl
- dnl (When cross-compiling to Windows from Linux using the mingw32-cross
- dnl compiler from OBS, use mingw32-python from OBS, and ditto for other
- dnl MinGW cross-compilation setups.)
AC_MSG_RESULT([fully internal])
enable_python=internal
elif test "$cross_compiling" = yes; then
@@ -8191,25 +7957,6 @@ if test $enable_python = system; then
PYTHON_LIBS="${filteredlibs}"
else
dnl How to find out the cross-compilation Python installation path?
- dnl Let's hardocode what we know for different distributions for now...
- for python_version in 2.6; do
- if test -f ${MINGW_SYSROOT}/include/python${python_version}/Python.h; then
- PYTHON_CFLAGS="-I${MINGW_SYSROOT}/include/python$python_version"
- PYTHON_LIBS="-L${MINGW_SYSROOT}/lib -lpython$python_version $python_libs"
- AC_MSG_CHECKING([for python.exe])
- libo_MINGW_CHECK_DLL([libpython$python_version])
- libo_MINGW_CHECK_DLL([libreadline6])
- libo_MINGW_CHECK_DLL([libtermcap])
- # could we somehow extract the really mingw python version from
- # actual distro package?
- # 2.6.2 currently on OpenSUSE 12.1?
- # rpm -q mingw32-python => mingw32-python-2.6.2-17.17.noarch
- PYTHON_VERSION=$python_version.2
- PYTHON_VERSION_MAJOR=`echo $python_version | cut -d . -f 1`
- PYTHON_VERSION_MINOR=`echo $python_version | cut -d . -f 2`
- break
- fi
- done
AC_MSG_CHECKING([for python version])
AS_IF([test -n "$PYTHON_VERSION"],
[AC_MSG_RESULT([$PYTHON_VERSION])],
@@ -8818,18 +8565,6 @@ if test "$with_system_curl" = "yes"; then
esac
fi
- libo_MINGW_CHECK_DLL([libcurl])
- libo_MINGW_TRY_DLL([libintl])
- libo_MINGW_TRY_DLL([libidn])
- libo_MINGW_TRY_DLL([libnspr4])
- libo_MINGW_TRY_DLL([nssutil3])
- libo_MINGW_TRY_DLL([libplc4])
- libo_MINGW_TRY_DLL([libplds4])
- libo_MINGW_TRY_DLL([nss3])
- libo_MINGW_TRY_DLL([ssl3])
- libo_MINGW_TRY_DLL([libgpg-error])
- libo_MINGW_TRY_DLL([libgcrypt])
- libo_MINGW_TRY_DLL([libssh2])
ENABLE_CURL=TRUE
elif test $_os = iOS; then
# Let's see if we need curl, I think not?
@@ -8857,12 +8592,6 @@ if test "$with_system_boost" = "yes"; then
AX_BOOST_DATE_TIME
AX_BOOST_FILESYSTEM
AX_BOOST_IOSTREAMS
- mingw_boost_date_time_dll=`echo $BOOST_DATE_TIME_LIB | sed -e 's/^-l//' -e 's/\.dll$//'`
- libo_MINGW_TRY_DLL([$mingw_boost_date_time_dll])
- if test -z "$MINGW_BOOST_DATE_TIME_DLL"; then
- # if not found, try again with 'lib' prefix
- libo_MINGW_CHECK_DLL([lib$mingw_boost_date_time_dll])
- fi
AC_LANG_PUSH([C++])
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $BOOST_CPPFLAGS $CXXFLAGS_CXX11"
@@ -8985,15 +8714,6 @@ if test $_os != iOS -a $_os != Android -a "$enable_fuzzers" != "yes"; then
else
with_tls=openssl
fi
-if test "$with_system_nss" = "yes"; then
- libo_MINGW_CHECK_DLL([libnspr4])
- libo_MINGW_CHECK_DLL([libplc4])
- libo_MINGW_CHECK_DLL([libplds4])
- libo_MINGW_CHECK_DLL([nss3])
- libo_MINGW_CHECK_DLL([nssutil3])
- libo_MINGW_CHECK_DLL([smime3])
- libo_MINGW_CHECK_DLL([ssl3])
-fi
AC_SUBST(ENABLE_NSS)
dnl ===================================================================
@@ -9067,12 +8787,8 @@ if test "$with_system_icu" = "yes"; then
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[unicode/rbbi.h]])],[AC_MSG_RESULT(checked.)],[AC_MSG_ERROR(icu headers not found.)])
AC_LANG_POP([C++])
- if test "$cross_compiling" != "yes" -o "$WITH_MINGW" = "yes"; then
- ICUPATH="$PATH"
- if test "$WITH_MINGW" = "yes"; then
- ICUPATH=`$CC -print-sysroot`/mingw/bin:"$ICUPATH"
- fi
- AC_PATH_PROG(ICUCONFIG,icu-config,,[$ICUPATH])
+ if test "$cross_compiling" != "yes"; then
+ AC_PATH_PROG(ICUCONFIG,icu-config)
AC_MSG_CHECKING([ICU version])
ICU_VERSION=`$ICUCONFIG --noverify --version 2>/dev/null || $ICUCONFIG --version`
@@ -9135,10 +8851,6 @@ You can use --with-system-icu-for-build=force to use it anyway.])
ICU_MINOR=""
fi
fi
-
- libo_MINGW_CHECK_DLL([icudata][$ICU_MAJOR][$ICU_MINOR])
- libo_MINGW_CHECK_DLL([icui18n][$ICU_MAJOR][$ICU_MINOR])
- libo_MINGW_CHECK_DLL([icuuc][$ICU_MAJOR][$ICU_MINOR])
else
AC_MSG_RESULT([internal])
SYSTEM_ICU=
@@ -9401,9 +9113,6 @@ neon)
libo_CHECK_SYSTEM_MODULE([neon],[NEON],[neon >= 0.26.0])
if test "$with_system_neon" = "yes"; then
NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`"
- libo_MINGW_CHECK_DLL([libneon])
- libo_MINGW_TRY_DLL([libtasn1])
- libo_MINGW_TRY_DLL([libgnutls])
else
NEON_VERSION=0295
fi
@@ -9479,8 +9188,6 @@ if test "$enable_openssl" = "yes"; then
libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl])
fi
if test "$with_system_openssl" = "yes"; then
- libo_MINGW_CHECK_DLL([libssl])
- libo_MINGW_CHECK_DLL([libcrypto])
AC_MSG_CHECKING([whether openssl supports SHA512])
AC_LANG_PUSH([C])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <openssl/sha.h>]],[[
@@ -9525,12 +9232,8 @@ dnl redland: versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:b
dnl raptor2: need at least 2.0.7 for CVE-2012-0037
libo_CHECK_SYSTEM_MODULE([redland],[REDLAND],[redland >= 1.0.8 raptor2 >= 2.0.7])
if test "$with_system_redland" = "yes"; then
- libo_MINGW_CHECK_DLL([librdf])
AC_CHECK_LIB([rdf], [librdf_world_set_raptor_init_handler], [:],
[AC_MSG_ERROR(librdf too old. Need >= 1.0.16)], [])
- libo_MINGW_TRY_DLL([libraptor])
- libo_MINGW_TRY_DLL([librasqal])
- libo_MINGW_TRY_DLL([libsqlite3])
else
RAPTOR_MAJOR="0"
RASQAL_MAJOR="3"
@@ -9560,7 +9263,6 @@ if test "$with_system_hunspell" = "yes"; then
HUNSPELL_LIBS=-lhunspell
fi
AC_LANG_POP([C++])
- libo_MINGW_CHECK_DLL([libhunspell-1.6])
HUNSPELL_CFLAGS=$(printf '%s' "$HUNSPELL_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
FilterLibs "${HUNSPELL_LIBS}"
HUNSPELL_LIBS="${filteredlibs}"
@@ -9601,7 +9303,6 @@ if test "$with_system_altlinuxhyph" = "yes"; then
AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
[ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
fi
- libo_MINGW_CHECK_DLL([libhyphen])
else
AC_MSG_RESULT([internal])
SYSTEM_HYPH=
@@ -9638,7 +9339,6 @@ if test "$with_system_mythes" = "yes"; then
fi
fi
AC_LANG_POP([C++])
- libo_MINGW_CHECK_DLL([libmythes-1.2])
MYTHES_CFLAGS=$(printf '%s' "$MYTHES_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
FilterLibs "${MYTHES_LIBS}"
MYTHES_LIBS="${filteredlibs}"
@@ -9705,7 +9405,6 @@ if test "$ENABLE_LPSOLVE" = TRUE; then
AC_CHECK_LIB([lpsolve55], [make_lp], [:],
[ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
LIBS=$save_LIBS
- libo_MINGW_CHECK_DLL([lpsolve55])
else
AC_MSG_RESULT([internal])
SYSTEM_LPSOLVE=
@@ -9741,8 +9440,6 @@ fi
dnl =========================================
dnl Check for the Windows SDK.
dnl =========================================
-dnl FIXME: I don't know yet if the Windows SDK works with MinGW, keep it until I know better,
-dnl and add "-a \( "$WITH_MINGW" != "yes" \)" then
if test "$_os" = "WINNT"; then
AC_MSG_CHECKING([for Windows SDK])
if test "$build_os" = "cygwin"; then
@@ -9869,16 +9566,9 @@ dnl =========================================
dnl Check for uuidgen
dnl =========================================
if test "$_os" = "WINNT" -a "$cross_compiling" != "yes"; then
- if test "$WITH_MINGW" = "yes"; then
- AC_PATH_PROG([UUIDGEN], [uuid])
- if test -z "$UUIDGEN"; then
- AC_MSG_WARN([uuid is needed for building installation sets])
- fi
- else
- # presence is already tested above in the WINDOWS_SDK_HOME check
- UUIDGEN=uuidgen.exe
- AC_SUBST(UUIDGEN)
- fi
+ # presence is already tested above in the WINDOWS_SDK_HOME check
+ UUIDGEN=uuidgen.exe
+ AC_SUBST(UUIDGEN)
else
AC_PATH_PROG([UUIDGEN], [uuidgen])
if test -z "$UUIDGEN"; then
@@ -10000,7 +9690,7 @@ dnl ***************************************
dnl testing assembler path
dnl ***************************************
ML_EXE=""
-if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
+if test "$_os" = "WINNT"; then
if test "$BITNESS_OVERRIDE" = ""; then
assembler=ml.exe
assembler_bin=bin
@@ -10619,7 +10309,6 @@ if test $_os != Android -a $_os != iOS -a \( -z "$enable_pdfimport" -o "$enable_
CXXFLAGS=$save_CXXFLAGS
CPPFLAGS=$save_CPPFLAGS
AC_LANG_POP([C++])
- libo_MINGW_CHECK_DLL([libpoppler])
POPPLER_CFLAGS=$(printf '%s' "$POPPLER_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
FilterLibs "${POPPLER_LIBS}"
@@ -11724,11 +11413,6 @@ if test "$test_cairo" = "yes"; then
AC_LANG_POP([C])
fi
- libo_MINGW_CHECK_DLL([libcairo])
- libo_MINGW_TRY_DLL([libfontconfig])
- libo_MINGW_TRY_DLL([libfreetype])
- libo_MINGW_TRY_DLL([libpixman])
- libo_MINGW_TRY_DLL([libpng15])
else
SYSTEM_CAIRO=
AC_MSG_RESULT([no])
@@ -11780,7 +11464,6 @@ if test "$enable_liblangtag" = "yes" -o \
LIBLANGTAG_CFLAGS=$(printf '%s' "$LIBLANGTAG_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
FilterLibs "${LIBLANGTAG_LIBS}"
LIBLANGTAG_LIBS="${filteredlibs}"
- libo_MINGW_CHECK_DLL([liblangtag])
else
SYSTEM_LIBLANGTAG=
AC_MSG_RESULT([no])
diff --git a/connectivity/Library_postgresql-sdbc-impl.mk b/connectivity/Library_postgresql-sdbc-impl.mk
index 0580a8b4106d..930eaf4d0e09 100644
--- a/connectivity/Library_postgresql-sdbc-impl.mk
+++ b/connectivity/Library_postgresql-sdbc-impl.mk
@@ -55,7 +55,7 @@ $(eval $(call gb_Library_use_externals,postgresql-sdbc-impl,\
))
ifeq ($(SYSTEM_POSTGRESQL),)
-ifneq ($(OS)$(COM),WNTMSC)
+ifneq ($(OS),WNT)
$(eval $(call gb_Library_add_libs,postgresql-sdbc-impl,\
$(if $(WITH_GSSAPI),$(GSSAPI_LIBS)) \
diff --git a/connectivity/source/drivers/ado/AKeys.cxx b/connectivity/source/drivers/ado/AKeys.cxx
index 4a48330d7f57..150933368f87 100644
--- a/connectivity/source/drivers/ado/AKeys.cxx
+++ b/connectivity/source/drivers/ado/AKeys.cxx
@@ -30,10 +30,6 @@
#include <connectivity/dbexception.hxx>
#include "resource/ado_res.hrc"
-#if defined __MINGW32__
-#pragma GCC diagnostic warning "-Wwrite-strings"
-#endif
-
using namespace ::comphelper;
using namespace connectivity;
using namespace connectivity::ado;
diff --git a/connectivity/source/inc/ado/Aolevariant.hxx b/connectivity/source/inc/ado/Aolevariant.hxx
index 320ef9706f54..f531848aa9b9 100644
--- a/connectivity/source/inc/ado/Aolevariant.hxx
+++ b/connectivity/source/inc/ado/Aolevariant.hxx
@@ -20,9 +20,6 @@
#define INCLUDED_CONNECTIVITY_SOURCE_INC_ADO_AOLEVARIANT_HXX
#include <sal/types.h>
-#ifdef __MINGW32__
-#include <windows.h>
-#endif
#include <rtl/ustring.hxx>
#include <com/sun/star/uno/Sequence.hxx>
diff --git a/dbaccess/Library_dbu.mk b/dbaccess/Library_dbu.mk
index 6aa3f150a6b0..b29a3d41b114 100644
--- a/dbaccess/Library_dbu.mk
+++ b/dbaccess/Library_dbu.mk
@@ -29,12 +29,6 @@ $(eval $(call gb_Library_add_defs,dbu,\
-DDBACCESS_DLLIMPLEMENTATION \
))
-ifeq ($(OS)$(COM),WNTGCC) # for adoint.h
-$(eval $(call gb_Library_add_cxxflags,dbu,\
- -fpermissive \
-))
-endif
-
$(eval $(call gb_Library_use_externals,dbu,\
boost_headers \
odbc_headers \
diff --git a/dbaccess/source/ui/dlg/adodatalinks.cxx b/dbaccess/source/ui/dlg/adodatalinks.cxx
index b945c434d2aa..0c926f2be990 100644
--- a/dbaccess/source/ui/dlg/adodatalinks.cxx
+++ b/dbaccess/source/ui/dlg/adodatalinks.cxx
@@ -37,12 +37,6 @@
#include "adodatalinks.hxx"
-#ifdef __MINGW32__
-const IID IID_IDataSourceLocator = { 0x2206CCB2, 0x19C1, 0x11D1, { 0x89, 0xE0, 0x00, 0xC0, 0x4F, 0xD7, 0xA8, 0x29 } };
-const CLSID CLSID_DataLinks = { 0x2206CDB2, 0x19C1, 0x11D1, { 0x89, 0xE0, 0x00, 0xC0, 0x4F, 0xD7, 0xA8, 0x29 } };
-#endif
-
-
OLECHAR const * PromptEdit(long hWnd,OLECHAR const * connstr);
BSTR PromptNew(long hWnd);
diff --git a/dbaccess/win32/source/odbcconfig/odbcconfig.cxx b/dbaccess/win32/source/odbcconfig/odbcconfig.cxx
index 4805d16053c6..58e779907ea8 100644
--- a/dbaccess/win32/source/odbcconfig/odbcconfig.cxx
+++ b/dbaccess/win32/source/odbcconfig/odbcconfig.cxx
@@ -111,11 +111,7 @@ HWND initInstance( HINSTANCE _hAppInstance )
}
// main window function
-#ifdef __MINGW32__
-extern "C" int APIENTRY WinMain( HINSTANCE _hAppInstance, HINSTANCE, LPSTR, int )
-#else
extern "C" int APIENTRY _tWinMain( HINSTANCE _hAppInstance, HINSTANCE, LPTSTR, int )
-#endif
{
if ( !registerWindowClass( _hAppInstance ) )
return FALSE;
diff --git a/desktop/win32/source/applauncher/launcher.cxx b/desktop/win32/source/applauncher/launcher.cxx
index 029d1a17b28c..beb05f56d90a 100644
--- a/desktop/win32/source/applauncher/launcher.cxx
+++ b/desktop/win32/source/applauncher/launcher.cxx
@@ -24,11 +24,7 @@
#include <stdlib.h>
#include <malloc.h>
-#ifdef __MINGW32__
-extern "C" int APIENTRY WinMain( HINSTANCE, HINSTANCE, LPSTR, int )
-#else
extern "C" int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
-#endif
{
// Retrieve startup info
diff --git a/desktop/win32/source/guiloader/genericloader.cxx b/desktop/win32/source/guiloader/genericloader.cxx
index 5398610d396e..cdad10687b0e 100644
--- a/desktop/win32/source/guiloader/genericloader.cxx
+++ b/desktop/win32/source/guiloader/genericloader.cxx
@@ -141,22 +141,12 @@ static int GenericMain()
return dwExitCode;
}
-
-#ifdef __MINGW32__
-int WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR, int )
-#else
int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
-#endif
{
return GenericMain();
}
-
-#ifdef __MINGW32__
-int __cdecl main()
-#else
int __cdecl _tmain()
-#endif
{
return GenericMain();
}
diff --git a/desktop/win32/source/guistdio/guistdio.inc b/desktop/win32/source/guistdio/guistdio.inc
index d688db35f395..5617d889a402 100644
--- a/desktop/win32/source/guistdio/guistdio.inc
+++ b/desktop/win32/source/guistdio/guistdio.inc
@@ -274,16 +274,7 @@ BOOL WINAPI CtrlBreakHandler(
return TRUE;
}
-
-
-
-
-
-#ifdef __MINGW32__
-int main( int, char ** )
-#else
int _tmain( int, _TCHAR ** )
-#endif
{
TCHAR szTargetFileName[MAX_PATH] = TEXT("");
STARTUPINFO aStartupInfo;
diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx
index e841e8769328..935cc7e42bb8 100644
--- a/desktop/win32/source/officeloader/officeloader.cxx
+++ b/desktop/win32/source/officeloader/officeloader.cxx
@@ -56,11 +56,7 @@ static LPTSTR *GetCommandArgs( int *pArgc )
#endif
}
-#ifdef __MINGW32__
-int WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR, int )
-#else
int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
-#endif
{
TCHAR szTargetFileName[MAX_PATH] = TEXT("");
TCHAR szIniDirectory[MAX_PATH];
diff --git a/desktop/win32/source/unoinfo.cxx b/desktop/win32/source/unoinfo.cxx
index 4f8bbcc40be3..3ee7e7750335 100644
--- a/desktop/win32/source/unoinfo.cxx
+++ b/desktop/win32/source/unoinfo.cxx
@@ -70,21 +70,12 @@ void writePath(
}
-#ifdef __MINGW32__
-int main(int argc, char ** argv, char **) {
- if (argc == 2 && strcmp(argv[1], "c++") == 0) {
-#else
int wmain(int argc, wchar_t ** argv, wchar_t **) {
if (argc == 2 && wcscmp(argv[1], L"c++") == 0) {
-#endif
wchar_t path[MAX_PATH];
wchar_t * pathEnd = getBrandPath(path);
writePath(path, pathEnd, MY_STRING(L""));
-#ifdef __MINGW32__
- } else if (argc == 2 && strcmp(argv[1], "java") == 0) {
-#else
} else if (argc == 2 && wcscmp(argv[1], L"java") == 0) {
-#endif
if (fwrite("1", 1, 1, stdout) != 1) {
exit(EXIT_FAILURE);
}
diff --git a/distro-configs/LibreOfficeMinGW.conf b/distro-configs/LibreOfficeMinGW.conf
deleted file mode 100644
index c29311779d96..000000000000
--- a/distro-configs/LibreOfficeMinGW.conf
+++ /dev/null
@@ -1,31 +0,0 @@
---build=x86_64-unknown-linux-gnu
---host=i686-w64-mingw32
---with-system-altlinuxhyph
---with-system-boost
---with-system-cairo
---with-system-cppunit
---with-system-curl
---with-system-expat
---with-system-graphite
---with-system-hunspell
---with-system-icu
---with-system-libpng
---with-system-libxml
---with-system-lpsolve
---with-system-mythes
---with-system-neon
---with-system-nss
---with-system-openssl
---with-system-poppler
---with-system-redland
---with-system-zlib
---without-junit
---without-myspell-dicts
---disable-activex
---disable-cairo-canvas
---disable-directx
---disable-extension-integration
---disable-postgresql-sdbc
---disable-gtk
---with-help
---with-myspell-dicts
diff --git a/distro-configs/LibreOfficeMinGW64.conf b/distro-configs/LibreOfficeMinGW64.conf
deleted file mode 100644
index 9440077afcd9..000000000000
--- a/distro-configs/LibreOfficeMinGW64.conf
+++ /dev/null
@@ -1,32 +0,0 @@
---build=x86_64-unknown-linux-gnu
---host=x86_64-w64-mingw32
---enable-64-bit
---with-system-altlinuxhyph
---with-system-boost
---with-system-cairo
---with-system-cppunit
---with-system-curl
---with-system-expat
---with-system-graphite
---with-system-hunspell
---with-system-icu
---with-system-libpng
---with-system-libxml
---with-system-lpsolve
---with-system-mythes
---with-system-neon
---with-system-nss
---with-system-openssl
---with-system-poppler
---with-system-redland
---with-system-zlib
---without-junit
---without-myspell-dicts
---disable-activex
---disable-cairo-canvas
---disable-directx
---disable-extension-integration
---disable-postgresql-sdbc
---disable-gtk
---with-help
---with-myspell-dicts
diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx
index 9323ed3ab05e..f416baab5df0 100644
--- a/dtrans/source/win32/clipb/MtaOleClipb.cxx
+++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx
@@ -46,12 +46,6 @@
#include <process.h>
#include <systools/win32/comtools.hxx>
-#ifdef __MINGW32__
-#if defined __uuidof
-#undef __uuidof
-#endif
-#define __uuidof(I) IID_##I
-#endif
// namespace directives
diff --git a/dtrans/source/win32/dnd/idroptarget.cxx b/dtrans/source/win32/dnd/idroptarget.cxx
index 1686baf0d718..8b403eb7a35f 100644
--- a/dtrans/source/win32/dnd/idroptarget.cxx
+++ b/dtrans/source/win32/dnd/idroptarget.cxx
@@ -19,13 +19,6 @@
#include "idroptarget.hxx"
-#ifdef __MINGW32__
-#if defined __uuidof
-#undef __uuidof
-#endif
-#define __uuidof(I) IID_##I
-#endif
-
IDropTargetImpl::IDropTargetImpl( DropTarget& pTarget): m_nRefCount( 0),
m_rDropTarget( pTarget)
{
diff --git a/dtrans/source/win32/dnd/source.cxx b/dtrans/source/win32/dnd/source.cxx
index 39c0bc472f2c..43f6fa9ccbb5 100644
--- a/dtrans/source/win32/dnd/source.cxx
+++ b/dtrans/source/win32/dnd/source.cxx
@@ -36,13 +36,6 @@
#include <winuser.h>
#include <stdio.h>
-#ifdef __MINGW32__
-#if defined __uuidof
-#undef __uuidof
-#endif
-#define __uuidof(I) IID_##I
-#endif
-
using namespace cppu;
using namespace osl;
using namespace com::sun::star::datatransfer;
diff --git a/dtrans/source/win32/dtobj/APNDataObject.cxx b/dtrans/source/win32/dtobj/APNDataObject.cxx
index 62d59007afea..f511c48c3894 100644
--- a/dtrans/source/win32/dtobj/APNDataObject.cxx
+++ b/dtrans/source/win32/dtobj/APNDataObject.cxx
@@ -21,12 +21,6 @@
#include <osl/diagnose.h>
#include <systools/win32/comtools.hxx>
-#ifdef __MINGW32__
-#if defined __uuidof
-#undef __uuidof
-#endif
-#define __uuidof(I) IID_##I
-#endif
#define FREE_HGLOB_ON_RELEASE TRUE
#define KEEP_HGLOB_ON_RELEASE FALSE
diff --git a/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx b/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx
index c18e32912111..3b495b4d2dd4 100644
--- a/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx
@@ -22,13 +22,6 @@
#include "../clipb/WinClipbImpl.hxx"
#include "../clipb/WinClipboard.hxx"
-#ifdef __MINGW32__
-#if defined __uuidof
-#undef __uuidof
-#endif
-#define __uuidof(I) IID_##I
-#endif
-
using namespace com::sun::star::datatransfer;
using namespace com::sun::star::datatransfer::clipboard;
using com::sun::star::uno::RuntimeException;
diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx
index 5f3c33e44c4f..74d28b9e9f20 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.cxx
@@ -42,13 +42,6 @@
#pragma warning(pop)
#endif
-#ifdef __MINGW32__
-#if defined __uuidof
-#undef __uuidof
-#endif
-#define __uuidof(I) IID_##I
-#endif
-
using namespace com::sun::star::datatransfer;
using namespace com::sun::star::datatransfer::clipboard;
using namespace com::sun::star::uno;
diff --git a/dtrans/source/win32/misc/ImplHelper.cxx b/dtrans/source/win32/misc/ImplHelper.cxx
index 5a3cdb10c71d..e4e8d1cb0ba7 100644
--- a/dtrans/source/win32/misc/ImplHelper.cxx
+++ b/dtrans/source/win32/misc/ImplHelper.cxx
@@ -33,10 +33,6 @@
#include <vector>
-#if defined ( __MINGW32__ )
-#include <sehandler.hxx>
-#endif
-
#define FORMATETC_EXACT_MATCH 1
#define FORMATETC_PARTIAL_MATCH -1
#define FORMATETC_NO_MATCH 0
@@ -175,29 +171,14 @@ OUString SAL_CALL cptostr( sal_uInt32 codepage )
// SCODE - S_OK if successful
void SAL_CALL DeleteTargetDevice( DVTARGETDEVICE* ptd )
{
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- jmp_buf jmpbuf;
- __SEHandler han;
- if (__builtin_setjmp(jmpbuf) == 0)
- {
- han.Set(jmpbuf, NULL, (__SEHandler::PF)EXCEPTION_EXECUTE_HANDLER);
-#else
__try
{
-#endif
CoTaskMemFree( ptd );
}
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- else
-#else
__except( EXCEPTION_EXECUTE_HANDLER )
-#endif
{
OSL_FAIL( "Error DeleteTargetDevice" );
}
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- han.Reset();
-#endif
}
// OleStdCopyTargetDevice()
@@ -219,29 +200,17 @@ DVTARGETDEVICE* SAL_CALL CopyTargetDevice( DVTARGETDEVICE* ptdSrc )
{
DVTARGETDEVICE* ptdDest = nullptr;
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- jmp_buf jmpbuf;
- __SEHandler han;
- if (__builtin_setjmp(jmpbuf) == 0)
- {
- han.Set(jmpbuf, NULL, (__SEHandler::PF)EXCEPTION_EXECUTE_HANDLER);
-#else
__try
{
-#endif
if ( nullptr != ptdSrc )
{
ptdDest = static_cast< DVTARGETDEVICE* >( CoTaskMemAlloc( ptdSrc->tdSize ) );
memcpy( ptdDest, ptdSrc, static_cast< size_t >( ptdSrc->tdSize ) );
}
}
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- han.Reset();
-#else
__except( EXCEPTION_EXECUTE_HANDLER )
{
}
-#endif
return ptdDest;
}
@@ -273,16 +242,8 @@ bool SAL_CALL CopyFormatEtc( LPFORMATETC petcDest, LPFORMATETC petcSrc )
{
bool bRet = false;
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- jmp_buf jmpbuf;
- __SEHandler han;
- if (__builtin_setjmp(jmpbuf) == 0)
- {
- han.Set(jmpbuf, NULL, (__SEHandler::PF)EXCEPTION_EXECUTE_HANDLER);
-#else
__try
{
-#endif
if ( petcDest != petcSrc )
{
@@ -299,17 +260,10 @@ bool SAL_CALL CopyFormatEtc( LPFORMATETC petcDest, LPFORMATETC petcSrc )
bRet = true;
}
}
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- else
-#else
__except( EXCEPTION_EXECUTE_HANDLER )
-#endif
{
OSL_FAIL( "Error CopyFormatEtc" );
}
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- han.Reset();
-#endif
return bRet;
}
@@ -324,16 +278,8 @@ sal_Int32 SAL_CALL CompareFormatEtc( const FORMATETC* pFetcLhs, const FORMATETC*
{
sal_Int32 nMatch = FORMATETC_EXACT_MATCH;
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- jmp_buf jmpbuf;
- __SEHandler han;
- if (__builtin_setjmp(jmpbuf) == 0)
- {
- han.Set(jmpbuf, NULL, (__SEHandler::PF)EXCEPTION_EXECUTE_HANDLER);
-#else
__try
{
-#endif
if ( pFetcLhs != pFetcRhs )
{
if ( ( pFetcLhs->cfFormat != pFetcRhs->cfFormat ) ||
@@ -371,18 +317,11 @@ sal_Int32 SAL_CALL CompareFormatEtc( const FORMATETC* pFetcLhs, const FORMATETC*
}
}
}
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- else
-#else
__except( EXCEPTION_EXECUTE_HANDLER )
-#endif
{
OSL_FAIL( "Error CompareFormatEtc" );
nMatch = FORMATETC_NO_MATCH;
}
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- han.Reset();
-#endif
return nMatch;
}
@@ -391,16 +330,8 @@ bool SAL_CALL CompareTargetDevice( DVTARGETDEVICE* ptdLeft, DVTARGETDEVICE* ptdR
{
bool bRet = false;
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- jmp_buf jmpbuf;
- __SEHandler han;
- if (__builtin_setjmp(jmpbuf) == 0)
- {
- han.Set(jmpbuf, NULL, (__SEHandler::PF)EXCEPTION_EXECUTE_HANDLER);
-#else
__try
{
-#endif
if ( ptdLeft == ptdRight )
{
// same address of td; must be same (handles NULL case)
@@ -415,18 +346,11 @@ bool SAL_CALL CompareTargetDevice( DVTARGETDEVICE* ptdLeft, DVTARGETDEVICE* ptdR
if ( memcmp( ptdLeft, ptdRight, ptdLeft->tdSize ) == 0 )
bRet = true;
}
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- else
-#else
__except( EXCEPTION_EXECUTE_HANDLER )
-#endif
{
OSL_FAIL( "Error CompareTargetDevice" );
bRet = false;
}
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- han.Reset();
-#endif
return bRet;
}
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 7c6e51cd0109..0a6a0bdebf71 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -927,7 +927,7 @@ EditPaM ImpEditEngine::CursorVisualStartEnd( EditView* pEditView, const EditPaM&
UBiDi* pBidi = ubidi_openSized( aLine.getLength(), 0, &nError );
const UBiDiLevel nBidiLevel = IsRightToLeft( nPara ) ? 1 /*RTL*/ : 0 /*LTR*/;
- ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(pLineString), aLine.getLength(), nBidiLevel, nullptr, &nError ); // UChar != sal_Unicode in MinGW
+ ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(pLineString), aLine.getLength(), nBidiLevel, nullptr, &nError );
sal_Int32 nVisPos = bStart ? 0 : aLine.getLength()-1;
const sal_Int32 nLogPos = ubidi_getLogicalIndex( pBidi, nVisPos, &nError );
@@ -1046,7 +1046,7 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView* pEditView, const EditPaM
UBiDi* pBidi = ubidi_openSized( aLine.getLength(), 0, &nError );
const UBiDiLevel nBidiLevel = IsRightToLeft( nPara ) ? 1 /*RTL*/ : 0 /*LTR*/;
- ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(pLineString), aLine.getLength(), nBidiLevel, nullptr, &nError ); // UChar != sal_Unicode in MinGW
+ ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(pLineString), aLine.getLength(), nBidiLevel, nullptr, &nError );
if ( !pEditView->IsInsertMode() )
{
@@ -1882,7 +1882,7 @@ void ImpEditEngine::InitWritingDirections( sal_Int32 nPara )
UBiDi* pBidi = ubidi_openSized( aText.getLength(), 0, &nError );
nError = U_ZERO_ERROR;
- ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aText.getStr()), aText.getLength(), nBidiLevel, nullptr, &nError ); // UChar != sal_Unicode in MinGW
+ ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aText.getStr()), aText.getLength(), nBidiLevel, nullptr, &nError );
nError = U_ZERO_ERROR;
int32_t nCount = ubidi_countRuns( pBidi, &nError );
diff --git a/embedserv/source/embed/esdll.cxx b/embedserv/source/embed/esdll.cxx
index d998f0134297..ccf737053bba 100644
--- a/embedserv/source/embed/esdll.cxx
+++ b/embedserv/source/embed/esdll.cxx
@@ -22,10 +22,6 @@
#pragma warning(disable : 4917 4555)
#endif
-#ifdef __MINGW32__
-#define _INIT_ATL_COMMON_VARS
-#endif
-
#include "stdafx.h"
#include <atlbase.h>
diff --git a/embedserv/source/embed/register.cxx b/embedserv/source/embed/register.cxx
index bbe5f6b7f321..2890a07b3744 100644
--- a/embedserv/source/embed/register.cxx
+++ b/embedserv/source/embed/register.cxx
@@ -20,9 +20,6 @@
#pragma warning(disable : 4917 4555)
#endif
-#ifdef __MINGW32__
-#define INITGUID
-#endif
#include "servprov.hxx"
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
diff --git a/embedserv/source/inc/embeddocaccess.hxx b/embedserv/source/inc/embeddocaccess.hxx
index 4ddefca1dab4..96d005863eaf 100644
--- a/embedserv/source/inc/embeddocaccess.hxx
+++ b/embedserv/source/inc/embeddocaccess.hxx
@@ -28,7 +28,6 @@
#define OLESERV_DEACTIVATE 6
#include <oleidl.h>
-#ifndef __MINGW32__
#pragma warning(disable : 4265)
#if defined __clang__
#pragma clang diagnostic push
@@ -41,7 +40,6 @@
#if defined __clang__
#pragma clang diagnostic pop
#endif
-#endif
#include <cppuhelper/weak.hxx>
class EmbedDocument_Impl;
diff --git a/embedserv/source/inc/embservconst.h b/embedserv/source/inc/embservconst.h
index 332c0abe855f..aca7c8e49728 100644
--- a/embedserv/source/inc/embservconst.h
+++ b/embedserv/source/inc/embservconst.h
@@ -26,22 +26,6 @@
#define SUPPORTED_FACTORIES_NUM 10
-#if defined(__MINGW32__) && !defined(INITGUID)
-extern "C" const GUID DECLSPEC_SELECTANY OID_WriterTextServer;
-extern "C" const GUID DECLSPEC_SELECTANY OID_WriterOASISTextServer;
-
-extern "C" const GUID DECLSPEC_SELECTANY OID_CalcServer;
-extern "C" const GUID DECLSPEC_SELECTANY OID_CalcOASISServer;
-
-extern "C" const GUID DECLSPEC_SELECTANY OID_DrawingServer;
-extern "C" const GUID DECLSPEC_SELECTANY OID_DrawingOASISServer;
-
-extern "C" const GUID DECLSPEC_SELECTANY OID_PresentationServer;
-extern "C" const GUID DECLSPEC_SELECTANY OID_PresentationOASISServer;
-
-extern "C" const GUID DECLSPEC_SELECTANY OID_MathServer;
-extern "C" const GUID DECLSPEC_SELECTANY OID_MathOASISServer;
-#else
extern "C" const GUID DECLSPEC_SELECTANY OID_WriterTextServer = { SO3_SW_OLE_EMBED_CLASSID_60 };
extern "C" const GUID DECLSPEC_SELECTANY OID_WriterOASISTextServer = { SO3_SW_OLE_EMBED_CLASSID_8 };
@@ -56,7 +40,6 @@ extern "C" const GUID DECLSPEC_SELECTANY OID_PresentationOASISServer = { SO3_SIM
extern "C" const GUID DECLSPEC_SELECTANY OID_MathServer = { SO3_SM_OLE_EMBED_CLASSID_60 };
extern "C" const GUID DECLSPEC_SELECTANY OID_MathOASISServer = { SO3_SM_OLE_EMBED_CLASSID_8 };
-#endif
#endif
diff --git a/embedserv/source/inc/stdafx.h b/embedserv/source/inc/stdafx.h
index 06b6606706f6..c056c5bf714a 100644
--- a/embedserv/source/inc/stdafx.h
+++ b/embedserv/source/inc/stdafx.h
@@ -38,11 +38,6 @@
//You may derive a class from CComModule and use it if you want to override
//something, but do not change the name of _Module
extern CComModule _Module;
-#ifdef __MINGW32__
-#include <algorithm>
-using ::std::min;
-using ::std::max;
-#endif
#include <atlcom.h>
#include <atlctl.h>
diff --git a/embedserv/source/inprocserv/dllentry.cxx b/embedserv/source/inprocserv/dllentry.cxx
index 58bc9a3a5c32..a4346eab84c2 100644
--- a/embedserv/source/inprocserv/dllentry.cxx
+++ b/embedserv/source/inprocserv/dllentry.cxx
@@ -21,12 +21,6 @@
#include <stdio.h>
#include <inprocembobj.h>
-#ifdef __MINGW32__
-#define INITGUID
-#define INPROC_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
-#else
-#define INPROC_DLLPUBLIC
-#endif
#include <embservconst.h>
static const GUID* guidList[ SUPPORTED_FACTORIES_NUM ] = {
@@ -163,7 +157,7 @@ protected:
// Entry points
-extern "C" INPROC_DLLPUBLIC BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/ )
+extern "C" BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/ )
{
if (dwReason == DLL_PROCESS_ATTACH)
{
@@ -177,7 +171,7 @@ extern "C" INPROC_DLLPUBLIC BOOL WINAPI DllMain( HINSTANCE hInstance, DWORD dwRe
}
-STDAPI INPROC_DLLPUBLIC DllGetClassObject( REFCLSID rclsid, REFIID riid, LPVOID* ppv )
+STDAPI DllGetClassObject( REFCLSID rclsid, REFIID riid, LPVOID* ppv )
{
for( int nInd = 0; nInd < SUPPORTED_FACTORIES_NUM; nInd++ )
if ( *guidList[nInd] == rclsid )
@@ -194,7 +188,7 @@ STDAPI INPROC_DLLPUBLIC DllGetClassObject( REFCLSID rclsid, REFIID riid, LPVOID*
}
-STDAPI INPROC_DLLPUBLIC DllCanUnloadNow()
+STDAPI DllCanUnloadNow()
{
if ( !g_nObj && !g_nLock )
return S_OK;
@@ -203,7 +197,7 @@ STDAPI INPROC_DLLPUBLIC DllCanUnloadNow()
}
-STDAPI INPROC_DLLPUBLIC DllRegisterServer()
+STDAPI DllRegisterServer()
{
HMODULE aCurModule = GetModuleHandleA( "inprocserv.dll" );
if( aCurModule )
@@ -221,7 +215,7 @@ STDAPI INPROC_DLLPUBLIC DllRegisterServer()
}
-STDAPI INPROC_DLLPUBLIC DllUnregisterServer()
+STDAPI DllUnregisterServer()
{
return WriteLibraryToRegistry( "ole32.dll", 10 );
}
diff --git a/extensions/source/activex/StdAfx2.cxx b/extensions/source/activex/StdAfx2.cxx
index 07efe24c7a0a..c2df5c5c0ef6 100644
--- a/extensions/source/activex/StdAfx2.cxx
+++ b/extensions/source/activex/StdAfx2.cxx
@@ -21,9 +21,6 @@
// stdafx1.pch will be the pre-compiled header
// stdafx1.obj will contain the pre-compiled type information
-#ifdef __MINGW32__
-#define _INIT_ATL_COMMON_VARS
-#endif
#include "StdAfx2.h"
#ifdef _ATL_STATIC_REGISTRY
diff --git a/extensions/source/ole/comifaces.hxx b/extensions/source/ole/comifaces.hxx
index c3957eff1598..87784161e8cd 100644
--- a/extensions/source/ole/comifaces.hxx
+++ b/extensions/source/ole/comifaces.hxx
@@ -23,11 +23,6 @@
using namespace com::sun::star::uno;
-#ifdef __MINGW32__
-DEFINE_GUID(IID_IJScriptValueObject, 0xe40a2331, 0x3bc1, 0x11d4, 0x83, 0x21, 0x00, 0x50, 0x04, 0x52, 0x6a, 0xb4);
-DEFINE_GUID(IID_IUnoObjectWrapper, 0x7B5C3410, 0x66FA, 0x11d4, 0x83, 0x2A, 0x00, 0x50, 0x04, 0x52, 0x6A, 0xB4);
-DEFINE_GUID(IID_IUnoTypeWrapper, 0x8BB66591, 0xA544, 0x4de9, 0x82, 0x2C, 0x57, 0xAB, 0x57, 0xBC, 0xED, 0x1C);
-#endif
MIDL_INTERFACE("e40a2331-3bc1-11d4-8321-005004526ab4")
IJScriptValueObject: public IUnknown
{
diff --git a/extensions/source/ole/oledll.cxx b/extensions/source/ole/oledll.cxx
index 62064e8b173e..c7f91ee7d9a1 100644
--- a/extensions/source/ole/oledll.cxx
+++ b/extensions/source/ole/oledll.cxx
@@ -37,9 +37,6 @@
#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
#endif
-#ifdef __MINGW32__
-#define _INIT_ATL_COMMON_VARS
-#endif
#include <atlbase.h>
static CComModule _Module;
#include <atlcom.h>
diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx
index fa5bfefbf2d6..d0f6f0f2e09e 100644
--- a/extensions/source/ole/oleobjw.cxx
+++ b/extensions/source/ole/oleobjw.cxx
@@ -949,11 +949,7 @@ Any IUnknownWrapper_Impl::invokeWithDispIdUnoTlb(const OUString& sFunctionName,
if( SUCCEEDED( CComObject<JScriptOutParam>::CreateInstance( &pParamObject)))
{
CComPtr<IUnknown> pUnk(pParamObject->GetUnknown());
-#ifdef __MINGW32__
- CComQIPtr<IDispatch, &__uuidof(IDispatch)> pDisp( pUnk);
-#else
CComQIPtr<IDispatch> pDisp( pUnk);
-#endif
pVarParams[ parameterCount - i -1].vt= VT_DISPATCH;
pVarParams[ parameterCount - i -1].pdispVal= pDisp;
@@ -1178,11 +1174,7 @@ void SAL_CALL IUnknownWrapper_Impl::initialize( const Sequence< Any >& aArgument
OSL_ASSERT(aArguments.getLength() == 3);
m_spUnknown= *static_cast<IUnknown* const *>(aArguments[0].getValue());
-#ifdef __MINGW32__
- m_spUnknown->QueryInterface(IID_IDispatch, reinterpret_cast<LPVOID*>( & m_spDispatch.p));
-#else
m_spUnknown.QueryInterface( & m_spDispatch.p);
-#endif
aArguments[1] >>= m_bOriginalDispatch;
aArguments[2] >>= m_seqTypes;
diff --git a/extensions/source/ole/servprov.cxx b/extensions/source/ole/servprov.cxx
index 30fea73db39e..28d64cf5664e 100644
--- a/extensions/source/ole/servprov.cxx
+++ b/extensions/source/ole/servprov.cxx
@@ -19,13 +19,8 @@
#include <vector>
-#ifdef __MINGW32__
-#define INITGUID
-#include <initguid.h>
-#else
#include "ole2uno.hxx"
#include "unoconversionutilities.hxx"
-#endif
#include "servprov.hxx"
#include "unoobjw.hxx"
#include "oleobjw.hxx"
diff --git a/extensions/source/ole/unoconversionutilities.hxx b/extensions/source/ole/unoconversionutilities.hxx
index 430064f24aa4..93ab6bef8baa 100644
--- a/extensions/source/ole/unoconversionutilities.hxx
+++ b/extensions/source/ole/unoconversionutilities.hxx
@@ -57,10 +57,6 @@ typedef unsigned char BYTE;
using namespace com::sun::star::script;
using namespace com::sun::star::beans;
using namespace com::sun::star::uno;
-#ifdef __MINGW32__
-using namespace com::sun::star::bridge;
-using namespace com::sun::star::bridge::ModelDependent;
-#endif
using namespace com::sun::star::bridge::oleautomation;
namespace ole_adapter
{
@@ -85,10 +81,6 @@ typedef std::unordered_map<sal_uIntPtr, WeakReference<XInterface> >::const_itera
extern std::unordered_map<sal_uIntPtr, WeakReference<XInterface> > UnoObjToWrapperMap;
typedef std::unordered_map<sal_uIntPtr, WeakReference<XInterface> >::iterator IT_Uno;
typedef std::unordered_map<sal_uIntPtr, WeakReference<XInterface> >::const_iterator CIT_Uno;
-#ifdef __MINGW32__
-inline void reduceRange( Any& any);
-#endif
-
// createUnoObjectWrapper gets a wrapper instance by calling createUnoWrapperInstance
// and initializes it via XInitialization. The wrapper object is required to implement
@@ -1523,11 +1515,7 @@ void UnoConversionUtilities<T>::variantToAny( const VARIANT* pVariant, Any& rAny
case VT_DISPATCH:
{
//check if it is a UNO type
-#ifdef __MINGW32__
- CComQIPtr<IUnoTypeWrapper, &__uuidof(IUnoTypeWrapper)> spType((IUnknown*) var.byref);
-#else
CComQIPtr<IUnoTypeWrapper> spType(static_cast<IUnknown*>(var.byref));
-#endif
if (spType)
{
CComBSTR sName;
@@ -1669,21 +1657,13 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type&
{
spUnknown = pVar->punkVal;
if (spUnknown)
-#ifdef __MINGW32__
- spUnknown->QueryInterface( IID_IDispatch, reinterpret_cast<LPVOID*>( & spDispatch.p));
-#else
spUnknown.QueryInterface( & spDispatch.p);
-#endif
}
else if (pVar->vt == VT_DISPATCH && pVar->pdispVal != nullptr)
{
CComPtr<IDispatch> spDispatch2(pVar->pdispVal);
if (spDispatch2)
-#ifdef __MINGW32__
- spDispatch2->QueryInterface( IID_IUnknown, reinterpret_cast<LPVOID*>( & spUnknown.p));
-#else
spDispatch2.QueryInterface( & spUnknown.p);
-#endif
}
static Type VOID_TYPE= Type();
@@ -1725,11 +1705,7 @@ Any UnoConversionUtilities<T>::createOleObjectWrapper(VARIANT* pVar, const Type&
// Check if "spUnknown" is a UNO wrapper, that is an UNO object that has been
// passed to COM. Then it supports IUnoObjectWrapper
// and we extract the original UNO object.
-#ifdef __MINGW32__
- CComQIPtr<IUnoObjectWrapper, &__uuidof(IUnoObjectWrapper)> spUno( spUnknown);
-#else
CComQIPtr<IUnoObjectWrapper> spUno( spUnknown);
-#endif
if( spUno)
{ // it is a wrapper
Reference<XInterface> xInt;
diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx
index 60cb7d4cb572..d8d0d1944122 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -561,11 +561,7 @@ static bool writeBackOutParameter2( VARIANTARG* pDest, VARIANT* pSource)
CComPtr<IDispatch> spDispDest(varDest.pdispVal);
// special Handling for a JScriptValue object
-#ifdef __MINGW32__
- CComQIPtr<IJScriptValueObject, &__uuidof(IJScriptValueObject)> spValueDest(spDispDest);
-#else
CComQIPtr<IJScriptValueObject> spValueDest(spDispDest);
-#endif
if (spValueDest)
{
VARIANT_BOOL varBool= VARIANT_FALSE;
@@ -584,11 +580,7 @@ static bool writeBackOutParameter2( VARIANTARG* pDest, VARIANT* pSource)
// of a property if it does not exist already. This is convenient for
// out parameters in JScript. Then the user must not specify propery "0"
// explicitly
-#ifdef __MINGW32__
- CComQIPtr<IDispatchEx, &__uuidof(IDispatchEx)> spDispEx( spDispDest);
-#else
CComQIPtr<IDispatchEx> spDispEx( spDispDest);
-#endif
if( spDispEx)
{
CComBSTR nullProp(L"0");
@@ -1074,11 +1066,7 @@ HRESULT InterfaceOleWrapper_Impl::InvokeGeneral( DISPID dispidMember, unsigned s
{
pValue->AddRef();
pvarResult->vt= VT_DISPATCH;
-#ifdef __MINGW32__
- pvarResult->pdispVal= CComQIPtr<IDispatch, &__uuidof(IDispatch)>(pValue->GetUnknown());
-#else
pvarResult->pdispVal= CComQIPtr<IDispatch>(pValue->GetUnknown());
-#endif
ret= S_OK;
}
else
diff --git a/extensions/source/ole/unotypewrapper.cxx b/extensions/source/ole/unotypewrapper.cxx
index 3d10e7675380..ef576a11aaa4 100644
--- a/extensions/source/ole/unotypewrapper.cxx
+++ b/extensions/source/ole/unotypewrapper.cxx
@@ -32,17 +32,9 @@ bool createUnoTypeWrapper(BSTR sTypeName, VARIANT * pVar)
{
pObj->AddRef();
pVar->vt= VT_DISPATCH;
-#ifdef __MINGW32__
- pVar->pdispVal= CComQIPtr<IDispatch, &__uuidof(IDispatch)>(pObj->GetUnknown());
-#else
pVar->pdispVal= CComQIPtr<IDispatch>(pObj->GetUnknown());
-#endif
//now set the value, e.i. the name of the type
-#ifdef __MINGW32__
- CComQIPtr<IUnoTypeWrapper, &__uuidof(IUnoTypeWrapper)> spType(pVar->pdispVal);
-#else
CComQIPtr<IUnoTypeWrapper> spType(pVar->pdispVal);
-#endif
OSL_ASSERT(spType);
if (SUCCEEDED(spType->put_Name(sTypeName)))
{
diff --git a/extensions/source/update/check/onlinecheck.cxx b/extensions/source/update/check/onlinecheck.cxx
index 3207647447f0..1568f848a2ed 100644
--- a/extensions/source/update/check/onlinecheck.cxx
+++ b/extensions/source/update/check/onlinecheck.cxx
@@ -41,9 +41,7 @@ extern "C" bool SAL_CALL WNT_hasInternetConnection()
DWORD dwFlags;
TCHAR szConnectionName[1024];
-#ifndef __MINGW32__
__try {
-#endif
BOOL fIsConnected = InternetGetConnectedStateEx(
&dwFlags,
szConnectionName,
@@ -52,11 +50,9 @@ extern "C" bool SAL_CALL WNT_hasInternetConnection()
return fIsConnected;
-#ifndef __MINGW32__
} __except( EXCEPTION_EXECUTE_HANDLER ) {
return false;
}
-#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 52950c2686ff..d83560d35ed5 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -9,10 +9,6 @@
$(eval $(call gb_Module_Module,external))
-ifeq ($(OS)$(COM),WNTGCC)
-$(eval $(call gb_Module_add_moduledir,external,mingw-externals))
-endif
-
ifeq ($(COM),MSC)
$(eval $(call gb_Module_add_moduledir,external,msc-externals))
endif
diff --git a/external/breakpad/Module_breakpad.mk b/external/breakpad/Module_breakpad.mk
index be910538fd58..aeb3c42a9d6d 100644
--- a/external/breakpad/Module_breakpad.mk
+++ b/external/breakpad/Module_breakpad.mk
@@ -13,7 +13,7 @@ $(eval $(call gb_Module_add_targets,breakpad,\
UnpackedTarball_breakpad \
))
-ifneq ($(OS)$(COM),WNTMSC)
+ifneq ($(OS),WNT)
$(eval $(call gb_Module_add_targets,breakpad,\
ExternalProject_breakpad \
))
diff --git a/external/cairo/ExternalProject_cairo.mk b/external/cairo/ExternalProject_cairo.mk
index 55434fce2a87..4938694151de 100644
--- a/external/cairo/ExternalProject_cairo.mk
+++ b/external/cairo/ExternalProject_cairo.mk
@@ -26,7 +26,7 @@ $(eval $(call gb_ExternalProject_register_targets,cairo,\
build \
))
-ifeq ($(OS)$(COM),WNTMSC)
+ifeq ($(OS),WNT)
$(call gb_ExternalProject_get_state_target,cairo,build) :
$(call gb_ExternalProject_run,build,\
diff --git a/external/cairo/ExternalProject_pixman.mk b/external/cairo/ExternalProject_pixman.mk
index 33a4b8d150e5..6dd2d6bed867 100644
--- a/external/cairo/ExternalProject_pixman.mk
+++ b/external/cairo/ExternalProject_pixman.mk
@@ -13,7 +13,7 @@ $(eval $(call gb_ExternalProject_register_targets,pixman,\
build \
))
-ifeq ($(OS)$(COM),WNTMSC)
+ifeq ($(OS),WNT)
$(call gb_ExternalProject_get_state_target,pixman,build) :
$(call gb_ExternalProject_run,build,\
diff --git a/external/cairo/UnpackedTarball_pixman.mk b/external/cairo/UnpackedTarball_pixman.mk
index d5a8907cd95e..777a47cc30fd 100644
--- a/external/cairo/UnpackedTarball_pixman.mk
+++ b/external/cairo/UnpackedTarball_pixman.mk
@@ -15,7 +15,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,pixman,\
external/cairo/pixman/pixman-0.24.4.patch \
))
-ifeq ($(OS)$(COM),WNTMSC)
+ifeq ($(OS),WNT)
$(eval $(call gb_UnpackedTarball_add_file,pixman,pixman,external/cairo/pixman/Makefile.win32.common))
endif
diff --git a/external/clucene/UnpackedTarball_clucene.mk b/external/clucene/UnpackedTarball_clucene.mk
index fa4689d4b315..a878947b0871 100644
--- a/external/clucene/UnpackedTarball_clucene.mk
+++ b/external/clucene/UnpackedTarball_clucene.mk
@@ -50,15 +50,7 @@ endif
ifeq ($(OS),WNT)
$(eval $(call gb_UnpackedTarball_add_file,clucene,src/shared/CLucene/_clucene-config.h,external/clucene/configs/_clucene-config-MSVC.h))
-ifeq ($(COM),MSC)
$(eval $(call gb_UnpackedTarball_add_file,clucene,src/shared/CLucene/clucene-config.h,external/clucene/configs/clucene-config-MSVC.h))
-else
-ifeq ($(HAVE_GCC_BUILTIN_ATOMIC),TRUE)
-$(eval $(call gb_UnpackedTarball_add_file,clucene,src/shared/CLucene/clucene-config.h,external/clucene/configs/clucene-config-MINGW-atomic.h))
-else
-$(eval $(call gb_UnpackedTarball_add_file,clucene,src/shared/CLucene/clucene-config.h,external/clucene/configs/clucene-config-MINGW.h))
-endif
-endif
else # ! $(OS),WNT
ifeq ($(HAVE_GCC_BUILTIN_ATOMIC),TRUE)
$(eval $(call gb_UnpackedTarball_add_file,clucene,src/shared/CLucene/clucene-config.h,external/clucene/configs/clucene-config-GCC-atomic.h))
diff --git a/external/clucene/configs/clucene-config-MINGW-atomic.h b/external/clucene/configs/clucene-config-MINGW-atomic.h
deleted file mode 100644
index 4b77b69ff8c5..000000000000
--- a/external/clucene/configs/clucene-config-MINGW-atomic.h
+++ /dev/null
@@ -1,150 +0,0 @@
-#ifndef _SRC_CLUCENE_CLUCENE_CONFIG_H
-#define _SRC_CLUCENE_CLUCENE_CONFIG_H 1
-
-/* src/shared/CLucene/clucene-config.h.
-* Normally generated automatically at end of cmake,
-* but here in LibreOffice this actually is a copy of
-* clucene/configs/clucene-config-MINGW-atomic.h.
-*/
-
-/* CMake will look for these headers: */
-#define _CL_HAVE_STRING_H 1
-#define _CL_HAVE_MEMORY_H 1
-/* #undef _CL_HAVE_UNISTD_H */
-#define _CL_HAVE_IO_H 1
-#define _CL_HAVE_DIRECT_H 1
-/* #undef _CL_HAVE_DIRENT_H */
-/* #undef _CL_HAVE_SYS_DIR_H */
-/* #undef _CL_HAVE_SYS_NDIR_H */
-#define _CL_HAVE_ERRNO_H 1
-#define _CL_HAVE_WCHAR_H 1
-#define _CL_HAVE_WCTYPE_H
-#define _CL_HAVE_CTYPE_H 1
-#define _CL_HAVE_WINDOWS_H 1
-/* #undef _CL_HAVE_WINDEF_H */
-#define _CL_HAVE_SYS_TYPES_H 1
-/* #undef _CL_HAVE_DLFCN_H */
-/* #undef _CL_HAVE_EXT_HASH_MAP */
-/* #undef _CL_HAVE_EXT_HASH_SET */
-/* #undef _CL_HAVE_TR1_UNORDERED_MAP */
-/* #undef _CL_HAVE_TR1_UNORDERED_SET */
-/* #undef _CL_HAVE_HASH_MAP */
-/* #undef _CL_HAVE_HASH_SET */
-/* #undef _CL_HAVE_NDIR_H */
-#define _CL_HAVE_SYS_STAT_H 1
-#define _CL_HAVE_SYS_TIMEB_H 1
-/* #undef _CL_HAVE_SYS_TIME_H */
-#define _CL_HAVE_TCHAR_H 1
-/* #undef _CL_HAVE_SYS_MMAN_H */
-#define _CL_HAVE_WINERROR_H 1
-/* #undef _CL_HAVE_STDINT_H */
-
-// our needed types
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
-
-/* undef float_t*/
-typedef unsigned long _cl_dword_t;
-/* undef size_t size_t */
-
-/* tchar & _T definitions... */
-/* undef TCHAR TCHAR */
-/* #undef _T */
-
-/* CMake will determine these specifics. Things like bugs, etc */
-
-/* if we can't support the map/set hashing */
-/* #undef LUCENE_DISABLE_HASHING */
-
-/* Define if you have POSIX threads libraries and header files. */
-/* #undef _CL_HAVE_PTHREAD */
-
-/* Define if you have Win32 threads libraries and header files. */
-#define _CL_HAVE_WIN32_THREADS 1
-
-/* Define if we have gcc atomic functions */
-#define _CL_HAVE_GCC_ATOMIC_FUNCTIONS 1
-
-/* Define what eval method is required for float_t to be defined (for GCC). */
-/* #undef _FLT_EVAL_METHOD */
-
-/* If we use hashmaps, which namespace do we use: */
-#define CL_NS_HASHING(func)
-/* If we use hashmaps, which classes do we use: */
-#define _CL_HASH_MAP
-#define _CL_HASH_SET
-
-/* define if the compiler implements namespaces */
-#define _CL_HAVE_NAMESPACES
-
-/* Defined if the snprintf overflow test fails */
-/* #undef _CL_HAVE_SNPRINTF_BUG */
-
-/* Defined if the swprintf test fails */
-/* #undef _CL_HAVE_SNWPRINTF_BUG */
-
-/* How to define a static const in a class */
-#define LUCENE_STATIC_CONSTANT(type, assignment) static const type assignment
-
-/* Define to the necessary symbol if this constant uses a non-standard name on
- your system. */
-//todo: not checked
-/* #undef _CL_PTHREAD_CREATE_JOINABLE */
-
-/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
-//todo: not being checked for...
-/* #undef _CL_STAT_MACROS_BROKEN */
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-//not actually used for anything...
-/* #undef _CL_TIME_WITH_SYS_TIME */
-
-/* Define that we will be using -fvisibility=hidden, and
- * make public classes visible using __attribute__ ((visibility("default")))
- */
-/* #undef _CL_HAVE_GCCVISIBILITYPATCH */
-
-
-/* Versions, etc */
-
-/* Name of package */
-#define _CL_PACKAGE "clucene-core"
-
-/* Version number of package */
-#define _CL_VERSION "2.3.3.4"
-
-/* So-Version number of package */
-#define _CL_SOVERSION "1"
-
-/* A comparable version number */
-#define _CL_INT_VERSION 2030304
-
-/* Configured options (from command line) */
-
-/* Forces into Ascii mode */
-/* #undef _ASCII */
-
-/* Conditional Debugging */
-/* #undef _CL__CND_DEBUG */
-
-/* debuging option */
-/* #undef _DEBUG */
-
-/* Disable multithreading */
-/* #undef _CL_DISABLE_MULTITHREADING */
-
-
-#ifdef __BORLANDC__ //borland compiler
- //todo: bcc incorrectly detects this... fix this in cmake
- #undef LUCENE_STATIC_CONSTANT
- #define LUCENE_STATIC_CONSTANT(type, assignment) enum { assignment }
-#endif
-
-
-#endif
diff --git a/external/clucene/configs/clucene-config-MINGW.h b/external/clucene/configs/clucene-config-MINGW.h
deleted file mode 100644
index 009505edcf33..000000000000
--- a/external/clucene/configs/clucene-config-MINGW.h
+++ /dev/null
@@ -1,150 +0,0 @@
-#ifndef _SRC_CLUCENE_CLUCENE_CONFIG_H
-#define _SRC_CLUCENE_CLUCENE_CONFIG_H 1
-
-/* src/shared/CLucene/clucene-config.h.
-* Normally generated automatically at end of cmake,
-* but here in LibreOffice this actually is a copy of
-* clucene/configs/clucene-config-MINGW.h.
-*/
-
-/* CMake will look for these headers: */
-#define _CL_HAVE_STRING_H 1
-#define _CL_HAVE_MEMORY_H 1
-/* #undef _CL_HAVE_UNISTD_H */
-#define _CL_HAVE_IO_H 1
-#define _CL_HAVE_DIRECT_H 1
-/* #undef _CL_HAVE_DIRENT_H */
-/* #undef _CL_HAVE_SYS_DIR_H */
-/* #undef _CL_HAVE_SYS_NDIR_H */
-#define _CL_HAVE_ERRNO_H 1
-#define _CL_HAVE_WCHAR_H 1
-#define _CL_HAVE_WCTYPE_H
-#define _CL_HAVE_CTYPE_H 1
-#define _CL_HAVE_WINDOWS_H 1
-/* #undef _CL_HAVE_WINDEF_H */
-#define _CL_HAVE_SYS_TYPES_H 1
-/* #undef _CL_HAVE_DLFCN_H */
-/* #undef _CL_HAVE_EXT_HASH_MAP */
-/* #undef _CL_HAVE_EXT_HASH_SET */
-/* #undef _CL_HAVE_TR1_UNORDERED_MAP */
-/* #undef _CL_HAVE_TR1_UNORDERED_SET */
-/* #undef _CL_HAVE_HASH_MAP */
-/* #undef _CL_HAVE_HASH_SET */
-/* #undef _CL_HAVE_NDIR_H */
-#define _CL_HAVE_SYS_STAT_H 1
-#define _CL_HAVE_SYS_TIMEB_H 1
-/* #undef _CL_HAVE_SYS_TIME_H */
-#define _CL_HAVE_TCHAR_H 1
-/* #undef _CL_HAVE_SYS_MMAN_H */
-#define _CL_HAVE_WINERROR_H 1
-/* #undef _CL_HAVE_STDINT_H */
-
-// our needed types
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
-typedef signed short int16_t;
-typedef unsigned short uint16_t;
-typedef signed int int32_t;
-typedef unsigned int uint32_t;
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
-
-/* undef float_t*/
-typedef unsigned long _cl_dword_t;
-/* undef size_t size_t */
-
-/* tchar & _T definitions... */
-/* undef TCHAR TCHAR */
-/* #undef _T */
-
-/* CMake will determine these specifics. Things like bugs, etc */
-
-/* if we can't support the map/set hashing */
-/* #undef LUCENE_DISABLE_HASHING */
-
-/* Define if you have POSIX threads libraries and header files. */
-/* #undef _CL_HAVE_PTHREAD */
-
-/* Define if you have Win32 threads libraries and header files. */
-#define _CL_HAVE_WIN32_THREADS 1
-
-/* Define if we have gcc atomic functions */
-/* #undef _CL_HAVE_GCC_ATOMIC_FUNCTIONS */
-
-/* Define what eval method is required for float_t to be defined (for GCC). */
-/* #undef _FLT_EVAL_METHOD */
-
-/* If we use hashmaps, which namespace do we use: */
-#define CL_NS_HASHING(func)
-/* If we use hashmaps, which classes do we use: */
-#define _CL_HASH_MAP
-#define _CL_HASH_SET
-
-/* define if the compiler implements namespaces */
-#define _CL_HAVE_NAMESPACES
-
-/* Defined if the snprintf overflow test fails */
-/* #undef _CL_HAVE_SNPRINTF_BUG */
-
-/* Defined if the swprintf test fails */
-/* #undef _CL_HAVE_SNWPRINTF_BUG */
-
-/* How to define a static const in a class */
-#define LUCENE_STATIC_CONSTANT(type, assignment) static const type assignment
-
-/* Define to the necessary symbol if this constant uses a non-standard name on
- your system. */
-//todo: not checked
-/* #undef _CL_PTHREAD_CREATE_JOINABLE */
-
-/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
-//todo: not being checked for...
-/* #undef _CL_STAT_MACROS_BROKEN */
-
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-//not actually used for anything...
-/* #undef _CL_TIME_WITH_SYS_TIME */
-
-/* Define that we will be using -fvisibility=hidden, and
- * make public classes visible using __attribute__ ((visibility("default")))
- */
-/* #undef _CL_HAVE_GCCVISIBILITYPATCH */
-
-
-/* Versions, etc */
-
-/* Name of package */
-#define _CL_PACKAGE "clucene-core"
-
-/* Version number of package */
-#define _CL_VERSION "2.3.3.4"
-
-/* So-Version number of package */
-#define _CL_SOVERSION "1"
-
-/* A comparable version number */
-#define _CL_INT_VERSION 2030304
-
-/* Configured options (from command line) */
-
-/* Forces into Ascii mode */
-/* #undef _ASCII */
-
-/* Conditional Debugging */
-/* #undef _CL__CND_DEBUG */
-
-/* debuging option */
-/* #undef _DEBUG */
-
-/* Disable multithreading */
-/* #undef _CL_DISABLE_MULTITHREADING */
-
-
-#ifdef __BORLANDC__ //borland compiler
- //todo: bcc incorrectly detects this... fix this in cmake
- #undef LUCENE_STATIC_CONSTANT
- #define LUCENE_STATIC_CONSTANT(type, assignment) enum { assignment }
-#endif
-
-
-#endif
diff --git a/external/cppunit/ExternalProject_cppunit.mk b/external/cppunit/ExternalProject_cppunit.mk
index 730d17c050fb..a11cc277cefa 100644
--- a/external/cppunit/ExternalProject_cppunit.mk
+++ b/external/cppunit/ExternalProject_cppunit.mk
@@ -13,7 +13,7 @@ $(eval $(call gb_ExternalProject_register_targets,cppunit,\
build \
))
-ifeq ($(OS)$(COM),WNTMSC)
+ifeq ($(OS),WNT)
$(call gb_ExternalProject_get_state_target,cppunit,build) :
$(call gb_ExternalProject_run,build,\
PROFILEFLAGS="$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
@@ -34,10 +34,6 @@ cppunit_CXXFLAGS+=-D_GLIBCXX_DEBUG
endif
endif
-ifeq ($(OS)-$(COM),WNT-GCC)
-cppunit_CXXFLAGS+=-mthreads
-endif
-
ifneq (,$(debug))
cppunit_CXXFLAGS+=-g
endif
diff --git a/external/curl/ExternalPackage_curl.mk b/external/curl/ExternalPackage_curl.mk
index 2de52db1b741..18907f4e5a54 100644
--- a/external/curl/ExternalPackage_curl.mk
+++ b/external/curl/ExternalPackage_curl.mk
@@ -13,9 +13,7 @@ $(eval $(call gb_ExternalPackage_use_external_project,curl,curl))
ifneq ($(DISABLE_DYNLOADING),TRUE)
-ifeq ($(OS)$(COM),WNTGCC)
-$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.dll,lib/.libs/libcurl.dll))
-else ifeq ($(COM),MSC)
+ifeq ($(COM),MSC)
$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),d).dll,lib/$(if $(MSVC_USE_DEBUG_RUNTIME),debug-dll,release-dll)/libcurl$(if $(MSVC_USE_DEBUG_RUNTIME),d).dll))
else ifeq ($(OS),MACOSX)
$(eval $(call gb_ExternalPackage_add_file,curl,$(LIBO_LIB_FOLDER)/libcurl.4.dylib,lib/.libs/libcurl.4.dylib))
diff --git a/external/curl/ExternalProject_curl.mk b/external/curl/ExternalProject_curl.mk
index 48d0b6a8e6bb..f57efc07fd73 100644
--- a/external/curl/ExternalProject_curl.mk
+++ b/external/curl/ExternalProject_curl.mk
@@ -60,21 +60,6 @@ $(call gb_ExternalProject_get_state_target,curl,build):
&& $(MAKE) \
)
-else ifeq ($(OS)$(COM),WNTGCC)
-
-$(call gb_ExternalProject_get_state_target,curl,build):
- $(call gb_ExternalProject_run,build,\
- ./configure --with-nss --without-ssl --enable-ftp --enable-ipv6 --disable-http --disable-gopher \
- --disable-file --disable-ldap --disable-telnet --disable-dict --build=i586-pc-mingw32 --host=i586-pc-mingw32 \
- $(if $(ENABLE_DEBUG),--enable-debug) \
- CC="$(CC) -mthreads $(if $(MINGW_SHARED_GCCLIB),-shared-libgcc)" \
- LIBS="-lws2_32 -lwinmm $(if $(MINGW_SHARED_GXXLIB),$(MINGW_SHARED_LIBSTDCPP))" \
- LDFLAGS="$(patsubst ;, -L,$(ILIB))" \
- CPPFLAGS="$(INCLUDE)" OBJDUMP="objdump" \
- && cd lib \
- && $(MAKE) \
- )
-
else ifeq ($(COM),MSC)
$(call gb_ExternalProject_get_state_target,curl,build):
diff --git a/external/curl/UnpackedTarball_curl.mk b/external/curl/UnpackedTarball_curl.mk
index 536474d4a30b..3e88d5f771f1 100644
--- a/external/curl/UnpackedTarball_curl.mk
+++ b/external/curl/UnpackedTarball_curl.mk
@@ -20,7 +20,6 @@ $(eval $(call gb_UnpackedTarball_fix_end_of_line,curl,\
$(eval $(call gb_UnpackedTarball_add_patches,curl,\
external/curl/curl-msvc.patch.1 \
external/curl/curl-msvc-schannel.patch.1 \
- external/curl/curl-7.26.0_mingw.patch \
external/curl/curl-7.26.0_win-proxy.patch \
external/curl/curl-xp.patch.1 \
))
diff --git a/external/curl/curl-7.26.0_mingw.patch b/external/curl/curl-7.26.0_mingw.patch
deleted file mode 100644
index be9a20cac358..000000000000
--- a/external/curl/curl-7.26.0_mingw.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/lib/curl_setup.h 2009-10-29 05:21:58.000000000 +0900
-+++ b/lib/curl_setup.h 2010-03-02 06:03:10.009500000 +0900
-@@ -40,6 +40,21 @@
-
- #include "curl_config.h"
-
-+#ifdef __MINGW32__
-+#undef HAVE_DLFCN_H
-+#define HAVE_GETHOSTBYADDR 1
-+#define HAVE_GETHOSTBYNAME 1
-+#undef HAVE_LIBZ
-+#undef HAVE_NETDB_H
-+#undef HAVE_POLL_H
-+#undef HAVE_SYS_IOCTL_H
-+#undef HAVE_SYS_POLL_H
-+#undef HAVE_SYS_UIO_H
-+#undef HAVE_TERMIOS_H
-+#undef HAVE_TERMIO_H
-+#undef HAVE_ZLIB_H
-+#endif
-+
- #else /* HAVE_CONFIG_H */
-
- #ifdef _WIN32_WCE
diff --git a/external/expat/Module_expat.mk b/external/expat/Module_expat.mk
index ab39cdaf8dc5..baac0b595e20 100644
--- a/external/expat/Module_expat.mk
+++ b/external/expat/Module_expat.mk
@@ -14,14 +14,7 @@ $(eval $(call gb_Module_add_targets,expat,\
StaticLibrary_expat \
))
-# Actually it wasn't that clear if we should
-# run configure step on mingw or not:
-# CONFIGURATION_ACTION wasn't set, but
-# CROSS_COMPILE case was handled in original makefile
-
-# tested it on mingw and it doesn't hurt ;-)
-#ifneq ($(OS),WNT)
-ifneq ($(OS)$(COM),WNTMSC)
+ifneq ($(OS),WNT)
$(eval $(call gb_Module_add_targets,expat,\
ExternalProject_expat \
))
diff --git a/external/expat/StaticLibrary_expat.mk b/external/expat/StaticLibrary_expat.mk
index 4d6957f9ef52..bdcc767e2905 100644
--- a/external/expat/StaticLibrary_expat.mk
+++ b/external/expat/StaticLibrary_expat.mk
@@ -14,7 +14,7 @@ $(eval $(call gb_StaticLibrary_set_warnings_not_errors,expat))
$(eval $(call gb_StaticLibrary_use_unpacked,expat,expat))
# no configure step on windows, no dependency
-ifneq ($(OS)$(COM),WNTMSC)
+ifneq ($(OS),WNT)
$(eval $(call gb_StaticLibrary_use_external_project,expat,expat,full))
endif
diff --git a/external/firebird/ExternalPackage_firebird.mk b/external/firebird/ExternalPackage_firebird.mk
index 6505eda1064f..87df3567e932 100644
--- a/external/firebird/ExternalPackage_firebird.mk
+++ b/external/firebird/ExternalPackage_firebird.mk
@@ -11,7 +11,7 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,firebird,firebird))
$(eval $(call gb_ExternalPackage_use_external_project,firebird,firebird))
-ifeq ($(OS)-$(COM),WNT-MSC)
+ifeq ($(OS),WNT)
$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/ifbclient.dll,gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/bin/ifbclient.dll))
$(eval $(call gb_ExternalPackage_add_file,firebird,$(LIBO_LIB_FOLDER)/Engine12.dll,gen/$(if $(ENABLE_DEBUG),Debug,Release)/firebird/plugins/Engine12.dll))
else ifeq ($(OS),MACOSX)
diff --git a/external/firebird/UnpackedTarball_firebird.mk b/external/firebird/UnpackedTarball_firebird.mk
index e30048d4e69b..3cd7a42a0772 100644
--- a/external/firebird/UnpackedTarball_firebird.mk
+++ b/external/firebird/UnpackedTarball_firebird.mk
@@ -25,7 +25,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\
external/firebird/0002-Backported-fix-for-CORE-5452-Segfault-when-engine-s-.patch.1 \
))
-ifeq ($(OS)-$(COM),WNT-MSC)
+ifeq ($(OS),WNT)
$(eval $(call gb_UnpackedTarball_add_patches,firebird,\
external/firebird/firebird-cygwin-msvc.patch \
))
diff --git a/external/freetype/ExternalProject_freetype.mk b/external/freetype/ExternalProject_freetype.mk
index 1980637cd6de..46c7972d0601 100644
--- a/external/freetype/ExternalProject_freetype.mk
+++ b/external/freetype/ExternalProject_freetype.mk
@@ -13,7 +13,7 @@ $(eval $(call gb_ExternalProject_register_targets,freetype,\
build \
))
-ifeq ($(OS)$(COM),WNTMSC)
+ifeq ($(OS),WNT)
$(call gb_ExternalProject_get_state_target,freetype,build) :
$(call gb_ExternalProject_run,build,\
cd ../builds/win32/vc2010/ && \
diff --git a/external/hunspell/ExternalProject_hunspell.mk b/external/hunspell/ExternalProject_hunspell.mk
index 274778a088a9..4c3b74d5965c 100644
--- a/external/hunspell/ExternalProject_hunspell.mk
+++ b/external/hunspell/ExternalProject_hunspell.mk
@@ -33,7 +33,6 @@ $(call gb_ExternalProject_get_state_target,hunspell,build):
$(SHELL) ./configure --disable-shared --disable-nls --with-pic \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM))\
$(if $(filter AIX,$(OS)),CFLAGS="-D_LINUX_SOURCE_COMPAT") \
- $(if $(filter-out WNTGCC,$(OS)$(COM)),,LDFLAGS="-Wl,--enable-runtime-pseudo-reloc-v2") \
CXXFLAGS="$(hunspell_CXXFLAGS)" \
&& cd src/hunspell && $(MAKE) \
)
diff --git a/external/icu/ExternalProject_icu.mk b/external/icu/ExternalProject_icu.mk
index 4ff3b9fa5937..646b10b40155 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -18,7 +18,6 @@ icu_CPPFLAGS:="-DHAVE_GCC_ATOMICS=$(if $(filter TRUE,$(GCC_HAVE_BUILTIN_ATOMIC))
ifeq ($(OS),WNT)
# Note: runConfigureICU ignores everything following the platform name!
-ifeq ($(COM),MSC)
$(call gb_ExternalProject_get_state_target,icu,build) :
$(call gb_ExternalProject_run,build,\
export LIB="$(ILIB)" \
@@ -29,23 +28,6 @@ $(call gb_ExternalProject_get_state_target,icu,build) :
Cygwin/MSVC \
&& $(MAKE) \
,source)
-else
-$(call gb_ExternalProject_get_state_target,icu,build) :
- $(call gb_ExternalProject_run,build,\
- CPPFLAGS=$(icu_CPPFLAGS) CFLAGS="-O -D_MT" CXXFLAGS="-O -D_MT" \
- LIBS="$(if $(MINGW_SHARED_GXXLIB),$(MINGW_SHARED_LIBSTDCPP))" \
- LDFLAGS="-L$(COMPATH)/lib -Wl$(COMMA)--enable-runtime-pseudo-reloc-v2 \
- $(if $(MINGW_SHARED_GCCLIB),-shared-libgcc)" \
- ./configure \
- $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
- --with-cross-build=$(WORKDIR_FOR_BUILD)/UnpackedTarball/icu/source) \
- --disable-layout --disable-static --enable-shared --disable-samples \
- && $(MAKE) \
- && for lib in icudata icuin icuuc; do \
- touch $$lib; \
- done \
- ,source)
-endif
else # $(OS)
diff --git a/external/lcms2/ExternalProject_lcms2.mk b/external/lcms2/ExternalProject_lcms2.mk
index 86791ddfbf17..e307a30f4a31 100644
--- a/external/lcms2/ExternalProject_lcms2.mk
+++ b/external/lcms2/ExternalProject_lcms2.mk
@@ -31,7 +31,6 @@ $(call gb_ExternalProject_get_state_target,lcms2,build):
$(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no)) \
CPPFLAGS=" $(SOLARINC)" \
CFLAGS='$(CFLAGS) $(if $(debug),$(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS),$(gb_COMPILEROPTFLAGS))' \
- $(if $(filter-out WNTGCC,$(OS)$(COM)),,CPPFLAGS=" -DCMS_DLL_BUILD") \
$(if $(DISABLE_DYNLOADING), \
--enable-static --disable-shared \
, \
diff --git a/external/libcmis/UnpackedTarball_cmis.mk b/external/libcmis/UnpackedTarball_cmis.mk
index 2ba454f87a89..38f592a1bf34 100644
--- a/external/libcmis/UnpackedTarball_cmis.mk
+++ b/external/libcmis/UnpackedTarball_cmis.mk
@@ -21,7 +21,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,cmis, \
external/libcmis/libcmis-fix-error-handling.patch \
))
-ifeq ($(OS)$(COM),WNTMSC)
+ifeq ($(OS),WNT)
$(eval $(call gb_UnpackedTarball_add_patches,cmis,external/libcmis/boost-win.patch))
endif
diff --git a/external/liblangtag/ExternalProject_langtag.mk b/external/liblangtag/ExternalProject_langtag.mk
index eacf41db28a4..d20d7dd7fd85 100644
--- a/external/liblangtag/ExternalProject_langtag.mk
+++ b/external/liblangtag/ExternalProject_langtag.mk
@@ -30,12 +30,11 @@ $(call gb_ExternalProject_get_state_target,langtag,build):
$(if $(filter TRUE,$(HAVE_GCC_BUILTIN_ATOMIC)),"lt_cv_has_atomic=yes","lt_cv_has_atomic=no") \
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) "ac_cv_va_copy=no") \
LIBXML2_CFLAGS="$(LIBXML_CFLAGS)" \
- LIBXML2_LIBS="$(if $(filter WNTMSC,$(OS)$(COM)),-L$(call gb_UnpackedTarball_get_dir,xml2)/win32/bin.msvc -llibxml2,$(LIBXML_LIBS))" \
+ LIBXML2_LIBS="$(if $(filter WNT,$(OS)),-L$(call gb_UnpackedTarball_get_dir,xml2)/win32/bin.msvc -llibxml2,$(LIBXML_LIBS))" \
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________URELIB) \
$(if $(filter-out LINUX FREEBSD,$(OS)),,LDFLAGS="-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath,\\"\$$\$$ORIGIN) \
$(if $(filter-out SOLARIS,$(OS)),,LDFLAGS="-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-R$(COMMA)\\"\$$\$$ORIGIN) \
- $(if $(filter-out WNTGCC,$(OS)$(COM)),,LDFLAGS="-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2") \
- && $(if $(filter WNTMSC,$(OS)$(COM)),\
+ && $(if $(filter WNT,$(OS)),\
REAL_CC="$(shell cygpath -w $(lastword $(filter-out -%,$(CC))))" \
REAL_CC_FLAGS="$(filter -%,$(CC))") \
$(if $(verbose),V=1) \
diff --git a/external/liblangtag/UnpackedTarball_langtag.mk b/external/liblangtag/UnpackedTarball_langtag.mk
index 47505f85859c..d8fccf261512 100644
--- a/external/liblangtag/UnpackedTarball_langtag.mk
+++ b/external/liblangtag/UnpackedTarball_langtag.mk
@@ -23,14 +23,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,langtag,\
endif
endif
-ifeq ($(OS),WNT)
-ifeq ($(COM),GCC)
-$(eval $(call gb_UnpackedTarball_add_patches,langtag,\
- external/liblangtag/liblangtag-0.5.1-mingw.patch \
-))
-endif
-endif
-
$(eval $(call gb_UnpackedTarball_add_patches,langtag, \
$(if $(SYSTEM_LIBXML),,external/liblangtag/langtag-libtool-rpath.patch.0) \
external/liblangtag/clang-cl.patch.0 \
diff --git a/external/liblangtag/liblangtag-0.5.1-mingw.patch b/external/liblangtag/liblangtag-0.5.1-mingw.patch
deleted file mode 100644
index 54790e99a0c7..000000000000
--- a/external/liblangtag/liblangtag-0.5.1-mingw.patch
+++ /dev/null
@@ -1,64 +0,0 @@
---- misc/liblangtag-0.4.0/liblangtag/lt-ext-module.c 2013-06-14 15:06:13.629182430 +0100
-+++ misc/liblangtag-0.4.0/liblangtag/lt-ext-module.c 2013-06-14 15:06:43.537534204 +0100
-@@ -608,8 +608,8 @@
- size_t len;
-
- while (1) {
-- if (readdir_r(dir, &dent, &dresult) || dresult == NULL)
-- break;
-+/* if (readdir_r(dir, &dent, &dresult) || dresult == NULL)
-+ break;*/ abort(); /* we do not use liblangtag-gobject anyway */
-
- len = strlen(dent.d_name);
- if (len > suffix_len &&
---- misc/liblangtag-0.4.0/liblangtag/Makefile.am 2013-06-14 15:06:13.636182512 +0100
-+++ misc/liblangtag-0.4.0/liblangtag/Makefile.am 2013-06-14 15:08:53.556063464 +0100
-@@ -211,6 +211,7 @@
- liblangtag_la_LDFLAGS = \
- $(LDFLAGS) \
- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-+ -no-undefined \
- $(NULL)
-
- -include $(top_srcdir)/git.mk
---- misc/liblangtag-0.4.0/liblangtag/Makefile.in 2013-06-14 15:06:13.636182512 +0100
-+++ misc/liblangtag-0.4.0/liblangtag/Makefile.in 2013-06-14 15:09:07.204223994 +0100
-@@ -576,6 +576,7 @@
- liblangtag_la_LDFLAGS = \
- $(LDFLAGS) \
- -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-+ -no-undefined \
- $(NULL)
-
- all: $(BUILT_SOURCES)
---- misc/liblangtag-0.4.0/liblangtag-gobject/Makefile.am 2013-06-14 15:06:13.648182653 +0100
-+++ misc/liblangtag-0.4.0/liblangtag-gobject/Makefile.am 2013-06-14 15:09:27.122458271 +0100
-@@ -149,6 +149,7 @@
- liblangtag_gobject_la_LDFLAGS = \
- $(LDFLAGS) \
- -version-info $(LT_G_CURRENT):$(LT_G_REVISION):$(LT_G_AGE) \
-+ -no-undefined \
- $(NULL)
- #
- if HAVE_INTROSPECTION
---- misc/liblangtag-0.4.0/liblangtag-gobject/Makefile.in 2013-06-14 15:06:13.648182653 +0100
-+++ misc/liblangtag-0.4.0/liblangtag-gobject/Makefile.in 2013-06-14 15:09:33.099528574 +0100
-@@ -476,6 +476,7 @@
- liblangtag_gobject_la_LDFLAGS = \
- $(LDFLAGS) \
- -version-info $(LT_G_CURRENT):$(LT_G_REVISION):$(LT_G_AGE) \
-+ -no-undefined \
- $(NULL)
-
- #
---- misc/liblangtag-0.4.0/Makefile.am 2013-06-14 15:06:13.652182700 +0100
-+++ misc/liblangtag-0.4.0/Makefile.am 2013-06-14 15:06:43.539534228 +0100
-@@ -6,7 +6,7 @@
- SUBDIRS += liblangtag-gobject
- endif
- #SUBDIRS += docs tests
--SUBDIRS += tests
-+#SUBDIRS += tests
-
- ACLOCAL_AMFLAGS = -I m4macros
-
diff --git a/external/libxml2/ExternalProject_xml2.mk b/external/libxml2/ExternalProject_xml2.mk
index aa9d612ac45e..f60d960d6790 100644
--- a/external/libxml2/ExternalProject_xml2.mk
+++ b/external/libxml2/ExternalProject_xml2.mk
@@ -14,20 +14,6 @@ $(eval $(call gb_ExternalProject_register_targets,xml2,\
))
ifeq ($(OS),WNT)
-ifeq ($(COM),GCC)
-$(call gb_ExternalProject_get_state_target,xml2,build):
- $(call gb_ExternalProject_run,build,\
- ./configure --disable-ipv6 --without-python --without-zlib \
- --without-lzma \
- --disable-static --without-debug lt_cv_cc_dll_switch="-shared" \
- $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
- CC="$(CC) -mthreads $(if $(MINGW_SHARED_GCCLIB),-shared-libgcc)" \
- LIBS="-lws2_32 $(if $(MINGW_SHARED_GXXLIB),$(MINGW_SHARED_LIBSTDCPP))" \
- LDFLAGS="-Wl$(COMMA)--no-undefined -Wl$(COMMA)--enable-runtime-pseudo-reloc-v2" \
- OBJDUMP=objdump \
- && $(MAKE) \
- )
-else # COM=MSC
$(call gb_ExternalProject_use_external_project,xml2,icu)
$(call gb_ExternalProject_get_state_target,xml2,build):
@@ -38,7 +24,6 @@ $(call gb_ExternalProject_get_state_target,xml2,build):
&& unset MAKEFLAGS \
&& LIB="$(ILIB)" nmake \
,win32)
-endif
else # OS!=WNT
$(call gb_ExternalProject_get_state_target,xml2,build):
$(call gb_ExternalProject_run,build,\
diff --git a/external/libxmlsec/ExternalProject_xmlsec.mk b/external/libxmlsec/ExternalProject_xmlsec.mk
index 31708c4577ba..66abd02ac3a5 100644
--- a/external/libxmlsec/ExternalProject_xmlsec.mk
+++ b/external/libxmlsec/ExternalProject_xmlsec.mk
@@ -21,21 +21,6 @@ $(eval $(call gb_ExternalProject_register_targets,xmlsec,\
ifeq ($(OS),WNT)
-ifeq ($(COM),GCC)
-$(call gb_ExternalProject_get_state_target,xmlsec,build) :
- $(call gb_ExternalProject_run,build,\
- autoreconf \
- && ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
- --without-libxslt --without-openssl --without-gnutls --disable-crypto-dl \
- $(if $(SYSTEM_NSS),,--disable-pkgconfig) \
- CC="$(CC) -mthreads $(if $(MINGW_SHARED_GCCLIB),-shared-libgcc)" \
- LDFLAGS="-Wl$(COMMA)--no-undefined $(ILIB:;= -L)" \
- LIBS="$(if $(MINGW_SHARED_GXXLIB),$(MINGW_SHARED__LIBSTDCPP))" \
- lt_cv_deplibs_check_method=pass_all \
- && $(MAKE) \
- )
-
-else
$(call gb_ExternalProject_get_state_target,xmlsec,build) :
$(call gb_ExternalProject_run,build,\
cscript /e:javascript configure.js crypto=mscrypto xslt=no iconv=no static=no \
@@ -44,7 +29,6 @@ $(call gb_ExternalProject_get_state_target,xmlsec,build) :
&& unset MAKEFLAGS \
&& LIB="$(ILIB)" nmake \
,win32)
-endif
else
diff --git a/external/libxmlsec/xmlsec1-configure.patch.1 b/external/libxmlsec/xmlsec1-configure.patch.1
index 2b496d7ee9fd..e114012ab602 100644
--- a/external/libxmlsec/xmlsec1-configure.patch.1
+++ b/external/libxmlsec/xmlsec1-configure.patch.1
@@ -88,7 +88,7 @@ index b8770ad..721e4ca 100644
-NSPR_LIBS_LIST="-lnspr4 -lplds4 -lplc4"
+
+case $host_os in
-+cygwin* | mingw* | pw32*)
++cygwin* | pw32*)
+ NSS_LIBS_LIST="-lnss3 -lsmime3"
+ NSPR_LIBS_LIST="-lnspr4"
+ ;;
diff --git a/external/libxmlsec/xmlsec1-customkeymanage.patch.1 b/external/libxmlsec/xmlsec1-customkeymanage.patch.1
index 226d6c0394a1..2a5f15fecf4f 100644
--- a/external/libxmlsec/xmlsec1-customkeymanage.patch.1
+++ b/external/libxmlsec/xmlsec1-customkeymanage.patch.1
@@ -3165,7 +3165,7 @@ new file mode 100644
index 0000000..e27d1e4
--- /dev/null
+++ b/src/nss/tokens.c
-@@ -0,0 +1,548 @@
+@@ -0,0 +1,544 @@
+/**
+ * XMLSec library
+ *
@@ -3517,11 +3517,7 @@ index 0000000..e27d1e4
+/**
+ * Key Slot List
+ */
-+#ifdef __MINGW32__ // for runtime-pseudo-reloc
-+static struct _xmlSecPtrListKlass xmlSecNssKeySlotPtrListKlass = {
-+#else
+static xmlSecPtrListKlass xmlSecNssKeySlotPtrListKlass = {
-+#endif
+ BAD_CAST "mechanism-list",
+ (xmlSecPtrDuplicateItemMethod)xmlSecNssKeySlotDuplicate,
+ (xmlSecPtrDestroyItemMethod)xmlSecNssKeySlotDestroy,
diff --git a/external/libxslt/ExternalProject_xslt.mk b/external/libxslt/ExternalProject_xslt.mk
index af19e840b56c..02c239b069ee 100644
--- a/external/libxslt/ExternalProject_xslt.mk
+++ b/external/libxslt/ExternalProject_xslt.mk
@@ -15,19 +15,6 @@ $(eval $(call gb_ExternalProject_register_targets,xslt,\
build \
))
ifeq ($(OS),WNT)
-ifeq ($(COM),GCC)
-$(call gb_ExternalProject_get_state_target,xslt,build):
- $(call gb_ExternalProject_run,build,\
- ./configure --without-crypto --without-python --disable-static \
- $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
- CC="$(CC) -mthreads $(if $(MINGW_SHARED_GCCLIB),-shared-libgcc)" \
- $(if $(MINGW_SHARED_GXXLIB),LIBS="$(MINGW_SHARED_LIBSTDCPP)") \
- LDFLAGS="-Wl$(COMMA)--no-undefined -Wl$(COMMA)--enable-runtime-pseudo-reloc-v2" \
- OBJDUMP=objdump \
- && chmod 777 xslt-config \
- && $(MAKE) \
- )
-else # COM=MSC
$(call gb_ExternalProject_get_state_target,xslt,build):
$(call gb_ExternalProject_run,build,\
cscript /e:javascript configure.js \
@@ -37,7 +24,6 @@ $(call gb_ExternalProject_get_state_target,xslt,build):
&& unset MAKEFLAGS \
&& LIB="$(ILIB)" nmake \
,win32)
-endif
else # OS!=WNT
$(call gb_ExternalProject_get_state_target,xslt,build):
$(call gb_ExternalProject_run,build,\
diff --git a/external/lpsolve/ExternalProject_lpsolve.mk b/external/lpsolve/ExternalProject_lpsolve.mk
index 120ded64942f..cbe35931f473 100644
--- a/external/lpsolve/ExternalProject_lpsolve.mk
+++ b/external/lpsolve/ExternalProject_lpsolve.mk
@@ -14,21 +14,11 @@ $(eval $(call gb_ExternalProject_register_targets,lpsolve,\
))
ifeq ($(OS),WNT)
-ifeq ($(COM),GCC)
-$(call gb_ExternalProject_get_state_target,lpsolve,build):
- $(call gb_ExternalProject_run,build,\
- $(if $(filter WNT,$(OS_FOR_BUILD)), \
- $(if $(MINGW_SHARED_GCCLIB) lpsolve_LDFLAGS="-shared-libgcc") \
- $(if $(MINGW_SHARED_GXXLIB) lpsolve_LIBS="$(MINGW_SHARED_LIBSTDCPP)") \
- cmd /c cgcc.bat, sh ccc) \
- ,lpsolve55)
-else # $(COM)!=GCC
$(call gb_ExternalProject_get_state_target,lpsolve,build):
$(call gb_ExternalProject_run,build,\
LIB="$(ILIB)" RUNTIME_FLAG="$(if $(MSVC_USE_DEBUG_RUNTIME),/MDd,/MD)" \
cmd /c cvc6.bat \
,lpsolve55)
-endif # $(COM)
else # $(OS)!=WNT
$(call gb_ExternalProject_get_state_target,lpsolve,build):
$(call gb_ExternalProject_run,build,\
diff --git a/external/mingw-externals/CustomTarget_jawt.mk b/external/mingw-externals/CustomTarget_jawt.mk
deleted file mode 100644
index 1fb5fa872eb2..000000000000
--- a/external/mingw-externals/CustomTarget_jawt.mk
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_CustomTarget_CustomTarget,external/jawt))
-
-$(eval $(call gb_CustomTarget_register_targets,external/jawt,\
- jawt.def \
- libjawt.dll.a \
-))
-
-ifeq ($(OS)-$(CPUNAME),WNT-X86_64)
-$(call gb_CustomTarget_get_workdir,external/jawt)/jawt.def:
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
- echo EXPORTS > $@
- echo "JAWT_GetAWT" >> $@
-else
-$(call gb_CustomTarget_get_workdir,external/jawt)/jawt.def:
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ECH,1)
- echo EXPORTS > $@
- echo "JAWT_GetAWT@8" >> $@
-endif
-
-$(call gb_CustomTarget_get_workdir,external/jawt)/libjawt.dll.a: $(call gb_CustomTarget_get_workdir,external/jawt)/jawt.def
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),DLT,1)
- $(DLLTOOL) --input-def=$< --output-lib=$@ --dllname=jawt.dll
-
-# vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/external/mingw-externals/Module_mingw-externals.mk b/external/mingw-externals/Module_mingw-externals.mk
deleted file mode 100644
index e63016239c7c..000000000000
--- a/external/mingw-externals/Module_mingw-externals.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_Module_Module,mingw-externals))
-
-ifeq ($(OS)$(COM),WNTGCC)
-$(eval $(call gb_Module_add_targets,mingw-externals,\
- CustomTarget_jawt \
- Package_mingw_dlls \
- Package_mingw_gccdlls \
-))
-endif
-
-# vim: set noet sw=4 ts=4:
diff --git a/external/mingw-externals/Package_mingw_dlls.mk b/external/mingw-externals/Package_mingw_dlls.mk
deleted file mode 100644
index 65a042d4d0b2..000000000000
--- a/external/mingw-externals/Package_mingw_dlls.mk
+++ /dev/null
@@ -1,16 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_Package_Package,mingw_dlls,$(MINGW_SYSROOT)/bin))
-
-$(eval $(call gb_Package_add_files,mingw_dlls,bin,\
- $(sort $(MINGW_DLLS)) \
-))
-
-# vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/external/mingw-externals/Package_mingw_gccdlls.mk b/external/mingw-externals/Package_mingw_gccdlls.mk
deleted file mode 100644
index b5d37c570238..000000000000
--- a/external/mingw-externals/Package_mingw_gccdlls.mk
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_Package_Package,mingw_gccdlls,$(MINGW_SYSROOT)/bin))
-
-$(eval $(call gb_Package_set_outdir,mingw_gccdlls,$(INSTDIR)))
-
-$(eval $(call gb_Package_add_files,mingw_gccdlls,program,\
- $(if $(MINGW_SHARED_GCCLIB),$(MINGW_GCCDLL)) \
- $(if $(MINGW_SHARED_GXXLIB),$(MINGW_GXXDLL)) \
-))
-
-# vim:set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/external/mysqlcppconn/Library_mysqlcppconn.mk b/external/mysqlcppconn/Library_mysqlcppconn.mk
index 8b6202fa7d4e..e2894824bc18 100644
--- a/external/mysqlcppconn/Library_mysqlcppconn.mk
+++ b/external/mysqlcppconn/Library_mysqlcppconn.mk
@@ -16,7 +16,7 @@ $(eval $(call gb_Library_use_externals,mysqlcppconn, \
mariadb \
))
-ifneq ($(OS)$(COM),WNTMSC)
+ifneq ($(OS),WNT)
$(eval $(call gb_Library_add_libs,mysqlcppconn,\
$(if $(filter-out MACOSX,$(OS)),-ldl) \
diff --git a/external/neon/neon.patch b/external/neon/neon.patch
index b86b613d7294..fa0c1938d4aa 100644
--- a/external/neon/neon.patch
+++ b/external/neon/neon.patch
@@ -95,17 +95,6 @@
/* Set callbacks to provide credentials for server and proxy
* authentication, using the default set of authentication protocols.
---- src/ne_defs.h 2010-01-11 23:57:34.000000000 +0100
-+++ src/ne_defs.h 2011-02-03 10:26:20.000000000 +0100
-@@ -41,7 +41,7 @@
- #endif
-
- /* define ssize_t for Win32 */
--#if defined(WIN32) && !defined(ssize_t)
-+#if defined(WIN32) && !defined(ssize_t) && !defined(__MINGW32__)
- #define ssize_t int
- #endif
-
--- src/ne_locks.c 2007-02-05 11:09:27.000000000 +0100
+++ src/ne_locks.c 2011-02-03 10:26:21.000000000 +0100
@@ -579,6 +579,23 @@
diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk
index 07cc472b9fb2..57a78b4a850c 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -26,7 +26,6 @@ $(call gb_ExternalProject_get_state_target,nss,configure):
,,nss_configure.log)
ifeq ($(OS),WNT)
-ifeq ($(COM),MSC)
$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalProject_get_state_target,nss,configure) $(call gb_ExternalExecutable_get_dependencies,python)
$(call gb_ExternalProject_run,build,\
$(if $(MSVC_USE_DEBUG_RUNTIME),USE_DEBUG_RTL=1,BUILD_OPT=1) \
@@ -38,26 +37,6 @@ $(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalProject
NSINSTALL='$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/external/nss/nsinstall.py' \
,nss)
-
-else
-$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalProject_get_state_target,nss,configure) $(call gb_ExternalExecutable_get_dependencies,python)
- $(call gb_ExternalProject_run,build,\
- $(MAKE) -j1 nss_build_all \
- NS_USE_GCC=1 \
- CC="$(CC) $(if $(MINGW_SHARED_GCCLIB),-shared-libgcc)" \
- CXX="$(CXX) $(if $(MINGW_SHARED_GCCLIB),-shared-libgcc)" \
- OS_LIBS="-ladvapi32 -lws2_32 -lmswsock -lwinmm $(if $(MINGW_SHARED_GXXLIB),$(MINGW_SHARED_LIBSTDCPP))" \
- LDFLAGS="" \
- PATH="$(PATH)" \
- RANLIB="$(RANLIB)" \
- OS_TARGET=WINNT RC="$(WINDRES)" OS_RELEASE="5.0" \
- IMPORT_LIB_SUFFIX=dll.a \
- NSPR_CONFIGURE_OPTS="--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --enable-shared --disable-static" \
- NSINSTALL="$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/external/nss/nsinstall.py" \
- && rm -f $(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/out/lib/*.a \
- ,nss)
-
-endif
else # OS!=WNT
$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalProject_get_state_target,nss,configure) $(call gb_ExternalExecutable_get_dependencies,python)
$(call gb_ExternalProject_run,build,\
diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk
index a0ac57173fd1..7200e6ffdf65 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -17,12 +17,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
external/nss/nss-3.13.5-zlib-werror.patch \
external/nss/nss_macosx.patch \
external/nss/nss-win32-make.patch.1 \
- $(if $(filter WNTMSC,$(OS)$(COM)),external/nss/nss.windows.patch \
+ $(if $(filter WNT,$(OS)),external/nss/nss.windows.patch \
external/nss/nss.nowerror.patch \
external/nss/nss.vs2015.patch) \
- $(if $(filter WNTGCC,$(OS)$(COM)),external/nss/nspr-4.9-build.patch.3 \
- external/nss/nss-3.13.3-build.patch.3 \
- external/nss/nss.mingw.patch.3) \
external/nss/ubsan.patch.0 \
external/nss/clang-cl.patch.0 \
external/nss/nss.windowbuild.patch.0 \
@@ -32,11 +29,11 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
external/nss/nss-ios.patch) \
$(if $(filter MSC-INTEL,$(COM)-$(CPUNAME)), \
external/nss/nss.cygwin64.in32bit.patch) \
- $(if $(filter WNTMSC,$(OS)$(COM)), \
+ $(if $(filter WNT,$(OS)), \
external/nss/nss.vs2015.pdb.patch) \
$(if $(findstring 120_70,$(VCVER)_$(WINDOWS_SDK_VERSION)), \
external/nss/nss-winXP-sdk.patch.1) \
- $(if $(filter WNTMSC,$(OS)$(COM)), \
+ $(if $(filter WNT,$(OS)), \
external/nss/nss.utf8bom.patch.1) \
))
diff --git a/external/nss/nspr-4.9-build.patch.3 b/external/nss/nspr-4.9-build.patch.3
deleted file mode 100644
index 6f80f8023569..000000000000
--- a/external/nss/nspr-4.9-build.patch.3
+++ /dev/null
@@ -1,285 +0,0 @@
---- a/a/a/nspr/config/autoconf.mk.in 2011-08-29 19:02:51.000000000 +0200
-+++ a/a/a/nspr/config/autoconf.mk.in 2012-03-22 11:24:22.137097336 +0100
-@@ -27,6 +27,7 @@
- OBJ_SUFFIX = $(error config/config.mk needs to be included before using OBJ_SUFFIX)
- _OBJ_SUFFIX = @OBJ_SUFFIX@
- LIB_SUFFIX = @LIB_SUFFIX@
-+IMPORT_LIB_SUFFIX = @IMPORT_LIB_SUFFIX@
- DLL_SUFFIX = @DLL_SUFFIX@
- ASM_SUFFIX = @ASM_SUFFIX@
- MOD_NAME = @NSPR_MODNAME@
---- a/a/a/nspr/config/rules.mk 2011-08-29 19:02:51.000000000 +0200
-+++ a/a/a/nspr/config/rules.mk 2012-03-22 11:24:22.138097311 +0100
-@@ -115,21 +115,21 @@
- #
-
- ifdef LIBRARY_NAME
--ifeq (,$(filter-out WINNT WINCE OS2,$(OS_ARCH)))
-+ifeq (,$(filter-out Linux WIN95 WINNT WINCE OS2,$(OS_ARCH)))
-
- #
- # Win95 and OS/2 require library names conforming to the 8.3 rule.
- # other platforms do not.
- #
--ifeq (,$(filter-out WIN95 WINCE WINMO OS2,$(OS_TARGET)))
-+ifeq (,$(filter-out WIN95 WINCE WINMO WINNT OS2,$(OS_TARGET)))
- LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
- SHARED_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
--IMPORT_LIBRARY = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
-+IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
- SHARED_LIB_PDB = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb
- else
- LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
- SHARED_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
--IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
-+IMPORT_LIBRARY = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
- SHARED_LIB_PDB = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb
- endif
-
---- a/a/a/nspr/configure 2012-02-14 20:06:00.000000000 +0100
-+++ a/a/a/nspr/configure 2012-03-22 11:24:22.139097286 +0100
-@@ -3034,6 +3034,7 @@
-
- OBJ_SUFFIX=o
- LIB_SUFFIX=a
-+IMPORT_LIB_SUFFIX=$IMPORT_LIB_SUFFIX
- DLL_SUFFIX=so
- ASM_SUFFIX=s
- MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
-@@ -4536,6 +4537,7 @@
- CC="$CC -mwindows"
- CXX="$CXX -mwindows"
- DLL_SUFFIX=dll
-+ IMPORT_LIB_SUFFIX=dll.a
- MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
- RC=$WINDRES
- # Use temp file for windres (bug 213281)
-@@ -4552,6 +4554,7 @@
- GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
- OBJ_SUFFIX=obj
- LIB_SUFFIX=lib
-+ IMPORT_LIB_SUFFIX=lib
- DLL_SUFFIX=dll
-
- # Determine compiler version
-@@ -4661,11 +4664,11 @@
-
- if test "$OS_TARGET" = "WINNT"; then
- CFLAGS="$CFLAGS -GT"
-- LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-- LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-+ LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
-+ LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
- else
-- LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-- LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-+ LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
-+ LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
- fi
- fi # GNU_CC
-
-@@ -4775,6 +4778,7 @@
-
- OBJ_SUFFIX=obj
- LIB_SUFFIX=lib
-+ IMPORT_LIB_SUFFIX=lib
- DLL_SUFFIX=dll
- MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
-
-@@ -4782,8 +4786,8 @@
- RESOLVE_LINK_SYMBOLS=1
-
- MDCPUCFG_H=_win95.cfg
-- LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-- LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-+ LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
-+ LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
-
- DLLFLAGS='-OUT:"$@"'
- if test -n "$MOZ_DEBUG_SYMBOLS"; then
-@@ -5584,6 +5588,7 @@
-
- USE_PTHREADS=1
- LIB_SUFFIX=lib
-+ IMPORT_LIB_SUFFIX=lib
- DLL_SUFFIX=dll
- MKSHLIB=
- DSO_LDOPTS=
-@@ -5668,6 +5673,7 @@
- EOF
-
- LIB_SUFFIX=lib
-+ IMPORT_LIB_SUFFIX=lib
- DLL_SUFFIX=dll
- RC=rc.exe
- PR_MD_ARCH_DIR=os2
-@@ -6966,6 +6972,7 @@
- s%@CPU_ARCH@%$CPU_ARCH%g
- s%@OBJ_SUFFIX@%$OBJ_SUFFIX%g
- s%@LIB_SUFFIX@%$LIB_SUFFIX%g
-+s%@IMPORT_LIB_SUFFIX@%$IMPORT_LIB_SUFFIX%g
- s%@DLL_SUFFIX@%$DLL_SUFFIX%g
- s%@ASM_SUFFIX@%$ASM_SUFFIX%g
- s%@WRAP_LDFLAGS@%$WRAP_LDFLAGS%g
---- a/a/a/nspr/configure.in 2012-02-14 20:06:00.000000000 +0100
-+++ a/a/a/nspr/configure.in 2012-03-22 11:24:22.139097286 +0100
-@@ -834,6 +834,7 @@
- dnl ========================================================
- OBJ_SUFFIX=o
- LIB_SUFFIX=a
-+IMPORT_LIB_SUFFIX=$(IMPORT_LIB_SUFFIX)
- DLL_SUFFIX=so
- ASM_SUFFIX=s
- MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
-@@ -1901,6 +1902,7 @@
- CC="$CC -mwindows"
- CXX="$CXX -mwindows"
- DLL_SUFFIX=dll
-+ IMPORT_LIB_SUFFIX=dll.a
- MKSHLIB='$(CC) -shared -Wl,--export-all-symbols -Wl,--out-implib -Wl,$(IMPORT_LIBRARY) $(DLLBASE) -o $(subst $(OBJDIR)/,,$(SHARED_LIBRARY))'
- RC=$WINDRES
- # Use temp file for windres (bug 213281)
-@@ -1917,6 +1919,7 @@
- GARBAGE='$(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb'
- OBJ_SUFFIX=obj
- LIB_SUFFIX=lib
-+ IMPORT_LIB_SUFFIX=lib
- DLL_SUFFIX=dll
-
- # Determine compiler version
-@@ -2014,11 +2017,11 @@
-
- if test "$OS_TARGET" = "WINNT"; then
- CFLAGS="$CFLAGS -GT"
-- LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-- LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-+ LIBNSPR='$(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
-+ LIBPLC='$(dist_libdir)/libplc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
- else
-- LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-- LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-+ LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
-+ LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
- fi
- fi # GNU_CC
-
-@@ -2089,6 +2092,7 @@
-
- OBJ_SUFFIX=obj
- LIB_SUFFIX=lib
-+ IMPORT_LIB_SUFFIX=lib
- DLL_SUFFIX=dll
- MKSHLIB='$(LD) -DLL $(DSO_LDOPTS) -OUT:$@'
-
-@@ -2096,8 +2100,8 @@
- RESOLVE_LINK_SYMBOLS=1
-
- MDCPUCFG_H=_win95.cfg
-- LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-- LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(LIB_SUFFIX)'
-+ LIBNSPR='$(dist_libdir)/nspr$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
-+ LIBPLC='$(dist_libdir)/plc$(MOD_MAJOR_VERSION).$(IMPORT_LIB_SUFFIX)'
-
- DLLFLAGS='-OUT:"$@"'
- if test -n "$MOZ_DEBUG_SYMBOLS"; then
-@@ -2576,6 +2580,7 @@
- AC_DEFINE(HAVE_SOCKLEN_T)
- USE_PTHREADS=1
- LIB_SUFFIX=lib
-+ IMPORT_LIB_SUFFIX=lib
- DLL_SUFFIX=dll
- MKSHLIB=
- DSO_LDOPTS=
-@@ -2630,6 +2635,7 @@
- AC_DEFINE(BSD_SELECT)
- AC_DEFINE(TCPV40HDRS)
- LIB_SUFFIX=lib
-+ IMPORT_LIB_SUFFIX=lib
- DLL_SUFFIX=dll
- RC=rc.exe
- PR_MD_ARCH_DIR=os2
-@@ -3291,6 +3297,7 @@
-
- AC_SUBST(OBJ_SUFFIX)
- AC_SUBST(LIB_SUFFIX)
-+AC_SUBST(IMPORT_LIB_SUFFIX)
- AC_SUBST(DLL_SUFFIX)
- AC_SUBST(ASM_SUFFIX)
- AC_SUBST(WRAP_LDFLAGS)
---- a/a/a/nspr/pr/include/md/_win95.cfg 2010-01-27 03:45:49.000000000 +0100
-+++ a/a/a/nspr/pr/include/md/_win95.cfg 2012-03-22 11:24:22.139097286 +0100
-@@ -106,7 +106,7 @@
- #define PR_BYTES_PER_WORD_LOG2 2
- #define PR_BYTES_PER_DWORD_LOG2 3
-
--#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)
-+#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_) || defined (_WIN64)
-
- #define IS_LITTLE_ENDIAN 1
- #undef IS_BIG_ENDIAN
---- a/a/a/nspr/pr/include/md/_winnt.cfg 2010-01-27 03:45:49.000000000 +0100
-+++ a/a/a/nspr/pr/include/md/_winnt.cfg 2012-03-22 11:24:22.140097261 +0100
-@@ -100,7 +100,7 @@
- #define PR_BYTES_PER_WORD_LOG2 2
- #define PR_BYTES_PER_DWORD_LOG2 2
-
--#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_)
-+#elif defined(_M_X64) || defined(_M_AMD64) || defined(_AMD64_) || defined (_WIN64)
-
- #define IS_LITTLE_ENDIAN 1
- #undef IS_BIG_ENDIAN
---- a/a/a/nspr/pr/src/Makefile.in 2011-09-22 17:21:06.000000000 +0200
-+++ a/a/a/nspr/pr/src/Makefile.in 2012-03-22 11:24:22.140097261 +0100
-@@ -9,6 +9,9 @@
- topsrcdir = @top_srcdir@
- srcdir = @srcdir@
- VPATH = @srcdir@
-+
-+LIBRARY_NAME = nspr
-+LIBRARY_VERSION = $(MOD_MAJOR_VERSION)
-
- include $(MOD_DEPTH)/config/autoconf.mk
-
-@@ -200,9 +200,9 @@
-
- ifeq ($(OS_ARCH),WINNT)
- ifdef NS_USE_GCC
--OS_LIBS = -ladvapi32 -lwsock32 -lwinmm
-+OS_LIBS = -ladvapi32 -lws2_32 -lmswsock -lwinmm
- else
--OS_LIBS = advapi32.lib wsock32.lib winmm.lib
-+OS_LIBS = advapi32.lib ws2_32.lib mswsock.lib winmm.lib
- endif
- endif
-
-@@ -291,8 +291,6 @@
- include $(srcdir)/bthreads/objs.mk
- endif
-
--LIBRARY_NAME = nspr
--LIBRARY_VERSION = $(MOD_MAJOR_VERSION)
-
- RELEASE_LIBS = $(TARGETS)
-
---- a/a/a/nspr/pr/src/md/windows/ntgc.c 2010-11-30 00:26:19.000000000 +0100
-+++ a/a/a/nspr/pr/src/md/windows/ntgc.c 2012-03-22 11:24:22.140097261 +0100
-@@ -44,7 +44,7 @@
-
- PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
- {
--#if defined(_X86_)
-+#if defined(_X86_) && (!defined(_AMD64_))
- CONTEXT context;
- context.ContextFlags = CONTEXT_INTEGER;
-
---- a/a/a/nspr/tools/Makefile.in 2008-05-04 00:28:44.000000000 +0200
-+++ a/a/a/nspr/tools/Makefile.in 2012-03-22 11:24:22.140097261 +0100
-@@ -219,7 +219,7 @@
- echo winsock.lib >>w16link
- wlink @w16link.
- else
-- link $(LDOPTS) $< $(LIBPR) $(LIBPLC) wsock32.lib -out:$@
-+ link $(LDOPTS) $< $(LIBPR) $(LIBPLC) ws2_32.lib mswsock.lib -out:$@
- endif
- else
- ifeq ($(OS_ARCH),OS2)
diff --git a/external/nss/nss-3.13.3-build.patch.3 b/external/nss/nss-3.13.3-build.patch.3
deleted file mode 100644
index 383b9384a9c8..000000000000
--- a/external/nss/nss-3.13.3-build.patch.3
+++ /dev/null
@@ -1,231 +0,0 @@
---- a/a/a/nss/coreconf/rules.mk 2013-06-14 13:31:28.569204870 +0100
-+++ a/a/a/nss/coreconf/rules.mk 2013-06-14 13:31:59.277567709 +0100
-@@ -400,7 +400,7 @@
- PWD := $(shell pwd)
- ifeq (,$(findstring ;,$(PATH)))
- ifndef USE_MSYS
--PWD := $(subst \,/,$(shell cygpath -w $(PWD)))
-+#PWD := $(subst \,/,$(shell cygpath -w $(PWD)))
- endif
- endif
- endif
---- a/a/a/nss/coreconf/WIN32.mk 2013-06-14 13:31:28.557204728 +0100
-+++ a/a/a/nss/coreconf/WIN32.mk 2013-06-14 13:31:59.278567724 +0100
-@@ -124,7 +124,7 @@
- # The -mnop-fun-dllimport flag allows us to avoid a drawback of
- # the dllimport attribute that a pointer to a function marked as
- # dllimport cannot be used as as a constant address.
-- OS_CFLAGS += -mwindows -mms-bitfields -mnop-fun-dllimport
-+ OS_CFLAGS += -mwindows -mms-bitfields -mnop-fun-dllimport -D_WIN32_IE=0x0700 -U__MMX__ -U__SSE__ -U__SSE2__
- _GEN_IMPORT_LIB=-Wl,--out-implib,$(IMPORT_LIBRARY)
- DLLFLAGS += -mwindows -o $@ -shared -Wl,--export-all-symbols $(if $(IMPORT_LIBRARY),$(_GEN_IMPORT_LIB))
- ifdef BUILD_OPT
---- a/a/a/nss/coreconf/WINNT.mk 2013-06-14 13:31:28.560204763 +0100
-+++ a/a/a/nss/coreconf/WINNT.mk 2013-06-14 13:31:59.278567724 +0100
-@@ -46,7 +46,7 @@
- #
- # Win NT needs -GT so that fibers can work
- #
--OS_CFLAGS += -GT
-+#OS_CFLAGS += -GT
-
- # WINNT uses the lib prefix, Win95 doesn't
- NSPR31_LIB_PREFIX = lib
---- a/a/a/nss/cmd/crmftest/Makefile 2013-06-14 13:31:28.678206158 +0100
-+++ a/a/a/nss/cmd/crmftest/Makefile 2013-06-14 13:31:59.278567724 +0100
-@@ -90,7 +90,7 @@
- LDDIST = $(DIST)/lib
-
- ifeq (,$(filter-out WIN%,$(OS_TARGET)))
--EXTRA_LIBS += $(LDDIST)/sectool.lib
-+#EXTRA_LIBS += $(LDDIST)/sectool.lib
- endif
-
- include ../platrules.mk
---- a/a/a/nss/cmd/pk11mode/Makefile 2013-06-14 13:31:28.709206524 +0100
-+++ a/a/a/nss/cmd/pk11mode/Makefile 2013-06-14 13:31:59.279567738 +0100
-@@ -61,9 +61,9 @@
- ifeq ($(OS_ARCH), WINNT)
-
- EXTRA_LIBS += \
-- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \
-- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \
-- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \
-+ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(IMPORT_LIB_SUFFIX) \
-+ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(IMPORT_LIB_SUFFIX) \
-+ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(IMPORT_LIB_SUFFIX) \
- $(NULL)
-
- else
---- a/a/a/nss/cmd/shlibsign/Makefile 2013-06-14 13:31:28.680206181 +0100
-+++ a/a/a/nss/cmd/shlibsign/Makefile 2013-06-14 13:31:59.279567738 +0100
-@@ -59,9 +59,9 @@
- ifeq ($(OS_ARCH), WINNT)
-
- EXTRA_LIBS += \
-- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \
-- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \
-- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \
-+ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(IMPORT_LIB_SUFFIX) \
-+ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(IMPORT_LIB_SUFFIX) \
-+ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(IMPORT_LIB_SUFFIX) \
- $(NULL)
-
- else
-@@ -93,8 +93,8 @@
- endif
- CHECKLOC = $(CHECKLIBS:.$(DLL_SUFFIX)=.chk)
-
--MD_LIB_RELEASE_FILES = $(CHECKLOC)
--ALL_TRASH += $(CHECKLOC)
-+MD_LIB_RELEASE_FILES = # $(CHECKLOC)
-+#ALL_TRASH += $(CHECKLOC)
- endif
-
- #######################################################################
-@@ -128,5 +128,5 @@
- endif
- endif
-
--libs install :: $(CHECKLOC)
-+libs install :: #$(CHECKLOC)
-
---- a/a/a/nss/cmd/shlibsign/mangle/Makefile 2013-06-14 13:31:28.681206193 +0100
-+++ a/a/a/nss/cmd/shlibsign/mangle/Makefile 2013-06-14 13:31:59.279567738 +0100
-@@ -59,9 +59,9 @@
- ifeq ($(OS_ARCH), WINNT)
-
- EXTRA_LIBS += \
-- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(LIB_SUFFIX) \
-- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(LIB_SUFFIX) \
-- $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(LIB_SUFFIX) \
-+ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plc4.$(IMPORT_LIB_SUFFIX) \
-+ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)plds4.$(IMPORT_LIB_SUFFIX) \
-+ $(NSPR_LIB_DIR)/$(NSPR31_LIB_PREFIX)nspr4.$(IMPORT_LIB_SUFFIX) \
- $(NULL)
-
- else
---- a/a/a/nss/lib/ckfw/builtins/config.mk 2013-06-14 13:31:28.666206016 +0100
-+++ a/a/a/nss/lib/ckfw/builtins/config.mk 2013-06-14 13:31:59.280567750 +0100
-@@ -48,7 +48,7 @@
-
- ifeq (,$(filter-out WIN%,$(OS_TARGET)))
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
-- RES = $(OBJDIR)/$(LIBRARY_NAME).res
-+ RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
- RESNAME = $(LIBRARY_NAME).rc
- endif
-
---- a/a/a/nss/lib/ckfw/capi/Makefile 2013-06-14 13:31:28.669206051 +0100
-+++ a/a/a/nss/lib/ckfw/capi/Makefile 2013-06-14 13:31:59.280567750 +0100
-@@ -75,6 +75,9 @@
- -lplc4 \
- -lplds4 \
- -lnspr4 \
-+ -lcrypt32 \
-+ -ladvapi32 \
-+ -lrpcrt4 \
- $(NULL)
- endif
-
---- a/a/a/nss/lib/freebl/config.mk 2013-06-14 13:31:28.593205153 +0100
-+++ a/a/a/nss/lib/freebl/config.mk 2013-06-14 13:31:59.280567750 +0100
-@@ -82,7 +82,7 @@
- # don't want the 32 in the shared library name
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
-
--RES = $(OBJDIR)/$(LIBRARY_NAME).res
-+RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
- RESNAME = freebl.rc
-
- ifdef NS_USE_GCC
---- a/a/a/nss/lib/freebl/mpi/mpi-priv.h 2013-06-14 13:31:28.605205295 +0100
-+++ a/a/a/nss/lib/freebl/mpi/mpi-priv.h 2013-06-14 13:31:59.281567762 +0100
-@@ -254,7 +254,7 @@
- #define MPI_ASM_DECL
- #endif
-
--#ifdef MPI_AMD64
-+#if defined(MPI_AMD64) && defined(MP_ASSEMBLY_MULTIPLY)
-
- mp_digit MPI_ASM_DECL s_mpv_mul_set_vec64(mp_digit*, mp_digit *, mp_size, mp_digit);
- mp_digit MPI_ASM_DECL s_mpv_mul_add_vec64(mp_digit*, const mp_digit*, mp_size, mp_digit);
---- a/a/a/nss/lib/nss/config.mk 2013-06-14 13:31:28.620205472 +0100
-+++ a/a/a/nss/lib/nss/config.mk 2013-06-14 13:31:59.281567762 +0100
-@@ -42,7 +42,7 @@
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
- IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
-
--RES = $(OBJDIR)/$(LIBRARY_NAME).res
-+RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
- RESNAME = $(LIBRARY_NAME).rc
-
- ifdef NS_USE_GCC
---- a/a/a/nss/lib/smime/config.mk 2013-06-14 13:31:28.580205000 +0100
-+++ a/a/a/nss/lib/smime/config.mk 2013-06-14 13:31:59.282567773 +0100
-@@ -43,7 +43,7 @@
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
- IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
-
--RES = $(OBJDIR)/smime.res
-+RES = $(OBJDIR)/smime.res.o
- RESNAME = smime.rc
-
- ifdef NS_USE_GCC
---- a/a/a/nss/lib/softoken/config.mk 2013-06-14 13:31:28.662205969 +0100
-+++ a/a/a/nss/lib/softoken/config.mk 2013-06-14 13:31:59.282567773 +0100
-@@ -49,7 +49,7 @@
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
- IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
-
--RES = $(OBJDIR)/$(LIBRARY_NAME).res
-+RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
- RESNAME = $(LIBRARY_NAME).rc
-
- ifdef NS_USE_GCC
---- a/a/a/nss/lib/softoken/legacydb/config.mk 2013-06-14 13:31:28.660205945 +0100
-+++ a/a/a/nss/lib/softoken/legacydb/config.mk 2013-06-14 13:31:59.282567773 +0100
-@@ -50,7 +50,7 @@
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
- IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
-
--RES = $(OBJDIR)/$(LIBRARY_NAME).res
-+RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
- RESNAME = $(LIBRARY_NAME).rc
-
- ifdef NS_USE_GCC
---- a/a/a/nss/lib/ssl/config.mk 2013-06-14 13:31:28.614205402 +0100
-+++ a/a/a/nss/lib/ssl/config.mk 2013-06-14 13:31:59.283567784 +0100
-@@ -55,7 +55,7 @@
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
- IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
-
--RES = $(OBJDIR)/ssl.res
-+RES = $(OBJDIR)/ssl.res.o
- RESNAME = ssl.rc
-
- ifdef NS_USE_GCC
---- a/a/a/nss/lib/sysinit/config.mk 2013-06-14 13:31:28.674206110 +0100
-+++ a/a/a/nss/lib/sysinit/config.mk 2013-06-14 13:31:59.283567784 +0100
-@@ -47,8 +47,8 @@
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
- IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
-
--RES = $(OBJDIR)/$(LIBRARY_NAME).res
--RESNAME = $(LIBRARY_NAME).rc
-+#RES = $(OBJDIR)/$(LIBRARY_NAME).res
-+#RESNAME = $(LIBRARY_NAME).rc
-
- ifdef NS_USE_GCC
- EXTRA_SHARED_LIBS += \
---- a/a/a/nss/lib/util/config.mk 2013-06-14 13:31:28.629205579 +0100
-+++ a/a/a/nss/lib/util/config.mk 2013-06-14 13:31:59.283567784 +0100
-@@ -42,7 +42,7 @@
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
- IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
-
--RES = $(OBJDIR)/$(LIBRARY_NAME).res
-+RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
- RESNAME = $(LIBRARY_NAME).rc
-
- ifdef NS_USE_GCC
diff --git a/external/nss/nss.mingw.patch.3 b/external/nss/nss.mingw.patch.3
deleted file mode 100644
index 53aecc515731..000000000000
--- a/external/nss/nss.mingw.patch.3
+++ /dev/null
@@ -1,106 +0,0 @@
---- a/a/a/nspr/config/Makefile.in.dt 2012-10-29 13:30:49.244696426 +0100
-+++ a/a/a/nspr/config/Makefile.in 2012-10-29 13:31:26.541830215 +0100
-@@ -30,7 +30,6 @@ CSRCS = now.c
-
- # This version hasn't been ported for us; the one in mozilla/config has
- ifneq ($(OS_ARCH),OS2)
--CSRCS += nsinstall.c
-
- PLSRCS = nfspwd.pl
- endif
-@@ -84,7 +83,6 @@ else
- ifeq (,$(filter-out SYMBIAN WINCE,$(OS_ARCH)))
- TARGETS = $(PROGS)
- else
--PROGS += $(OBJDIR)/nsinstall$(PROG_SUFFIX)
- TARGETS = $(PROGS) $(PLSRCS:.pl=)
- endif
- endif
---- a/a/a/nss/lib/nss/config.mk.dt 2012-10-30 12:31:06.675726730 +0100
-+++ a/a/a/nss/lib/nss/config.mk 2012-10-30 12:31:08.860676053 +0100
-@@ -40,7 +40,7 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
-
- # don't want the 32 in the shared library name
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
--IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
-+IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
-
- RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
- RESNAME = $(LIBRARY_NAME).rc
---- a/a/a/nss/lib/smime/config.mk.dt 2012-10-30 12:30:52.020062600 +0100
-+++ a/a/a/nss/lib/smime/config.mk 2012-10-30 12:30:54.504004586 +0100
-@@ -41,7 +41,7 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
-
- # don't want the 32 in the shared library name
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
--IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
-+IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
-
- RES = $(OBJDIR)/smime.res.o
- RESNAME = smime.rc
---- a/a/a/nss/lib/softoken/config.mk.dt 2012-10-30 12:31:02.707816790 +0100
-+++ a/a/a/nss/lib/softoken/config.mk 2012-10-30 12:31:04.388778631 +0100
-@@ -47,7 +47,7 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
-
- # don't want the 32 in the shared library name
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
--IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
-+IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
-
- RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
- RESNAME = $(LIBRARY_NAME).rc
---- a/a/a/nss/lib/softoken/legacydb/config.mk.dt 2012-10-30 12:30:56.531958414 +0100
-+++ a/a/a/nss/lib/softoken/legacydb/config.mk 2012-10-30 12:31:00.575865594 +0100
-@@ -48,7 +48,7 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
-
- # don't want the 32 in the shared library name
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
--IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
-+IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
-
- RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
- RESNAME = $(LIBRARY_NAME).rc
---- a/a/a/nss/lib/sqlite/config.mk.dt 2012-10-30 12:31:10.499638736 +0100
-+++ a/a/a/nss/lib/sqlite/config.mk 2012-10-30 12:31:12.624590177 +0100
-@@ -41,7 +41,7 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
-
- # don't want the 32 in the shared library name
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
--IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
-+IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
-
- #RES = $(OBJDIR)/$(LIBRARY_NAME).res
- #RESNAME = $(LIBRARY_NAME).rc
---- a/a/a/nss/lib/ssl/config.mk.dt 2012-10-30 12:31:14.882539495 +0100
-+++ a/a/a/nss/lib/ssl/config.mk 2012-10-30 12:31:16.379504032 +0100
-@@ -53,7 +53,7 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
-
- # don't want the 32 in the shared library name
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
--IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
-+IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
-
- RES = $(OBJDIR)/ssl.res.o
- RESNAME = ssl.rc
---- a/a/a/nss/lib/sysinit/config.mk.dt 2012-10-30 12:31:18.195462428 +0100
-+++ a/a/a/nss/lib/sysinit/config.mk 2012-10-30 12:31:20.277414942 +0100
-@@ -45,7 +45,7 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
-
- # don't want the 32 in the shared library name
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
--IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
-+IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
-
- #RES = $(OBJDIR)/$(LIBRARY_NAME).res
- #RESNAME = $(LIBRARY_NAME).rc
---- a/a/a/nss/lib/util/config.mk.dt 2012-10-30 12:31:22.179371231 +0100
-+++ a/a/a/nss/lib/util/config.mk 2012-10-30 12:31:24.074328169 +0100
-@@ -40,7 +40,7 @@ ifeq (,$(filter-out WIN%,$(OS_TARGET)))
-
- # don't want the 32 in the shared library name
- SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
--IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(IMPORT_LIB_SUFFIX)
-+IMPORT_LIBRARY = $(OBJDIR)/$(IMPORT_LIB_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION).$(IMPORT_LIB_SUFFIX)
-
- RES = $(OBJDIR)/$(LIBRARY_NAME).res.o
- RESNAME = $(LIBRARY_NAME).rc
diff --git a/external/openssl/ExternalProject_openssl.mk b/external/openssl/ExternalProject_openssl.mk
index aa25c3a776de..941da5b14eeb 100644
--- a/external/openssl/ExternalProject_openssl.mk
+++ b/external/openssl/ExternalProject_openssl.mk
@@ -42,11 +42,7 @@ OPENSSL_PLATFORM := \
ios-armv7\
,\
$(if $(filter WNT,$(OS)),\
- $(if $(filter GCC,$(COM)),\
- mingw\
- ,\
- $(if $(filter INTEL,$(CPUNAME)),VC-WIN32,VC-WIN64A)\
- )\
+ $(if $(filter INTEL,$(CPUNAME)),VC-WIN32,VC-WIN64A)\
,\
$(if $(filter MACOSX,$(OS)),\
$(if $(filter POWERPC,$(CPUNAME)),darwin-ppc-cc)\
diff --git a/external/openssl/UnpackedTarball_openssl.mk b/external/openssl/UnpackedTarball_openssl.mk
index 9fc5f72656e3..5845e31a436a 100644
--- a/external/openssl/UnpackedTarball_openssl.mk
+++ b/external/openssl/UnpackedTarball_openssl.mk
@@ -13,7 +13,6 @@ $(eval $(call gb_UnpackedTarball_set_tarball,openssl,$(OPENSSL_TARBALL),,openssl
$(eval $(call gb_UnpackedTarball_add_patches,openssl,\
external/openssl/openssllnx.patch \
- external/openssl/opensslmingw.patch \
external/openssl/opensslwnt.patch \
external/openssl/openssl-1.0.1h-win64.patch.1 \
external/openssl/opensslsol.patch \
diff --git a/external/openssl/opensslmingw.patch b/external/openssl/opensslmingw.patch
deleted file mode 100644
index 2a8729cbc26e..000000000000
--- a/external/openssl/opensslmingw.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-diff -ru openssl.orig/Makefile.shared openssl/Makefile.shared
---- a/openssl.orig/Makefile.shared 2016-03-03 21:16:48.751822016 +0100
-+++ b/openssl/Makefile.shared 2016-03-03 21:27:12.615802449 +0100
-@@ -278,7 +278,7 @@
- link_a.cygwin:
- @ $(CALC_VERSIONS); \
- INHIBIT_SYMLINKS=yes; \
-- SHLIB=cyg$(LIBNAME); SHLIB_SOVER=-$(LIBVERSION); SHLIB_SUFFIX=.dll; \
-+ SHLIB=cyg$(LIBNAME); SHLIB_SOVER=; SHLIB_SUFFIX=.dll; \
- dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; extras=; \
- base=-Wl,--enable-auto-image-base; \
- if expr $(PLATFORM) : 'mingw' > /dev/null; then \
-@@ -289,7 +289,11 @@
- SHLIB_SOVER=32; \
- extras="$(LIBNAME).def"; \
- $(PERL) util/mkdef.pl 32 $$SHLIB > $$extras; \
-- base=; [ $(LIBNAME) = "crypto" -a -n "$(FIPSCANLIB)" ] && base=-Wl,--image-base,0x63000000; \
-+ base=; \
-+ if test $(LIBNAME) = "crypto"; then \
-+ SHLIB=libeay32; \
-+ base=-Wl,--image-base,0x63000000; \
-+ fi; \
- fi; \
- dll_name=$$SHLIB$$SHLIB_SOVER$$SHLIB_SUFFIX; \
- $(PERL) util/mkrc.pl $$dll_name | \
-@@ -297,7 +301,7 @@
- extras="$$extras rc.o"; \
- ALLSYMSFLAGS='-Wl,--whole-archive'; \
- NOALLSYMSFLAGS='-Wl,--no-whole-archive'; \
-- SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-Bsymbolic -Wl,--out-implib,lib$(LIBNAME).dll.a $$extras"; \
-+ SHAREDFLAGS="$(CFLAGS) $(SHARED_LDFLAGS) -shared $$base -Wl,-s,-Bsymbolic -Wl,--export-all-symbols -Wl,--out-implib,lib$(LIBNAME).dll.a $$extras"; \
- [ -f apps/$$dll_name ] && rm apps/$$dll_name; \
- [ -f test/$$dll_name ] && rm test/$$dll_name; \
- $(LINK_SO_A) || exit 1; \
-diff -ru openssl.orig/e_os2.h openssl/e_os2.h
---- a/openssl.orig/e_os2.h 2016-03-01 14:35:53.000000000 +0100
-+++ b/openssl/e_os2.h 2016-03-03 21:27:33.179801804 +0100
-@@ -293,7 +293,7 @@
- # ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION
- # define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) \
- type *_shadow_##name(void) \
-- { static type _hide_##name=value; return &_hide_##name; }
-+ { type _hide_##name=value; return &_hide_##name; }
- # define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void)
- # define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name()))
- # else
-diff -ru openssl.orig/ms/mingw32.bat openssl/ms/mingw32.bat
---- a/openssl.orig/ms/mingw32.bat 2016-03-01 14:35:05.000000000 +0100
-+++ b/openssl/ms/mingw32.bat 2016-03-03 21:27:56.487801073 +0100
-@@ -75,15 +75,41 @@
- rem copy ms\tlhelp32.h outinc
-
- echo Building the libraries
--mingw32-make -f ms/mingw32a.mak
-+make -f ms/mingw32a.mak
- if errorlevel 1 goto end
-
- echo Generating the DLLs and input libraries
--dllwrap --dllname libeay32.dll --output-lib out/libeay32.a --def ms/libeay32.def out/libcrypto.a -lws2_32 -lgdi32
-+mv out/libcrypto.a out/libcrypto_static.a
-+mv out/libssl.a out/libssl_static.a
-+dlltool --dllname libeay32.dll --output-lib out/libcrypto.a --input-def ms/libeay32.def
- if errorlevel 1 goto end
--dllwrap --dllname libssl32.dll --output-lib out/libssl32.a --def ms/ssleay32.def out/libssl.a out/libeay32.a
-+gcc --shared --enable-pseudo-reloc -Wl,-Map,out/libeay32.map ms/libeay32.def -o out/libeay32.dll out/libcrypto_static.a -lws2_32 -lgdi32
- if errorlevel 1 goto end
-+dlltool --dllname ssleay32.dll --output-lib out/libssl.a --input-def ms/ssleay32.def
-+if errorlevel 1 goto end
-+if "%MINGW_SHARED_GXXLIB%"=="TRUE" goto shared_gxxlib
-+if "%MINGW_SHARED_GCCLIB%"=="TRUE" goto shared_gcclib
-+gcc --shared --enable-pseudo-reloc -Wl,-Map,out/libeay32.map ms/libeay32.def -o out/libeay32.dll out/libcrypto_static.a -lws2_32 -lgdi32
-+if errorlevel 1 goto end
-+gcc --shared --enable-pseudo-reloc -Wl,-Map,out/ssleay32.map -Lout ms/ssleay32.def -o out/ssleay32.dll out/libssl_static.a -lcrypto
-+if errorlevel 1 goto end
-+goto finished
-+
-+:shared_gcclib
-+gcc --shared -shared-libgcc --enable-pseudo-reloc -Wl,-Map,out/libeay32.map ms/libeay32.def -o out/libeay32.dll out/libcrypto_static.a -lws2_32 -lgdi32
-+if errorlevel 1 goto end
-+gcc --shared -shared-libgcc --enable-pseudo-reloc -Wl,-Map,out/ssleay32.map -Lout ms/ssleay32.def -o out/ssleay32.dll out/libssl_static.a -lcrypto
-+if errorlevel 1 goto end
-+goto finished
-
-+:shared_gxxlib
-+gcc --shared -shared-libgcc --enable-pseudo-reloc -Wl,-Map,out/libeay32.map ms/libeay32.def -o out/libeay32.dll out/libcrypto_static.a -lws2_32 -lgdi32 %MINGW_SHARED_LIBSTDSPP%
-+if errorlevel 1 goto end
-+gcc --shared -shared-libgcc --enable-pseudo-reloc -Wl,-Map,out/ssleay32.map -Lout ms/ssleay32.def -o out/ssleay32.dll out/libssl_static.a -lcrypto %MINGW_SHARED_LIBSTDSPP%
-+if errorlevel 1 goto end
-+goto finished
-+
-+:finished
- echo Done compiling OpenSSL
-
- :end
-diff -ru openssl.orig/util/pl/Mingw32.pl openssl/util/pl/Mingw32.pl
---- a/openssl.orig/util/pl/Mingw32.pl 2016-03-01 14:33:04.000000000 +0100
-+++ b/openssl/util/pl/Mingw32.pl 2016-03-03 21:28:16.691800440 +0100
-@@ -6,11 +6,11 @@
- $o='/';
- $cp='cp';
- $rm='rm -f';
--$mkdir='gmkdir';
-+#$mkdir='gmkdir';
-
--$o='\\';
--$cp='copy';
--$rm='del';
-+#$o='\\';
-+#$cp='copy';
-+#$rm='del';
- $mkdir='mkdir';
-
- # C compiler stuff
-@@ -85,7 +85,8 @@
- ($Name=$name) =~ tr/a-z/A-Z/;
-
- $ret.="$target: \$(${Name}OBJ)\n";
-- $ret.="\tif exist $target \$(RM) $target\n";
-+ $ret.="\t\$(RM) $target\n";
-+# $ret.="\tif exist $target \$(RM) $target\n";
- $ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n";
- $ret.="\t\$(RANLIB) $target\n\n";
- }
diff --git a/external/poppler/poppler-snprintf.patch.1 b/external/poppler/poppler-snprintf.patch.1
index f44dad538010..577660580489 100644
--- a/external/poppler/poppler-snprintf.patch.1
+++ b/external/poppler/poppler-snprintf.patch.1
@@ -1,48 +1,33 @@
--- poppler-0.22.5/poppler/Catalog.cc 2013-06-09 12:16:12.000000000 +0200
+++ poppler-0.22.5/poppler/Catalog.cc 2013-07-08 16:54:30.712095880 +0200
-@@ -40,6 +40,14 @@
+@@ -40,6 +40,9 @@
#include <stddef.h>
#include <stdlib.h>
+#ifdef _WIN32
-+# ifdef __MINGW32__
-+# define LO_SNPRINTF_DLLIMPORT
-+# endif
-+# ifdef _MSC_VER
-+# include <systools/win32/snprintf.h>
-+# endif
++# include <systools/win32/snprintf.h>
+#endif
#include "goo/gmem.h"
#include "Object.h"
#include "PDFDoc.h"
--- poppler-0.22.5/poppler/GlobalParams.cc 2013-03-25 22:48:34.000000000 +0100
+++ poppler-0.22.5/poppler/GlobalParams.cc 2013-07-08 16:55:04.753303654 +0200
-@@ -57,6 +57,12 @@
+@@ -57,6 +57,7 @@
#ifdef _WIN32
# include <shlobj.h>
# include <mbstring.h>
-+# ifdef __MINGW32__
-+# define LO_SNPRINTF_DLLIMPORT
-+# endif
-+# ifdef _MSC_VER
-+# include <systools/win32/snprintf.h>
-+# endif
++# include <systools/win32/snprintf.h>
#endif
#include "goo/gmem.h"
#include "goo/GooString.h"
--- poppler-0.22.5/poppler/PageLabelInfo.cc 2013-03-25 22:48:34.000000000 +0100
+++ poppler-0.22.5/poppler/PageLabelInfo.cc 2013-07-08 16:56:47.977901129 +0200
-@@ -17,6 +17,14 @@
+@@ -17,6 +17,9 @@
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
+#ifdef _WIN32
-+# ifdef __MINGW32__
-+# define LO_SNPRINTF_DLLIMPORT
-+# endif
-+# ifdef _MSC_VER
-+# include <systools/win32/snprintf.h>
-+# endif
++# include <systools/win32/snprintf.h>
+#endif
#include "PageLabelInfo.h"
diff --git a/external/postgresql/ExternalProject_postgresql.mk b/external/postgresql/ExternalProject_postgresql.mk
index 11481117cf7e..85699503f627 100644
--- a/external/postgresql/ExternalProject_postgresql.mk
+++ b/external/postgresql/ExternalProject_postgresql.mk
@@ -19,7 +19,7 @@ $(eval $(call gb_ExternalProject_register_targets,postgresql,\
build \
))
-ifeq ($(OS)$(COM),WNTMSC)
+ifeq ($(OS),WNT)
$(call gb_ExternalProject_get_state_target,postgresql,build) :
$(call gb_ExternalProject_run,build,\
diff --git a/external/python3/ExternalPackage_python3.mk b/external/python3/ExternalPackage_python3.mk
index 864c9cdcff30..8617e0efb34f 100644
--- a/external/python3/ExternalPackage_python3.mk
+++ b/external/python3/ExternalPackage_python3.mk
@@ -11,7 +11,7 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,python3,python3))
$(eval $(call gb_ExternalPackage_use_external_project,python3,python3))
-ifeq ($(OS)-$(COM),WNT-MSC)
+ifeq ($(OS),WNT)
ifeq ($(CPUNAME),X86_64)
python_arch_subdir=amd64/
else
@@ -38,10 +38,6 @@ $(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
PCbuild/$(python_arch_subdir)unicodedata$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)winsound$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
))
-else ifeq ($(OS),WNT) # MinGW
-# TODO how are C modules called on this platform?
-$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/bin/python.exe,python.exe))
-$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYTHON_VERSION_MAJOR).dll,python$(PYTHON_VERSION_MAJOR).dll))
else
$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin,python))
$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).so,libpython$(PYTHON_VERSION_MAJOR).so))
@@ -123,7 +119,7 @@ endif
# (+ toplevel for pyconfig.h)
# that one is generated...
-ifneq ($(OS)-$(COM),WNT-MSC)
+ifneq ($(OS),WNT)
$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
LO_lib/_sysconfigdata.py \
))
diff --git a/external/python3/ExternalProject_python3.mk b/external/python3/ExternalProject_python3.mk
index fefdd1ab3adf..2c97ef116491 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -24,7 +24,7 @@ $(eval $(call gb_ExternalProject_register_targets,python3,\
) \
))
-ifeq ($(OS)$(COM),WNTMSC)
+ifeq ($(OS),WNT)
# TODO: using Debug configuration and related mangling of pyconfig.h
@@ -72,7 +72,6 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
--disable-ipv6 --with-threads OPT="-g0 -fwrapv -O3 -Wall", \
$(if $(gb_Module_CURRENTMODULE_DEBUG_ENABLED), \
OPT="$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS)")) \
- $(if $(filter WNT-GCC,$(OS)-$(COM)),--with-threads ac_cv_printf_zd_format=no) \
$(if $(filter MACOSX,$(OS)), \
$(if $(filter INTEL,$(CPUNAME)),--enable-universalsdk=$(MACOSX_SDK_PATH) \
--with-universal-archs=intel \
@@ -93,8 +92,6 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
$(if $(SYSTEM_EXPAT),,-L$(gb_StaticLibrary_WORKDIR)) \
$(if $(SYSTEM_ZLIB),,-L$(gb_StaticLibrary_WORKDIR)) \
$(if $(SYSBASE), -L$(SYSBASE)/usr/lib) \
- $(if $(filter WNT-GCC,$(OS)-$(COM)), -shared-libgcc \
- $(if $(MINGW_SHARED_GCCLIB),-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2 -Wl$(COMMA)--export-all-symbols)) \
$(gb_LTOFLAGS) \
)" \
&& MAKEFLAGS= $(MAKE) \
diff --git a/external/python33/ExternalPackage_python3.mk b/external/python33/ExternalPackage_python3.mk
index 9341e9c498f2..86467bec5ca9 100644
--- a/external/python33/ExternalPackage_python3.mk
+++ b/external/python33/ExternalPackage_python3.mk
@@ -11,7 +11,7 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,python3,python3))
$(eval $(call gb_ExternalPackage_use_external_project,python3,python3))
-ifeq ($(OS)-$(COM),WNT-MSC)
+ifeq ($(OS),WNT)
ifeq ($(CPUNAME),X86_64)
python_arch_subdir=amd64/
endif
@@ -36,10 +36,6 @@ $(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-cor
PCbuild/$(python_arch_subdir)unicodedata$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
PCbuild/$(python_arch_subdir)winsound$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd \
))
-else ifeq ($(OS),WNT) # MinGW
-# TODO how are C modules called on this platform?
-$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/bin/python.exe,python.exe))
-$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python$(PYTHON_VERSION_MAJOR).dll,python$(PYTHON_VERSION_MAJOR).dll))
else
$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/python.bin,python))
$(eval $(call gb_ExternalPackage_add_file,python3,$(LIBO_BIN_FOLDER)/libpython$(PYTHON_VERSION_MAJOR).so,libpython$(PYTHON_VERSION_MAJOR).so))
@@ -116,7 +112,7 @@ endif
# (+ toplevel for pyconfig.h)
# that one is generated...
-ifneq ($(OS)-$(COM),WNT-MSC)
+ifneq ($(OS),WNT)
$(eval $(call gb_ExternalPackage_add_files,python3,$(LIBO_BIN_FOLDER)/python-core-$(PYTHON_VERSION)/lib,\
LO_lib/_sysconfigdata.py \
))
diff --git a/external/python33/ExternalProject_python3.mk b/external/python33/ExternalProject_python3.mk
index c7d3dc901c9b..577eb29f5129 100644
--- a/external/python33/ExternalProject_python3.mk
+++ b/external/python33/ExternalProject_python3.mk
@@ -24,7 +24,7 @@ $(eval $(call gb_ExternalProject_register_targets,python3,\
) \
))
-ifeq ($(OS)$(COM),WNTMSC)
+ifeq ($(OS),WNT)
# TODO: using Debug configuration and related mangling of pyconfig.h
@@ -64,7 +64,6 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
--disable-ipv6 --with-threads OPT="-g0 -fwrapv -O3 -Wall", \
$(if $(gb_Module_CURRENTMODULE_DEBUG_ENABLED), \
OPT="$(gb_COMPILERNOOPTFLAGS) $(gb_DEBUGINFO_FLAGS) $(gb_DEBUG_CFLAGS)")) \
- $(if $(filter WNT-GCC,$(OS)-$(COM)),--with-threads ac_cv_printf_zd_format=no) \
$(if $(filter MACOSX,$(OS)), \
$(if $(filter INTEL,$(CPUNAME)),--enable-universalsdk=$(MACOSX_SDK_PATH) \
--with-universal-archs=intel \
@@ -84,8 +83,6 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
$(if $(SYSTEM_OPENSSL),,-L$(call gb_UnpackedTarball_get_dir,openssl)) \
$(if $(SYSTEM_EXPAT),,-L$(gb_StaticLibrary_WORKDIR)) \
$(if $(SYSBASE), -L$(SYSBASE)/usr/lib) \
- $(if $(filter WNT-GCC,$(OS)-$(COM)), -shared-libgcc \
- $(if $(MINGW_SHARED_GCCLIB),-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2 -Wl$(COMMA)--export-all-symbols)) \
$(gb_LTOFLAGS) \
)" \
&& MAKEFLAGS= $(MAKE) \
diff --git a/external/python33/UnpackedTarball_python3.mk b/external/python33/UnpackedTarball_python3.mk
index d5db8b45c052..2b2f0be224b9 100644
--- a/external/python33/UnpackedTarball_python3.mk
+++ b/external/python33/UnpackedTarball_python3.mk
@@ -50,7 +50,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
))
endif
-ifeq ($(OS)-$(COM),WNT-MSC)
+ifeq ($(OS),WNT)
ifneq ($(filter 120,$(VCVER)),)
$(eval $(call gb_UnpackedTarball_add_patches,python3,\
external/python33/python-vc2013.patch.1 \
diff --git a/external/redland/ExternalPackage_raptor.mk b/external/redland/ExternalPackage_raptor.mk
index 4a81a165c0de..119e52f9e6ed 100644
--- a/external/redland/ExternalPackage_raptor.mk
+++ b/external/redland/ExternalPackage_raptor.mk
@@ -13,8 +13,6 @@ $(eval $(call gb_ExternalPackage_use_external_project,raptor,raptor))
ifeq ($(OS),MACOSX)
$(eval $(call gb_ExternalPackage_add_file,raptor,$(LIBO_LIB_FOLDER)/libraptor2-lo.$(RAPTOR_MAJOR).dylib,src/.libs/libraptor2-lo.$(RAPTOR_MAJOR).dylib))
-else ifeq ($(OS)-$(COM),WNT-GCC)
-$(eval $(call gb_ExternalPackage_add_file,raptor,$(LIBO_LIB_FOLDER)/libraptor2-$(RAPTOR_MAJOR).dll,src/.libs/libraptor2-$(RAPTOR_MAJOR).dll))
else ifeq ($(COM),MSC)
$(eval $(call gb_ExternalPackage_add_file,raptor,$(LIBO_LIB_FOLDER)/libraptor2.dll,src/.libs/libraptor2.dll))
else ifeq ($(DISABLE_DYNLOADING),)
diff --git a/external/redland/ExternalPackage_rasqal.mk b/external/redland/ExternalPackage_rasqal.mk
index ebe519a113c5..57fe97c38eae 100644
--- a/external/redland/ExternalPackage_rasqal.mk
+++ b/external/redland/ExternalPackage_rasqal.mk
@@ -13,8 +13,6 @@ $(eval $(call gb_ExternalPackage_use_external_project,rasqal,rasqal))
ifeq ($(OS),MACOSX)
$(eval $(call gb_ExternalPackage_add_file,rasqal,$(LIBO_LIB_FOLDER)/librasqal-lo.$(RASQAL_MAJOR).dylib,src/.libs/librasqal-lo.$(RASQAL_MAJOR).dylib))
-else ifeq ($(OS)-$(COM),WNT-GCC)
-$(eval $(call gb_ExternalPackage_add_file,rasqal,$(LIBO_LIB_FOLDER)/librasqal-$(RASQAL_MAJOR).dll,src/.libs/librasqal-$(RASQAL_MAJOR).dll))
else ifeq ($(COM),MSC)
$(eval $(call gb_ExternalPackage_add_file,rasqal,$(LIBO_LIB_FOLDER)/librasqal.dll,src/.libs/librasqal.dll))
else ifeq ($(DISABLE_DYNLOADING),)
diff --git a/external/redland/ExternalPackage_redland.mk b/external/redland/ExternalPackage_redland.mk
index d37ae8622f79..8c35d850e910 100644
--- a/external/redland/ExternalPackage_redland.mk
+++ b/external/redland/ExternalPackage_redland.mk
@@ -13,8 +13,6 @@ $(eval $(call gb_ExternalPackage_use_external_project,redland,redland))
ifeq ($(OS),MACOSX)
$(eval $(call gb_ExternalPackage_add_file,redland,$(LIBO_LIB_FOLDER)/librdf-lo.$(REDLAND_MAJOR).dylib,src/.libs/librdf-lo.$(REDLAND_MAJOR).dylib))
-else ifeq ($(OS)-$(COM),WNT-GCC)
-$(eval $(call gb_ExternalPackage_add_file,redland,$(LIBO_LIB_FOLDER)/librdf-$(REDLAND_MAJOR).dll,src/.libs/librdf-$(REDLAND_MAJOR).dll))
else ifeq ($(COM),MSC)
$(eval $(call gb_ExternalPackage_add_file,redland,$(LIBO_LIB_FOLDER)/librdf.dll,src/.libs/librdf.dll))
else ifeq ($(DISABLE_DYNLOADING),)
diff --git a/external/redland/ExternalProject_raptor.mk b/external/redland/ExternalProject_raptor.mk
index 51efb1a2212b..70e28edf99b8 100644
--- a/external/redland/ExternalProject_raptor.mk
+++ b/external/redland/ExternalProject_raptor.mk
@@ -15,23 +15,6 @@ $(eval $(call gb_ExternalProject_register_targets,raptor,\
build \
))
-ifeq ($(OS),WNT)
-$(call gb_ExternalProject_get_state_target,raptor,build):
- $(call gb_ExternalProject_run,build,\
- CC="$(CC) -mthreads $(if $(MINGW_SHARED_GCCLIB),-shared-libgcc)" \
- LDFLAGS="-Wl$(COMMA)--no-undefined -Wl$(COMMA)--enable-runtime-pseudo-reloc-v2 -Wl$(COMMA)--export-all-symbols $(subst ;, -L,$(ILIB))" \
- OBJDUMP="$(HOST_PLATFORM)-objdump" \
- $(if $(and $(SYSTEM_LIBXML),$(filter GCC,$(COM))),PATH="$(MINGW_SYSROOT)/bin:$$PATH") \
- ./configure --disable-static --enable-shared --disable-gtk-doc \
- --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" \
- --with-www=xml \
- --without-xslt-config \
- --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --target=$(HOST_PLATFORM) \
- lt_cv_cc_dll_switch="-shared" \
- $(if $(SYSTEM_LIBXML),,--with-xml2-config=$(call gb_UnpackedTarball_get_dir,xml2)/xml2-config) \
- && $(MAKE) \
- )
-else
$(call gb_ExternalProject_get_state_target,raptor,build):
$(call gb_ExternalProject_run,build,\
$(if $(filter IOS,$(OS)),LIBS="-liconv") \
@@ -56,6 +39,5 @@ $(call gb_ExternalProject_get_state_target,raptor,build):
$(if $(SYSTEM_LIBXML),,--with-xml2-config=$(call gb_UnpackedTarball_get_dir,xml2)/xml2-config) \
&& $(MAKE) \
)
-endif
# vim: set noet sw=4 ts=4:
diff --git a/external/redland/ExternalProject_rasqal.mk b/external/redland/ExternalProject_rasqal.mk
index 49c3f6555a3d..2d9393e14a34 100644
--- a/external/redland/ExternalProject_rasqal.mk
+++ b/external/redland/ExternalProject_rasqal.mk
@@ -19,26 +19,6 @@ $(eval $(call gb_ExternalProject_register_targets,rasqal,\
# note: this can intentionally only build against internal raptor (not system)
-ifeq ($(OS),WNT)
-$(call gb_ExternalProject_get_state_target,rasqal,build):
- $(call gb_ExternalProject_run,build,\
- CC="$(CC) -mthreads $(if $(MINGW_SHARED_GCCLIB),-shared-libgcc)" \
- LDFLAGS="-Wl$(COMMA)--no-undefined -Wl$(COMMA)--enable-runtime-pseudo-reloc-v2 -Wl$(COMMA)--export-all-symbols $(subst ;, -L$,$(ILIB))" \
- OBJDUMP="$(HOST_PLATFORM)-objdump" \
- PKG_CONFIG="" \
- RAPTOR2_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,raptor)/src" \
- RAPTOR2_LIBS="-L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2" \
- ./configure --disable-static --enable-shared --disable-gtk-doc \
- --disable-pcre \
- --with-decimal=none \
- --with-uuid-library=internal \
- --with-digest-library=internal \
- --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
- lt_cv_cc_dll_switch="-shared" \
- $(if $(SYSTEM_LIBXML),,--with-xml2-config=$(call gb_UnpackedTarball_get_dir,xml2)/xml2-config) \
- && $(MAKE) \
- )
-else
$(call gb_ExternalProject_get_state_target,rasqal,build):
$(call gb_ExternalProject_run,build,\
CFLAGS="$(CFLAGS) $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-fvisibility=hidden)" \
@@ -68,6 +48,5 @@ $(call gb_ExternalProject_get_state_target,rasqal,build):
$(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
$(gb_Package_SOURCEDIR_rasqal)/src/.libs/librasqal-lo.$(RASQAL_MAJOR).dylib) \
)
-endif
# vim: set noet sw=4 ts=4:
diff --git a/external/redland/ExternalProject_redland.mk b/external/redland/ExternalProject_redland.mk
index 64746ff16077..e127755da0da 100644
--- a/external/redland/ExternalProject_redland.mk
+++ b/external/redland/ExternalProject_redland.mk
@@ -20,27 +20,6 @@ $(eval $(call gb_ExternalProject_register_targets,redland,\
# note: this can intentionally only build against internal raptor/rasqal
-ifeq ($(OS),WNT)
-$(call gb_ExternalProject_get_state_target,redland,build):
- $(call gb_ExternalProject_run,build,\
- CC="$(CC) -mthreads $(if $(MINGW_SHARED_GCCLIB),-shared-libgcc)" \
- LDFLAGS="-Wl$(COMMA)--no-undefined -Wl$(COMMA)--enable-runtime-pseudo-reloc-v2 -Wl$(COMMA)--export-all-symbols" \
- OBJDUMP="$(HOST_PLATFORM)-objdump" \
- PKG_CONFIG="" \
- RAPTOR2_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,raptor)/src" \
- RAPTOR2_LIBS="-L$(call gb_UnpackedTarball_get_dir,raptor)/src/.libs -lraptor2 $(LIBXML_LIBS)" \
- RASQAL_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,rasqal)/src" \
- RASQAL_LIBS="-L$(call gb_UnpackedTarball_get_dir,rasqal)/src/.libs -lrasqal" \
- ./configure --disable-static --disable-gtk-doc \
- --disable-modular \
- --without-threads \
- --without-bdb --without-sqlite --without-mysql \
- --without-postgresql --without-threestore --without-virtuoso \
- --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
- lt_cv_cc_dll_switch="-shared" \
- && $(MAKE) \
- )
-else
$(call gb_ExternalProject_get_state_target,redland,build):
$(call gb_ExternalProject_run,build,\
CFLAGS="$(CFLAGS) $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-fvisibility=hidden)" \
@@ -71,6 +50,5 @@ $(call gb_ExternalProject_get_state_target,redland,build):
$(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
$(gb_Package_SOURCEDIR_redland)/src/.libs/librdf-lo.$(REDLAND_MAJOR).dylib) \
)
-endif
# vim: set noet sw=4 ts=4:
diff --git a/external/redland/UnpackedTarball_raptor.mk b/external/redland/UnpackedTarball_raptor.mk
index 762903018d43..7df3ee6db40f 100644
--- a/external/redland/UnpackedTarball_raptor.mk
+++ b/external/redland/UnpackedTarball_raptor.mk
@@ -20,7 +20,6 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,raptor,0))
$(eval $(call gb_UnpackedTarball_add_patches,raptor,\
external/redland/raptor/raptor-freebsd.patch.1 \
external/redland/raptor/raptor-msvc.patch.1 \
- $(if $(filter WNTGCC,$(OS)$(COM)),external/redland/raptor/raptor-mingw.patch.1) \
$(if $(filter-out WNT,$(OS)),external/redland/raptor/raptor-bundled-soname.patch.1) \
$(if $(filter ANDROID,$(OS)),external/redland/raptor/raptor-android.patch.1) \
external/redland/raptor/ubsan.patch \
diff --git a/external/redland/UnpackedTarball_rasqal.mk b/external/redland/UnpackedTarball_rasqal.mk
index 37e4fafee0a8..ed479a942d10 100644
--- a/external/redland/UnpackedTarball_rasqal.mk
+++ b/external/redland/UnpackedTarball_rasqal.mk
@@ -23,7 +23,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,rasqal,\
external/redland/rasqal/rasqal-aix.patch.1 \
$(if $(filter-out WNT,$(OS)),external/redland/rasqal/rasqal-bundled-soname.patch.1) \
$(if $(filter ANDROID,$(OS)),external/redland/rasqal/rasqal-android.patch.1) \
- $(if $(filter WNTGCC,$(OS)$(COM)),external/redland/rasqal/rasqal-mingw.patch.1) \
$(if $(CROSS_COMPILING),external/redland/rasqal/rasqal-xcompile.patch.1) \
external/redland/rasqal/rpath.patch \
external/redland/rasqal/clang-cl.patch \
diff --git a/external/redland/UnpackedTarball_redland.mk b/external/redland/UnpackedTarball_redland.mk
index e543b05fb05e..92c54aea147a 100644
--- a/external/redland/UnpackedTarball_redland.mk
+++ b/external/redland/UnpackedTarball_redland.mk
@@ -23,7 +23,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,redland,\
external/redland/redland/redland-msvc.patch.1 \
$(if $(filter-out WNT,$(OS)),external/redland/redland/redland-bundled-soname.patch.1) \
$(if $(filter ANDROID,$(OS)),external/redland/redland/redland-android.patch.1) \
- $(if $(filter WNTGCC,$(OS)$(COM)),external/redland/redland/redland-mingw.patch.1) \
$(if $(CROSS_COMPILING),external/redland/redland/redland-xcompile.patch.1) \
external/redland/redland/redland-format.patch.0 \
external/redland/redland/rpath.patch \
diff --git a/external/redland/raptor/raptor-mingw.patch.1 b/external/redland/raptor/raptor-mingw.patch.1
deleted file mode 100644
index db4121829e5b..000000000000
--- a/external/redland/raptor/raptor-mingw.patch.1
+++ /dev/null
@@ -1,13 +0,0 @@
-MinGW: libtool falls back to static lib unless -no-undefined given
-
---- a/src/Makefile.in 2013-03-29 19:11:27.944919859 +0100
-+++ b/src/Makefile.in 2013-03-29 20:05:02.140892243 +0100
-@@ -507,7 +507,7 @@
- $(am__append_21) $(am__append_22) $(am__append_23) \
- $(am__append_24) $(am__append_25) $(am__append_26)
- libraptor2_la_LIBADD = $(am__append_29) @LTLIBOBJS@
--libraptor2_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ \
-+libraptor2_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ -no-undefined \
- @RAPTOR_LDFLAGS@ $(MEM_LIBS)
-
- EXTRA_DIST = \
diff --git a/external/redland/rasqal/rasqal-mingw.patch.1 b/external/redland/rasqal/rasqal-mingw.patch.1
deleted file mode 100644
index 5d808b7330c0..000000000000
--- a/external/redland/rasqal/rasqal-mingw.patch.1
+++ /dev/null
@@ -1,13 +0,0 @@
-MinGW: libtool falls back to static lib unless -no-undefined given
-
---- a/src/Makefile.in 2013-03-29 21:44:58.115840724 +0100
-+++ b/src/Makefile.in 2013-03-29 21:46:43.024839823 +0100
-@@ -621,7 +621,7 @@
- $(am__append_2) $(am__append_3) $(am__append_4) \
- $(am__append_5) $(am__append_6) $(am__append_7)
- nodist_librasqal_la_SOURCES = $(am__append_8)
--librasqal_la_LDFLAGS = -version-info @RASQAL_LIBTOOL_VERSION@
-+librasqal_la_LDFLAGS = -version-info @RASQAL_LIBTOOL_VERSION@ -no-undefined
- librasqal_la_LIBADD = @LTLIBOBJS@ @RASQAL_INTERNAL_LIBS@ \
- @RASQAL_EXTERNAL_LIBS@ $(MEM_LIBS) \
- $(top_builddir)/libsv/libsv.la $(am__append_10)
diff --git a/external/redland/redland/redland-mingw.patch.1 b/external/redland/redland/redland-mingw.patch.1
deleted file mode 100644
index 358633d247b6..000000000000
--- a/external/redland/redland/redland-mingw.patch.1
+++ /dev/null
@@ -1,13 +0,0 @@
-MinGW: libtool falls back to static lib unless -no-undefined given
-
---- redland/src/Makefile.in.old 2013-03-30 17:43:48.127008037 +0100
-+++ redland/src/Makefile.in 2013-03-30 17:47:15.753006253 +0100
-@@ -625,7 +625,7 @@
- rdf_parser_raptor.c
-
- EXTRA_DIST = redland.spec redland.spec.in mysql-v1.ttl mysql-v2.ttl
--librdf_la_LDFLAGS = -version-info @LIBRDF_LIBTOOL_VERSION@ \
-+librdf_la_LDFLAGS = -version-info @LIBRDF_LIBTOOL_VERSION@ -no-undefined \
- @LIBRDF_LDFLAGS@ @LIBRDF_EXTERNAL_LIBS@
-
- pkgdata_DATA = $(am__append_13)
diff --git a/external/redland/redland/redland-msvc.patch.1 b/external/redland/redland/redland-msvc.patch.1
index c307c7e17a37..c69366bc23f5 100644
--- a/external/redland/redland/redland-msvc.patch.1
+++ b/external/redland/redland/redland-msvc.patch.1
@@ -86,17 +86,7 @@
/* Define to 1 if you have the <openssl/crypto.h> header file. */
/* #undef HAVE_OPENSSL_CRYPTO_H */
-@@ -178,6 +181,9 @@
-
- /* Define to 1 if you have the <pthread.h> header file. */
- /* #undef HAVE_PTHREAD_H */
-+#ifdef __MINGW32__
-+#undef HAVE_PTHREAD_H
-+#endif
-
- /* Define to 1 if you have the <stdint.h> header file. */
- #define HAVE_STDINT_H 1
-@@ -261,7 +270,7 @@
+@@ -261,7 +267,7 @@
/*#undef STORAGE_POSTGRESQL*/
/* Building SQLite storage */
diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx
index d48c49830e0a..4dffe3f2f4c5 100644
--- a/forms/source/xforms/datatypes.cxx
+++ b/forms/source/xforms/datatypes.cxx
@@ -191,7 +191,7 @@ namespace xforms
void lcl_initializePatternMatcher( ::std::unique_ptr< RegexMatcher >& _rpMatcher, const OUString& _rPattern )
{
UErrorCode nMatchStatus = U_ZERO_ERROR;
- UnicodeString aIcuPattern( reinterpret_cast<const UChar *>(_rPattern.getStr()), _rPattern.getLength() ); // UChar != sal_Unicode in MinGW
+ UnicodeString aIcuPattern( reinterpret_cast<const UChar *>(_rPattern.getStr()), _rPattern.getLength() );
_rpMatcher.reset( new RegexMatcher( aIcuPattern, 0, nMatchStatus ) );
OSL_ENSURE( U_SUCCESS( nMatchStatus ), "lcl_initializePatternMatcher: invalid pattern property!" );
// if asserts, then something changed our pattern without going to convertFastPropertyValue/checkPropertySanity
@@ -200,7 +200,7 @@ namespace xforms
bool lcl_matchString( RegexMatcher& _rMatcher, const OUString& _rText )
{
UErrorCode nMatchStatus = U_ZERO_ERROR;
- UnicodeString aInput( reinterpret_cast<const UChar *>(_rText.getStr()), _rText.getLength() ); // UChar != sal_Unicode in MinGW
+ UnicodeString aInput( reinterpret_cast<const UChar *>(_rText.getStr()), _rText.getLength() );
_rMatcher.reset( aInput );
if ( _rMatcher.matches( nMatchStatus ) )
{
@@ -271,7 +271,7 @@ namespace xforms
OUString sPattern;
OSL_VERIFY( _rNewValue >>= sPattern );
- UnicodeString aIcuPattern( reinterpret_cast<const UChar *>(sPattern.getStr()), sPattern.getLength() ); // UChar != sal_Unicode in MinGW
+ UnicodeString aIcuPattern( reinterpret_cast<const UChar *>(sPattern.getStr()), sPattern.getLength() );
UErrorCode nMatchStatus = U_ZERO_ERROR;
RegexMatcher aMatcher( aIcuPattern, 0, nMatchStatus );
if ( U_FAILURE( nMatchStatus ) )
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
index b4c1e9bcc0ee..eb798d87c348 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx
@@ -33,9 +33,6 @@
#include <osl/file.hxx>
#include <osl/mutex.hxx>
#include <rtl/process.h>
-#ifdef __MINGW32__
-#include <limits.h>
-#endif
#include "../misc/WinImplHelper.hxx"
#include <shlguid.h>
@@ -64,14 +61,8 @@ bool createFolderItem(OUString const & url, ComPtr<IShellItem> & folder) {
{
return false;
}
-#if defined __MINGW32__
- HRESULT res = SHCreateItemFromParsingName(
- reinterpret_cast<PCWSTR>(path.getStr()), NULL, IID_IShellItem,
- reinterpret_cast<void **>(&folder));
-#else
HRESULT res = SHCreateItemFromParsingName(
path.getStr(), nullptr, IID_PPV_ARGS(&folder));
-#endif
return SUCCEEDED(res);
}
@@ -416,11 +407,7 @@ void VistaFilePickerImpl::impl_sta_CreateOpenDialog(const RequestRef& rRequest)
return;
TFileDialog iDialog;
-#ifdef __MINGW32__
- m_iDialogOpen->QueryInterface(IID_IFileDialog, (void **)(&iDialog));
-#else
m_iDialogOpen.query(&iDialog);
-#endif
TFileDialogEvents iHandler = m_iEventHandler;
@@ -459,11 +446,7 @@ void VistaFilePickerImpl::impl_sta_CreateSaveDialog(const RequestRef& rRequest)
TFileDialogEvents iHandler = m_iEventHandler;
TFileDialog iDialog;
-#ifdef __MINGW32__
- m_iDialogSave->QueryInterface(IID_IFileDialog, (void **)(&iDialog));
-#else
m_iDialogSave.query(&iDialog);
-#endif
aLock.clear();
// <- SYNCHRONIZED
@@ -998,17 +981,9 @@ TFileDialog VistaFilePickerImpl::impl_getBaseDialogInterface()
::osl::ResettableMutexGuard aLock(m_aMutex);
if (m_iDialogOpen.is())
-#ifdef __MINGW32__
- m_iDialogOpen->QueryInterface(IID_IFileDialog, (void**)(&iDialog));
-#else
m_iDialogOpen.query(&iDialog);
-#endif
if (m_iDialogSave.is())
-#ifdef __MINGW32__
- m_iDialogSave->QueryInterface(IID_IFileDialog, (void**)(&iDialog));
-#else
m_iDialogSave.query(&iDialog);
-#endif
return iDialog;
}
@@ -1022,17 +997,9 @@ TFileDialogCustomize VistaFilePickerImpl::impl_getCustomizeInterface()
::osl::ResettableMutexGuard aLock(m_aMutex);
if (m_iDialogOpen.is())
-#ifdef __MINGW32__
- m_iDialogOpen->QueryInterface(IID_IFileDialogCustomize, (void**)(&iCustom));
-#else
m_iDialogOpen.query(&iCustom);
-#endif
else if (m_iDialogSave.is())
-#ifdef __MINGW32__
- m_iDialogSave->QueryInterface(IID_IFileDialogCustomize, (void**)(&iCustom));
-#else
m_iDialogSave.query(&iCustom);
-#endif
return iCustom;
}
diff --git a/fpicker/source/win32/filepicker/comptr.hxx b/fpicker/source/win32/filepicker/comptr.hxx
index 89fc85b34787..b7f123833a34 100644
--- a/fpicker/source/win32/filepicker/comptr.hxx
+++ b/fpicker/source/win32/filepicker/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), reinterpret_cast<void**>(pQuery));
}
-#endif
-
bool equals(IUnknown* pCheck)
{
diff --git a/fpicker/source/win32/folderpicker/MtaFop.hxx b/fpicker/source/win32/folderpicker/MtaFop.hxx
index 6f9eeeabb681..06529bab7add 100644
--- a/fpicker/source/win32/folderpicker/MtaFop.hxx
+++ b/fpicker/source/win32/folderpicker/MtaFop.hxx
@@ -29,9 +29,6 @@
#include <osl/mutex.hxx>
#include <utility>
-#ifdef __MINGW32__
-#include <windows.h>
-#endif
#if defined _MSC_VER
#pragma warning(push, 1)
#pragma warning(disable: 4917)
diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx
index 35af12103962..3f9dce9c81ba 100644
--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx
+++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx
@@ -197,7 +197,6 @@ void SAL_CALL BreakIterator_Unicode::loadICUBreakIterator(const css::lang::Local
if (bNewBreak || icuBI->aICUText.pData != rText.pData)
{
- // UChar != sal_Unicode in MinGW
const UChar *pText = reinterpret_cast<const UChar *>(rText.getStr());
icuBI->ut = utext_openUChars(icuBI->ut, pText, rText.getLength(), &status);
diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx
index dfba7ac57b1e..21c7deee2860 100644
--- a/i18npool/source/collator/collator_unicode.cxx
+++ b/i18npool/source/collator/collator_unicode.cxx
@@ -115,13 +115,13 @@ sal_Int32 SAL_CALL
Collator_Unicode::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int32 len1,
const OUString& str2, sal_Int32 off2, sal_Int32 len2)
{
- return collator->compare(reinterpret_cast<const UChar *>(str1.getStr()) + off1, len1, reinterpret_cast<const UChar *>(str2.getStr()) + off2, len2); // UChar != sal_Unicode in MinGW
+ return collator->compare(reinterpret_cast<const UChar *>(str1.getStr()) + off1, len1, reinterpret_cast<const UChar *>(str2.getStr()) + off2, len2);
}
sal_Int32 SAL_CALL
Collator_Unicode::compareString( const OUString& str1, const OUString& str2)
{
- return collator->compare(reinterpret_cast<const UChar *>(str1.getStr()), reinterpret_cast<const UChar *>(str2.getStr())); // UChar != sal_Unicode in MinGW
+ return collator->compare(reinterpret_cast<const UChar *>(str1.getStr()), reinterpret_cast<const UChar *>(str2.getStr()));
}
#ifndef DISABLE_DYNLOADING
@@ -137,7 +137,7 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
UErrorCode status = U_ZERO_ERROR;
OUString rule = LocaleDataImpl::get()->getCollatorRuleByAlgorithm(rLocale, rAlgorithm);
if (!rule.isEmpty()) {
- collator = new RuleBasedCollator(reinterpret_cast<const UChar *>(rule.getStr()), status); // UChar != sal_Unicode in MinGW
+ collator = new RuleBasedCollator(reinterpret_cast<const UChar *>(rule.getStr()), status);
if (! U_SUCCESS(status)) throw RuntimeException();
}
if (!collator && OUString(LOCAL_RULE_LANGS).indexOf(rLocale.Language) >= 0) {
diff --git a/i18npool/source/collator/gencoll_rule.cxx b/i18npool/source/collator/gencoll_rule.cxx
index 70dd38eab65e..897d47fd8a69 100644
--- a/i18npool/source/collator/gencoll_rule.cxx
+++ b/i18npool/source/collator/gencoll_rule.cxx
@@ -112,7 +112,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
//UCollator *coll = ucol_openRules(Obuf.getStr(), Obuf.getLength(), UCOL_OFF,
// UCOL_DEFAULT_STRENGTH, &parseError, &status);
- RuleBasedCollator *coll = new RuleBasedCollator(reinterpret_cast<const UChar *>(Obuf.getStr()), status); // UChar != sal_Unicode in MinGW
+ RuleBasedCollator *coll = new RuleBasedCollator(reinterpret_cast<const UChar *>(Obuf.getStr()), status);
if (U_SUCCESS(status)) {
std::vector<uint8_t> data;
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
-
diff --git a/m4/mingw.m4 b/m4/mingw.m4
deleted file mode 100644
index d75d6a0bdddf..000000000000
--- a/m4/mingw.m4
+++ /dev/null
@@ -1,90 +0,0 @@
-dnl
-dnl This file is part of the LibreOffice project.
-dnl
-dnl This Source Code Form is subject to the terms of the Mozilla Public
-dnl License, v. 2.0. If a copy of the MPL was not distributed with this
-dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
-dnl
-
-# libo_MINGW_CHECK_DLL(dll-name-stem,[action-if-found],[action-if-not-found])
-#
-# Checks for presence of dll dll-name-stem . Appends the dll name to
-# variable MINGW_DLLS if found, issues an error otherwise.
-#
-# It recognizes these dll patterns (x, y match any character, but they
-# are supposed to be numerals):
-# * name-x.dll
-# * name-xy.dll
-# * name-x.y.dll
-# * name.dll
-#
-#
-# Example:
-# MINGW_DLLS=
-# libo_MINGW_CHECK_DLL([libexpat])
-# might result in MINGW_DLLS containing libexpat-1.dll .
-#
-# uses MINGW_SYSROOT, WITH_MINGW
-# changes MINGW_DLLS
-# ------------------------------------------------------------------------------------------
-AC_DEFUN([libo_MINGW_CHECK_DLL],
-[dnl
-
-if test -n "$WITH_MINGW"; then
- _libo_mingw_dlldir="[$MINGW_SYSROOT]"/bin
- _libo_mingw_dllname=
- AC_MSG_CHECKING([for $1 dll])
-
- dnl try one- or two-numbered version
- _libo_mingw_try_dll([$1][-?.dll])
- if test "$_libo_mingw_dllname" = ""; then
- _libo_mingw_try_dll([$1][-??.dll])
- fi
- dnl maybe the version contains a dot (e.g., libdb)
- if test "$_libo_mingw_dllname" = ""; then
- _libo_mingw_try_dll([$1][-?.?.dll])
- fi
- dnl maybe the version contains a dash (e.g., libpixman)
- if test "$_libo_mingw_dllname" = ""; then
- _libo_mingw_try_dll([$1][-?-?.dll])
- fi
- dnl maybe it is not versioned
- if test "$_libo_mingw_dllname" = ""; then
- _libo_mingw_try_dll([$1][.dll])
- fi
-
- if test "$_libo_mingw_dllname" = ""; then
- AC_MSG_RESULT([no])
- m4_default([$3],[AC_MSG_ERROR([no dll found for $1])])
- else
- AC_MSG_RESULT([$_libo_mingw_dllname])
- MINGW_DLLS="$MINGW_DLLS $_libo_mingw_dllname"
- m4_default([$2],[])
- fi
-fi[]dnl
-]) # libo_MINGW_CHECK_DLL
-
-# libo_MINGW_TRY_DLL(dll-name-stem)
-#
-# Checks for presence of dll dll-name-stem . Appends the dll name to
-# variable MINGW_DLLS if found, does nothing otherwise.
-#
-# See libo_MINGW_CHECK_DLL for further info.
-#
-# uses MINGW_SYSROOT, WITH_MINGW
-# changes MINGW_DLLS
-# ------------------------------------------------
-AC_DEFUN([libo_MINGW_TRY_DLL],
-[dnl TODO: ignore already tested for dlls
-libo_MINGW_CHECK_DLL([$1],[[]],[[]])dnl
-]) # libo_MINGW_TRY_DLL
-
-# _libo_mingw_try_dll(dll-name,dll-dir)
-m4_define([_libo_mingw_try_dll],
-[_libo_mingw_trying_dll=`ls "[$_libo_mingw_dlldir]"/[$1] 2>/dev/null`
-if test -f "$_libo_mingw_trying_dll"; then
- _libo_mingw_dllname=`basename "$_libo_mingw_trying_dll"`
-fi[]dnl
-]) # _libo_mingw_try_dll
-
-dnl vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/odk/CustomTarget_check.mk b/odk/CustomTarget_check.mk
index 8328fc8a4b0b..dc983e2f67d8 100644
--- a/odk/CustomTarget_check.mk
+++ b/odk/CustomTarget_check.mk
@@ -13,8 +13,7 @@ $(eval $(call gb_CustomTarget_register_targets,odk/check,\
checkbin \
))
-odk_PLATFORM := $(if $(filter WNT,$(OS)),\
- $(if $(filter GCC,$(COM)),mingw,windows),\
+odk_PLATFORM := $(if $(filter WNT,$(OS)),windows,\
$(if $(filter SOLARIS,$(OS)),\
$(if $(filter SPARC,$(CPUNAME)),solsparc,\
$(if $(filter SPARC64,$(CPUNAME)),solsparc64,solintel)),\
diff --git a/odk/util/check.pl b/odk/util/check.pl
index 8dfbfcc6ba56..03b58fe3da7c 100644
--- a/odk/util/check.pl
+++ b/odk/util/check.pl
@@ -62,8 +62,8 @@ if (-d "$SdkDir") {
}
}
- if ($OperatingSystem eq "windows" || $OperatingSystem eq "mingw") {
- if ($OperatingSystem eq "windows" && !check_file("bin/climaker.exe")) {
+ if ($OperatingSystem eq "windows") {
+ if (!check_file("bin/climaker.exe")) {
$return++;
print "\nERROR: \"bin/climaker.exe\" is missing\n";
} else {
@@ -110,7 +110,7 @@ if (-d "$SdkDir") {
#check configure files
print "check config files: ";
- if ($OperatingSystem eq "windows" || $OperatingSystem eq "mingw") {
+ if ($OperatingSystem eq "windows") {
if (!check_file("setsdkenv_windows.bat")) {
print "\nERROR: \"setsdkenv_windows.bat\" is missing\n";
$return++;
diff --git a/postprocess/signing/no_signing.txt b/postprocess/signing/no_signing.txt
index 26ba6aab7e92..53aaac652c2b 100644
--- a/postprocess/signing/no_signing.txt
+++ b/postprocess/signing/no_signing.txt
@@ -8,4 +8,3 @@ policy.1.0.cli_oootypes.dll
policy.1.0.cli_ure.dll
policy.1.0.cli_cppuhelper.dll
policy.1.0.cli_basetypes.dll
-mingwm10.dll
diff --git a/pyuno/CustomTarget_pyuno_pythonloader_ini.mk b/pyuno/CustomTarget_pyuno_pythonloader_ini.mk
index 51cb35f3d981..3dfd4549c1ac 100644
--- a/pyuno/CustomTarget_pyuno_pythonloader_ini.mk
+++ b/pyuno/CustomTarget_pyuno_pythonloader_ini.mk
@@ -28,7 +28,7 @@ $(call gb_CustomTarget_get_workdir,pyuno/pythonloader_ini)/$(call gb_Helper_get_
'', \
$(if $(filter MACOSX,$(OS)), \
'$(foreach dir,/ /lib-dynload /lib-tk /site-packages,$(patsubst %/,%,$$ORIGIN/../Frameworks/LibreOfficePython.framework/Versions/Current/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)$(dir))) ', \
- $(if $(filter WNTMSC,$(OS)$(COM)), \
+ $(if $(filter WNT,$(OS)), \
'$(foreach dir,/ /site-packages,$(patsubst %/,%,$$ORIGIN/python-core-$(PYTHON_VERSION)/lib$(dir))) ', \
'$(foreach dir,/ /lib-dynload /lib-tk /site-packages,$(patsubst %/,%,$$ORIGIN/python-core-$(PYTHON_VERSION)/lib$(dir))) '))) \
) > $@
diff --git a/pyuno/CustomTarget_zipcore.mk b/pyuno/CustomTarget_zipcore.mk
deleted file mode 100644
index 42b37a831b04..000000000000
--- a/pyuno/CustomTarget_zipcore.mk
+++ /dev/null
@@ -1,34 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_CustomTarget_CustomTarget,pyuno/zipcore))
-
-# system python (only mingw)
-ifneq ($(SYSTEM_PYTHON),)
-# mingw: MINGW_SYSROOT is defined in configure
-ifeq ($(OS)$(COM),WNTGCC)
-pyuno_PYTHON_LIB_DIR=$(MINGW_SYSROOT)/lib/python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)
-endif
-else
-$(error SHOULD NOT GET HERE)
-endif
-
-pyuno_PYTHON_ARCHIVE_NAME:=python-core-$(PYTHON_VERSION).zip
-
-$(call gb_CustomTarget_get_target,pyuno/zipcore) : \
- $(call gb_CustomTarget_get_workdir,pyuno/zipcore)/$(pyuno_PYTHON_ARCHIVE_NAME)
-
-# create zip archive
-$(call gb_CustomTarget_get_workdir,pyuno/zipcore)/$(pyuno_PYTHON_ARCHIVE_NAME) \
- : $(call gb_ExternalPackage_get_target,python3) \
- | $(call gb_CustomTarget_get_workdir,pyuno/zipcore)/.dir
- $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),ZIP,1)
- cd $(pyuno_PYTHON_LIB_DIR) && zip -q $@ $(shell cd $(pyuno_PYTHON_LIB_DIR) && $(FIND) . -type f | grep -v "\.pyc" | grep -v "\.py~" | grep -v .orig | grep -v _failed)
-
-# vim: set noet sw=4 ts=4:
diff --git a/pyuno/GeneratedPackage_python-core.mk b/pyuno/GeneratedPackage_python-core.mk
deleted file mode 100644
index ec6123ed3921..000000000000
--- a/pyuno/GeneratedPackage_python-core.mk
+++ /dev/null
@@ -1,20 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_GeneratedPackage_GeneratedPackage,python-core,$(MINGW_SYSROOT)/lib))
-
-# NOTE: The original code excluded *.pyc, *.py~, *.orig and *_failed . I
-# assume it was just a size optimization. If their presence actually
-# causes a problem, an extension of GeneratedPackage is is left as an
-# exercise for the poor misguided person who wants to cross-compile
-# with mingw and system python and actually use the results for
-# something.
-$(eval $(call gb_GeneratedPackage_add_dir,python-core,$(INSTDIR)/program/python-core-$(PYTHON_VERSION)/lib,python$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)))
-
-# vim: set noet sw=4 ts=4:
diff --git a/pyuno/Module_pyuno.mk b/pyuno/Module_pyuno.mk
index 9d38455c69f2..fb38a50119da 100644
--- a/pyuno/Module_pyuno.mk
+++ b/pyuno/Module_pyuno.mk
@@ -26,12 +26,7 @@ $(eval $(call gb_Module_add_targets,pyuno,\
))
endif
-#
# Windows: only --enable-python=internal possible
-# mingw: both cases possible: internal && system
-# that why it makes sense to handle the next 3 targets
-# with SYSTEM_PYTHON=TRUE and SYSTEM_PYTHON=
-
# python-core: pyuno/python.exe on Windows
ifeq ($(OS),WNT)
$(eval $(call gb_Module_add_targets,pyuno,\
@@ -49,16 +44,6 @@ $(eval $(call gb_Module_add_targets,pyuno,\
))
endif
-else # SYSTEM_PYTHON
-
-# these two targets have to be executed only with system-python on mingw
-# FIXME remove this
-ifeq ($(OS)$(COM),WNTGCC)
-$(eval $(call gb_Module_add_targets,pyuno,\
- GeneratedPackage_python-core \
-))
-endif
-
endif # SYSTEM_PYTHON
ifneq ($(OS),MACOSX)
diff --git a/pyuno/Package_zipcore.mk b/pyuno/Package_zipcore.mk
deleted file mode 100644
index c3302910165c..000000000000
--- a/pyuno/Package_zipcore.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_Package_Package,python_zipcore,$(call gb_CustomTarget_get_workdir,pyuno/zipcore)))
-
-$(error FIXME do not deliver this stuff to OUTDIR)
-
-pyuno_PYTHON_ARCHIVE_NAME:=python-core-$(PYTHON_VERSION).zip
-
-$(eval $(call gb_Package_add_file,python_zipcore,bin/$(pyuno_PYTHON_ARCHIVE_NAME),$(pyuno_PYTHON_ARCHIVE_NAME)))
-
-# vim: set noet sw=4 ts=4:
diff --git a/pyuno/zipcore/python.cxx b/pyuno/zipcore/python.cxx
index b67b17f28f4f..c128938cbc8f 100644
--- a/pyuno/zipcore/python.cxx
+++ b/pyuno/zipcore/python.cxx
@@ -24,13 +24,9 @@
#include <wchar.h>
#define WIN32_LEAN_AND_MEAN
-#if defined _MSC_VER
#pragma warning(push, 1)
-#endif
#include <windows.h>
-#if defined _MSC_VER
#pragma warning(pop)
-#endif
#include "tools/pathutils.hxx"
@@ -69,11 +65,7 @@ wchar_t * encode(wchar_t * buffer, wchar_t const * text) {
return buffer;
}
-#ifdef __MINGW32__
-int main(int argc, char ** argv, char **) {
-#else
int wmain(int argc, wchar_t ** argv, wchar_t **) {
-#endif
wchar_t path[MAX_PATH];
DWORD n = GetModuleFileNameW(nullptr, path, MAX_PATH);
if (n == 0 || n >= MAX_PATH) {
@@ -111,15 +103,6 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) {
if (pythonpath3End == nullptr) {
exit(EXIT_FAILURE);
}
-#ifdef __MINGW32__
- wchar_t pythonpath4[MAX_PATH];
- wchar_t * pythonpath4End = tools::buildPath(
- pythonpath4, path, pathEnd,
- MY_STRING(L"\\python-core-" PYTHON_VERSION_STRING L"\\lib\\lib-dynload"));
- if (pythonpath4End == NULL) {
- exit(EXIT_FAILURE);
- }
-#endif
wchar_t pythonhome[MAX_PATH];
wchar_t * pythonhomeEnd = tools::buildPath(
pythonhome, path, pathEnd, MY_STRING(L"\\python-core-" PYTHON_VERSION_STRING));
@@ -138,27 +121,14 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) {
// 4 * len: each char preceded by backslash, each trailing backslash
// doubled
for (int i = 1; i < argc; ++i) {
-#ifdef __MINGW32__
- clSize += MY_LENGTH(L" \"") + 4 * strlen(argv[i]) +
-#else
- clSize += MY_LENGTH(L" \"") + 4 * wcslen(argv[i]) +
-#endif
- MY_LENGTH(L"\""); //TODO: overflow
+ clSize += MY_LENGTH(L" \"") + 4 * wcslen(argv[i]) + MY_LENGTH(L"\"");
+ //TODO: overflow
}
wchar_t * cl = new wchar_t[clSize];
wchar_t * cp = encode(cl, pythonhome);
for (int i = 1; i < argc; ++i) {
*cp++ = L' ';
-#ifdef __MINGW32__
- int nNeededWStrBuffSize = MultiByteToWideChar(CP_ACP, 0, argv[i], -1, NULL, 0);
- WCHAR *buff = new WCHAR[nNeededWStrBuffSize+1];
- MultiByteToWideChar(CP_ACP, 0, argv[i], -1, buff, nNeededWStrBuffSize);
- buff[nNeededWStrBuffSize] = 0;
- cp = encode(cp, buff);
- delete [] buff;
-#else
cp = encode(cp, argv[i]);
-#endif
}
*cp = L'\0';
n = GetEnvironmentVariableW(L"PATH", nullptr, 0);
@@ -201,16 +171,6 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) {
exit(EXIT_FAILURE);
}
}
-#ifdef __MINGW32__
- len = (pathEnd - path) + MY_LENGTH(L";") + (pythonpath2End - pythonpath2) +
- MY_LENGTH(L";") + (pythonpath4End - pythonpath4) +
- MY_LENGTH(L";") + (pythonpath3End - pythonpath3) +
- (n == 0 ? 0 : MY_LENGTH(L";") + (n - 1)) + 1; //TODO: overflow
- value = new wchar_t[len];
- _snwprintf(
- value, len, L"%s;%s;%s;%s%s%s", path, pythonpath2, pythonpath4,
- pythonpath3, n == 0 ? L"" : L";", orig);
-#else
len = (pathEnd - path) + MY_LENGTH(L";") + (pythonpath2End - pythonpath2) +
MY_LENGTH(L";") + (pythonpath3End - pythonpath3) +
(n == 0 ? 0 : MY_LENGTH(L";") + (n - 1)) + 1; //TODO: overflow
@@ -218,7 +178,6 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) {
_snwprintf(
value, len, L"%s;%s;%s%s%s", path, pythonpath2, pythonpath3,
n == 0 ? L"" : L";", orig);
-#endif
if (!SetEnvironmentVariableW(L"PYTHONPATH", value)) {
exit(EXIT_FAILURE);
}
diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx
index c6ea42c6169a..0065b4984775 100644
--- a/registry/source/regimpl.cxx
+++ b/registry/source/regimpl.cxx
@@ -27,9 +27,6 @@
#if defined(UNX)
#include <unistd.h>
#endif
-#ifdef __MINGW32__
-#include <unistd.h>
-#endif
#include <reflread.hxx>
diff --git a/sal/osl/w32/dllentry.c b/sal/osl/w32/dllentry.c
index d336e70810c1..670592b3a600 100644
--- a/sal/osl/w32/dllentry.c
+++ b/sal/osl/w32/dllentry.c
@@ -47,17 +47,6 @@
extern CRITICAL_SECTION g_ThreadKeyListCS;
extern oslMutex g_Mutex;
-#ifdef __MINGW32__
-
-typedef void (*func_ptr) (void);
-extern func_ptr __CTOR_LIST__[];
-extern func_ptr __DTOR_LIST__[];
-
-static void do_startup(void);
-static void do_cleanup(void);
-
-#else
-
/*
This is needed because DllMain is called after static constructors. A DLL's
startup and shutdown sequence looks like this:
@@ -75,73 +64,6 @@ _pRawDllMain()
static BOOL WINAPI RawDllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved );
BOOL (WINAPI *_pRawDllMain)(HINSTANCE, DWORD, LPVOID) = RawDllMain;
-#endif
-
-#ifdef __MINGW32__
-
-void
-__do_global_dtors (void)
-{
- static func_ptr *p = __DTOR_LIST__ + 1;
-
- /*
- * Call each destructor in the destructor list until a null pointer
- * is encountered.
- */
- while (*p)
- {
- (*(p)) ();
- p++;
- }
-}
-
-void
-__do_global_ctors (void)
-{
- sal_uIntPtr nptrs = (sal_uIntPtr) __CTOR_LIST__[0];
- unsigned i;
-
- /*
- * If the first entry in the constructor list is -1 then the list
- * is terminated with a null entry. Otherwise the first entry was
- * the number of pointers in the list.
- */
- if (nptrs == (sal_uIntPtr)-1)
- {
- for (nptrs = 0; __CTOR_LIST__[nptrs + 1] != 0; nptrs++)
- ;
- }
-
- /*
- * Go through the list backwards calling constructors.
- */
- for (i = nptrs; i >= 1; i--)
- {
- __CTOR_LIST__[i] ();
- }
-
- /*
- * Register the destructors for processing on exit.
- */
- atexit (__do_global_dtors);
-}
-
-static int initialized = 0;
-
-void
-__main (void)
-{
- if (!initialized)
- {
- initialized = 1;
- do_startup();
- __do_global_ctors ();
- }
-}
-
-static void do_startup( void )
-{
-#else
static BOOL WINAPI RawDllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
{
(void)hinstDLL; /* avoid warnings */
@@ -166,7 +88,6 @@ static BOOL WINAPI RawDllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvRe
_set_error_mode(_OUT_TO_STDERR);
}
#endif
-#endif
#if OSL_DEBUG_LEVEL < 2
/* Suppress file error messages from system like "Floppy A: not inserted" */
@@ -185,19 +106,10 @@ static BOOL WINAPI RawDllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvRe
//We disable floating point exceptions. This is the usual state at program startup
//but on Windows 98 and ME this is not always the case.
_control87(_MCW_EM, _MCW_EM);
-#ifdef __MINGW32__
- atexit(do_cleanup);
-}
-
-void do_cleanup( void )
-{
-#else
break;
}
case DLL_PROCESS_DETACH:
-#endif
-
WSACleanup( );
TlsFree( g_dwTLSTextEncodingIndex );
@@ -207,8 +119,6 @@ void do_cleanup( void )
osl_destroyMutex( g_CurrentDirectoryMutex );
-#ifndef __MINGW32__
-
/*
On a product build memory management finalization might
@@ -243,7 +153,6 @@ void do_cleanup( void )
}
return TRUE;
-#endif
}
static DWORD GetParentProcessId()
diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx
index 73cb2f8409ed..bb5df9940206 100644
--- a/sal/osl/w32/file.cxx
+++ b/sal/osl/w32/file.cxx
@@ -35,11 +35,6 @@
#include <stdio.h>
#include <tchar.h>
-#ifdef __MINGW32__
-#include <wchar.h>
-#include <ctype.h>
-#endif
-
#include <algorithm>
#include <limits>
diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx
index a2fbfc15a21f..1f50617abab0 100644
--- a/sal/osl/w32/file_dirvol.cxx
+++ b/sal/osl/w32/file_dirvol.cxx
@@ -37,9 +37,6 @@
#include <rtl/character.hxx>
#include <tchar.h>
-#ifdef __MINGW32__
-#include <ctype.h>
-#endif
static const wchar_t UNC_PREFIX[] = L"\\\\";
static const wchar_t BACKSLASH = '\\';
diff --git a/sal/osl/w32/interlck.c b/sal/osl/w32/interlck.c
index 32ce6f694bb3..68c9504763a1 100644
--- a/sal/osl/w32/interlck.c
+++ b/sal/osl/w32/interlck.c
@@ -22,10 +22,6 @@
#include <osl/interlck.h>
#include <osl/diagnose.h>
-#if defined __MINGW32__
-#pragma GCC diagnostic warning "-Wreturn-type"
-#endif
-
oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* pCount)
{
return (InterlockedIncrement(pCount));
diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx
index a9fa84f7c86b..c74dde485441 100644
--- a/sal/osl/w32/signal.cxx
+++ b/sal/osl/w32/signal.cxx
@@ -31,9 +31,7 @@
#include <osl/diagnose.h>
#include <osl/signal.h>
-#ifndef __MINGW32__
#include <DbgHelp.h>
-#endif
#include <errorrep.h>
#include <systools/win32/uwinapi.h>
#include <sal/macros.h>
diff --git a/sal/osl/w32/system.h b/sal/osl/w32/system.h
index 4cb8b4e76539..700d9aa578f8 100644
--- a/sal/osl/w32/system.h
+++ b/sal/osl/w32/system.h
@@ -43,47 +43,16 @@
*/
#define WIN32_LEAN_AND_MEAN
-#ifdef __GNUC__
- // windows.h includes winsock2.h
- // if _WIN32_WINNT > 0x0400
- // so someone cannot include winsock.h
- // at the same time without patching
- // windows.h
- #include <windows.h>
- #include <winsock2.h>
- #ifdef __cplusplus
- extern "C" {
- #endif
- #include <ws2tcpip.h>
- #ifdef __cplusplus
- }
- #endif
- #include <shlobj.h>
- #ifndef NO_DEBUG_CRT
- #include <crtdbg.h>
- #endif
-#else
- // winsock2.h includes windows.h
- #pragma warning(push,1) /* disable warnings within system headers */
- #pragma warning(disable:4917)
- #include <winsock2.h>
- #include <wsipx.h>
- #include <ws2tcpip.h>
- #include <shlobj.h>
- #ifndef NO_DEBUG_CRT
- #include <crtdbg.h>
- #endif
- #pragma warning(pop)
+// winsock2.h includes windows.h
+#pragma warning(push,1) /* disable warnings within system headers */
+#pragma warning(disable:4917)
+#include <winsock2.h>
+#include <wsipx.h>
+#include <ws2tcpip.h>
+#include <shlobj.h>
+#ifndef NO_DEBUG_CRT
+ #include <crtdbg.h>
#endif
-
-#ifdef __GNUC__
- # ifndef SA_FAMILY_DECL
- # define SA_FAMILY_DECL short sa_family
- # endif
-
- # define NSPROTO_IPX 1000
- # define NSPROTO_SPX 1256
- # define NSPROTO_SPXII 1257
-#endif // #ifdef __GNUC__
+#pragma warning(pop)
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/osl/w32/tempfile.cxx b/sal/osl/w32/tempfile.cxx
index 14478e694a60..3128fb3f65d1 100644
--- a/sal/osl/w32/tempfile.cxx
+++ b/sal/osl/w32/tempfile.cxx
@@ -34,12 +34,8 @@
#include <tchar.h>
// Allocate n number of t's on the stack return a pointer to it in p
-#ifdef __MINGW32__
-#define STACK_ALLOC(p, t, n) (p) = reinterpret_cast<t*>(_alloca((n)*sizeof(t)));
-#else
#define STACK_ALLOC(p, t, n) __try {(p) = static_cast<t*>(_alloca((n)*sizeof(t)));} \
__except(EXCEPTION_EXECUTE_HANDLER) {(p) = nullptr;}
-#endif
// Temp file functions
diff --git a/sal/qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx b/sal/qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx
index 1e894129c649..aa14225bc455 100644
--- a/sal/qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx
+++ b/sal/qa/rtl/oustringbuffer/test_oustringbuffer_assign.cxx
@@ -44,8 +44,7 @@ private:
b2 = "1234567890123456";
CPPUNIT_ASSERT_EQUAL(s3, b2.toString());
CPPUNIT_ASSERT_EQUAL(sal_Int32(32), b2.getCapacity());
-#if HAVE_CXX11_UTF16_STRING_LITERAL \
- && (!defined SAL_W32 || defined __MINGW32__)
+#if HAVE_CXX11_UTF16_STRING_LITERAL && !defined SAL_W32
// sal_Unicode is still wchar_t not char16_t even for MSVC 2015
OUStringBuffer b3;
b3 = u"123456789012345";
diff --git a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
index 094a779fc2f1..b221306f8ba4 100644
--- a/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_oustring_stringliterals.cxx
@@ -353,8 +353,7 @@ void test::oustring::StringLiterals::checkOUStringLiteral1()
}
void test::oustring::StringLiterals::checkUtf16() {
-#if HAVE_CXX11_UTF16_STRING_LITERAL \
- && (!defined SAL_W32 || defined __MINGW32__)
+#if HAVE_CXX11_UTF16_STRING_LITERAL && !defined SAL_W32
// sal_Unicode is still wchar_t not char16_t even for MSVC 2015
rtl::OUString s1(u"abc");
CPPUNIT_ASSERT_EQUAL(rtl::OUString("abc"), s1);
diff --git a/sal/systools/win32/uwinapi/sntprintf.c b/sal/systools/win32/uwinapi/sntprintf.c
index a46ed2e7c478..22ce4f7d3050 100644
--- a/sal/systools/win32/uwinapi/sntprintf.c
+++ b/sal/systools/win32/uwinapi/sntprintf.c
@@ -22,10 +22,6 @@
#include <stdarg.h>
#include <stdio.h>
-#ifdef __MINGW32__
-/* MinGW-w64 doesn't have a _tcsinc() inline or library function */
-#define _MB_MAP_DIRECT
-#endif
#include <tchar.h>
#include <systools/win32/snprintf.h>
@@ -33,33 +29,8 @@
#pragma warning(disable:4273) // inconsistent dll linkage
#endif
-#if defined(__MINGW32_VERSION) && ((__MINGW32_MAJOR_VERSION < 3)||((__MINGW32_MAJOR_VERSION == 3)&&(__MINGW32_MINOR_VERSION < 18)))
-
-/* The non-debug versions of _vscprintf/_scprintf are just calls
- to _vsprintf/_sprintf with string buffer pointer set to NULL,
- requires MSVCRT version 7.0 */
-#ifdef __MINGW32__
-static int __cdecl _vsctprintf( const TCHAR *format, va_list ap )
-#else
-static int __cdecl _vsctprintf( const _TXCHAR *format, va_list ap )
-#endif
-{
- FILE *fp = _tfopen( _T("NUL"), _T("wb") );
-
- if ( fp )
- {
- int retval = _vftprintf( fp, format, ap );
- fclose( fp );
-
- return retval;
- }
-
- return -1;
-}
-#endif
-
/* VS 2015 and above support ISO C snprintf */
-#if (defined(__MINGW32__) && !defined (__NO_ISOCEXT)) || (defined(_MSC_VER) && (_MSC_VER < 1900))
+#if _MSC_VER < 1900
/* This function retrieves the pointer to the last character of a buffer.
That is the pointer to the last character of the buffer that fits
diff --git a/scp2/InstallModule_ooo.mk b/scp2/InstallModule_ooo.mk
index 3a1f2a47e591..ba854310045c 100644
--- a/scp2/InstallModule_ooo.mk
+++ b/scp2/InstallModule_ooo.mk
@@ -30,11 +30,6 @@ $(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\
WITH_MYSPELL_DICTS \
))
-$(eval $(call gb_InstallModule_define_value_if_set,scp2/ooo,\
- MINGW_GCCDLL \
- MINGW_GXXDLL \
-))
-
$(eval $(call gb_InstallModule_add_defs,scp2/ooo,\
$(if $(SYSTEM_HSQLDB),\
-DHSQLDB_JAR=\""$(call gb_Helper_make_path,$(HSQLDB_JAR))"\" \
@@ -75,9 +70,6 @@ $(eval $(call gb_InstallModule_add_scpfiles,scp2/ooo,\
scp2/source/ooo/module_lang_template \
scp2/source/ooo/profileitem_ooo \
scp2/source/ooo/scpaction_ooo \
- $(if $(filter WNTGCC,$(OS)$(COM)),\
- scp2/source/ooo/mingw_dlls \
- ) \
scp2/source/ooo/module_filter \
$(if $(filter-out MACOSX WNT,$(OS)), \
scp2/source/ooo/module_libreofficekit \
diff --git a/scp2/InstallModule_python.mk b/scp2/InstallModule_python.mk
index 965781cc771e..e38d58a9b821 100644
--- a/scp2/InstallModule_python.mk
+++ b/scp2/InstallModule_python.mk
@@ -24,14 +24,6 @@ $(eval $(call gb_InstallModule_add_defs,scp2/python,\
-DSYSTEM_PYTHON \
))
-# mingw: mix mode copy file from system python to installation set
-ifeq ($(OS)$(COM),WNTGCC)
-$(eval $(call gb_InstallModule_add_defs,scp2/python,\
- -DPYVERSION=$(PYTHON_VERSION) \
- -DMINGW_SYSTEM_PYTHON \
-))
-endif
-
else
$(eval $(call gb_InstallModule_define_if_set,scp2/python,\
diff --git a/scp2/InstallModule_ure.mk b/scp2/InstallModule_ure.mk
index 4f498bdf5fe1..6a994ff15ea5 100644
--- a/scp2/InstallModule_ure.mk
+++ b/scp2/InstallModule_ure.mk
@@ -15,11 +15,6 @@ $(eval $(call gb_InstallModule_define_if_set,scp2/ure,\
ENABLE_MACOSX_SANDBOX \
))
-$(eval $(call gb_InstallModule_define_value_if_set,scp2/ure,\
- MINGW_GCCDLL \
- MINGW_GXXDLL \
-))
-
$(eval $(call gb_InstallModule_add_scpfiles,scp2/ure,\
scp2/source/ooo/ure \
))
diff --git a/scp2/source/ooo/mingw_dlls.scp b/scp2/source/ooo/mingw_dlls.scp
deleted file mode 100644
index 0e5491df19de..000000000000
--- a/scp2/source/ooo/mingw_dlls.scp
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * 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/.
- */
-
-#include "macros.inc"
-
-#if defined(WNT) && defined( _gcc3 )
-
-File gid_Brand_File_Lib_Mingw_Dlls
- TXT_FILE_BODY;
- Dir = FILELIST_DIR;
- Name = "mingw_dlls.filelist";
- Styles = (FILELIST, PACKED);
-End
-
-#if defined(MINGW_GCCDLL)
-
-File gid_Brand_File_Lib_Mingw_GccS
- TXT_FILE_BODY;
- Dir = gid_Brand_Dir_Program;
- Name = MINGW_GCCDLL;
- Styles = (PACKED);
-End
-
-#endif
-
-#if defined(MINGW_GXXDLL)
-
-File gid_Brand_File_Lib_Mingw_Stdcpp
- TXT_FILE_BODY;
- Dir = gid_Brand_Dir_Program;
- Name = MINGW_GXXDLL;
- Styles = (PACKED);
-End
-
-#endif
-
-#endif
-
diff --git a/scp2/source/ooo/scpaction_ooo.scp b/scp2/source/ooo/scpaction_ooo.scp
index c84f4a994857..ad15dfb8aaab 100644
--- a/scp2/source/ooo/scpaction_ooo.scp
+++ b/scp2/source/ooo/scpaction_ooo.scp
@@ -52,21 +52,6 @@ ScpAction scp_Copy_Install
End
#endif
-#if defined(WNT) && defined(_gcc3)
-#if defined(MINGW_GCCDLL)
-ScpAction SCP_COPY_MINGW_GCCS
- Copy = MINGW_GCCDLL;
- Name = MINGW_GCCDLL;
-End
-#endif
-#if defined(MINGW_GXXDLL)
-ScpAction SCP_COPY_MINGW_STDCPP
- Copy = MINGW_GXXDLL;
- Name = MINGW_GXXDLL;
-End
-#endif
-#endif
-
#ifdef MACOSX
ScpAction scp_Copy_Dmg_Background_Image
Copy = "osxdndinstall.png";
diff --git a/scp2/source/ooo/ure.scp b/scp2/source/ooo/ure.scp
index ec1cafef03e6..a75aeb4dbb8f 100644
--- a/scp2/source/ooo/ure.scp
+++ b/scp2/source/ooo/ure.scp
@@ -230,32 +230,6 @@ Unixlink gid_Unixlink_File_Dl_Libxml2
End
#endif
-#if defined(WNT) && defined( _gcc3 )
-
-#if defined(MINGW_GCCDLL)
-
-File gid_File_Lib_Mingw_GccS_Ure
- LIB_FILE_BODY;
- Dir = SCP2_URE_DL_DIR;
- Name = MINGW_GCCDLL;
- Styles = (PACKED);
-End
-
-#endif
-
-#if defined(MINGW_GXXDLL)
-
-File gid_File_Lib_Mingw_Stdcpp_Ure
- LIB_FILE_BODY;
- Dir = SCP2_URE_DL_DIR;
- Name = MINGW_GXXDLL;
- Styles = (PACKED);
-End
-
-#endif
-
-#endif
-
// Public Miscellaneous Files:
File gid_File_Misc_TypesRdb
@@ -313,8 +287,6 @@ Module gid_Module_Root_Ure_Hidden
gid_Unixlink_File_Dl_PurpEnvHelper,
gid_Unixlink_File_Dl_Sal,
gid_Unixlink_File_Dl_Salhelper,
- gid_File_Lib_Mingw_GccS_Ure,
- gid_File_Lib_Mingw_Stdcpp_Ure,
gid_File_Misc_TypesRdb,
gid_File_Misc_ServicesRdb);
Unixlinks = (gid_Unixlink_File_Dl_Sal,
diff --git a/scp2/source/python/file_python.scp b/scp2/source/python/file_python.scp
index 0f2c994a4f9b..fd008624fd66 100644
--- a/scp2/source/python/file_python.scp
+++ b/scp2/source/python/file_python.scp
@@ -59,47 +59,5 @@ File gid_File_Share_Registry_Pyuno_Xcd
Name = "pyuno.xcd";
End
-#ifdef MINGW_SYSTEM_PYTHON
-
-// python_wrapper.exe
-File gid_File_Py_Bin_Python
- BIN_FILE_BODY;
- Name = "python.exe";
- Dir = gid_Brand_Dir_Program;
- Styles = (PACKED);
-End
-
-Directory gid_Dir_Py_PythonCore
- ParentID = gid_Brand_Dir_Program;
- HostName = STRING(CONCAT2(python-core-,PYVERSION));
-End
-
-Directory gid_Dir_Py_PythonCore_Lib
- ParentID = gid_Dir_Py_PythonCore;
- HostName = "lib";
-End
-
-File gid_File_Py_Python_Core
- TXT_FILE_BODY;
- Dir = FILELIST_DIR;
- Name = "python-core.filelist";
- Styles = (FILELIST);
-End
-
-Directory gid_Dir_Py_PythonCore_Bin
- ParentID = gid_Dir_Py_PythonCore;
- HostName = "bin";
-End
-
-File gid_File_Py_Python_Bin
- BIN_FILE_BODY;
- Dir = gid_Dir_Py_PythonCore_Bin;
- Name = "python.exe";
- Styles = (PACKED);
-End
-
-
-#endif //MINGW_SYSTEM_PYTHON
-
// DISABLE_PYUNO
#endif
diff --git a/scp2/source/python/module_python.scp b/scp2/source/python/module_python.scp
index 358923448994..1424409c1f9c 100644
--- a/scp2/source/python/module_python.scp
+++ b/scp2/source/python/module_python.scp
@@ -41,9 +41,6 @@ Module gid_Module_Pyuno
gid_Dir_Py_PythonCore_Lib);
Files = (auto_python_ALL,
gid_File_Pyuno_Rdb,
- gid_File_Py_Bin_Python,
- gid_File_Py_Python_Core,
- gid_File_Py_Python_Bin,
gid_File_Lib_Python_So,
gid_File_Lib_Python3_So,
gid_File_Share_Registry_Pyuno_Xcd);
diff --git a/sd/source/ui/remotecontrol/BluetoothServer.cxx b/sd/source/ui/remotecontrol/BluetoothServer.cxx
index 28e5c377c7c9..be1534df4ade 100644
--- a/sd/source/ui/remotecontrol/BluetoothServer.cxx
+++ b/sd/source/ui/remotecontrol/BluetoothServer.cxx
@@ -54,11 +54,6 @@
#include "OSXBluetoothWrapper.hxx"
#endif
-#ifdef __MINGW32__
-// Value taken from http://msdn.microsoft.com/en-us/library/windows/desktop/ms738518%28v=vs.85%29.aspx
-#define NS_BTH 16
-#endif
-
#include "Communicator.hxx"
using namespace sd;
diff --git a/setup_native/CustomTarget_wintools.mk b/setup_native/CustomTarget_wintools.mk
deleted file mode 100644
index 0436bc48ba1a..000000000000
--- a/setup_native/CustomTarget_wintools.mk
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-wintools_WORKDIR := $(call gb_CustomTarget_get_workdir,setup_native/wintools)
-wintools_SRCDIR := $(SRCDIR)/setup_native/source/win32/wintools
-
-$(eval $(call gb_CustomTarget_CustomTarget,setup_native/wintools))
-
-$(eval $(call gb_CustomTarget_register_targets,setup_native/wintools,\
- makecab.exe \
- msidb.exe \
- msiinfo.exe \
- msimsp.exe \
- msitran.exe \
-))
-
-$(wintools_WORKDIR)/makecab.exe: $(wintools_SRCDIR)/makecab/makecab.c $(wintools_SRCDIR)/makecab/parseddf.c
- $(WINEGCC) -o $@ $< -m32 -mconsole -lmsi
-
-$(wintools_WORKDIR)/msidb.exe: $(wintools_SRCDIR)/msidb/msidb.c
- $(WINEGCC) -o $@ $< -m32 -municode -lmsi
-
-$(wintools_WORKDIR)/msiinfo.exe: $(wintools_SRCDIR)/msiinfo/msiinfo.c
- $(WINEGCC) -o $@ $< -m32 -mconsole -municode -lmsi
-
-$(wintools_WORKDIR)/msimsp.exe: $(wintools_SRCDIR)/msimsp/msimsp.c
- $(WINEGCC) -o $@ $< -m32 -mconsole -lmsi
-
-$(wintools_WORKDIR)/msitran.exe: $(wintools_SRCDIR)/msitran/msitran.c
- $(WINEGCC) -o $@ $< -m32 -mconsole -lmsi
-
-# vim: set noet sw=4 ts=4:
diff --git a/setup_native/Module_setup_native.mk b/setup_native/Module_setup_native.mk
index 163bd4e24a88..d19e57c0c554 100644
--- a/setup_native/Module_setup_native.mk
+++ b/setup_native/Module_setup_native.mk
@@ -21,7 +21,7 @@ $(eval $(call gb_Module_add_targets,setup_native,\
) \
))
-ifeq ($(OS)$(COM),WNTMSC)
+ifeq ($(OS),WNT)
$(eval $(call gb_Module_add_targets,setup_native,\
Library_instooofiltmsi \
Library_qslnkmsi \
@@ -35,17 +35,6 @@ $(eval $(call gb_Module_add_targets,setup_native,\
StaticLibrary_seterror \
))
-else
-
-ifneq ($(WINEGCC),)
-# this is supposed to be built on the _build_ platform, even though the
-# result is an .exe
-$(eval $(call gb_Module_add_targets,setup_native,\
- CustomTarget_wintools \
- Package_wintools \
-))
-endif
-
endif
# vim: set noet sw=4 ts=4:
diff --git a/setup_native/Package_wintools.mk b/setup_native/Package_wintools.mk
deleted file mode 100644
index 5d9662e192e2..000000000000
--- a/setup_native/Package_wintools.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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/.
-#
-
-$(eval $(call gb_Package_Package,setup_native_wintools,$(call gb_CustomTarget_get_workdir,setup_native/wintools)))
-
-$(error FIXME do not deliver this stuff to OUTDIR)
-
-$(eval $(call gb_Package_add_files,setup_native_wintools,bin,\
- makecab.exe \
- msidb.exe \
- msiinfo.exe \
- msimsp.exe \
- msitran.exe\
-))
-
-# vim: set noet sw=4 ts=4:
diff --git a/setup_native/source/win32/wintools/makecab/makecab.c b/setup_native/source/win32/wintools/makecab/makecab.c
deleted file mode 100644
index a5c7acda1a8e..000000000000
--- a/setup_native/source/win32/wintools/makecab/makecab.c
+++ /dev/null
@@ -1,379 +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/.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <stdarg.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <unistd.h>
-#include <zlib.h>
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-#include "parseddf.h"
-
-#define _O_RDONLY 0
-#define _O_WRONLY 1
-#define _O_RDWR 2
-#define _O_CREAT 0x0100
-
-#define _A_RDONLY 1
-#define _A_HIDDEN 2
-#define _A_SYSTEM 4
-#define _A_ARCH 0x20
-
-typedef enum CABLOGLEVEL { CABLOG_ERR = 1, CABLOG_WRN, CABLOG_MSG } CABLOGLEVEL;
-typedef enum CABERR { CAB_OK, CABERR_DDF_UNOPENED } CABERR;
-static unsigned int CabVerb = 0;
-static const char * FCI_ERRS[] = {"None", "Error opening source file", "Error reading source file", "Error allocating memory", "Error creating temporary file", "Unknown compression type specified", "Error creating cabinet file", "Compression was manually aborted", "Error compressing data", "Cabinet data size or file count limits exceeded"};
-
-void cabLog(CABLOGLEVEL lvl, char * msg, ...)
-{
- va_list args;
- if (CabVerb < lvl) return;
-
- switch (lvl)
- {
- case CABLOG_WRN: printf("[Warning] "); break;
- case CABLOG_ERR: printf("[Error] "); break;
- }
-
- va_start(args, msg);
- vprintf(msg, args);
- va_end(args);
- printf("\n");
-}
-
-void cabLogErr(PERF erf, char * msg)
-{
- if (!erf)
- {
- cabLog(CABLOG_ERR, "%s: An unknown problem occurred");
- return;
- }
-
- if (erf->erfOper >= 0)
- {
- if (erf->erfOper < SAL_N_ELEMENTS(FCI_ERRS))
- cabLog(CABLOG_ERR, "%s: %s", msg, FCI_ERRS[erf->erfOper]);
- else
- cabLog(CABLOG_ERR, "%s: Unknown error", msg);
- }
-}
-
-void cabLogCCAB(PCCAB cc)
-{
- cabLog(CABLOG_MSG,
- "cb %ld\n"
- "cbFolderThresh %ld\n"
- "cbReserveCFHeader %d\n"
- "cbReserveCFFolder %d\n"
- "cbReserveCFData %d\n"
- "iCab %d\n"
- "iDisk %d\n"
- "setID %d\n"
- "szDisk %s\n"
- "szCab %s\n"
- "szCabPath %s\n",
- cc->cb, cc->cbFolderThresh, cc->cbReserveCFHeader,
- cc->cbReserveCFFolder, cc->cbReserveCFData, cc->iCab,
- cc->iDisk, cc->setID, cc->szDisk, cc->szCab, cc->szCabPath);
-}
-
-/***********************************************************************
- * Define FCI callbacks
- **********************************************************************/
-FNFCIALLOC (fnMemAlloc) /*(ULONG cb)*/
-{
- return malloc(cb);
-}
-
-FNFCIFREE (fnMemFree) /*(void HUGE *memory)*/
-{
- free(memory);
-}
-
-FNFCIOPEN (fnOpen) /*(char *pszFile, int oflag, int pmode, int *err, void *pv)*/
-{
- FILE * f = NULL;
- char * mode = "r+";
- printf("DEBUG: fnOpen file %s\n", pszFile);
- if (oflag & _O_WRONLY) mode = "w";
- else if (oflag & _O_RDWR) mode = "r+";
- else if (oflag & _O_RDONLY) mode = "r";
-
- if (oflag & _O_CREAT && oflag & _O_RDWR) mode = "w+";
-
- f = fopen(pszFile, mode);
- if (f == NULL)
- {
- cabLog(CABLOG_ERR, "Could not get handle to file %s", pszFile);
- *err = -1;
- }
-
- return (INT_PTR) f;
-}
-
-FNFCIREAD (fnRead) /*(INT_PTR hf, void FAR *memory, UINT cb, int FAR *err, void FAR *pv)*/
-{
- FILE * f = (FILE *)hf;
- size_t r = fread(memory, 1, cb, f);
- printf("DEBUG: fnRead\n");
- if (r < cb)
- {
- if (feof(f))
- {
- cabLog(CABLOG_WRN, "Reached EOF while reading file (%d chars remain of %d requested)", r, cb);
- return r;
- }
- else if (ferror(f))
- {
- cabLog(CABLOG_ERR, "Error while reading file");
- }
- *err = -1;
- return -1;
- }
- return r;
-}
-
-FNFCIWRITE (fnWrite) /*(INT_PTR hf, void FAR *memory, UINT cb, int FAR *err, void FAR *pv)*/
-{
- unsigned int c;
- printf("DEBUG: fnWrite\n");
- if ( !(hf && (c = fwrite(memory, 1, sizeof(memory), (FILE *)hf))) )
- {
- if(c < cb)
- {
- *err = -1;
- return -1;
- }
- }
- return cb;
-}
-
-FNFCICLOSE (fnClose) /*(INT_PTR hf, int FAR *err, void FAR *pv)*/
-{
- printf("DEBUG: fnClose\n");
- if ( !(hf && fclose((FILE *)hf) != EOF) )
- {
- *err = -1;
- return -1;
- }
- return 0;
-}
-
-FNFCISEEK (fnSeek) /*(INT_PTR hf, long dist, int seektype, int FAR *err, void FAR *pv)*/
-{
- printf("DEBUG: fnSeek\n");
- if (fseek((FILE *)hf, dist, seektype) != 0)
- {
- *err = -1;
- return -1;
- }
- return 0;
-}
-
-FNFCIDELETE (fnDelete) /*(LPSTR pszFile, int FAR *err, void FAR *pv)*/
-{
- printf("DEBUG: fnDelete\n");
- if (remove(pszFile) != 0)
- {
- *err = -1;
- return -1;
- }
- return 0;
-}
-
-FNFCIGETTEMPFILE (fnGetTempFile) /*(char *pszTempName[bcount(cbTempName)], int cbTempName[range(>=, MAX_PATH)], void FAR *pv)*/
-{
- BOOL success = FALSE;
- CHAR tempPath[L_tmpnam];
- char * r;
- printf("DEBUG: fnGetTempFile\n");
- r = tmpnam(tempPath);
- if (r != NULL)
- {
- success = TRUE;
- strcpy(pszTempName, tempPath);
- cbTempName = strlen(pszTempName);
- }
- return success;
-}
-
-FNFCIFILEPLACED (fnFilePlaced) /*(PCCAB *pccab, LPSTR pszFile, long cbFile, BOOL fContinuation, void FAR *pv)*/
-{
- printf("DEBUG: fnFilePlaced\n");
- if (fContinuation == FALSE)
- cabLog(CABLOG_MSG, "%s (%d b) has been added to %s", pszFile, cbFile, pccab->szCab);
-
- return 0;
-}
-
-FNFCIGETNEXTCABINET(fnGetNextCab) /*(PCCAB pccab, ULONG cbPrevCab, void FAR *pv)*/
-{
- printf("DEBUG: fnGetNextCab\n");
- return TRUE;
-}
-
-FNFCISTATUS(fnStatus) /*(UINT typeStatus, ULONG cb1, ULONG cb2, void FAR *pv)*/
-{
- switch (typeStatus)
- {
- case statusFile:
- printf("\rCompressing source file (%d bytes compressed from %d)", cb1, cb2);
- break;
- case statusFolder:
- printf("\rCopying data into cabinet (%d of %d)", cb1, cb2);
- break;
- case statusCabinet:
- printf("\rWriting cabinet file (%d of approx. %d bytes)", cb1, cb2);
- return cb2;
- }
-
- return 0;
-}
-
-FNFCIGETOPENINFO(fnGetOpenInfo) /*(LPSTR pszName, USHORT *pdate, USHORT *ptime, USHORT *pattribs, int FAR *err, void FAR *pv)*/
-{
- /* pdate: dddddmmmmyyyyyyy - d [1-31] m [1-12] y offset from 1980 */
- /* ptime: sssssmmmmhhhhhhh = s [second/2] m [0-59] h [0-23] */
- struct stat s;
- struct tm * time;
- FILE * f = NULL;
- if (stat(pszName, &s) != -1)
- {
- time = gmtime(&s.st_mtime);
- *pdate = 0;
- *ptime = 0;
-
- /* Note: tm_year is years since 1900 */
- *pdate = (time->tm_mday << 11) | ((time->tm_mon+1) << 7) | (time->tm_year-80);
- *ptime = ((time->tm_sec / 2) << 11) | (time->tm_min << 6) | (time->tm_hour);
- f = (FILE *) fnOpen(pszName, _O_RDONLY, 0, err, pv);
- }
-
- if (!f)
- {
- cabLog(CABLOG_ERR, "Could not access file information: %s", pszName);
- return -1;
- }
- return (INT_PTR) f;
-}
-
-/*
- MAKECAB [/V[n]] [/D var=value ...] [/L dir] source [destination]
- MAKECAB [/V[n]] [/D var=value ...] /F directive_file [...]
- source - File to compress.
- destination - File name to give compressed file. If omitted, the
- last character of the source file name is replaced
- with an underscore (_) and used as the destination.
- /F directives - A file with MakeCAB directives (may be repeated).
- /D var=value - Defines variable with specified value.
- /L dir - Location to place destination (default is current directory).
- /V[n] - Verbosity level (1..3)
-*/
-void usage(void)
-{
- printf(
- "Usage: makecab [/V[n]] /F directive_file\n"
- "\nOptions:\n"
- "/F directives - A file with MakeCAB directives.\n"
- "/V[n] - Verbosity level (1..3)\n");
-}
-
-int main(int argc, char *argv[])
-{
- int v = 0;
- char * ddfFile = NULL;
- CCAB ddfVars;
- DDFSRCFILE *srcList = NULL;
- DDFSRCFILE *srcListCurr = NULL;
- char * cmd = NULL;
- unsigned int cmdSize = 0;
-
- while (argv[1] && (argv[1][0] == '-' || argv[1][0] == '/'))
- {
- switch(tolower(argv[1][1]))
- {
- case 'f': /* Directive file specified */
- argv++; argc--;
- ddfFile = argv[1];
- break;
- case 'v': /* Verbosity [0-3] */
- switch(argv[1][2])
- {
- case '0': v = 0; break;
- case '1': v = 1; break;
- case '2': v = 2; break;
- case '3': v = 3; break;
- }
- break;
- case '?':
- usage();
- return 0;
- }
- argv++; argc--;
- }
- CabVerb = v;
-
- if (ddfFile == NULL)
- {
- cabLog(CABLOG_ERR, "No DDF file specified.");
- usage();
- return 0;
- }
-
- cabLog(CABLOG_MSG, "=== Parsing directive file \"%s\"===", ddfFile);
- switch(ParseDdf(ddfFile, &ddfVars, &srcListCurr, v))
- {
- case DDFERR_UNREAD: cabLog(CABLOG_ERR, "Could not open directive file."); break;
- }
- getcwd(ddfVars.szCabPath, MAX_PATH-1);
- strcat(ddfVars.szCabPath, "/");
-
- srcList = srcListCurr;
- if (srcList == NULL)
- {
- cabLog(CABLOG_ERR, "No input files were specified.");
- return 2;
- }
-
- /* Construct system call to lcab */
- for(srcListCurr = srcList; srcListCurr != NULL; srcListCurr = srcListCurr->next)
- cmdSize += strlen(srcListCurr->fileName) + 1;
- cmdSize += strlen(ddfVars.szCabPath) + strlen(ddfVars.szCab);
- cmdSize += 6; /* room for "lcab " and \0 */
- cmd = malloc(cmdSize);
- strcpy(cmd, "lcab ");
- for (srcListCurr = srcList; srcListCurr != NULL; srcListCurr = srcListCurr->next)
- {
- strcat(cmd, srcListCurr->fileName);
- strcat(cmd, " ");
- }
- strcat(cmd, ddfVars.szCabPath);
- strcat(cmd, ddfVars.szCab);
-
- cabLog(CABLOG_MSG, "syscall: %s\n", cmd);
- system(cmd);
- free(cmd);
-
- cabLog(CABLOG_MSG, "=== Cleaning up resources ===");
- /* Free list of cab source files */
- for (srcListCurr = srcList; srcListCurr != NULL; )
- {
- struct DDFSRCFILE *const next = srcListCurr->next;
- free(srcListCurr);
- srcListCurr = next;
- }
- cabLog(CABLOG_MSG, "Cabinet file %s/%s created.", ddfVars.szCabPath, ddfVars.szCab);
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/setup_native/source/win32/wintools/makecab/parseddf.c b/setup_native/source/win32/wintools/makecab/parseddf.c
deleted file mode 100644
index bde5be4a9a9f..000000000000
--- a/setup_native/source/win32/wintools/makecab/parseddf.c
+++ /dev/null
@@ -1,386 +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/.
- */
-
-#include "parseddf.h"
-#include <sys/stat.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <errno.h>
-
-extern int errno;
-static const char * VARS[] = {"cabinetname", "reservepercabinetsize", "maxdisksize", "compressiontype", "compress", "compressionmemory", "cabinet", "diskdirectorytemplate"};
-static const unsigned int VARS_COUNT = 8;
-static int CompMemory = 0;
-static TCOMP CompType = tcompTYPE_MSZIP;
-static unsigned int DdfVerb = 0;
-
-/* Trim leading whitespace from a null terminated string */
-void ltrim(char * str)
-{
- unsigned int i = 0;
- while (isspace(str[i]) && str[i] != '\0') i++;
- if (i > 0) memmove(str, str+i, strlen(str)+1-i);
-}
-
-/* Trim trailing whitespace from a null terminated string */
-void rtrim(char * str)
-{
- unsigned int i = strlen(str) - 1;
- while (isspace(str[i]) && i > 0) i--;
- if (i) i++;
- str[i] = '\0';
-}
-
-/* Trim trailing and leading whitespace from a null terminated string */
-void trim(char * str)
-{
- ltrim(str);
- rtrim(str);
-}
-
-void ddfLogProgress(DDFLOGLEVEL lvl, char * desc, unsigned int progress)
-{
- if (DdfVerb < lvl) return;
- if (progress == 0) printf(" %s: %3u%%", desc, progress);
- else if (progress > 0 && progress < 100) printf("\r %s: %3u%%", desc, progress);
- else if (progress == 100) printf("\r %s: 100%%\n", desc);
- fflush(stdout);
-}
-
-void ddfLog(DDFLOGLEVEL lvl, char * msg, ...)
-{
- va_list args;
- if (DdfVerb < lvl) return;
-
- switch (lvl)
- {
- case DDFLOG_WRN: printf("[Warning] "); break;
- case DDFLOG_ERR: printf("[Error] "); break;
- }
-
- va_start(args, msg);
- vprintf(msg, args);
- va_end(args);
- printf("\n");
-}
-
-void ddfPrintState(DDFLOGLEVEL lvl, PCCAB ccab, DDFSRCFILE * srcList)
-{
- static const unsigned int SIZE = 2048;
- char msg[SIZE];
- char srcLine[DDF_MAX_CHARS];
- unsigned int len;
- DDFSRCFILE * srcListCurr;
-
- if (ccab)
- {
- len = sprintf(msg,
- "=== Directive file state table ===\n"
- "CabinetName %s\n"
- "ReservePerCabinetSize %d\n"
- "MaxDiskSize %d\n"
- "Compress %d\n"
- "CompressionMemory %d\n"
- "Cabinet %d\n"
- "DiskDirectoryTemplate %s",
- ccab->szCab,
- ccab->cbReserveCFHeader,
- ccab->iDisk,
- 1,
- CompMemory,
- 1,
- ccab->szCabPath);
- }
- else
- {
- msg[0] = '\0';
- }
- if (!srcList) printf("DEBUG: No list!\n");
-
- for (srcListCurr = srcList;
- srcListCurr != NULL && (len = strlen(msg)) < SIZE;
- srcListCurr = srcListCurr->next)
- {
- sprintf(srcLine, "\nsrc: %s (%s) extract? %d MSZIP? %d LZX? %d",
- srcListCurr->fileName, srcListCurr->cabName,
- srcListCurr->extract, (srcListCurr->cmpType == tcompTYPE_MSZIP),
- (srcListCurr->cmpType != tcompTYPE_MSZIP));
- strncat(msg, srcLine, SIZE-strlen(srcLine)-1);
- }
- if (msg[SIZE-1] != '\0') msg[SIZE-1] = '\0';
-
- ddfLog(lvl, msg);
-}
-
-/* Moves the next DDF token from the beginning of *line into *token.
- *
- * Currently supported token delimiters are:
- * whitespace (trimmed when not quoted)
- * ; demarks the start of a comment
- * " escapes whitespace, quotes and =
- * = when setting values
- * \n \r - only if file has endline incompatibility
- *
- * returns:
- * DDF_OK More tokens remain
- * DDFERR_NO_MORE_TOKENS At the end of the (usable) line.
- * DDFERR_INVALID_ENDL Token up to this point is stored, endline is chomped.
- */
-DDFERR nextToken(char * token, char * line)
-{
- unsigned int i = 0;
- unsigned int r = DDF_OK;
- unsigned int offset = 0;
- int c;
- BOOL esc = FALSE;
-
- ltrim(line);
- if (line[0] == '\0' || line[0] == ';') return DDFERR_NO_MORE_TOKENS;
- if (line[0] == '=')
- {
- memmove(line, line+1, strlen(line));
- trim(line);
- }
-
- for (i = 0; i < DDF_MAX_CHARS-1 && i < strlen(line); i++)
- {
- /* Chomp delimiting tokens unless they're escaped */
- c = line[i];
- if (c == '\"')
- {
- esc = !esc;
- offset++;
- /* Compress "" to ", otherwise don't add quote to token*/
- if (i > 0 && line[i-1] != '\"') continue;
- }
- else if (c == '\r' || c == '\n')
- {
- r = DDFERR_INVALID_ENDL;
- break;
- }
- else if(!esc)
- {
- if (isspace(c) || c == '=') { r = DDF_OK; break; }
- else if (c == ';') { r = DDFERR_NO_MORE_TOKENS; break; }
- }
-
- token[i - offset] = c;
-
- }
- token[i - offset] = '\0';
- memmove(line, line+i, strlen(line)+1-i);
- return r;
-}
-
-DDFERR setVar(DDFVAR key, PCCAB ccab, char * value)
-{
- int i = 0;
- char * cp = NULL;
-
- ddfLog(DDFLOG_MSG, "Setting variable %s=%s...", VARS[key], value);
-
- switch (key)
- {
- case DDF_CABNAME:
- strncpy(ccab->szCab, value, 255);
- break;
- case DDF_RESERVEPERCAB:
- i = atoi(value);
- if (i < 0) i = 0;
- if (i > DDF_MAX_CABRESERVE) i = DDF_MAX_CABRESERVE;
- if (i % 4 != 0) i -= (i % 4);
- ccab->cbReserveCFHeader = i;
- break;
- case DDF_MAXDISK:
- i = atoi(value);
- ccab->cb = i;
- break;
- case DDF_COMPTYPE:
- if (strcmp(value, "LZX") == 0)
- {
-/* if (CompMemory) CompType = TCOMPfromLZXWindow(CompMemory);
- else CompType = tcompTYPE_LZX;*/
-/*TODO: LZX not yet supported in Wine */
- CompType = tcompTYPE_MSZIP;
- }
- else
- {
- if (strcmp(value, "MSZIP") != 0)
- ddfLog(DDFLOG_WRN, "Invalid compression type \"%s\", reverting to MSZIP.", value);
- CompType = tcompTYPE_MSZIP;
- }
- break;
- case DDF_COMPRESS:
- break;
- case DDF_COMPMEM:
- i = atoi(value);
- if (i < 15) i = 15;
- if (i > 21) i = 21;
- CompMemory = i;
- if (CompType == tcompTYPE_LZX) CompType = TCOMPfromLZXWindow(CompMemory);
- break;
- case DDF_CABINET:
- break;
- case DDF_DISKDIRTEMPLATE:
- while ((cp = strchr(value, '*')) != '\0') *cp = '1';
- strncpy(ccab->szCabPath, value, 255);
- break;
- }
-
- return DDF_OK;
-}
-
-DDFERR parseCmd(char * line, PCCAB ccab, char * token)
-{
- unsigned int r, i;
- char *p;
- for (p = token ; *p; ++p) *p = tolower(*p);
-
- /* Set command checks lower case token representing var name
- against known variables. If found, the next token is used as
- the value to assign */
- if (strcmp(token, ".set") == 0)
- {
- r = nextToken(token, line);
- if (r != DDF_OK) return DDFERR_FUNC_FAILED;
-
- for (p = token ; *p; ++p) *p = tolower(*p);
- if (isdigit(token[strlen(token)-1])) token[strlen(token)-1] = '\0';
- for (i = 0; i < SAL_N_ELEMENTS(VARS); i++)
- {
- if (strcmp(token, VARS[i]) == 0)
- {
- r = nextToken(token, line);
- if (r != DDF_OK) return DDFERR_FUNC_FAILED;
- setVar(i, ccab, token);
- break;
- }
- }
- }
-
- return DDF_OK;
-}
-
-char * getCabName(char * name)
-{
- char * cName;
- if ((cName = strrchr(name, '/')) || (cName = strrchr(name, '\\')))
- cName++;
- else
- cName = name;
- return cName;
-}
-
-DDFERR parseSrc(char * line, DDFSRCFILE ** srcFileList, char * token)
-{
- unsigned int r;
- struct stat s;
- DDFSRCFILE * tmpSrcFile;
-
- /* Check file exists before allocating DDFSRCFILE */
- if (stat(token, &s) == -1 && errno == ENOENT)
- {
- ddfLog(DDFLOG_WRN, "Could not find file \"%s\"", token);
- return DDFERR_SRC_SKIPPED;
- }
-
- tmpSrcFile = (DDFSRCFILE *) malloc(sizeof(DDFSRCFILE));
- if (!tmpSrcFile) return DDFERR_FUNC_FAILED;
- if (!(*srcFileList))
- {
- *srcFileList = tmpSrcFile;
- }
- else
- {
- while ((*srcFileList)->next != NULL) *srcFileList = (*srcFileList)->next;
- (*srcFileList)->next = tmpSrcFile;
- }
-
- strncpy(tmpSrcFile->fileName, token, MAX_PATH);
- /* Get cabinet file name or construct from src path if unspecified */
- r = nextToken(token, line);
- if (r != DDF_OK || token[0] == '/')
- {
- strncpy(tmpSrcFile->cabName, getCabName(tmpSrcFile->fileName), DDF_MAX_CABNAME-1);
- }
- else
- {
- strncpy(tmpSrcFile->cabName, token, DDF_MAX_CABNAME-1);
- }
-
- tmpSrcFile->cabName[DDF_MAX_CABNAME-1] = '\0';
- tmpSrcFile->extract = FALSE;
- tmpSrcFile->cmpType = CompType;
- tmpSrcFile->next = NULL;
-
- return DDF_OK;
-}
-
-DDFERR parseDdfLine(char * line, PCCAB ccab, DDFSRCFILE ** srcList)
-{
- unsigned int r;
- char token[DDF_MAX_CHARS];
-
- if (line[0] == '\0') return DDF_OK;
-
- ddfLog(DDFLOG_MSG, "Parsing line \"%s\"", line);
-
- r = nextToken(token,line);
- if (r == DDF_OK)
- {
- if (token[0] == '.')
- {
- r = parseCmd(line, ccab, token);
- if (r != DDF_OK) ddfLog(DDFLOG_ERR, "Invalid command line skipped: %s%s", token, line);
- }
- else
- {
- r = parseSrc(line, srcList, token);
-
- if (r == DDFERR_SRC_SKIPPED)
- ddfLog(DDFLOG_ERR, "Source file command \"%s%s\" couldn't be read - skipped", token, line);
- else if (r == DDFERR_FUNC_FAILED)
- ddfLog(DDFLOG_WRN, "Could not parse command correctly, \"%s\" remains", line);
- }
- }
-
- return r;
-}
-
-DDFERR ParseDdf(char* ddfFile, PCCAB ccab, DDFSRCFILE ** srcListH, unsigned int v)
-{
- char fLine[DDF_MAX_CHARS];
- FILE *ddf = NULL;
- unsigned int i = 0;
- DDFSRCFILE * srcListCurr = NULL;
-
- ddf = fopen(ddfFile, "r");
- if (ddf == NULL) return DDFERR_UNREAD;
-
- DdfVerb = v;
- for (; i < DDF_MAX_LINES && fgets(fLine, sizeof fLine, ddf); i++)
- {
- fLine[strlen(fLine)-1] = '\0';
- parseDdfLine(fLine, ccab, &srcListCurr);
- if (srcListCurr && !(*srcListH))
- {
- *srcListH = srcListCurr;
- }
- }
-
- ddfPrintState(DDFLOG_MSG, ccab, *srcListH);
- ccab->cbFolderThresh = ccab->cb;
- ccab->iDisk = 0;
-
- fclose(ddf);
-
- return DDF_OK;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/setup_native/source/win32/wintools/makecab/parseddf.h b/setup_native/source/win32/wintools/makecab/parseddf.h
deleted file mode 100644
index 90f34c6e7f87..000000000000
--- a/setup_native/source/win32/wintools/makecab/parseddf.h
+++ /dev/null
@@ -1,46 +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/.
- */
-
-#ifndef INCLUDED_SETUP_NATIVE_SOURCE_WIN32_WINTOOLS_MAKECAB_PARSEDDF_H
-#define INCLUDED_SETUP_NATIVE_SOURCE_WIN32_WINTOOLS_MAKECAB_PARSEDDF_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <windows.h>
-#include <fci.h>
-
-typedef enum DDFLINETYPE { DDF_NONE, DDF_CMD, DDF_SRC } DDFLINETYPE;
-typedef enum DDFERR { DDF_OK, DDFERR_INVALID_ENDL, DDFERR_NO_MORE_TOKENS, DDFERR_FUNC_FAILED, DDFERR_SRC_SKIPPED, DDFERR_UNREAD } DDFERR;
-typedef enum DDFVAR { DDF_CABNAME, DDF_RESERVEPERCAB, DDF_MAXDISK, DDF_COMPTYPE, DDF_COMPRESS, DDF_COMPMEM, DDF_CABINET, DDF_DISKDIRTEMPLATE } DDFVAR;
-typedef enum DDFLOGLEVEL { DDFLOG_ERR = 1, DDFLOG_WRN, DDFLOG_MSG } DDFLOGLEVEL;
-
-#define DDF_MAX_CHARS 1024
-#define DDF_MAX_LINES 1024
-#define DDF_MAX_CABRESERVE 60000
-#define DDF_MAX_CABNAME 50
-
-typedef struct DDFSRCFILE
-{
- char fileName[MAX_PATH];
- char cabName[DDF_MAX_CABNAME];
- BOOL extract;
- TCOMP cmpType;
- struct DDFSRCFILE * next;
-} DDFSRCFILE;
-
-unsigned int ParseDdf(char * ddfFile, PCCAB vars, DDFSRCFILE ** srcListH, unsigned int v);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // INCLUDED_SETUP_NATIVE_SOURCE_WIN32_WINTOOLS_MAKECAB_PARSEDDF_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/setup_native/source/win32/wintools/msidb/msidb.c b/setup_native/source/win32/wintools/msidb/msidb.c
deleted file mode 100644
index 2c100975fe7b..000000000000
--- a/setup_native/source/win32/wintools/msidb/msidb.c
+++ /dev/null
@@ -1,620 +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/.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <dirent.h>
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <msi.h>
-#include <msiquery.h>
-#include <msidefs.h>
-
-#include "wine/unicode.h"
-
-#define MAX_TABLES 50
-#define MAX_STREAMS 10
-#define MAX_STORAGES 10
-#define MAX_TABLE_NAME 50
-#define MAX_STREAM_NAME 62
-#define MAX_STORAGE_NAME 31
-
-static const WCHAR PATH_DELIMITERW[] = {'/', 0};
-static const char PATH_DELIMITER[] = {'/', 0};
-
-
-static WCHAR *strdupAtoW( UINT cp, const char *str )
-{
- WCHAR *ret = NULL;
- if (str)
- {
- DWORD len = MultiByteToWideChar( cp, 0, str, -1, NULL, 0 );
- if ((ret = malloc( len * sizeof(WCHAR) )))
- MultiByteToWideChar( cp, 0, str, -1, ret, len );
- }
- return ret;
-}
-
-static char *strdupWtoA( UINT cp, const WCHAR *str )
-{
- char *ret = NULL;
- if (str)
- {
- DWORD len = WideCharToMultiByte(cp, 0, str, -1, NULL, 0, NULL, NULL);
- if ( (ret = malloc(len)) )
- WideCharToMultiByte(cp, 0, str, -1, ret, len, NULL, NULL);
- }
- return ret;
-}
-
-static BOOL msidbImportStorages(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR storageNames[])
-{
- static const WCHAR delim[] = {'/', 0};
- UINT r, len, i;
- MSIHANDLE dbhandle, view, rec;
- WCHAR *storagePath = 0;
- char *query = "INSERT INTO _Storages (Name, Data) VALUES(?, ?)";
-
- r = MsiOpenDatabaseW(dbfile, (LPWSTR) MSIDBOPEN_TRANSACT, &dbhandle);
- if (r != ERROR_SUCCESS) return FALSE;
-
- r = MsiDatabaseOpenView(dbhandle, query, &view);
- if (r != ERROR_SUCCESS) return FALSE;
- MsiViewExecute(view, 0);
- r = MsiViewFetch(view, &rec);
- if (r != ERROR_SUCCESS) return FALSE;
-
- for (i = 0; i < MAX_STORAGES && storageNames[i] != 0; ++i)
- {
- len = lstrlenW(wdir) + lstrlenW(storageNames[i]) + 2;
- storagePath = malloc(len * sizeof(WCHAR));
- if (storagePath == NULL) return FALSE;
-
- lstrcpyW(storagePath, wdir);
- lstrcatW(storagePath, delim);
- lstrcatW(storagePath, storageNames[i]);
-
- rec = MsiCreateRecord(2);
- MsiRecordSetStringW(rec, 1, storageNames[i]);
- r = MsiRecordSetStreamW(rec, 2, storagePath);
- if (r != ERROR_SUCCESS)
- {
- return FALSE;
- }
-
- r = MsiViewExecute(view, rec);
- if (r != ERROR_SUCCESS)
- {
- return FALSE;
- }
-
- MsiCloseHandle(rec);
- }
-
- MsiViewClose(view);
- MsiCloseHandle(view);
- MsiDatabaseCommit(dbhandle);
- MsiCloseHandle(dbhandle);
- return TRUE;
-}
-
-static BOOL msidbExportStorage(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR storageName)
-{
- UINT r, len;
- MSIHANDLE dbhandle, view, rec;
- char queryBuffer[100];
- char *storageNameA = strdupWtoA(CP_ACP, storageName);
- char *wdirA = strdupWtoA(CP_ACP, wdir);
- char *storagePath = NULL;
- char *dataBuffer;
- DWORD dataLen = 0;
- FILE *fp = NULL;
- sprintf(queryBuffer, "SELECT * FROM _Storages WHERE Name = '%s'", storageNameA);
-
- r = MsiOpenDatabaseW(dbfile, (LPWSTR) MSIDBOPEN_READONLY, &dbhandle);
- if (r != ERROR_SUCCESS)
- {
- free(storageNameA);
- free(wdirA);
- return FALSE;
- }
-
- MsiDatabaseOpenView(dbhandle, queryBuffer, &view);
- MsiViewExecute(view, 0);
- r = MsiViewFetch(view, &rec);
- if (r != ERROR_SUCCESS)
- {
- free(storageNameA);
- free(wdirA);
- return FALSE;
- }
-
- if (MsiRecordReadStream(rec, 2, 0, &dataLen) != ERROR_SUCCESS)
- {
- free(storageNameA);
- free(wdirA);
- return FALSE;
- }
-
- if ((dataBuffer = malloc(dataLen)) == NULL)
- {
- free(storageNameA);
- free(wdirA);
- return FALSE;
- }
- if (MsiRecordReadStream(rec, 2, dataBuffer, &dataLen) != ERROR_SUCCESS)
- {
- free(storageNameA);
- free(wdirA);
- return FALSE;
- }
-
- len = strlen(wdirA) + strlen(storageNameA) + 2;
- storagePath = malloc(len * sizeof(WCHAR));
- if (storagePath == NULL)
- {
- free(storageNameA);
- free(wdirA);
- return FALSE;
- }
-
- strcpy(storagePath, wdirA);
- strcat(storagePath, "/");
- strcat(storagePath, storageNameA);
-
- fp = fopen(storagePath , "wb");
- if (fp != NULL)
- {
- fwrite(dataBuffer, 1, dataLen, fp);
- fclose(fp);
- }
-
- free(storagePath);
- MsiCloseHandle(rec);
-
- MsiViewClose(view);
- MsiCloseHandle(view);
- MsiCloseHandle(dbhandle);
- free(storageNameA);
- free(wdirA);
- return TRUE;
-}
-
-static BOOL msidbImportStreams(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR streamNames[])
-{
- UINT r, len;
- MSIHANDLE dbhandle, view, rec;
- int i = 0;
- WCHAR *streamPath = 0;
- char *query = "INSERT INTO _Streams (Name, Data) VALUES(?, ?)";
-
- r = MsiOpenDatabaseW(dbfile, (LPWSTR) MSIDBOPEN_TRANSACT, &dbhandle);
- if (r != ERROR_SUCCESS) return FALSE;
-
- r = MsiDatabaseOpenView(dbhandle, query, &view);
- if (r != ERROR_SUCCESS) return FALSE;
-
- for (i = 0; i < MAX_STREAMS && streamNames[i] != NULL; i++)
- {
- len = lstrlenW(wdir) + lstrlenW(streamNames[i]) + 2;
- streamPath = malloc(len * sizeof(WCHAR));
- if (streamPath == NULL) return FALSE;
-
- lstrcpyW(streamPath, wdir);
- lstrcatW(streamPath, PATH_DELIMITERW);
- lstrcatW(streamPath, streamNames[i]);
-
- rec = MsiCreateRecord(2);
- MsiRecordSetStringW(rec, 1, streamNames[i]);
- r = MsiRecordSetStreamW(rec, 2, streamPath);
- if (r != ERROR_SUCCESS)
- {
- return FALSE;
- }
-
- r = MsiViewExecute(view, rec);
- if (r != ERROR_SUCCESS)
- {
- return FALSE;
- }
-
- MsiCloseHandle(rec);
- }
-
- MsiViewClose(view);
- MsiCloseHandle(view);
- MsiDatabaseCommit(dbhandle);
- MsiCloseHandle(dbhandle);
- return TRUE;
-}
-
-/***********************************************************************
- * msidbExportStream
- *
- * Exports a stream to a file with an .idb extension.
- *
- * Examples (note wildcard escape for *nix/bash):
- * msidb -d <pathtomsi>.msi -f <workdir> -x <streamname>
- * msidb -d <pathtomsi>.msi -f <workdir> -x data.cab
- **********************************************************************/
-static BOOL msidbExportStream(LPCWSTR dbfile, LPCWSTR wdir, LPCWSTR streamName)
-{
- static const char ext[] = {'.', 'i', 'd', 'b', 0};
- UINT r, len;
- MSIHANDLE dbhandle, streamListView, rec;
- char queryBuffer[100];
- FILE *fp = 0;
- char *streamNameA = strdupWtoA(CP_ACP, streamName);
- char *wdirA = strdupWtoA(CP_ACP, wdir);
- char *streamFileA = 0;
- char streamPath[MAX_PATH];
- char *dataBuffer;
- DWORD dataLen = 0;
-
- r = MsiOpenDatabaseW(dbfile, (LPCWSTR) MSIDBOPEN_READONLY, &dbhandle);
- if (r != ERROR_SUCCESS)
- {
- free(wdirA);
- free(streamNameA);
- return FALSE;
- }
-
- sprintf(queryBuffer, "SELECT * FROM _Streams WHERE Name = '%s'", streamNameA);
- MsiDatabaseOpenView(dbhandle, queryBuffer, &streamListView);
- MsiViewExecute(streamListView, 0);
- r = MsiViewFetch(streamListView, &rec);
- if (r != ERROR_SUCCESS)
- {
- free(wdirA);
- free(streamNameA);
- return FALSE;
- }
-
- if (MsiRecordReadStream(rec, 2, 0, &dataLen) != ERROR_SUCCESS)
- {
- free(wdirA);
- free(streamNameA);
- return FALSE;
- }
- dataBuffer = malloc(dataLen);
- if (!dataBuffer)
- {
- free(wdirA);
- free(streamNameA);
- return FALSE;
- }
- if (MsiRecordReadStream(rec, 2, dataBuffer, &dataLen) != ERROR_SUCCESS)
- {
- free(wdirA);
- free(streamNameA);
- return FALSE;
- }
-
- len = strlen(streamNameA) + 5;
- streamFileA = malloc(len);
- if (streamFileA == NULL)
- {
- free(wdirA);
- free(streamNameA);
- return FALSE;
- }
-
- strcpy(streamFileA, streamNameA);
- strcat(streamFileA, ext);
-
- strcpy(streamPath, wdirA);
- strcat(streamPath, PATH_DELIMITER);
- strcat(streamPath, streamFileA);
-
- fp = fopen(streamPath , "wb");
- if (fp != NULL)
- {
- fwrite(dataBuffer, 1, dataLen, fp);
- fclose(fp);
- }
-
- free(streamFileA);
- MsiCloseHandle(rec);
-
- MsiViewClose(streamListView);
- MsiCloseHandle(streamListView);
- MsiCloseHandle(dbhandle);
- free(wdirA);
- free(streamNameA);
- return TRUE;
-}
-
-/***********************************************************************
- * msidbImportTables
- *
- * Takes a list of tables or '*' (for all) to import from text archive
- * files in specified folder
- *
- * For each table, a file called <tablename>.idt is imported containing
- * tab separated ASCII.
- *
- * Examples (note wildcard escape for *nix/bash):
- * msidb -d <pathtomsi>.msi -f <workdir> -i \*
- * msidb -d <pathtomsi>.msi -f <workdir> -i File Directory Binary
- **********************************************************************/
-static BOOL msidbImportTables(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR tables[], BOOL create)
-{
- static const WCHAR ext[] = {'.', 'i', 'd', 't', 0};
- static const WCHAR all[] = {'*', 0};
-
- UINT r, len;
- char *dirNameA;
- char *fileName;
- DIR *dir;
- struct dirent *ent;
-
- int i = 0;
- MSIHANDLE dbhandle;
-
- LPWSTR tableFile = 0;
- LPCWSTR oFlag = (LPCWSTR) MSIDBOPEN_TRANSACT;
-
- if (create == TRUE) oFlag = (LPCWSTR) MSIDBOPEN_CREATE;
- r = MsiOpenDatabaseW(dbfile, oFlag, &dbhandle);
-
- if (r != ERROR_SUCCESS)
- {
- return FALSE;
- }
-
- if (strcmpW(tables[0], all) == 0)
- {
- dirNameA = strdupWtoA(CP_ACP, wdir);
- dir = opendir(dirNameA);
-
- if (dir)
- {
- while ((ent = readdir(dir)) != NULL)
- {
- if (ent->d_type != DT_REG) continue;
- fileName = ent->d_name;
- if (strcmp(fileName+strlen(fileName)-4*sizeof(fileName[0]), ".idt") != 0) continue;
- if (strcmp(fileName, ".") == 0 || strcmp(fileName, "..") == 0) continue;
- tableFile = strdupAtoW(CP_ACP, fileName);
- r = MsiDatabaseImportW(dbhandle, wdir, tableFile);
- free(tableFile);
- }
- }
- else
- {
- free(dirNameA);
- return FALSE;
- }
- closedir(dir);
- free(dirNameA);
- }
- else
- {
- for (i = 0; i < MAX_TABLES && tables[i] != 0; ++i)
- {
- len = lstrlenW(tables[i]) + 5;
- tableFile = malloc(len * sizeof (WCHAR));
- if (tableFile == NULL) return FALSE;
-
- lstrcpyW(tableFile, tables[i]);
- lstrcatW(tableFile, ext);
- r = MsiDatabaseImportW(dbhandle, wdir, tableFile);
- free(tableFile);
-
- if (r != ERROR_SUCCESS)
- {
- return FALSE;
- }
- }
- }
-
- MsiDatabaseCommit(dbhandle);
- MsiCloseHandle(dbhandle);
- return TRUE;
-}
-
-/***********************************************************************
- * msidbExportTables
- *
- * Takes a list of tables or '*' (for all) to export to text archive
- * files in specified folder
- *
- * For each table, a file called <tablename>.idt is exported containing
- * tab separated ASCII.
- *
- * Examples (note wildcard escape for *nix/bash):
- * msidb -d <pathtomsi>.msi -f <workdir> -e \*
- * msidb -d <pathtomsi>.msi -f <workdir> -e File Directory Binary
- **********************************************************************/
-static BOOL msidbExportTables(LPCWSTR dbfile, LPCWSTR wdir, LPWSTR tables[])
-{
- static const WCHAR ext[] = {'.', 'i', 'd', 't', 0};
- static const WCHAR all[] = {'*', 0};
- UINT r, len;
- MSIHANDLE dbhandle, tableListView, rec;
- LPWSTR tableFile = 0;
- WCHAR tableName[MAX_TABLE_NAME];
- DWORD size = SAL_N_ELEMENTS(tableName);
- int i = 0;
-
- r = MsiOpenDatabaseW(dbfile, (LPCWSTR) MSIDBOPEN_READONLY, &dbhandle);
-
- if (r != ERROR_SUCCESS) return FALSE;
-
- if (strcmpW(tables[0], all) == 0)
- {
- r = MsiDatabaseOpenView(dbhandle, "SELECT Name FROM _Tables", &tableListView);
- r = MsiViewExecute(tableListView, 0);
- r = MsiViewFetch(tableListView, &rec);
-
- while (r == ERROR_SUCCESS)
- {
- size = SAL_N_ELEMENTS(tableName);
- r = MsiRecordGetStringW(rec, 1, tableName, &size);
- if (r == ERROR_SUCCESS)
- {
- len = lstrlenW(tableName) + 5;
- tableFile = malloc(len * sizeof (WCHAR));
- if (tableFile == NULL) return FALSE;
-
- lstrcpyW(tableFile, tableName);
- lstrcatW(tableFile, ext);
-
- r = MsiDatabaseExportW(dbhandle, tableName, wdir, tableFile);
-
- free(tableFile);
- MsiCloseHandle(rec);
- }
-
- r = MsiViewFetch(tableListView, &rec);
- }
-
- MsiViewClose(tableListView);
- MsiCloseHandle(tableListView);
- }
- else
- {
- for (i = 0; i < MAX_TABLES && tables[i] != 0; ++i)
- {
- len = lstrlenW(tables[i]) + 5;
- tableFile = malloc(len * sizeof (WCHAR));
- if (tableFile == NULL) return FALSE;
-
- lstrcpyW(tableFile, tables[i]);
- lstrcatW(tableFile, ext);
- r = MsiDatabaseExportW(dbhandle, tables[i], wdir, tableFile);
-
- free(tableFile);
- }
- }
-
- MsiCloseHandle(dbhandle);
- return TRUE;
-}
-
-static void usage( void )
-{
- printf(
- "Usage: msidb [options] [tables]\n"
- "\nOptions:\n"
- " -d <path> Fully qualified path to MSI database file\n"
- " -f <wdir> Path to the text archive folder\n"
- " -c Create or overwrite with new database and import tables\n"
- " -i <tables> Import tables from text archive files - "
- "use * for all\n"
- " -e <tables> Export tables to files archive in directory - "
- "use * for all\n"
- " -x <stream> Saves stream as <stream>.idb in <wdir>\n"
- " -a <file> Adds stream from file to database\n"
- " -r <storage> Adds storage to database as substorage\n");
-}
-
-int wmain(int argc, WCHAR *argv[])
-{
- LPWSTR dbfile, streamName, storageName;
- LPWSTR wdir = (LPWSTR) L".";
- LPWSTR streamFiles[MAX_STREAMS] = {0};
- LPWSTR storageNames[MAX_STORAGES] = {0};
- LPWSTR iTables[MAX_TABLES] = {0};
- LPWSTR oTables[MAX_TABLES] = {0};
- BOOL createdb = FALSE;
- int i = 0;
- int currStream = 0;
- int currStorage = 0;
- dbfile = streamName = storageName = NULL;
-
- while (argv[1] && (argv[1][0] == '-' || argv[1][0] == '/'))
- {
- switch (tolower(argv[1][1]))
- {
- case 'i': /* Import tables */
- i = 0;
- while (argv[2] && argv[2][0] != '-' && i < 10)
- {
- iTables[i] = argv[2];
- argv++; argc--; i++;
- }
- break;
- case 'e': /* Export tables */
- i = 0;
- while (argv[2] && argv[2][0] != '-' && i < 10)
- {
- oTables[i] = argv[2];
- argv++; argc--; i++;
- }
- break;
- case 'c': /* Create/overwrite .msi db */
- createdb = TRUE;
- break;
- case 'f': /* Specify working dir */
- argv++; argc--;
- wdir = argv[1];
- break;
- case 'd': /* Specify .msi db */
- argv++; argc--;
- dbfile = argv[1];
- break;
- case 'x': /* Save stream to .ibd */
- argv++; argc--;
- streamName = argv[1];
- break;
- case 'a': /* Add stream(s) to db */
- argv++; argc--;
- if (currStream < MAX_STREAMS)
- streamFiles[currStream++] = argv[1];
- break;
- case 'w':
- argv++; argc--;
- storageName = argv[1];
- break;
- case 'r': /* Add strg as substrg to db */
- argv++; argc--;
- if (currStorage < MAX_STORAGES)
- storageNames[currStorage++] = argv[1];
- break;
- case '?':
- case 'h':
- usage();
- return 0;
- }
- argv++; argc--;
- }
-
- if (iTables[0])
- if (!msidbImportTables(dbfile, wdir, iTables, createdb))
- return 1;
-
- if (oTables[0])
- if (!msidbExportTables(dbfile, wdir, oTables))
- return 2;
-
- if (streamName)
- if (!msidbExportStream(dbfile, wdir, streamName))
- return 3;
-
- if (streamFiles[0])
- if (!msidbImportStreams(dbfile, wdir, streamFiles))
- return 4;
-
- if(storageNames[0])
- if (!msidbImportStorages(dbfile, wdir, storageNames))
- return 5;
-
- if (storageName)
- if (!msidbExportStorage(dbfile, wdir, storageName))
- return 6;
-
- if (!iTables[0] && !oTables[0] && !streamName && !streamFiles[0] && !storageNames[0] && !storageName)
- return 7;
-
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/setup_native/source/win32/wintools/msiinfo/msiinfo.c b/setup_native/source/win32/wintools/msiinfo/msiinfo.c
deleted file mode 100644
index 2ba88dfb3d3c..000000000000
--- a/setup_native/source/win32/wintools/msiinfo/msiinfo.c
+++ /dev/null
@@ -1,254 +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/.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <dirent.h>
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <msi.h>
-#include <msiquery.h>
-#include <msidefs.h>
-#include <wchar.h>
-
-#define WINE_NO_TRACE_MSGS 1
-#define WINE_NO_DEBUG_MSGS 1
-
-#include "wine/unicode.h"
-#include "wine/debug.h"
-#include "wtypes.h"
-
-#define MAX_TABLES 50
-#define MAX_STREAMS 10
-#define MAX_STORAGES 10
-#define MAX_TABLE_NAME 50
-#define MAX_STREAM_NAME 62
-#define MAX_STORAGE_NAME 31
-#define COMMANDS 17
-
-static const unsigned commandMap[COMMANDS][4] =
-{{'c', PID_CODEPAGE, VT_I2},
- {'t', PID_TITLE, VT_LPSTR},
- {'j', PID_SUBJECT, VT_LPSTR},
- {'a', PID_AUTHOR, VT_LPSTR},
- {'k', PID_KEYWORDS, VT_LPSTR},
- {'o', PID_COMMENTS, VT_LPSTR},
- {'p', PID_TEMPLATE, VT_LPSTR},
- {'l', PID_LASTAUTHOR, VT_LPSTR},
- {'v', PID_REVNUMBER, VT_LPSTR},
- {'s', PID_LASTPRINTED, VT_FILETIME},
- {'r', PID_CREATE_DTM, VT_FILETIME},
- {'q', PID_LASTSAVE_DTM, VT_FILETIME},
- {'g', PID_PAGECOUNT, VT_I4},
- {'w', PID_WORDCOUNT, VT_I4},
- {'h', PID_CHARCOUNT, VT_I4},
- {'n', PID_APPNAME, VT_LPSTR},
- {'u', PID_SECURITY, VT_I4}};
-
-static const char * commandNames[COMMANDS] =
-{"Codepage", "Title", "Subject", "Author", "Keywords", "Comments",
- "Template", "Last Saved By", "Revision Number", "Last Printed",
- "Create Time/Date", "Last Save Time/Date", "Page Count", "Word Count",
- "Character Count", "Creating Application", "Security"};
-
-static void parseDate(LPCWSTR value, SYSTEMTIME *time)
-{
- LPWSTR field;
- unsigned len = 4*sizeof(WCHAR);
-
- if (lstrlenW(value) != 19) return;
- field = malloc(len + sizeof(WCHAR));
- if (field == NULL) return;
- memcpy(field, value, len);
- field[4] = L'\0';
- time->wYear = atoiW(field);
-
- len = 2 * sizeof(WCHAR);
- memcpy(field, &(value[5]), len);
- field[2] = '\0';
- time->wMonth = atoiW(field);
-
- memcpy(field, &(value[8]), len);
- time->wDay = atoiW(field);
-
- memcpy(field, &(value[11]), len);
- time->wHour = atoiW(field);
-
- memcpy(field, &(value[14]), len);
- time->wMinute = atoiW(field);
-
- memcpy(field, &(value[17]), len);
- time->wSecond = atoiW(field);
-
- free(field);
-}
-
-static BOOL msiinfoDisplayProperties(LPWSTR dbfile)
-{
- MSIHANDLE dbhandle, infohandle;
- unsigned i, r, dataType;
- INT iVal;
- FILETIME ftVal;
- SYSTEMTIME sysTime;
- LPWSTR szVal = NULL;
- DWORD size;
- r = MsiOpenDatabaseW(dbfile, (LPWSTR) MSIDBOPEN_READONLY, &dbhandle);
- if (r != ERROR_SUCCESS)
- {
- return FALSE;
- }
-
- r = MsiGetSummaryInformationW(dbhandle, 0, 0, &infohandle);
- if (r != ERROR_SUCCESS)
- {
- return FALSE;
- }
- for (i = 0; i < COMMANDS; i++)
- {
- MsiSummaryInfoGetPropertyW(infohandle, commandMap[i][1], &dataType,
- &iVal, &ftVal, szVal, &size);
-
- wprintf(L"%-24s", commandNames[i]);
- if (dataType == VT_LPSTR)
- {
- if (szVal!=NULL) wprintf(L"%ls (%d)\n", szVal, lstrlenW(szVal));
- else wprintf(L"\n");
- }
- else if (dataType == VT_FILETIME)
- {
- FileTimeToSystemTime(&ftVal, &sysTime);
- wprintf(L"%04d/%02d/%02d %02d:%02d:%02d\n", sysTime.wYear, sysTime.wMonth,
- sysTime.wDay, sysTime.wHour, sysTime.wMinute, sysTime.wSecond);
- }
- else
- {
- wprintf(L"%d\n", iVal);
- }
- }
-
- MsiCloseHandle(infohandle);
- return TRUE;
-}
-
-static BOOL msiinfoUpdateProperty(MSIHANDLE infoHandle, unsigned property, unsigned dataType, LPCWSTR value)
-{
- unsigned r;
- int iVal = 0;
- FILETIME ftVal;
- SYSTEMTIME sysTime = {0};
- LPCWSTR szVal = NULL;
-
- if (dataType == VT_LPSTR) szVal = value;
- else if (dataType == VT_FILETIME)
- {
- parseDate(value, &sysTime);
- SystemTimeToFileTime(&sysTime, &ftVal);
- }
- else
- iVal = atoiW(value);
-
- r = MsiSummaryInfoSetPropertyW(infoHandle, property, dataType, iVal, &ftVal, szVal);
- if (r != ERROR_SUCCESS)
- {
- wprintf(L"Problem updating property: %d %d %d %d\n", r == ERROR_DATATYPE_MISMATCH, r == ERROR_FUNCTION_FAILED, ERROR_UNKNOWN_PROPERTY, ERROR_UNSUPPORTED_TYPE);
- return FALSE;
- }
-
- return TRUE;
-}
-
-static void usage(void)
-{
- wprintf(
- L"Usage: msiinfo {database} [[-b]-d] {options} {data}\n"
- L"\nOptions:\n"
- L" -c <cp> Specify codepage\n"
- L" -t <title> Specify title\n"
- L" -j <subject> Specify subject\n"
- L" -a <author> Specify author\n"
- L" -k <keywords> Specify keywords\n"
- L" -o <comment> Specify comments\n"
- L" -p <template> Specify template\n"
- L" -l <author> Specify last author\n"
- L" -v <revno> Specify revision number\n"
- L" -s <date> Specify last printed date\n"
- L" -r <date> Specify creation date\n"
- L" -q <date> Specify date of last save\n"
- L" -g <pages> Specify page count\n"
- L" -w <words> Specify word count\n"
- L" -h <chars> Specify character count\n"
- L" -n <appname> Specify application which created the database\n"
- L" -u <security> Specify security (0: none, 2: read only (rec.) 3: read only (enforced)\n");
-}
-
-int wmain(int argc, WCHAR *argv[])
-{
- WCHAR *dbfile = NULL;
- unsigned i = 0;
- MSIHANDLE dbhandle, infohandle;
- unsigned r;
- LPWSTR value = 0;
- static const WCHAR h1[] = {'/', '?', 0};
- static const WCHAR h2[] = {'-', '?', 0};
-
- if (argc > 1)
- {
- dbfile = argv[1];
- argv++; argc--;
- }
-
- if (!dbfile || strcmpW(dbfile, h1) == 0 || strcmpW(dbfile, h2) == 0)
- {
- usage();
- return 0;
- }
- else if (argc == 1)
- {
- msiinfoDisplayProperties(dbfile);
- return 0;
- }
-
- r = MsiOpenDatabaseW(dbfile, (LPWSTR) MSIDBOPEN_TRANSACT, &dbhandle);
- if (r != ERROR_SUCCESS) return 1;
- r = MsiGetSummaryInformationW(dbhandle, 0, 20, &infohandle);
- if (r != ERROR_SUCCESS) return 2;
-
- while (argv[1] && argv[1][0] == '-')
- {
- switch (argv[1][1])
- {
- case '?':
- case 'h':
- usage();
- return 0;
- default:
- for (i = 0; i < COMMANDS; i++)
- {
- if (commandMap[i][0] == argv[1][1])
- {
- argv++; argc--;
- value = argv[1];
- msiinfoUpdateProperty(infohandle, commandMap[i][1], commandMap[i][2], value);
- break;
- }
- }
- break;
- }
- argv++; argc--;
- }
-
- MsiSummaryInfoPersist(infohandle);
- MsiDatabaseCommit(dbhandle);
- MsiCloseHandle(dbhandle);
- msiinfoDisplayProperties(dbfile);
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/setup_native/source/win32/wintools/msimsp/msimsp.c b/setup_native/source/win32/wintools/msimsp/msimsp.c
deleted file mode 100644
index 8e2c99dc4bb0..000000000000
--- a/setup_native/source/win32/wintools/msimsp/msimsp.c
+++ /dev/null
@@ -1,86 +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/.
- */
-
-#include <stdio.h>
-#include <sys/stat.h>
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-
-void usage(void)
-{
- printf(
- "Usage: msimsp.exe -s [pcp_path] -p [msp_path] {options}\n"
- "\nOptions:\n"
- "-s <pcpfile> Required. Path to the patch creation properties (.pcp) file.\n"
- "-p <mspfile> Required. Path to patch package being created (.msp)\n"
- "-f <tmpdir> Path to temporary directory (default: %%TMP%%/~pcw_tmp.tmp/\n"
- "-k Fail if temporary directory already exists\n"
- "-l <logfile> Path to log file of patch creation process and errors\n"
-/* "-lp <logfile> Path to log file (includes performance data).\n"
- "-d Displays dialog on success\n"*/
- "-? or -h Display usage\n");
-}
-
-void createPatch(char * pcpFile, char * mspFile, char * tmpDir, char * logFile)
-{
-}
-
-int main(int argc, char *argv[])
-{
- char * pcpFile = 0;
- char * mspFile = 0;
- char * tmpDir = 0;
- char * logFile = 0;
- BOOL chkTmpDir = FALSE;
- struct stat s;
-
- /* Get parameters */
- while (argv[1] && (argv[1][0] == '-' || argv[1][0] == '/'))
- {
- switch(tolower(argv[1][1]))
- {
- case 's':
- argv++; argc++;
- pcpFile = argv[1];
- break;
- case 'p':
- argv++; argc++;
- mspFile = argv[1];
- break;
- case 'f':
- argv++; argc++;
- tmpDir = argv[1];
- break;
- case 'k':
- chkTmpDir = TRUE;
- break;
- case 'l':
- argv++; argc++;
- logFile = argv[1];
- break;
- case '?':
- case 'h':
- usage();
- return 0;
- }
- argv++; argc++;
- }
-
- if (chkTmpDir && stat(tmpDir, &s) == 0 && S_ISDIR(s.st_mode))
- {
- printf("Temporary directory exists, please specify another or omit -k\n");
- return 2;
- }
- createPatch(pcpFile, mspFile, tmpDir, logFile);
-
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/setup_native/source/win32/wintools/msitran/msitran.c b/setup_native/source/win32/wintools/msitran/msitran.c
deleted file mode 100644
index 2e2b5e85f2da..000000000000
--- a/setup_native/source/win32/wintools/msitran/msitran.c
+++ /dev/null
@@ -1,122 +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/.
- */
-
-#include <stdio.h>
-
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <msi.h>
-#include <msiquery.h>
-
-#define MSITRANSFORM_ERROR_ADDEXISTINGROW 0x01
-#define MSITRANSFORM_ERROR_DELMISSINGROW 0x02
-#define MSITRANSFORM_ERROR_ADDEXISTINGTABLE 0x04
-#define MSITRANSFORM_ERROR_DELMISSINGTABLE 0x08
-#define MSITRANSFORM_ERROR_UPDATEMISSINGROW 0x10
-#define MSITRANSFORM_ERROR_CHANGECODEPAGE 0x20
-
-void usage(void)
-{
- printf(
- "Usage: msitran.exe -g {basedb}{refdb}{transformfile}[{errorconditions}]\n"
- "\nOptions:\n"
- " -g Generate a transform\n"
- " -? or -h Display usage\n"
- "\nError conditions (specify in {errorconditions} to suppress):\n"
- " a Add existing row\n"
- " b Delete non-existing row\n"
- " c Add existing table\n"
- " d Delete non-existing table\n"
- " e Modify existing row\n"
- " f Change codepage\n");
-}
-
-BOOL generateTransform(char * basedb, char * refdb, char * transFile, unsigned int err)
-{
- MSIHANDLE dbHandle, refHandle;
- UINT r;
- r = MsiOpenDatabase(basedb, MSIDBOPEN_READONLY, &dbHandle);
- if (r != ERROR_SUCCESS) return FALSE;
- r = MsiOpenDatabase (refdb, MSIDBOPEN_READONLY, &refHandle);
- if (r != ERROR_SUCCESS) return FALSE;
-
- /* TODO: This isn't implemented in Wine */
- r = MsiDatabaseGenerateTransform(dbHandle, refHandle, transFile, 0, 0);
- if (r != ERROR_SUCCESS)
- {
- MsiCloseHandle(dbHandle);
- MsiCloseHandle(refHandle);
- return FALSE;
- }
- r = MsiCreateTransformSummaryInfo(dbHandle, refHandle, transFile, err, 0);
- MsiCloseHandle(dbHandle);
- MsiCloseHandle(refHandle);
-
- return TRUE;
-}
-
-int main(int argc, char *argv[])
-{
- char * genFiles[3] = {0, 0, 0};
- unsigned int i, err = 0;
- err = 0;
-
- /* Get parameters */
- while (argv[1] && (argv[1][0] == '-' || argv[1][0] == '/'))
- {
- switch(tolower(argv[1][1]))
- {
- case 'g':
- for (i = 0; i < 3; i++)
- {
- if (!argv[1])
- {
- printf("Please supply all arguments for generating a transform\n");
- return 1;
- }
- argv++; argc--;
- genFiles[i] = argv[1];
- }
- break;
- case '?':
- case 'h':
- usage();
- return 0;
- }
- argv++; argc++;
- }
-
- /* Record error suppression conditions */
- if (argv[1])
- {
- for (i = 0; i < strlen(argv[1]); i++)
- {
- switch(tolower(argv[1][i]))
- {
- case 'a': err |= MSITRANSFORM_ERROR_ADDEXISTINGROW; break;
- case 'b': err |= MSITRANSFORM_ERROR_DELMISSINGROW; break;
- case 'c': err |= MSITRANSFORM_ERROR_ADDEXISTINGTABLE; break;
- case 'd': err |= MSITRANSFORM_ERROR_DELMISSINGTABLE; break;
- case 'e': err |= MSITRANSFORM_ERROR_UPDATEMISSINGROW; break;
- case 'f': err |= MSITRANSFORM_ERROR_CHANGECODEPAGE; break;
- }
- }
- }
-
- /* Perform transformation */
- if (!generateTransform(genFiles[0], genFiles[1], genFiles[2], err))
- {
- printf("An error occurred and the transform could not be generated\n");
- return 3;
- }
-
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/syspathw32.cxx b/sfx2/source/doc/syspathw32.cxx
index ce5839082f14..ad0e244660a7 100644
--- a/sfx2/source/doc/syspathw32.cxx
+++ b/sfx2/source/doc/syspathw32.cxx
@@ -61,7 +61,7 @@ static bool SHGetSpecialFolderW32( int nFolderID, WCHAR* pszFolder, int nSize )
// time to very nasty compilation errors. If someone finds a better
// way to solve these probs please remove this copied part!
typedef unsigned short sal_uInt16;
-#if defined(_WIN32) && !defined(__MINGW32__)
+#if defined(_WIN32)
typedef wchar_t sal_Unicode;
#else
typedef sal_uInt16 sal_Unicode;
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 <objidl.h>
#include <shlobj.h>
-#ifdef __MINGW32__
-#include <algorithm>
-using std::min;
-using std::max;
-#endif
#ifndef DONT_HAVE_GDIPLUS
#include <gdiplus.h>
#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 <string>
#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 <strsafe.h>
-#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 <algorithm>
-#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 <objidl.h>
#include <stdio.h>
#include "propspec.hxx"
-#ifdef __MINGW32__
-#include <algorithm>
-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<void**>(&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: */
diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
deleted file mode 100644
index 3f0567449bb3..000000000000
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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 .
-#
-
-gb_COMPILEROPTFLAGS := -Os
-gb_CPUDEFS := -D_M_IX86
-gb_TMPDIR:=$(if $(TMPDIR),$(TMPDIR),/tmp)
-
-# please make generic modifications to either of these
-include $(GBUILDDIR)/platform/com_GCC_defs.mk
-include $(GBUILDDIR)/platform/windows.mk
-
-ifeq ($(COM_IS_CLANG),)
-# This has to do something with calling conventions, which are different
-# for x86 and x64. Don't put it in the common part since it is breaking
-# any code that uses boost::bind
-gb_GccLess470 := $(shell expr $(GCC_VERSION) \< 407)
-
-# Until GCC 4.6, MinGW used __cdecl by default, and BOOST_MEM_FN_ENABLE_CDECL
-# would result in ambiguous calls to overloaded boost::bind; since GCC 4.7,
-# MinGW uses __thiscall by default, so now needs BOOST_MEM_FN_ENABLE_CDECL for
-# uses of boost::bind with functions annotated with SAL_CALL:
-ifeq ($(gb_GccLess470),0)
-gb_COMPILERDEFS += -DBOOST_MEM_FN_ENABLE_CDECL
-endif
-endif
-
-include $(GBUILDDIR)/platform/mingw.mk
-
-include $(GBUILDDIR)/platform/com_GCC_class.mk
-
-# vim: set noet sw=4:
diff --git a/solenv/gbuild/platform/WNT_X86_64_GCC.mk b/solenv/gbuild/platform/WNT_X86_64_GCC.mk
deleted file mode 100644
index e1bb0215925f..000000000000
--- a/solenv/gbuild/platform/WNT_X86_64_GCC.mk
+++ /dev/null
@@ -1,33 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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 .
-#
-
-gb_COMPILEROPTFLAGS := -Os
-gb_CPUDEFS := -D_M_AMD64 -D_M_X64
-gb_TMPDIR:=$(if $(TMPDIR),$(TMPDIR),/tmp)
-
-# please make generic modifications to either of these
-include $(GBUILDDIR)/platform/com_GCC_defs.mk
-include $(GBUILDDIR)/platform/windows.mk
-
-include $(GBUILDDIR)/platform/mingw.mk
-gb_RCDEFS += -DWIN64
-
-include $(GBUILDDIR)/platform/com_GCC_class.mk
-
-# vim: set noet sw=4:
diff --git a/solenv/gbuild/platform/mingw.mk b/solenv/gbuild/platform/mingw.mk
deleted file mode 100644
index 6dc96cdcdf4b..000000000000
--- a/solenv/gbuild/platform/mingw.mk
+++ /dev/null
@@ -1,378 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# 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 .
-#
-
-gb_RC := $(WINDRES)
-
-gb_COMPILERDEFS += \
- -D_MT \
- -D_NATIVE_WCHAR_T_DEFINED \
- -D_MSC_EXTENSIONS \
- -D_FORCENAMELESSUNION \
-
-gb_RCDEFS := \
- -DWINVER=0x0502 \
- -DWIN32 \
-
-gb_RCFLAGS :=
-
-gb_CFLAGS += \
- $(gb_CFLAGS_COMMON) \
- -Wdeclaration-after-statement \
- -fno-strict-aliasing \
-
-gb_CXXFLAGS := \
- $(gb_CXXFLAGS_COMMON) \
- -Wno-ctor-dtor-privacy \
- -Wreturn-type \
- -Wshadow \
- -Wuninitialized \
- -fno-strict-aliasing \
- -std=gnu++0x \
-
-ifneq ($(SYSBASE),)
-gb_CXXFLAGS += --sysroot=$(SYSBASE)
-gb_CFLAGS += --sysroot=$(SYSBASE)
-endif
-
-# At least sal defines its own __main, which would cause DLLs linking against
-# sal to pick up sal's __main instead of the one from MinGW's dllcrt2.o:
-gb_LinkTarget_LDFLAGS := \
- -Wl,--export-all-symbols \
- -Wl,--exclude-symbols,__main \
- -Wl,--enable-stdcall-fixup \
- -Wl,--enable-runtime-pseudo-reloc-v2 \
-
-ifeq ($(MINGW_GCCLIB_EH),YES)
-gb_LinkTarget_LDFLAGS += -shared-libgcc
-endif
-
-gb_STDLIBS := \
- -lmingwthrd \
- -lmingw32 \
- -lmingwex \
-
-gb_DEBUG_CFLAGS := -fno-inline
-
-# LinkTarget class
-
-gb_LinkTarget_CFLAGS := $(gb_CFLAGS)
-gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
-
-gb_LinkTarget_INCLUDE +=\
- $(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
-
-define gb_LinkTarget__command_dynamiclinkexecutable
-$(call gb_Helper_abbreviate_dirs,\
- $(if $(CXXOBJECTS)$(GENCXXOBJECTS)$(EXTRAOBJECTLISTS),$(gb_CXX),$(gb_CC)) $(strip \
- $(gb_Executable_TARGETTYPEFLAGS) \
- $(if $(filter YES,$(TARGETGUI)), -mwindows, -mconsole) \
- $(T_LDFLAGS) \
- $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
- $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
- $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \
- $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
- $(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \
- $(foreach extraobjectlist,$(EXTRAOBJECTLISTS),@$(extraobjectlist)) \
- $(NATIVERES) \
- $(if $(LINKED_STATIC_LIBS),-Wl$(COMMA)--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) -Wl$(COMMA)--end-group) \
- $(patsubst lib%.a,-l%,$(patsubst lib%.dll.a,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_ilibfilename,$(lib))))) \
- $(T_LIBS) \
- -Wl$(COMMA)-Map$(COMMA)$(WORKDIR)/LinkTarget/$(2).map \
- -o $(1)))
-endef
-
-define gb_LinkTarget__command_dynamiclinklibrary
-$(call gb_Helper_abbreviate_dirs,\
- $(if $(CXXOBJECTS)$(GENCXXOBJECTS)$(EXTRAOBJECTLISTS),$(gb_CXX),$(gb_CC)) $(strip \
- $(gb_Library_TARGETTYPEFLAGS) \
- $(T_LDFLAGS) \
- $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
- $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
- $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \
- $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
- $(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \
- $(foreach extraobjectlist,$(EXTRAOBJECTLISTS),@$(extraobjectlist)) \
- $(NATIVERES) \
- $(if $(LINKED_STATIC_LIBS),-Wl$(COMMA)--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) -Wl$(COMMA)--end-group) \
- $(patsubst lib%.a,-l%,$(patsubst lib%.dll.a,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_ilibfilename,$(lib))))) \
- $(T_LIBS) \
- -Wl$(COMMA)-Map$(COMMA)$(WORKDIR)/LinkTarget/$(2).map \
- -Wl$(COMMA)--out-implib$(COMMA)$(ILIBTARGET) \
- -o $(1) \
- $(if $(findstring s,$(MAKEFLAGS)),> /dev/null)))
-endef
-
-define gb_LinkTarget__command_staticlinklibrary
-$(call gb_Helper_abbreviate_dirs,\
- rm -f $(1) && \
- $(gb_AR) -rsu $(1) \
- $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
- $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
- $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \
- $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
- $(foreach extraobjectlist,$(EXTRAOBJECTLISTS),@$(extraobjectlist)) \
- $(if $(findstring s,$(MAKEFLAGS)),> /dev/null))
-endef
-
-define gb_LinkTarget__command
-$(call gb_Output_announce,$(2),$(true),LNK,4)
-$(if $(filter Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinkexecutable,$(1),$(2)))
-$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclinklibrary,$(1),$(2)))
-$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlinklibrary,$(1)))
-endef
-
-define gb_LinkTarget_use_system_win32_libs
-$(call gb_LinkTarget_add_libs,$(1),$(foreach lib,$(2),-l$(patsubst oldnames,moldname,$(lib))))
-$(if $(call gb_LinkTarget__is_merged,$(1)),\
- $(call gb_LinkTarget_add_libs,$(call gb_Library_get_linktarget,merged),$(foreach lib,$(2),-l$(patsubst oldnames,moldname,$(lib)))))
-endef
-
-gb_LinkTarget_get_mapfile = \
-$(WORKDIR)/LinkTarget/$(patsubst %.dll,%.map,$(call gb_LinkTarget__get_workdir_linktargetname,$(1)))
-
-# Library class
-
-gb_Library_DEFS := -D_DLL
-gb_Library_TARGETTYPEFLAGS := -shared
-gb_Library_get_rpath :=
-
-gb_Library_SYSPRE := lib
-gb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_
-gb_Library_UDK_MAJORVER := 3
-
-gb_Library_PLAINEXT := .dll.a
-
-gb_Library_RTEXT := gcc3$(gb_Library_PLAINEXT)
-gb_Library_RTVEREXT := $(gb_Library_UDK_MAJORVER)$(gb_Library_RTEXT)
-gb_Library_OOOEXT := $(gb_Library_DLLPOSTFIX)$(gb_Library_PLAINEXT)
-gb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT)
-gb_Library_UNOVEREXT := $(gb_Library_UDK_MAJORVER)$(gb_Library_PLAINEXT)
-
-gb_Library_DLLEXT := .dll
-
-gb_Library_RTDLLEXT := gcc3$(gb_Library_DLLEXT)
-gb_Library_RTVERDLLEXT := $(gb_Library_UDK_MAJORVER)$(gb_Library_RTDLLEXT)
-gb_Library_OOODLLEXT := $(gb_Library_DLLPOSTFIX)$(gb_Library_DLLEXT)
-gb_Library_UNOVERDLLEXT := $(gb_Library_UDK_MAJORVER)$(gb_Library_DLLEXT)
-
-gb_Library_LAYER := \
- $(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \
- $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):NONE) \
- $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):URELIB) \
- $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \
- $(foreach lib,$(gb_Library_PLAINLIBS_OXT),$(lib):OXT) \
- $(foreach lib,$(gb_Library_PLAINLIBS_SHLXTHDL),$(lib):SHLXTHDL) \
- $(foreach lib,$(gb_Library_PRIVATELIBS_URE),$(lib):URELIB) \
- $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):URELIB) \
- $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \
- $(foreach lib,$(gb_Library_EXTENSIONLIBS),$(lib):OXT) \
-
-gb_Library_ILIBFILENAMES :=\
- $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \
- $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
- $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
- $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
- $(foreach lib,$(gb_Library_PLAINLIBS_OXT),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
- $(foreach lib,$(gb_Library_PLAINLIBS_SHLXTHDL),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
- $(foreach lib,$(gb_Library_PRIVATELIBS_URE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \
- $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTVEREXT)) \
- $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(gb_Library_UNOVERPRE)$(lib)$(gb_Library_PLAINEXT)) \
- $(foreach lib,$(gb_Library_EXTENSIONLIBS),$(lib):$(lib)$(gb_Library_UNOEXT)) \
-
-
-gb_Library_FILENAMES :=\
- $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(lib)$(gb_Library_OOODLLEXT)) \
- $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(lib)$(gb_Library_DLLEXT)) \
- $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(lib)$(gb_Library_DLLEXT)) \
- $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(lib)$(gb_Library_DLLEXT)) \
- $(foreach lib,$(gb_Library_PLAINLIBS_OXT),$(lib):$(lib)$(gb_Library_DLLEXT)) \
- $(foreach lib,$(gb_Library_PLAINLIBS_SHLXTHDL),$(lib):$(lib)$(gb_Library_DLLEXT)) \
- $(foreach lib,$(gb_Library_PRIVATELIBS_URE),$(lib):$(lib)$(gb_Library_OOODLLEXT)) \
- $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(lib)$(gb_Library_RTVERDLLEXT)) \
- $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(lib)$(gb_Library_UNOVERDLLEXT)) \
- $(foreach lib,$(gb_Library_EXTENSIONLIBS),$(lib):$(lib)$(gb_Library_UNOEXT)) \
-
-gb_Library_IARCSYSPRE := lib
-gb_Library_IARCEXT := .a
-
-gb_Library_ILIBEXT := .lib
-
-define gb_Library_Library_platform
-$(call gb_LinkTarget_set_ilibtarget,$(2),$(3))
-
-$(call gb_LinkTarget_add_auxtargets,$(2), \
- $(3) \
- $(call gb_LinkTarget_get_mapfile,$(2)) \
-)
-
-$(call gb_Library_add_default_nativeres,$(1),$(1)/default)
-
-endef
-
-define gb_Library_add_default_nativeres
-$(call gb_WinResTarget_WinResTarget_init,$(2))
-$(call gb_WinResTarget_set_rcfile,$(2),include/default)
-$(call gb_WinResTarget_add_defs,$(2),\
- -DVERVARIANT="$(LIBO_VERSION_PATCH)" \
- -DRES_APP_VENDOR="$(OOO_VENDOR)" \
- -DADDITIONAL_VERINFO1="" \
- -DADDITIONAL_VERINFO2="" \
- -DADDITIONAL_VERINFO3="" \
-)
-$(call gb_Library_add_nativeres,$(1),$(2))
-$(call gb_Library_get_clean_target,$(1)) : $(call gb_WinResTarget_get_clean_target,$(2))
-
-endef
-
-define gb_LinkTarget_add_nativeres
-$(call gb_LinkTarget_get_target,$(1)) : $(call gb_WinResTarget_get_target,$(2))
-$(call gb_LinkTarget_get_target,$(1)) : NATIVERES += $(call gb_WinResTarget_get_target,$(2))
-
-endef
-
-define gb_LinkTarget_set_nativeres
-$(call gb_LinkTarget_get_target,$(1)) : $(call gb_WinResTarget_get_target,$(2))
-$(call gb_LinkTarget_get_target,$(1)) : NATIVERES := $(call gb_WinResTarget_get_target,$(2))
-
-endef
-
-define gb_Library_get_ilibfilename
-$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Library_ILIBFILENAMES)))
-endef
-
-gb_Library_get_sdk_link_dir = $(INSTDIR)/$(SDKDIRNAME)/lib
-
-gb_Library_get_sdk_link_lib = $(gb_Library_get_ilib_target)
-
-# Executable class
-
-gb_Executable_EXT := .exe
-gb_Executable_TARGETTYPEFLAGS :=
-gb_Executable_get_rpath :=
-
-define gb_Executable_Executable_platform
-
-endef
-
-# CppunitTest class
-
-gb_CppunitTest_CPPTESTPRECOMMAND := \
- $(call gb_Helper_extend_ld_path,$(WORKDIR)/UnpackedTarball/cppunit/src/cppunit/.libs)
-gb_CppunitTest_get_filename = test_$(1).dll
-gb_CppunitTest_get_ilibfilename = itest_$(1).lib
-
-define gb_CppunitTest_CppunitTest_platform
-$(call gb_LinkTarget_set_ilibtarget,$(2),$(3))
-
-$(call gb_LinkTarget_add_auxtargets,$(2),\
- $(3) \
- $(call gb_LinkTarget_get_mapfile,$(2)) \
-)
-
-endef
-
-# WinResTarget class
-
-gb_WinResTarget_POSTFIX :=.o
-
-define gb_WinResTarget__command
-$(call gb_Output_announce,$(2),$(true),RC ,3)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) && \
- $(gb_RC) \
- $(DEFS) $(FLAGS) \
- $(INCLUDE) \
- -o $(1) \
- $(RCFILE) )
-endef
-
-$(eval $(call gb_Helper_make_dep_targets,\
- WinResTarget \
-))
-
-ifeq ($(gb_FULLDEPS),$(true))
-gb_WinResTarget__command_target = $(gb_Executable_BINDIR_FOR_BUILD)/makedepend
-define gb_WinResTarget__command_dep
-$(call gb_Output_announce,RC:$(2),$(true),DEP,1)
-$(call gb_Helper_abbreviate_dirs,\
- mkdir -p $(dir $(1)) && \
- $(gb_Executable_BINDIR_FOR_BUILD)/makedepend \
- $(INCLUDE) \
- $(DEFS) \
- $(RCFILE) \
- -o .res \
- -p $(dir $(3)) \
- -f $(1))
-endef
-else
-gb_WinResTarget__command_target =
-gb_WinResTarget__command_dep =
-endif
-
-# InstallModuleTarget class
-
-define gb_InstallModuleTarget_InstallModuleTarget_platform
-$(call gb_InstallModuleTarget_add_defs,$(1),\
- $(gb_CPUDEFS) \
- $(gb_OSDEFS) \
- -DCOMID=gcc3 \
- -D_gcc3 \
-)
-
-endef
-
-# InstallScript class
-
-gb_InstallScript_EXT := .inf
-
-# CliAssemblyTarget class
-
-gb_CliAssemblyTarget_POLICYEXT :=
-gb_CliAssemblyTarget_get_dll :=
-
-# Extension class
-
-gb_Extension_LICENSEFILE_DEFAULT := $(INSTROOT)/license.txt
-
-# UnpackedTarget class
-
-gb_UnpackedTarget_TARFILE_LOCATION := $(TARFILE_LOCATION)
-
-# UnoApiHeadersTarget class
-
-ifeq ($(DISABLE_DYNLOADING),TRUE)
-gb_UnoApiHeadersTarget_select_variant = $(if $(filter udkapi,$(1)),comprehensive,$(2))
-else
-gb_UnoApiHeadersTarget_select_variant = $(2)
-endif
-
-# UIMenubarTarget class
-
-define gb_UIMenubarTarget__command
-$(call gb_Output_announce,$(2),$(true),UIM,1)
-cp $(3) $(1)
-
-endef
-
-gb_UIMenubarTarget_UIMenubarTarget_platform :=
-
-# Python
-gb_PYTHON_PRECOMMAND := $$(error FIXME)
-
-# vim: set noet sw=4:
diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index 45411186081a..ca84867918dd 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -7,11 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-
-// Include this before stdio.h for the __MINGW32__ sake.
-// This header contains a define that modifies the way
-// formatting strings work for the mingw platforms.
-#include <sal/types.h>
+#include <sal/config.h>
#include <stdio.h>
#ifndef _WIN32
@@ -36,6 +32,7 @@
#include <osl/file.hxx>
#include <osl/process.h>
#include <rtl/bootstrap.hxx>
+#include <sal/types.h>
#include <vcl/svapp.hxx>
#include <svx/galtheme.hxx>
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index bca1e1edfc2e..5fd1529d6539 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -1080,7 +1080,7 @@ void SwTextFrame::PrepareVisualMove( sal_Int32& nPos, sal_uInt8& nCursorLevel,
UErrorCode nError = U_ZERO_ERROR;
UBiDi* pBidi = ubidi_openSized( nLen, 0, &nError );
- ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(pLineString), nLen, nDefaultDir, nullptr, &nError ); // UChar != sal_Unicode in MinGW
+ ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(pLineString), nLen, nDefaultDir, nullptr, &nError );
sal_Int32 nTmpPos = 0;
bool bOutOfBounds = false;
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 6cdf8b8f7518..f2a3247e0745 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -1278,7 +1278,7 @@ void SwScriptInfo::UpdateBidiInfo( const OUString& rText )
UBiDi* pBidi = ubidi_openSized( rText.getLength(), 0, &nError );
nError = U_ZERO_ERROR;
- ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(rText.getStr()), rText.getLength(), // UChar != sal_Unicode in MinGW
+ ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(rText.getStr()), rText.getLength(),
nDefaultDir, nullptr, &nError );
nError = U_ZERO_ERROR;
int nCount = ubidi_countRuns( pBidi, &nError );
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index e8277dc78f95..3132d9e181b5 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -38,7 +38,6 @@ $(eval $(call gb_Library_set_precompiled_header,vcl,$(SRCDIR)/vcl/inc/pch/precom
$(eval $(call gb_Library_set_include,vcl,\
$$(INCLUDE) \
-I$(SRCDIR)/vcl/inc \
- $(if $(filter WNTGCC,$(OS)$(COM)),-I$(MINGW_SYSROOT)/include/gdiplus) \
))
$(eval $(call gb_Library_add_defs,vcl,\
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index c3c3c8561973..69caafdfa73e 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -2836,7 +2836,7 @@ void TextEngine::ImpInitWritingDirections( sal_uInt32 nPara )
UBiDi* pBidi = ubidi_openSized( aText.getLength(), 0, &nError );
nError = U_ZERO_ERROR;
- ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aText.getStr()), aText.getLength(), nBidiLevel, nullptr, &nError ); // UChar != sal_Unicode in MinGW
+ ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aText.getStr()), aText.getLength(), nBidiLevel, nullptr, &nError );
nError = U_ZERO_ERROR;
long nCount = ubidi_countRuns( pBidi, &nError );
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 79b3140dd6f1..88f02d66f6fa 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -441,7 +441,7 @@ ImplLayoutArgs::ImplLayoutArgs(const OUString& rStr,
UBiDi* pParaBidi = ubidi_openSized(nLength, 0, &rcI18n);
if( !pParaBidi )
return;
- ubidi_setPara(pParaBidi, reinterpret_cast<const UChar *>(mrStr.getStr()), nLength, nLevel, nullptr, &rcI18n); // UChar != sal_Unicode in MinGW
+ ubidi_setPara(pParaBidi, reinterpret_cast<const UChar *>(mrStr.getStr()), nLength, nLevel, nullptr, &rcI18n);
UBiDi* pLineBidi = pParaBidi;
int nSubLength = mnEndCharPos - mnMinCharPos;
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index 0d00e4719872..4f270bc7845f 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -59,13 +59,6 @@
#pragma warning( disable: 4917 )
#endif
-#ifdef __MINGW32__
-#ifdef GetObject
-#undef GetObject
-#endif
-#define GetObject GetObjectA
-#endif
-
#include "prewin.h"
#include <gdiplus.h>
@@ -76,20 +69,10 @@
#endif
#include "postwin.h"
-#ifdef __MINGW32__
-#ifdef GetObject
-#undef GetObject
-#endif
-#endif
-
#if defined _MSC_VER
#pragma warning(pop)
#endif
-#ifdef __MINGW32__
-#include <sehandler.hxx>
-#endif
-
void SalAbort( const OUString& rErrorText, bool )
{
ImplFreeSalGDI();
@@ -756,25 +739,13 @@ LRESULT CALLBACK SalComWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPa
{
int bDef = TRUE;
LRESULT nRet = 0;
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- jmp_buf jmpbuf;
- __SEHandler han;
- if (__builtin_setjmp(jmpbuf) == 0)
- {
- han.Set(jmpbuf, NULL, (__SEHandler::PF)EXCEPTION_EXECUTE_HANDLER);
-#else
__try
{
-#endif
nRet = SalComWndProc( hWnd, nMsg, wParam, lParam, bDef );
}
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- han.Reset();
-#else
__except(WinSalInstance::WorkaroundExceptionHandlingInUSER32Lib(GetExceptionCode(), GetExceptionInformation()))
{
}
-#endif
if ( bDef )
{
if ( !ImplHandleGlobalMsg( hWnd, nMsg, wParam, lParam, nRet ) )
@@ -1031,8 +1002,6 @@ SalSession* WinSalInstance::CreateSalSession()
return nullptr;
}
-#if !defined ( __MINGW32__ ) || defined ( _WIN64 )
-
int WinSalInstance::WorkaroundExceptionHandlingInUSER32Lib(int, LPEXCEPTION_POINTERS pExceptionInfo)
{
// Decide if an exception is a c++ (mostly UNO) exception or a process violation.
@@ -1048,7 +1017,6 @@ int WinSalInstance::WorkaroundExceptionHandlingInUSER32Lib(int, LPEXCEPTION_POIN
return UnhandledExceptionFilter( pExceptionInfo );
}
-#endif
OUString WinSalInstance::getOSVersion()
{
diff --git a/vcl/win/app/saltimer.cxx b/vcl/win/app/saltimer.cxx
index 7930ac9e0b6c..8a21780e6d1e 100644
--- a/vcl/win/app/saltimer.cxx
+++ b/vcl/win/app/saltimer.cxx
@@ -22,10 +22,6 @@
#include <win/saltimer.h>
#include <win/salinst.h>
-#if defined ( __MINGW32__ )
-#include <sehandler.hxx>
-#endif
-
// maximum period
#define MAX_SYSPERIOD 65533
@@ -119,17 +115,8 @@ at better resolution than 10ms.
*/
void CALLBACK SalTimerProc(PVOID, BOOLEAN)
{
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- jmp_buf jmpbuf;
- __SEHandler han;
- if (__builtin_setjmp(jmpbuf) == 0)
- {
- han.Set(jmpbuf, NULL, (__SEHandler::PF)EXCEPTION_EXECUTE_HANDLER);
-#else
__try
{
-#endif
-
SalData* pSalData = GetSalData();
// always post message when the timer fires, we will remove the ones
@@ -140,16 +127,10 @@ void CALLBACK SalTimerProc(PVOID, BOOLEAN)
if (0 == ret) // SEH prevents using SAL_WARN here?
fputs("ERROR: PostMessage() failed!", stderr);
#endif
-
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- }
- han.Reset();
-#else
}
__except(WinSalInstance::WorkaroundExceptionHandlingInUSER32Lib(GetExceptionCode(), GetExceptionInformation()))
{
}
-#endif
}
/** Called in the main thread.
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index 250c2c84103e..277b1d85b94e 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -51,12 +51,6 @@
#include "prewin.h"
-#ifdef __MINGW32__
-#ifdef GetObject
-#undef GetObject
-#endif
-#endif
-
#include <gdiplus.h>
#include <gdiplusenums.h>
#include <gdipluscolor.h>
@@ -2166,12 +2160,7 @@ void setInterpolationMode(
if(bSameWidth && bSameHeight)
{
-#ifdef __MINGW32__
- //Gdiplus::InterpolationModeInvalid is missing on mingw
- rGraphics.SetInterpolationMode(Gdiplus::InterpolationModeDefault);
-#else
rGraphics.SetInterpolationMode(Gdiplus::InterpolationModeInvalid);
-#endif
}
else if(rDestWidth > rSrcWidth && rDestHeight > rSrcHeight)
{
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index f2f25d654d35..63c0c24ba810 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -49,25 +49,6 @@
#include <malloc.h>
-#if defined ( __MINGW32__ )
-#include <sehandler.hxx>
-#endif
-
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
-#define CATCH_DRIVER_EX_BEGIN \
- jmp_buf jmpbuf; \
- __SEHandler han; \
- if (__builtin_setjmp(jmpbuf) == 0) \
- { \
- han.Set(jmpbuf, NULL, (__SEHandler::PF)EXCEPTION_EXECUTE_HANDLER)
-
-#define CATCH_DRIVER_EX_END(mes, p) \
- } \
- han.Reset()
-#define CATCH_DRIVER_EX_END_2(mes) \
- } \
- han.Reset()
-#else
#define CATCH_DRIVER_EX_BEGIN \
__try \
{
@@ -84,7 +65,6 @@
{ \
OSL_FAIL( mes ); \
}
-#endif
using namespace com::sun::star;
using namespace com::sun::star::uno;
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 85339ff0e905..88e6f814b155 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -77,10 +77,6 @@
#include <multimon.h>
#pragma warning(pop)
#include <vector>
-#ifdef __MINGW32__
-#include <algorithm>
-using ::std::max;
-#endif
#include <com/sun/star/uno/Exception.hpp>
@@ -92,10 +88,6 @@ using ::std::max;
#include <time.h>
-#if defined ( __MINGW32__ )
-#include <sehandler.hxx>
-#endif
-
#include <windows.h>
#include <shobjidl.h>
#include <propkey.h>
@@ -5886,25 +5878,13 @@ LRESULT CALLBACK SalFrameWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l
{
int bDef = TRUE;
LRESULT nRet = 0;
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- jmp_buf jmpbuf;
- __SEHandler han;
- if (__builtin_setjmp(jmpbuf) == 0)
- {
- han.Set(jmpbuf, NULL, (__SEHandler::PF)EXCEPTION_EXECUTE_HANDLER);
-#else
__try
{
-#endif
nRet = SalFrameWndProc( hWnd, nMsg, wParam, lParam, bDef );
}
-#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
- han.Reset();
-#else
__except(WinSalInstance::WorkaroundExceptionHandlingInUSER32Lib(GetExceptionCode(), GetExceptionInformation()))
{
}
-#endif
if ( bDef )
nRet = DefWindowProcW( hWnd, nMsg, wParam, lParam );
diff --git a/xmlsecurity/Library_xmlsecurity.mk b/xmlsecurity/Library_xmlsecurity.mk
index 868c3f809e6c..b814435327e3 100644
--- a/xmlsecurity/Library_xmlsecurity.mk
+++ b/xmlsecurity/Library_xmlsecurity.mk
@@ -72,7 +72,7 @@ $(eval $(call gb_Library_add_exception_objects,xmlsecurity,\
$(eval $(call gb_Library_use_externals,xmlsecurity,\
libxml2 \
))
-ifeq ($(OS)-$(COM),WNT-MSC)
+ifeq ($(OS),WNT)
$(eval $(call gb_Library_add_defs,xmlsecurity,\
-DXMLSEC_CRYPTO_MSCRYPTO \
))
diff --git a/xmlsecurity/Library_xsec_xmlsec.mk b/xmlsecurity/Library_xsec_xmlsec.mk
index af7bca214a76..86411941763d 100644
--- a/xmlsecurity/Library_xsec_xmlsec.mk
+++ b/xmlsecurity/Library_xsec_xmlsec.mk
@@ -71,7 +71,7 @@ $(eval $(call gb_Library_add_exception_objects,xsec_xmlsec,\
xmlsecurity/source/xmlsec/nss/xsec_nss \
))
-ifeq ($(OS)-$(COM),WNT-MSC)
+ifeq ($(OS),WNT)
$(eval $(call gb_Library_add_defs,xsec_xmlsec,\
-DXMLSEC_CRYPTO_MSCRYPTO \
@@ -105,12 +105,7 @@ $(eval $(call gb_Library_add_defs,xsec_xmlsec,\
-DXMLSEC_CRYPTO_NSS \
))
-ifeq ($(OS)-$(COM),WNT-GCC)
-$(eval $(call gb_Library_add_libs,xsec_xmlsec,\
- $(call gb_UnpackedTarball_get_dir,xmlsec)/src/nss/.libs/libxmlsec1-nss.dll.a \
- $(call gb_UnpackedTarball_get_dir,xmlsec)/src/.libs/libxmlsec1.dll.a \
-))
-else ifeq ($(OS),ANDROID)
+ifeq ($(OS),ANDROID)
$(eval $(call gb_Library_add_libs,xsec_xmlsec,\
$(call gb_UnpackedTarball_get_dir,xmlsec)/src/openssl/.libs/libxmlsec1-openssl.a \
$(call gb_UnpackedTarball_get_dir,xmlsec)/src/.libs/libxmlsec1.a \
@@ -137,7 +132,7 @@ $(eval $(call gb_Library_add_exception_objects,xsec_xmlsec,\
xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl \
))
-endif # ifeq ($(OS)-$(COM),WNT-GCC)
+endif
ifeq ($(OS),SOLARIS)
$(eval $(call gb_Library_add_libs,xsec_xmlsec,\