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

2020-05-10 Thread Martin Storsjö

On Tue, 28 Apr 2020, Jean-Baptiste Kempf wrote:




On Tue, Apr 28, 2020, at 10:28, Steve Lhomme wrote:

On 2020-04-27 19:23, Martin Storsjö wrote:
> 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 allowed
>> - GetFileAttributes is allowed
>> - WaitForSingleObject is allowed
>> - GetTickCount is allowed
>> - SetUnhandledExceptionFilter is allowed
>> - TerminateProcess is allowed
>> - IsDBCSLeadByteEx is allowed
>> - SetErrorMode is allowed
>> - GetACP is allowed
>> - LocalAlloc/LocalFree are allowed
>> - Sleep/SleepEx are allowed
>> - SetFilePointer is allowed
>> - Tls functions are allowed
>> - GetConsoleOutputCP is allowed
>>
>> https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis
>>
>> To select the set of API's allowed by this library, define WINSTORECOMPAT
>> and build with _WIN32_WINNT >= _WIN32_WINNT_WIN10.
>> ---
>> .../winstorecompat/Makefile.am    | 25 ++-
>> 1 file changed, 24 insertions(+), 1 deletion(-)
>>
>> diff --git a/mingw-w64-libraries/winstorecompat/Makefile.am 
>> b/mingw-w64-libraries/winstorecompat/Makefile.am

>> index a1f79947..5cc71cd8 100644
>> --- a/mingw-w64-libraries/winstorecompat/Makefile.am
>> +++ b/mingw-w64-libraries/winstorecompat/Makefile.am
>> @@ -2,7 +2,8 @@ AUTOMAKE_OPTIONS = foreign subdir-objects
>>
>> AM_CFLAGS = -Wall -Wstrict-aliasing=2 -pedantic
>>
>> -lib_LIBRARIES = libwinstorecompat.a
>> +lib_LIBRARIES = libwinstorecompat.a \
>> +  libwinstorecompatapp.a
> 
> I'd still like this to be named e.g. winstorecompatuwp instead of -app.


How about windowsappcompat ? It's shorter and hint at the combination 
with windowsapp.


I like that.


I'd be ok with pushing this patch after it's been updated with the 
suggested name.


// Martin

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


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

2020-04-28 Thread Steve Lhomme



On 2020-04-27 16:31, Steve Lhomme wrote:

The original libwinstorecompat is designed to be used with libmincore.

- _beginthread _beginthreadex _endthread _endthreadex are allowed


They are allowed with UCRT but not in 8.x store apps. I'm not sure what 
it means for win10 store apps. The doc doesn't have a big banner saying 
it's forbidden in UWP like it does for getpid().




- CreateEventW is allowed
- CreateMutexW is allowed
- CreateSemaphoreW is allowed
- InitializeCriticalSection is allowed
- GetFileAttributes is allowed
- WaitForSingleObject is allowed
- GetTickCount is allowed
- SetUnhandledExceptionFilter is allowed
- TerminateProcess is allowed
- IsDBCSLeadByteEx is allowed
- SetErrorMode is allowed
- GetACP is allowed
- LocalAlloc/LocalFree are allowed
- Sleep/SleepEx are allowed
- SetFilePointer is allowed
- Tls functions are allowed
- GetConsoleOutputCP is allowed

https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis

To select the set of API's allowed by this library, define WINSTORECOMPAT
and build with _WIN32_WINNT >= _WIN32_WINNT_WIN10.
---
  .../winstorecompat/Makefile.am| 25 ++-
  1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/mingw-w64-libraries/winstorecompat/Makefile.am 
b/mingw-w64-libraries/winstorecompat/Makefile.am
index a1f79947..5cc71cd8 100644
--- a/mingw-w64-libraries/winstorecompat/Makefile.am
+++ b/mingw-w64-libraries/winstorecompat/Makefile.am
@@ -2,7 +2,8 @@ AUTOMAKE_OPTIONS = foreign subdir-objects
  
  AM_CFLAGS = -Wall -Wstrict-aliasing=2 -pedantic
  
-lib_LIBRARIES = libwinstorecompat.a

+lib_LIBRARIES = libwinstorecompat.a \
+  libwinstorecompatapp.a
  
  libwinstorecompat_a_SOURCES = \

