[Mingw-w64-public] MinGW Binaries

2020-04-17 Thread Thomas Dineen
Gentle People:    I normally use CentOS7, but I was disappointed to discover that RH had removed the mingw binaries from their normal CentOS Archive. Claiming that they were out of date and full of bugs and security holes? H?    RH said to use the Fedora Mingw binaries, but did not say which

[Mingw-w64-public] [PATCH v3 3/6] headers: crt: disable cwait/_cwait in winstore builds

2020-04-17 Thread Steve Lhomme
It's not allowed to launch another process (as far as 2016 doc goes): https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=vs-2019 "These functions are used to read and write directly from and to the console. UWP apps are GUI only; they don

[Mingw-w64-public] [PATCH 10/12] headers: allow some process/thread affinity API's in winstore builds

2020-04-17 Thread Steve Lhomme
https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-processtopology-obsolete-l1-1-0dll --- mingw-w64-headers/include/winbase.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mingw-w64-headers/include/winbase.h b/mingw-w64-headers/inc

Re: [Mingw-w64-public] [PATCH 01/12] headers: add some security API's to winstore builds

2020-04-17 Thread Steve Lhomme
This set goes on top of the previous set of 37 patches. To make it easier to grab the patches and the others I've submitted, I created this branch on Github: https://github.com/robUx4/mingw-w64/tree/winstore-cleaning On 2020-04-17 14:27, Steve Lhomme wrote: The ones allowed are listed here ht

[Mingw-w64-public] [PATCH 04/12] headers: allow IsWow64Process in winstore builds

2020-04-17 Thread Steve Lhomme
https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-wow64-l1-1-0dll --- mingw-w64-headers/include/wow64apiset.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mingw-w64-headers/include/wow64apiset.h b/mingw-w64-headers/include/wow64apiset.h index f07ae0

[Mingw-w64-public] [PATCH 03/12] headers: allow CommandLineToArgvW in winstore builds

2020-04-17 Thread Steve Lhomme
It's allowed https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-shcore-obsolete-l1-1-0dll --- mingw-w64-headers/include/shellapi.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw-w64-headers/include/shellapi.h b/mingw-w64-headers/incl

[Mingw-w64-public] [PATCH 08/12] headers: add some access control APIs in winstore builds

2020-04-17 Thread Steve Lhomme
https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-security-base-l1-1-0dll https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-security-base-l1-2-0dll --- mingw-w64-headers/include/securitybaseapi.h | 103 ++-- 1 file c

[Mingw-w64-public] [PATCH 06/12] headers: allow GetAcceptLanguagesA/W in winstore builds

2020-04-17 Thread Steve Lhomme
https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-url-l1-1-0dll LWSTDAPI needs to be defined for desktop and app sections so move around the family check. --- mingw-w64-headers/include/shlwapi.h | 40 - 1 file changed, 22 insertion

[Mingw-w64-public] [PATCH 12/12] headers: allow DeleteVolumeMountPointA in winstore builds

2020-04-17 Thread Steve Lhomme
https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-file-ansi-l1-1-0dll It's not in fileapi.h, unlike DeleteVolumeMountPointW --- mingw-w64-headers/include/winbase.h | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mingw-w64-header

[Mingw-w64-public] [PATCH 05/12] headers: add more locale API's allowed in winstore builds

2020-04-17 Thread Steve Lhomme
https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-localization-obsolete-l1-2-0dll https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-localization-ansi-l1-1-0dll --- mingw-w64-headers/include/winnls.h | 13 - 1 f

[Mingw-w64-public] [PATCH 11/12] headers: add some security identifier API's in winstore builds

2020-04-17 Thread Steve Lhomme
https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-security-lsalookup-ansi-l2-1-0dll https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-security-lsalookup-l2-1-0dll --- mingw-w64-headers/include/winbase.h | 31 +++-

[Mingw-w64-public] [PATCH 07/12] headers: add CM_Get_Device_Interface_List APIs in winstore builds

2020-04-17 Thread Steve Lhomme
https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-devices-config-l1-1-1dll https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-devices-config-l1-1-2dll Some of the types are moved so they are visible by all build families. --- mingw-

[Mingw-w64-public] [PATCH 02/12] headers: add some namespace API's in winstore builds

2020-04-17 Thread Steve Lhomme
https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-namespace-ansi-l1-1-0dll https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-namespace-l1-1-0dll --- mingw-w64-headers/include/namespaceapi.h | 2 +- mingw-w64-headers/inclu

[Mingw-w64-public] [PATCH 01/12] headers: add some security API's to winstore builds

2020-04-17 Thread Steve Lhomme
The ones allowed are listed here https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-security-provider-ansi-l1-1-0dll https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-security-provider-l1-1-0dll --- mingw-w64-headers/include/aclapi.h

[Mingw-w64-public] [PATCH 09/12] headers: add (Global)LocalAlloc APIs in winstore builds

