Re: [Mingw-w64-public] [PATCH v3 05/10] winstorecompat: provide GetUserName

2020-04-27 Thread Jacek Caban
On 27.04.2020 19:55, Jean-Baptiste Kempf wrote: On Mon, Apr 27, 2020, at 19:40, Jacek Caban wrote: On 27.04.2020 16:31, Steve Lhomme wrote: It's needed by: - getlogin() in mingwex Could we prohibit getlogin() on non-desktop in headers instead? Or call directly GetEnvironment directly? If

Re: [Mingw-w64-public] [PATCH v3 05/10] winstorecompat: provide GetUserName

2020-04-27 Thread Jean-Baptiste Kempf
On Mon, Apr 27, 2020, at 19:40, Jacek Caban wrote: > On 27.04.2020 16:31, Steve Lhomme wrote: > > It's needed by: > > - getlogin() in mingwex > > > Could we prohibit getlogin() on non-desktop in headers instead? Or call directly GetEnvironment directly? -- Jean-Baptiste Kempf - President +

Re: [Mingw-w64-public] [PATCH v3 10/10] winstorecompat: add libwinstorecompatapp to use with libwindowsapp

2020-04-27 Thread Jacek Caban
On 27.04.2020 19:23, Martin Storsjö wrote: I'd still like this to be named e.g. winstorecompatuwp instead of -app. Other than that, I don't think I have any objections to the other patches in the set - but I'd like to hear Jacek's ack as well. Other than comments I just sent, I don't have an

Re: [Mingw-w64-public] [PATCH v3 05/10] winstorecompat: provide GetUserName

2020-04-27 Thread Jacek Caban
On 27.04.2020 16:31, Steve Lhomme wrote: It's needed by: - getlogin() in mingwex Could we prohibit getlogin() on non-desktop in headers instead? Thanks, Jacek ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://list

Re: [Mingw-w64-public] [PATCH v3 09/10] crt: compile the DLL Delay Loading code in delayimp