src/beginthread.c \
@@ -43,3 +44,25 @@ libwinstorecompat_a_SOURCES = \
src/RtlRestoreContext.c \
src/GetUserName.c \
$(NULL)
+libwinstorecompat_a_CPPFLAGS = $(AM_CPPFLAGS) -D_WIN32_WINNT=_WIN32_WINNT_WIN8
+
+libwinstorecompatapp_a_SOURCES = \
+  src/GetModuleHandle.c \
+  src/LoadLibraryW.c \
+  src/CreateFileW.c \
+  src/UnhandledExceptionFilter.c \
+  src/VirtualProtect.c \
+  src/getenv.c \
+  src/GetFileSize.c \
+  src/SHGetFolderPathW.c \
+  src/QueueTimer.c \
+  src/Crypto.c \
+  src/GetStartupInfo.c \
+  src/EnumProcessModules.c \
+  src/RtlAddFunctionTable.c \
+  src/RtlCaptureContext.c \
+  src/RtlVirtualUnwind.c \
+  src/RtlRestoreContext.c \
+  src/GetUserName.c \
+  $(NULL)
+libwinstorecompatapp_a_CPPFLAGS = $(AM_CPPFLAGS) 
-D_WIN32_WINNT=_WIN32_WINNT_WIN10
--
2.17.1




___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


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

2020-04-28 Thread Jean-Baptiste Kempf


On Tue, Apr 28, 2020, at 10:28, Steve Lhomme wrote:
> On 2020-04-27 19:23, Martin Storsjö wrote:
> > 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 allowed
> >> - GetFileAttributes is allowed
> >> - WaitForSingleObject is allowed
> >> - GetTickCount is allowed
> >> - SetUnhandledExceptionFilter is allowed
> >> - TerminateProcess is allowed
> >> - IsDBCSLeadByteEx is allowed
> >> - SetErrorMode is allowed
> >> - GetACP is allowed
> >> - LocalAlloc/LocalFree are allowed
> >> - Sleep/SleepEx are allowed
> >> - SetFilePointer is allowed
> >> - Tls functions are allowed
> >> - GetConsoleOutputCP is allowed
> >>
> >> https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis
> >>
> >> To select the set of API's allowed by this library, define WINSTORECOMPAT
> >> and build with _WIN32_WINNT >= _WIN32_WINNT_WIN10.
> >> ---
> >> .../winstorecompat/Makefile.am    | 25 ++-
> >> 1 file changed, 24 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/mingw-w64-libraries/winstorecompat/Makefile.am 
> >> b/mingw-w64-libraries/winstorecompat/Makefile.am
> >> index a1f79947..5cc71cd8 100644
> >> --- a/mingw-w64-libraries/winstorecompat/Makefile.am
> >> +++ b/mingw-w64-libraries/winstorecompat/Makefile.am
> >> @@ -2,7 +2,8 @@ AUTOMAKE_OPTIONS = foreign subdir-objects
> >>
> >> AM_CFLAGS = -Wall -Wstrict-aliasing=2 -pedantic
> >>
> >> -lib_LIBRARIES = libwinstorecompat.a
> >> +lib_LIBRARIES = libwinstorecompat.a \
> >> +  libwinstorecompatapp.a
> > 
> > I'd still like this to be named e.g. winstorecompatuwp instead of -app.
> 
> How about windowsappcompat ? It's shorter and hint at the combination 
> with windowsapp.

I like that.

-- 
Jean-Baptiste Kempf -  President
+33 672 704 734


___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


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

2020-04-28 Thread Steve Lhomme

On 2020-04-27 19:23, Martin Storsjö wrote:

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 allowed
- GetFileAttributes is allowed
- WaitForSingleObject is allowed
- GetTickCount is allowed
- SetUnhandledExceptionFilter is allowed
- TerminateProcess is allowed
- IsDBCSLeadByteEx is allowed
- SetErrorMode is allowed
- GetACP is allowed
- LocalAlloc/LocalFree are allowed
- Sleep/SleepEx are allowed
- SetFilePointer is allowed
- Tls functions are allowed
- GetConsoleOutputCP is allowed

https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis

To select the set of API's allowed by this library, define WINSTORECOMPAT
and build with _WIN32_WINNT >= _WIN32_WINNT_WIN10.
---
.../winstorecompat/Makefile.am    | 25 ++-
1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/mingw-w64-libraries/winstorecompat/Makefile.am 
b/mingw-w64-libraries/winstorecompat/Makefile.am

index a1f79947..5cc71cd8 100644
--- a/mingw-w64-libraries/winstorecompat/Makefile.am
+++ b/mingw-w64-libraries/winstorecompat/Makefile.am
@@ -2,7 +2,8 @@ AUTOMAKE_OPTIONS = foreign subdir-objects

AM_CFLAGS = -Wall -Wstrict-aliasing=2 -pedantic