2020-04-17 Thread Steve Lhomme
https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-heap-l2-1-0dll https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-api-ms-win-core-heap-obsolete-l1-1-0dll Some were already handled via winstorecompat --- mingw-w64-headers/include/winbase

[Mingw-w64-public] [PATCH v3 6/6] headers: crt: disable _wctype global variable in winstore builds

2020-04-17 Thread Steve Lhomme
It's not allowed (as far as 2016 doc goes): https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=vs-2019 "Multi-byte strings are not supported in UWP apps." --- mingw-w64-headers/crt/ctype.h | 2 +- mingw-w64-headers/crt/wchar.h | 2 +-

[Mingw-w64-public] [PATCH v3 4/6] headers: crt: forbid deprecated DLLs APIs in winstore builds

2020-04-17 Thread Steve Lhomme
They are not allowed: https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=vs-2019 "These were obsolete functions in previous CRT versions. Also, user cannot load DLLs except from those in the same application package." --- mingw-w64-heade

[Mingw-w64-public] [PATCH v3 1/6] headers: crt: include winapifamily in corecrt.h

2020-04-17 Thread Steve Lhomme
So we can restrict some C runtime APIs based on the target family. Based on this documentation some APIs are not allowed in UWP builds https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=vs-2019 The documentation is old and may not apply

[Mingw-w64-public] [PATCH v3 2/6] headers: crt: disable process APIs in winstore builds

2020-04-17 Thread Steve Lhomme
It's not allowed to launch another process (as far as 2016 doc goes): https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=vs-2019 "The functionality is not available in UWP apps. A UWP app cannot invoke another UWP app or a desktop app." -

[Mingw-w64-public] [PATCH v3 5/6] headers: crt: disable some character APIs in winstore builds

2020-04-17 Thread Steve Lhomme
They are not allowed (as far as 2016 doc goes): https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=vs-2019 "Multi-byte strings are not supported in Windows 8.x Store apps." "Multi-byte strings are not supported in UWP apps." --- mingw-w6

Re: [Mingw-w64-public] [PATCH] crt: add more DLLs to windowsapp

2020-04-17 Thread Steve Lhomme
On 2020-04-16 17:23, Liu Hao wrote: 在 2020/4/16 22:18, Steve Lhomme 写道: There are many DLLs with their API entries listed by MS that were no linkable yet using -lwindowsapp as recommended for apps the can run on all types of devices. https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis

[Mingw-w64-public] [PATCH v2] crt: add more DLLs to windowsapp

2020-04-17 Thread Steve Lhomme
There are many DLLs with their API entries listed by MS that were no linkable yet using -lwindowsapp as recommended for apps the can run on all types of devices. https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis --- mingw-w64-crt/Makefile.am | 71 ++

Re: [Mingw-w64-public] [PATCH 2/2] Revert "headers: move the C++ check for interlocked API"

2020-04-17 Thread Liu Hao
在 04/17/2020 06:08 PM, Martin Storsjö 写道: > This reverts commit 1013ae930cd6599dbfb181430996791731d18dc1. > > This has been fixed properly now, that fix only hid the issue > when compiling in C mode. > > Signed-off-by: Martin Storsjö > --- > mingw-w64-headers/include/winbase.h | 4 ++-- > 1 fil

Re: [Mingw-w64-public] [PATCH 1/2] headers: Don't have a define expand to something containing defined()

2020-04-17 Thread Steve Lhomme
Seems right. On 2020-04-17 12:08, Martin Storsjö wrote: The behaviour of a macro expanding to something containing defined() is undefined. Signed-off-by: Martin Storsjö --- mingw-w64-headers/include/winbase.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mingw-w64

Re: [Mingw-w64-public] [PATCH 3/3] crt: Convert the arm sincos.c to assembly

2020-04-17 Thread Martin Storsjö
On Wed, 8 Apr 2020, Martin Storsjö wrote: On Wed, 8 Apr 2020, Liu Hao wrote: 在 2020/4/8 2:01, Martin Storsjö 写道: This avoids optimizing the sincos function to a recursive call to itself, if built with -ffast-math (unless built with -fno-builtin-sin). While building with -ffast-math can break

[Mingw-w64-public] [PATCH 2/2] Revert "headers: move the C++ check for interlocked API"

2020-04-17 Thread Martin Storsjö
This reverts commit 1013ae930cd6599dbfb181430996791731d18dc1. This has been fixed properly now, that fix only hid the issue when compiling in C mode. Signed-off-by: Martin Storsjö --- mingw-w64-headers/include/winbase.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/min

[Mingw-w64-public] [PATCH 1/2] headers: Don't have a define expand to something containing defined()

2020-04-17 Thread Martin Storsjö
The behaviour of a macro expanding to something containing defined() is undefined. Signed-off-by: Martin Storsjö --- mingw-w64-headers/include/winbase.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mingw-w64-headers/include/winbase.h b/mingw-w64-headers/include/winba

