Re: [Mingw-w64-public] [PATCH 1/4] headers: Fix compile warning: D2DERR_* redefined

2024-09-15 Thread Biswapriyo Nath
On Mon, Sep 16, 2024 at 12:50 AM Nikolay Sivov wrote: > > Was it removed after 10.0.22621.0? Because I have it there. > > On Sun, Sep 15, 2024 at 8:13 PM Biswapriyo Nath > wrote: > > > Do we need to keep d2derr.h? It does not exists in latest Windows SDK > > 10.x version. Oh, my bad. The file na

Re: [Mingw-w64-public] [PATCH 1/4] headers: Fix compile warning: D2DERR_* redefined

2024-09-15 Thread Nikolay Sivov
Was it removed after 10.0.22621.0? Because I have it there. On Sun, Sep 15, 2024 at 8:13 PM Biswapriyo Nath wrote: > Do we need to keep d2derr.h? It does not exists in latest Windows SDK > 10.x version. > > > ___ > Mingw-w64-public mailing list > Mingw

Re: [Mingw-w64-public] [PATCH 1/4] headers: Fix compile warning: D2DERR_* redefined

2024-09-15 Thread Biswapriyo Nath
Do we need to keep d2derr.h? It does not exists in latest Windows SDK 10.x version. ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Re: [Mingw-w64-public] New libsrc/scrnsave.c compile warnings

2024-09-15 Thread Jeremy Drake via Mingw-w64-public
On Sun, 15 Sep 2024, Pali Rohár wrote: > Hello, Since recent commit 4cf86b87928c6653612238c1240bf8cb1a697e7e > ("crt/libsrc: Enable scrnsave code") gcc started throwing new compile > warnings during compilation of mingw-w64: > > libsrc/scrnsave.c: In function ‘WinMain’: > libsrc/scrnsave.c:130:23:

Re: [Mingw-w64-public] [PATCH] crt: Define and use __p_ function for _osplatform

2024-09-15 Thread Pali Rohár
On Sunday 15 September 2024 11:24:21 Pali Rohár wrote: > On Saturday 14 September 2024 23:51:40 Martin Storsjö wrote: > > On Sun, 8 Sep 2024, Pali Rohár wrote: > > > > > Global variable _osplatform is provided in new x86 versions of msvcrt.dll > > > > I think this misses explaining what the situa

[Mingw-w64-public] [PATCH 3/3] crt: Provide __p__osplatform() for all CRT import libraries

2024-09-15 Thread Pali Rohár
_osplatform is available only in i386 and x64 versions of msvcrt.dll, msvcr70.dll, msvcr71.dll and msvcr80.dll. Include emulation of __p__osplatform() functions for all other CRT libraries, including UCRT. --- mingw-w64-crt/Makefile.am | 11 +++ mingw-w64-crt/misc/__p__osp

[Mingw-w64-public] [PATCH 1/3] crt: Provide __p__winver() function also for ARM msvcrt.dll import library

2024-09-15 Thread Pali Rohár
ARM32 and ARM64 OS system version of msvcrt.dll do not have neither _winver global variable, nor __p__winver() function. But they have _winmajor and _winminor global variables. Provide __p__winver() function emulation for ARM msvcrt import library via via values of _winmajor and _winminor global v

[Mingw-w64-public] [PATCH 2/3] crt: Provide __p__osver(), __p__winmajor(), __p__winminor() and __p__winver() for msvcr90+ and UCRT

2024-09-15 Thread Pali Rohár
_osver, _winmajor, _winminor and _winver are exported from CRT DLL library up to the msvcr80.dll version. Add support for __p_ functions also for msvcr90+ and UCRT import libraries. --- mingw-w64-crt/Makefile.am | 27 +++--- mingw-w64-crt/lib-common/msvcr120.mri | 1 + min

[Mingw-w64-public] [PATCH v2] crt: Define and use __p_ function for _osplatform

2024-09-15 Thread Pali Rohár
Global variable _osplatform for i386 is provided in new versions of msvcrt.dll and then also in msvcr70.dll, msvcr71.dll and msvcr80.dll. For x64 it is provided in all msvcrt.dll and msvcr80.dll versions. Function __p__osplatform() which returns pointer to global variable _osplatform is provided o

[Mingw-w64-public] [PATCH v2] crt: Fix stat, _stat, _stat32, fstat, _fstat and _fstat32 for crtdll.dll builds