-lib_LIBRARIES = libwinstorecompat.a
+lib_LIBRARIES = libwinstorecompat.a \
+  libwinstorecompatapp.a


I'd still like this to be named e.g. winstorecompatuwp instead of -app.


How about windowsappcompat ? It's shorter and hint at the combination 
with windowsapp.


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.


// Martin


___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public



___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


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 any objections.


Thanks,

Jacek



___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


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 allowed
- GetFileAttributes is allowed
- WaitForSingleObject is allowed
- GetTickCount is allowed
- SetUnhandledExceptionFilter is allowed
- TerminateProcess is allowed
- IsDBCSLeadByteEx is allowed
- SetErrorMode is allowed
- GetACP is allowed
- LocalAlloc/LocalFree are allowed
- Sleep/SleepEx are allowed
- SetFilePointer is allowed
- Tls functions are allowed
- GetConsoleOutputCP is allowed

https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis

To select the set of API's allowed by this library, define WINSTORECOMPAT
and build with _WIN32_WINNT >= _WIN32_WINNT_WIN10.
---
.../winstorecompat/Makefile.am| 25 ++-
1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/mingw-w64-libraries/winstorecompat/Makefile.am 
b/mingw-w64-libraries/winstorecompat/Makefile.am
index a1f79947..5cc71cd8 100644
--- a/mingw-w64-libraries/winstorecompat/Makefile.am
+++ b/mingw-w64-libraries/winstorecompat/Makefile.am
@@ -2,7 +2,8 @@ AUTOMAKE_OPTIONS = foreign subdir-objects

AM_CFLAGS = -Wall -Wstrict-aliasing=2 -pedantic

-lib_LIBRARIES = libwinstorecompat.a
+lib_LIBRARIES = libwinstorecompat.a \
+  libwinstorecompatapp.a


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.


// Martin


___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[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
- WaitForSingleObject is allowed
- GetTickCount is allowed
- SetUnhandledExceptionFilter is allowed
- TerminateProcess is allowed
- IsDBCSLeadByteEx is allowed
- SetErrorMode is allowed
- GetACP is allowed
- LocalAlloc/LocalFree are allowed
- Sleep/SleepEx are allowed
- SetFilePointer is allowed
- Tls functions are allowed
- GetConsoleOutputCP is allowed

https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis

To select the set of API's allowed by this library, define WINSTORECOMPAT
and build with _WIN32_WINNT >= _WIN32_WINNT_WIN10.
---
 .../winstorecompat/Makefile.am| 25 ++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/mingw-w64-libraries/winstorecompat/Makefile.am 
b/mingw-w64-libraries/winstorecompat/Makefile.am
index a1f79947..5cc71cd8 100644
--- a/mingw-w64-libraries/winstorecompat/Makefile.am
+++ b/mingw-w64-libraries/winstorecompat/Makefile.am
@@ -2,7 +2,8 @@ AUTOMAKE_OPTIONS = foreign subdir-objects
 
 AM_CFLAGS = -Wall -Wstrict-aliasing=2 -pedantic
 
-lib_LIBRARIES = libwinstorecompat.a
+lib_LIBRARIES = libwinstorecompat.a \
+  libwinstorecompatapp.a
 
 libwinstorecompat_a_SOURCES = \
   src/beginthread.c \
@@ -43,3 +44,25 @@ libwinstorecompat_a_SOURCES = \
   src/RtlRestoreContext.c \
   src/GetUserName.c \
   $(NULL)
+libwinstorecompat_a_CPPFLAGS = $(AM_CPPFLAGS) -D_WIN32_WINNT=_WIN32_WINNT_WIN8
+
+libwinstorecompatapp_a_SOURCES = \
+  src/GetModuleHandle.c \
+  src/LoadLibraryW.c \
+  src/CreateFileW.c \
+  src/UnhandledExceptionFilter.c \
+  src/VirtualProtect.c \
+  src/getenv.c \
+  src/GetFileSize.c \
+  src/SHGetFolderPathW.c \
+  src/QueueTimer.c \
+  src/Crypto.c \
+  src/GetStartupInfo.c \
+  src/EnumProcessModules.c \
+  src/RtlAddFunctionTable.c \
+  src/RtlCaptureContext.c \
+  src/RtlVirtualUnwind.c \
+  src/RtlRestoreContext.c \
+  src/GetUserName.c \
+  $(NULL)
+libwinstorecompatapp_a_CPPFLAGS = $(AM_CPPFLAGS) 
-D_WIN32_WINNT=_WIN32_WINNT_WIN10
-- 
2.17.1



___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public