Re: [Mingw-w64-public] [PATCH] headers: move the C++ check for interlocked API

2020-04-17 Thread Martin Storsjö
On Fri, 17 Apr 2020, Steve Lhomme wrote: On 2020-04-16 16:20, Liu Hao wrote: 在 2020/4/16 14:17, Steve Lhomme 写道: The code is blocked the same way as before. This avoids a warning with clang: ../mingw-w64/mingw-w64-headers/include/winbase.h:3088:5: warning: macro expansion producing 'defin

Re: [Mingw-w64-public] [PATCH 1/5] headers: allow blocking some C runtime APIs in winstore builds

2020-04-17 Thread Steve Lhomme
On 2020-04-17 11:57, Martin Storsjö wrote: On Fri, 17 Apr 2020, Steve Lhomme wrote: On 2020-04-16 21:38, Martin Storsjö wrote: On Thu, 16 Apr 2020, Steve Lhomme wrote: Based on this documentation some APIs are not allowed in UWP builds https://docs.microsoft.com/en-us/cpp/cppcx/crt-function

Re: [Mingw-w64-public] [PATCH v2 1/6] headers: allow blocking some C runtime APIs in winstore builds

2020-04-17 Thread Martin Storsjö
On Fri, 17 Apr 2020, Steve Lhomme wrote: Based on this documentation some APIs are not allowed in UWP builds https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=vs-2019 The documentation is old and may not apply to Win10 but it's still

Re: [Mingw-w64-public] [PATCH 1/5] headers: allow blocking some C runtime APIs in winstore builds

2020-04-17 Thread Martin Storsjö
On Fri, 17 Apr 2020, Steve Lhomme wrote: On 2020-04-16 21:38, Martin Storsjö wrote: On Thu, 16 Apr 2020, Steve Lhomme wrote: Based on this documentation some APIs are not allowed in UWP builds https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platfor

Re: [Mingw-w64-public] [PATCH] headers: move the C++ check for interlocked API

2020-04-17 Thread Steve Lhomme
On 2020-04-16 16:20, Liu Hao wrote: 在 2020/4/16 14:17, Steve Lhomme 写道: The code is blocked the same way as before. This avoids a warning with clang: ../mingw-w64/mingw-w64-headers/include/winbase.h:3088:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-def

[Mingw-w64-public] [PATCH v2 4/6] headers: forbid deprecated DLLs APIs from the C runtime in winstore builds

2020-04-17 Thread Steve Lhomme
They are not allowed: https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=vs-2019 "These were obsolete functions in previous CRT versions. Also, user cannot load DLLs except from those in the same application package." --- mingw-w64-heade

[Mingw-w64-public] [PATCH v2 3/6] headers: disable cwait/_cwait from the C runtime in winstore builds

2020-04-17 Thread Steve Lhomme
It's not allowed to launch another process (as far as 2016 doc goes): https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=vs-2019 "These functions are used to read and write directly from and to the console. UWP apps are GUI only; they don

[Mingw-w64-public] [PATCH v2 5/6] headers: disable some character APIs from the C runtime in winstore builds

2020-04-17 Thread Steve Lhomme
They are not allowed (as far as 2016 doc goes): https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=vs-2019 "Multi-byte strings are not supported in Windows 8.x Store apps." "Multi-byte strings are not supported in UWP apps." --- mingw-w6

[Mingw-w64-public] [PATCH v2 1/6] headers: allow blocking some C runtime APIs in winstore builds

2020-04-17 Thread Steve Lhomme
Based on this documentation some APIs are not allowed in UWP builds https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=vs-2019 The documentation is old and may not apply to Win10 but it's still the one listed for UCRT compatibility : http

[Mingw-w64-public] [PATCH v2 6/6] headers: disable _wctype global variable from the C runtime in winstore builds

2020-04-17 Thread Steve Lhomme
It's not allowed (as far as 2016 doc goes): https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=vs-2019 "Multi-byte strings are not supported in UWP apps." --- mingw-w64-headers/crt/ctype.h | 2 +- mingw-w64-headers/crt/wchar.h | 2 +-

[Mingw-w64-public] [PATCH v2 2/6] headers: disable process APIs from the C runtime in winstore builds

2020-04-17 Thread Steve Lhomme
It's not allowed to launch another process (as far as 2016 doc goes): https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=vs-2019 "The functionality is not available in UWP apps. A UWP app cannot invoke another UWP app or a desktop app." -

Re: [Mingw-w64-public] [PATCH 1/5] headers: allow blocking some C runtime APIs in winstore builds

2020-04-17 Thread Steve Lhomme
On 2020-04-16 21:38, Martin Storsjö wrote: On Thu, 16 Apr 2020, Steve Lhomme wrote: Based on this documentation some APIs are not allowed in UWP builds https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps?view=vs-2019 The documentation is