2020-04-27 Thread Jacek Caban
On 27.04.2020 19:22, Martin Storsjö wrote: Jacek, Wine uses delayloaded DLLs a lot - does it use -ldelayimp properly? Or does it entirely use its own implementation of the helper function nowadays? Wine will always use its own implementation (that just forwards the call to ResolveDelayLoaded

Re: [Mingw-w64-public] [PATCH 8/9] winstorecompat: allow building with code that needs codeGeneration capability

2020-04-27 Thread Martin Storsjö
On Fri, 24 Apr 2020, Martin Storsjö wrote: On Fri, 24 Apr 2020, Steve Lhomme wrote: By default winstorecompat is built without the need for this capability. VirtualProtect may be mapped to VirtualProtectFromApp but only if the app has the codeGeneration capability. It is needed when compili

Re: [Mingw-w64-public] [PATCH] headers: add dinputd.idl

2020-04-27 Thread Biswapriyo Nath
On Monday, April 27, 2020, Liu Hao wrote: > Although it is a bit unclear why `LPDIEFFESCAPE` > etc. aren't defined in this file (they are defined in 'dinput.h' so use > of 'dinputd.h' requires inclusion of 'dinput.h' first). The only test project I have is in msys2/MINGW-packages/mingw-w64-ogre3

Re: [Mingw-w64-public] [PATCH v3 10/10] winstorecompat: add libwinstorecompatapp to use with libwindowsapp

2020-04-27 Thread Martin Storsjö
On Mon, 27 Apr 2020, Steve Lhomme wrote: The original libwinstorecompat is designed to be used with libmincore. - _beginthread _beginthreadex _endthread _endthreadex are allowed - CreateEventW is allowed - CreateMutexW is allowed - CreateSemaphoreW is allowed - InitializeCriticalSection is allo

Re: [Mingw-w64-public] [PATCH v3 09/10] crt: compile the DLL Delay Loading code in delayimp

2020-04-27 Thread Martin Storsjö
On Mon, 27 Apr 2020, Steve Lhomme wrote: The library already existed for projects correctly using it, but the actual code was in libmingw32. There is also a configure option to enable delay loading support (off by default). So It's only built when it's enabled. --- mingw-w64-crt/Makefile.am | 27

Re: [Mingw-w64-public] [PATCH] headers: add dinputd.idl

2020-04-27 Thread Liu Hao
在 2020/4/27 17:33, Biswapriyo Nath 写道: > ... > > > This patch looks good. Although it is a bit unclear why `LPDIEFFESCAPE` etc. aren't defined in this file (they are defined in 'dinput.h' so use of 'dinputd.h' requires inclusion of 'dinput.h' first) however this matches MS header, so it's proba

Re: [Mingw-w64-public] [PATCH] headers/winerror.h: add directx error values

2020-04-27 Thread Liu Hao
在 2020/4/27 22:17, Biswapriyo Nath 写道: > Updated. > > > Thanks. Pushed this one. -- Best regards, LH_Mouse signature.asc Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://list

[Mingw-w64-public] [PATCH] headers: import dsconf.h from wine

2020-04-27 Thread Biswapriyo Nath
dsconf.h was imported from wine but not added in wine-import.sh file. After importing from wine the only diff is that BOOL is replaced with WINBOOL. From 5595d68fbbff356a199342b3b544bd5ef962109f Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Mon, 27 Apr 2020 21:40:31 +0530 Subject: [PATCH] h

[Mingw-w64-public] [PATCH v3 08/10] winstorecompat: allow building with code that needs codeGeneration capability

2020-04-27 Thread Steve Lhomme
By default winstorecompat is built without the need for this capability. VirtualProtect may be mapped to VirtualProtectFromApp but only if the app has the codeGeneration capability. It is needed when compiling UNIX code with relocatable sections that are relocated at runtime. VirtualProtectFromAp

[Mingw-w64-public] [PATCH v3 02/10] crt: use UWP allowed API's in ftruncate64

2020-04-27 Thread Steve Lhomme
GetFileInformationByHandle, FindFirstVolumeW, FindNextVolumeW, FindVolumeClose are not allowed. GetFinalPathNameByHandleW is allowed in win8 and win10 https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis https://docs.microsoft.com/en-us/windows/win32/apiindex/windows-8-api-sets We read t

[Mingw-w64-public] [PATCH v3 04/10] crt: use WCHAR API's in WspiapiLoad

2020-04-27 Thread Steve Lhomme
They are more likely to be available in UWP and we already provide a LoadLibraryW replacement otherwise. --- mingw-w64-crt/libsrc/wspiapi/WspiapiLoad.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mingw-w64-crt/libsrc/wspiapi/WspiapiLoad.c b/mingw-w64-crt/l

[Mingw-w64-public] [PATCH v3 06/10] headers: allow CreateFileW/GetFileSize in winstore builds

2020-04-27 Thread Steve Lhomme
They are implemented in winstorecompat so they should be available. --- mingw-w64-headers/include/fileapi.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mingw-w64-headers/include/fileapi.h b/mingw-w64-headers/include/fileapi.h index 373ca9fb..2c0115f2 100644 --- a/min

[Mingw-w64-public] [PATCH v3 01/10] crt: use GetEnvironmentVariableW in getopt

2020-04-27 Thread Steve Lhomme
The API is available since Windows XP and available in UWP for win8 and win10. This avoids relying on getenv() from winstorecompat that returns NULL and can't be reimplemented in a clean way. --- mingw-w64-crt/misc/getopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw

[Mingw-w64-public] [PATCH v3 05/10] winstorecompat: provide GetUserName

2020-04-27 Thread Steve Lhomme
It's needed by: - getlogin() in mingwex GetEnvironmentVariableA("USERNAME") gives the same information (tested on win10 in cmd.exe and PowerShell). No implementation provided when building winstorecompat for win8 as GetEnvironmentVariableA is not allowed and GetUserNameEx requires -lsecur32. ---

[Mingw-w64-public] [PATCH v3 10/10] winstorecompat: add libwinstorecompatapp to use with libwindowsapp

2020-04-27 Thread Steve Lhomme
The original libwinstorecompat is designed to be used with libmincore. - _beginthread _beginthreadex _endthread _endthreadex are allowed - CreateEventW is allowed - CreateMutexW is allowed - CreateSemaphoreW is allowed - InitializeCriticalSection is allowed - GetFileAttributes is allowed - WaitFor

[Mingw-w64-public] [PATCH v3 07/10] headers: allow some forbidden functions winstore calls with WINSTORECOMPAT

2020-04-27 Thread Steve Lhomme
The stubs don't do anything but they are used by the crt. --- mingw-w64-headers/include/winnt.h | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/mingw-w64-headers/include/winnt.h b/mingw-w64-headers/include/winnt.h index c47dc7fd..fa29cf2a 100644

[Mingw-w64-public] [PATCH v3 09/10] crt: compile the DLL Delay Loading code in delayimp

2020-04-27 Thread Steve Lhomme
The library already existed for projects correctly using it, but the actual code was in libmingw32. There is also a configure option to enable delay loading support (off by default). So It's only built when it's enabled. --- mingw-w64-crt/Makefile.am | 27 +-- 1 file change

[Mingw-w64-public] [PATCH v3 03/10] crt: use UWP allowed API's in __mingw_fwrite

2020-04-27 Thread Steve Lhomme
GetFileSize is not allowed. Switching to GetFileSizeEx and SetFilePointerEx makes the types and comparison cleaner. Both API's are available in XP as the one they replace. --- mingw-w64-crt/misc/mingw-fseek.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/

Re: [Mingw-w64-public] [PATCH] headers/winerror.h: add directx error values

2020-04-27 Thread Biswapriyo Nath
Updated. From d60fc050596aa2fe053e804f90202f708acc36d2 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Mon, 27 Apr 2020 19:45:34 +0530 Subject: [PATCH] headers/winerror.h: add directx error values Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/include/winerror.h | 75

Re: [Mingw-w64-public] [PATCH] headers/winerror.h: add directx error values

2020-04-27 Thread Liu Hao
在 2020/4/27 17:23, Biswapriyo Nath 写道: > ... > > The following three macros are redefined: 0. DXGI_STATUS_UNOCCLUDED 1. DXGI_STATUS_DDA_WAS_STILL_DRAWING 2. DXGI_STATUS_PRESENT_REQUIRED In addition, why don't align the macro bodies just like others around them? -- Best regards, LH_Mouse

Re: [Mingw-w64-public] [PATCH] headers/wincon.h: add missing functions

2020-04-27 Thread Liu Hao
在 2020/4/27 16:46, Biswapriyo Nath 写道: > ... > > > Thanks. This patch looks good to me. Pushed. -- Best regards, LH_Mouse signature.asc Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.n

Re: [Mingw-w64-public] [PATCH 4/9] winstorecompat: handle LoadLibraryA alongside LoadLibraryW

2020-04-27 Thread Jean-Baptiste Kempf
On Mon, Apr 27, 2020, at 12:14, Martin Storsjö wrote: > On Mon, 27 Apr 2020, Jacek Caban wrote: > > We would need to move __delayLoadHelper2 to be defined in msvcrt importlib > > first. Then we could use different implementation for different crts. UCRT > > could use LdrResolveDelayLoadedAPI, but

Re: [Mingw-w64-public] [PATCH 8/9] winstorecompat: allow building with code that needs codeGeneration capability

2020-04-27 Thread Martin Storsjö
On Mon, 27 Apr 2020, Jacek Caban wrote: On 27.04.2020 12:10, Martin Storsjö wrote: On Fri, 24 Apr 2020, Martin Storsjö wrote: From when I implemented this in lld, I remember that it looked like there was an intention that the linker would reference the symbol _pei386_runtime_relocator (code

Re: [Mingw-w64-public] [PATCH 4/9] winstorecompat: handle LoadLibraryA alongside LoadLibraryW

2020-04-27 Thread Jacek Caban
On 27.04.2020 12:14, Martin Storsjö wrote: On Mon, 27 Apr 2020, Jacek Caban wrote: On 27.04.2020 11:46, Steve Lhomme wrote: On 2020-04-24 14:44, Jacek Caban wrote: On 24.04.2020 13:43, Steve Lhomme wrote: It's needed by: - __delayLoadHelper2() in mingwex I'm not sure what are the exact co

Re: [Mingw-w64-public] [PATCH 8/9] winstorecompat: allow building with code that needs codeGeneration capability

2020-04-27 Thread Jacek Caban
On 27.04.2020 12:10, Martin Storsjö wrote: On Fri, 24 Apr 2020, Martin Storsjö wrote: From when I implemented this in lld, I remember that it looked like there was an intention that the linker would reference the symbol _pei386_runtime_relocator (code in ld.bfd that tries to do that), to forc

Re: [Mingw-w64-public] [PATCH 4/9] winstorecompat: handle LoadLibraryA alongside LoadLibraryW

2020-04-27 Thread Martin Storsjö
On Mon, 27 Apr 2020, Jacek Caban wrote: On 27.04.2020 11:46, Steve Lhomme wrote: On 2020-04-24 14:44, Jacek Caban wrote: On 24.04.2020 13:43, Steve Lhomme wrote: It's needed by: - __delayLoadHelper2() in mingwex I'm not sure what are the exact compatibility considerations here, but for wi

Re: [Mingw-w64-public] [PATCH 8/9] winstorecompat: allow building with code that needs codeGeneration capability

2020-04-27 Thread Martin Storsjö
On Fri, 24 Apr 2020, Martin Storsjö wrote: From when I implemented this in lld, I remember that it looked like there was an intention that the linker would reference the symbol _pei386_runtime_relocator (code in ld.bfd that tries to do that), to force pulling in the whole mechanism - but doing

Re: [Mingw-w64-public] [PATCH 4/9] winstorecompat: handle LoadLibraryA alongside LoadLibraryW

2020-04-27 Thread Jacek Caban
On 27.04.2020 11:46, Steve Lhomme wrote: On 2020-04-24 14:44, Jacek Caban wrote: On 24.04.2020 13:43, Steve Lhomme wrote: It's needed by: - __delayLoadHelper2() in mingwex I'm not sure what are the exact compatibility considerations here, but for win8+ builds we could just use LdrResolveDel

Re: [Mingw-w64-public] [PATCH 4/9] winstorecompat: handle LoadLibraryA alongside LoadLibraryW

2020-04-27 Thread Steve Lhomme
On 2020-04-24 14:44, Jacek Caban wrote: On 24.04.2020 13:43, Steve Lhomme wrote: It's needed by: - __delayLoadHelper2() in mingwex I'm not sure what are the exact compatibility considerations here, but for win8+ builds we could just use LdrResolveDelayLoadedAPI and make __delayLoadHelper2 j

[Mingw-w64-public] [PATCH] headers: add dinputd.idl

2020-04-27 Thread Biswapriyo Nath
... From a46a7975f228a2f6e0201ea099197b91b6d1754e Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Mon, 27 Apr 2020 15:02:25 +0530 Subject: [PATCH] headers: add dinputd.idl Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/Makefile.am | 1 + mingw-w64-headers/include/dinputd.id

[Mingw-w64-public] [PATCH] headers/winerror.h: add directx error values

2020-04-27 Thread Biswapriyo Nath
... From 8d93a7ad7e14e3957aff0acd3bd881380bab6e9b Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Mon, 27 Apr 2020 14:52:00 +0530 Subject: [PATCH] headers/winerror.h: add directx error values Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/include/winerror.h | 78 +

[Mingw-w64-public] [PATCH] headers/wincon.h: add missing functions

2020-04-27 Thread Biswapriyo Nath
... From cc00572113b95ec771c455af51f84509e9294feb Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Mon, 27 Apr 2020 10:19:59 +0530 Subject: [PATCH] headers/wincon.h: add missing functions Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/include/wincon.h | 22 ++ 1 fi