2024-09-15 Thread Pali Rohár
crtdll.dll's struct _stat is different than msvcrt.dll's struct _stat. crtdll.dll's dev_t type (used in struct _stat) is short but msvcrt.dll's dev_t type is unsigned int. Fix this problem by providing mingw-w64 _stat32() and _fstat32() compatible wrappers around crtdll.dll's _stat() and _fstat()

[Mingw-w64-public] [PATCH 4/4] crt: Disable gcc warning for imaxdiv function alias

2024-09-15 Thread Pali Rohár
gcc 8+ throws warning during imaxdiv.c compilation: misc/imaxdiv.c:34:1: warning: ‘lldiv’ alias between functions of incompatible types ‘lldiv_t(long long int, long long int)’ {aka ‘struct (long long int, long long int)’} and ‘imaxdiv_t(intmax_t, intmax_t)’ {aka ‘struct (long long int, lo

[Mingw-w64-public] [PATCH 3/4] headers: Fix wspiapi.h warning: cast between incompatible function types

2024-09-15 Thread Pali Rohár
When casting from function pointer which takes some parameters and returns void to function pointer which returns non-void and may take some parameters, then gcc throws following warning: warning: wspiapi.h:50:20: warning: cast between incompatible function types from ‘void (__attribute__((stdc

[Mingw-w64-public] [PATCH 2/4] headers: Disable gcc warning that __INTRINSIC_PROLOG is not portable

2024-09-15 Thread Pali Rohár
When compiling any application with flags under gcc 7+ with flags -D__MINGW_INTRIN_INLINE -Wall -Wextra, it throws about 300 lines of preprocessor warnings for __INTRINSIC_PROLOG usage: warning: this use of "defined" may not be portable It is caused by the fact that this macro __INTRINSIC_PROLOG u

[Mingw-w64-public] [PATCH 1/4] headers: Fix compile warning: D2DERR_* redefined

2024-09-15 Thread Pali Rohár
For more D2DERR_* macros defined in d2derr.h, warnings is: In file included from mingw-w64-headers/include/d2d1.h:20, from mingw-w64-headers/include/d2d1_1.h:10, from libsrc/uuid.c:29: mingw-w64-headers/include/d2derr.h:16: warning: "D2DERR_BAD_NUMBER" red

Re: [Mingw-w64-public] [PATCH] crt: Define and use __p_ function for _osplatform

2024-09-15 Thread Pali Rohár
On Sunday 15 September 2024 18:03:45 Martin Storsjö wrote: > On Sun, 15 Sep 2024, Pali Rohár wrote: > > > On Sunday 15 September 2024 12:23:41 Pali Rohár wrote: > > > On Sunday 08 September 2024 11:43:01 Pali Rohár wrote: > > > > Global variable _osplatform is provided in new x86 versions of > >

Re: [Mingw-w64-public] [PATCH] crt: Fix stat, _stat, _stat32, fstat, _fstat and _fstat32 for crtdll.dll builds

2024-09-15 Thread Martin Storsjö
On Sun, 15 Sep 2024, Pali Rohár wrote: On Sunday 08 September 2024 11:31:47 Pali Rohár wrote: crtdll.dll's struct _stat is different than msvcrt.dll's struct _stat. crtdll.dll's dev_t type (used in struct _stat) is short but msvcrt.dll's dev_t type is unsigned int. Fix this problem by providin

Re: [Mingw-w64-public] [PATCH] crt: Define and use __p_ function for _osplatform

2024-09-15 Thread Martin Storsjö
On Sun, 15 Sep 2024, Pali Rohár wrote: On Sunday 15 September 2024 12:23:41 Pali Rohár wrote: On Sunday 08 September 2024 11:43:01 Pali Rohár wrote: Global variable _osplatform is provided in new x86 versions of msvcrt.dll and then also in msvcr70.dll, msvcr71.dll and msvcr80.dll. Function __p

Re: [Mingw-w64-public] [PATCH] crt: Fix stat, _stat, _stat32, fstat, _fstat and _fstat32 for crtdll.dll builds

2024-09-15 Thread Pali Rohár
On Sunday 08 September 2024 11:31:47 Pali Rohár wrote: > crtdll.dll's struct _stat is different than msvcrt.dll's struct _stat. > crtdll.dll's dev_t type (used in struct _stat) is short but msvcrt.dll's > dev_t type is unsigned int. > > Fix this problem by providing mingw-w64 _stat32() and _fstat3

Re: [Mingw-w64-public] [PATCH] crt: Define and use __p_ function for _osplatform

2024-09-15 Thread Pali Rohár
On Sunday 15 September 2024 12:23:41 Pali Rohár wrote: > On Sunday 08 September 2024 11:43:01 Pali Rohár wrote: > > Global variable _osplatform is provided in new x86 versions of msvcrt.dll > > and then also in msvcr70.dll, msvcr71.dll and msvcr80.dll. Function > > __p__osplatform() which returns p

[Mingw-w64-public] New libsrc/scrnsave.c compile warnings

2024-09-15 Thread Pali Rohár
Hello, Since recent commit 4cf86b87928c6653612238c1240bf8cb1a697e7e ("crt/libsrc: Enable scrnsave code") gcc started throwing new compile warnings during compilation of mingw-w64: libsrc/scrnsave.c: In function ‘WinMain’: libsrc/scrnsave.c:130:23: warning: cast to pointer from integer of different

Re: [Mingw-w64-public] intrin-impl.h compile warning: this use of "defined" may not be portable

2024-09-15 Thread Pali Rohár
On Monday 05 August 2024 12:19:58 Pali Rohár wrote: > On Monday 05 August 2024 16:54:14 LIU Hao wrote: > > 在 2024-08-05 01:59, Pali Rohár 写道: > > > I looked at the definition of that __INTRINSIC_PROLOG macro but I have > > > absolutely no idea what is the problem there. > > > > > > Can we mute som

Re: [Mingw-w64-public] wspiapi.h:50:20: warning: cast between incompatible function types from ‘void (__attribute__((stdcall)) *)(struct addrinfo *)’ to ‘int (__attribute__((stdcall)) *)()’ [-Wcast-f

2024-09-15 Thread Pali Rohár
On Monday 05 August 2024 17:54:34 Pali Rohár wrote: > On Monday 05 August 2024 23:04:21 LIU Hao wrote: > > 在 2024-08-05 20:14, Antonin Décimo 写道: > > > C99 in Annex J.5.7 Function pointer casts states: > > > 1 A pointer to an object or to void may be cast to a pointer to a > > > function, allowing

Re: [Mingw-w64-public] [PATCH] crt: Define and use __p_ function for _osplatform

2024-09-15 Thread Pali Rohár
On Sunday 08 September 2024 11:43:01 Pali Rohár wrote: > Global variable _osplatform is provided in new x86 versions of msvcrt.dll > and then also in msvcr70.dll, msvcr71.dll and msvcr80.dll. Function > __p__osplatform() which returns pointer to global variable _osplatform is > provided only in msv

Re: [Mingw-w64-public] [PATCH] crt: Define and use __p_ function for _osplatform

2024-09-15 Thread Pali Rohár
On Saturday 14 September 2024 23:51:40 Martin Storsjö wrote: > On Sun, 8 Sep 2024, Pali Rohár wrote: > > > Global variable _osplatform is provided in new x86 versions of msvcrt.dll > > I think this misses explaining what the situation is for other > architectures. Ou, I forget for it. > For x64

Re: [Mingw-w64-public] [PATCH] crt: Fix stat, _stat, _stat32, fstat, _fstat and _fstat32 for crtdll.dll builds

2024-09-15 Thread Pali Rohár
On Saturday 14 September 2024 23:22:40 Martin Storsjö wrote: > On Sun, 8 Sep 2024, Pali Rohár wrote: > > > crtdll.dll's struct _stat is different than msvcrt.dll's struct _stat. > > crtdll.dll's dev_t type (used in struct _stat) is short but msvcrt.dll's > > dev_t type is unsigned int. > > > > Fi

Re: [Mingw-w64-public] [PATCH] crt: Fix atexit() function for every import library

2024-09-15 Thread Pali Rohár
Ok, fine. I just wanted to know if the newly reported issue is not something known which will be fixed by your work. On Sunday 15 September 2024 16:35:52 Julian Waters wrote: > Hi Pali, > > Hmm, it doesn't seem to be related, at least on first glance. I'm > working on adding native TLS to gcc, bu

Re: [Mingw-w64-public] [PATCH] crt: Fix atexit() function for every import library

2024-09-15 Thread Julian Waters
Hi Pali, Hmm, it doesn't seem to be related, at least on first glance. I'm working on adding native TLS to gcc, but right now it uses software emulated TLS, which is what seems to be broken in that bug. I unfortunately doubt I am competent enough to fix that bug, however :( best regards, Julian