Re: [Mingw-w64-public] [PATCH] Define FLS_MAXIMUM_AVAILABLE as 4080 for WIN10_19H1

2023-06-07 Thread Luca Bacci
Yes, looks good! Thanks, Luca Da: LIU Hao Inviato: mercoledì, giugno 7, 2023 5:07:07 PM A: Luca Bacci ; mingw-w64-public@lists.sourceforge.net Oggetto: Re: [Mingw-w64-public] [PATCH] Define FLS_MAXIMUM_AVAILABLE as 4080 for WIN10_19H1 在 2023-06-07 22:47

Re: [Mingw-w64-public] [PATCH] Define FLS_MAXIMUM_AVAILABLE as 4080 for WIN10_19H1

2023-06-07 Thread Luca Bacci
Typo there: *0x0602* is Windows 8 Luca Inviato da Outlook per Android<https://aka.ms/AAb9ysg> From: Luca Bacci Sent: Wednesday, June 7, 2023 4:47:43 PM To: LIU Hao ; mingw-w64-public@lists.sourceforge.net Subject: Re: [Mingw-w64-public] [PATCH]

Re: [Mingw-w64-public] [PATCH] Define FLS_MAXIMUM_AVAILABLE as 4080 for WIN10_19H1

2023-06-07 Thread Luca Bacci
Indeed it's quite a strange macro, reminds me of https://devblogs.microsoft.com/oldnewthing/20160613-00/?p=93655 :) While writing a few tests for fiber local storage I found that the Windows SDK had a different value, so thought about updating the mingw-w64 headers. But actually I don't have an

Re: [Mingw-w64-public] [PATCH] Define FLS_MAXIMUM_AVAILABLE as 4080 for WIN10_19H1

2023-06-06 Thread Luca Bacci
Hi! Right, the Windows SDK defines FLS_MAXIMUM_AVAILABLE unconditionally, let's do the same here. Thank you! Luca Da: LIU Hao Inviato: lunedì, giugno 5, 2023 4:01:51 PM A: mingw-w64-public@lists.sourceforge.net ; Luca Bacci Oggetto: Re: [Mingw-w64-p

[Mingw-w64-public] [PATCH] Define FLS_MAXIMUM_AVAILABLE as 4080 for WIN10_19H1

2023-06-05 Thread Luca Bacci
Windows 10 19H1 raised the number of available FLS slots from 128 to 4080 [1] and the Windows SDK was updated accordingly [1] https://learn.microsoft.com/en-us/windows-insider/archive/new-in-19h1#fls-slot-limit-increase Signed-off-by: Luca Bacci --- mingw-w64-headers/include/winnt.h | 5

[Mingw-w64-public] R: R: [PATCH] Raise FLS_MAXIMUM_AVAILABLE to 4080

2023-06-03 Thread Luca Bacci
_WINNT_WIN10_RS3 include/winnt.h:6066:#if _WIN32_WINNT >= _WIN32_WINNT_WIN10_NI include/winnt.h:6192:#if _WIN32_WINNT >= _WIN32_WINNT_WIN10_19H2 include/winnt.h:6244:#if _WIN32_WINNT >= _WIN32_WINNT_WIN10_RS5 include/winnt.h:6252:#if _WIN32_WINNT >= _WIN32_WINNT_WIN10_FE Luca ___

[Mingw-w64-public] R: [PATCH] Raise FLS_MAXIMUM_AVAILABLE to 4080

2023-06-03 Thread Luca Bacci
Good idea! The first public release supporting 4080 slots is Win10 19H1. I think that we should use NTDDI_VERSION as it's the only macro that can differentiate between OS releases. The Windows SDK contains a few checks for OS releases w/ _WIN32_WINNT (grep for "_WIN32_WINNT_WIN10_"), but are act

[Mingw-w64-public] [PATCH] Raise FLS_MAXIMUM_AVAILABLE to 4080

2023-05-31 Thread Luca Bacci
Windows 10 19H1 raised the number of available FLS slots from 128 to 4080 [1] and the Windows SDK was updated accordingly [1] https://learn.microsoft.com/en-us/windows-insider/archive/new-in-19h1#fls-slot-limit-increase Signed-off-by: Luca Bacci --- mingw-w64-headers/include/winnt.h | 2 +- 1

Re: [Mingw-w64-public] Exported symbols of import .lib are influenced by the .def file

2023-05-22 Thread Luca Bacci
Hi! This issue has been fixed in binutils by commit https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=80d4e113d7b9af8a5a36e5ea4399bca86050784f Thank you all for your help! Luca Il giorno ven 5 mag 2023 alle ore 02:51 LIU Hao ha scritto: > 在 2023-05-05 03:59, Martin Storsjö 写道: > > Woul

Re: [Mingw-w64-public] Exported symbols of import .lib are influenced by the .def file

2023-05-04 Thread Luca Bacci
Thank you all for intervening! I have now opened https://sourceware.org/bugzilla/show_bug.cgi?id=30421. Tomorrow I'll try applying some of the suggestions presented here BR, Luca Il gio 4 mag 2023, 22:00 Martin Storsjö ha scritto: > On Fri, 5 May 2023, LIU Hao wrote: > > > The 'proper' workaro

Re: [Mingw-w64-public] Exported symbols of import .lib are influenced by the .def file

2023-05-04 Thread Luca Bacci
Hello, Jeremy! > Does GetProcAddress not deal with stdcall-decorated exports transparently on x86? No, unfortunately. That's also explained by Raymond Chen in two blog posts: - https://devblogs.microsoft.com/oldnewthing/20040112-00/?p=41083 - https://devblogs.microsoft.com/oldnewthing/2006

Re: [Mingw-w64-public] Exported symbols of import .lib are influenced by the .def file

2023-05-04 Thread Luca Bacci
; > Sent: Thursday, May 4, 2023 12:45 PM > > To: mingw-w64-public@lists.sourceforge.net > > Subject: RE: [Mingw-w64-public] Exported symbols of import .lib are > > influenced by the .def file > > > > Hi Luca, > > > > > -Original Message

Re: [Mingw-w64-public] Exported symbols of import .lib are influenced by the .def file

2023-05-04 Thread Luca Bacci
gt; > > -Original Message- > > From: Luca Bacci > > Sent: Thursday, May 4, 2023 10:50 AM > > To: mingw-w64-public@lists.sourceforge.net > > Subject: [Mingw-w64-public] Exported symbols of import .lib are > influenced > > by the .def file > > > &

[Mingw-w64-public] Exported symbols of import .lib are influenced by the .def file

2023-05-04 Thread Luca Bacci
Hello! we're observing a problem when compiling x86 DLLs using mingw-w64 gcc. Developers may choose to mark exported functions of a DLL using a .def definition file: LIBRARY mylib.dll EXPORTS foo bar Most of the times a .def file is used to export *undecorated* symbols from a DLL, so that use

[Mingw-w64-public] Question about -ffast-math on mingw-w64

2023-02-28 Thread Luca Bacci
Hello, I was wondering whether all the parts of -ffast-math are supported on mingw-w64. For example, does -fno-math-errno need appropriate support from the libc, beyond the compiler? My understanding is that mingw-gcc uses the math functions from the MSVCRT / UCRT library, but those won't support n

Re: [Mingw-w64-public] Undefined reference to _set_doserrno w/ msvcrt

2023-01-31 Thread Luca Bacci
Great. Thank you all! Best, Luca Il giorno mar 31 gen 2023 alle ore 15:21 LIU Hao ha scritto: > 在 2023-01-31 22:05, Luca Bacci 写道: > > Hi LIU, very sorry for the delay! > > > > I have now attached a patch with a proper sign-off > > > > > > Tha

Re: [Mingw-w64-public] Undefined reference to _set_doserrno w/ msvcrt

2023-01-31 Thread Luca Bacci
Hi LIU, very sorry for the delay! I have now attached a patch with a proper sign-off Thank you very much! Luca Il giorno mar 31 gen 2023 alle ore 09:35 LIU Hao ha scritto: > 在 2023/1/24 00:07, Luca Bacci 写道: > > Ok, first tentative here. Let me know if anything needs to b

Re: [Mingw-w64-public] Undefined reference to _set_doserrno w/ msvcrt

2023-01-23 Thread Luca Bacci
Ok, first tentative here. Let me know if anything needs to be changed! Thank you, Luca Il giorno lun 23 gen 2023 alle ore 15:25 LIU Hao ha scritto: > 在 2023-01-23 22:19, Luca Bacci 写道: > > Awesome! Thank you very much, LIU Hao and Martin Storsjö! > > > > Yes, making

Re: [Mingw-w64-public] Undefined reference to _set_doserrno w/ msvcrt

2023-01-23 Thread Luca Bacci
Awesome! Thank you very much, LIU Hao and Martin Storsjö! Yes, making both _set_controlfp, _set_doserrno available in MSVCRT toolchains would be great! Should I prepare a patch? Best, Luca Il giorno gio 19 gen 2023 alle ore 22:49 Martin Storsjö ha scritto: > On Thu, 19 Jan 2023, LIU Hao wrote

[Mingw-w64-public] Undefined reference to _set_doserrno w/ msvcrt

2023-01-19 Thread Luca Bacci
Hello! When compiling some code that uses _set_doserrno , I get a few linking errors: mintty screen dump D:\glib-mingw-dbg/../glib/glib/gstdio.c:366: undefined reference to `_set_doserrno' That doesn't happen when

Re: [Mingw-w64-public] Is wmain supported?

2023-01-03 Thread Luca Bacci
Works like a charm. Thank you! Best, Luca Il giorno mar 3 gen 2023 alle ore 21:06 David Grayson < davidegray...@gmail.com> ha scritto: > I tested it just now and it appears to be supported. Pass the -municode > option to GCC. > > --David > > On Tue, Jan 3, 2023 at 11:2

[Mingw-w64-public] Is wmain supported?

2023-01-03 Thread Luca Bacci
Hi, Is wmain supported by mingw GCC or CLang? https://learn.microsoft.com/en-us/cpp/c-language/using-wmain Otherwise where is the crt source code that creates the argv vector from the command line? Thank you very much! Luca ___ Mingw-w64-public mailin

[Mingw-w64-public] Linking with libssp

2022-09-12 Thread Luca Bacci
on/issues/10673 Thank you! Luca Bacci ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Re: [Mingw-w64-public] Feature Request: Add IPackage2

2022-08-29 Thread Luca Bacci
tions removed. Thanks a bunch! Luca Bacci Il giorno lun 29 ago 2022 alle ore 16:23 Biswapriyo Nath < nathbap...@gmail.com> ha scritto: > I can try to add those interfaces in mingw-w64 and/or wine. But it > would be better if the code in glib was written that winrt way. > gwin32pa

Re: [Mingw-w64-public] Feature Request: Add IPackage2

2022-08-29 Thread Luca Bacci
this would be a big undertaking, so I don't know if it's worth it. For now I can simply add the function pointers in gio/gwin32api-package.h, so I'm not blocked by this :) Thanks! Luca Bacci Il lun 29 ago 2022, 14:47 Biswapriyo Nath ha scritto: > Can you provide how to configure th

Re: [Mingw-w64-public] Feature Request: Add IPackage2

2022-08-29 Thread Luca Bacci
Update: I now see that the structures are declared directly in GLib/GIO headers, https://gitlab.gnome.org/GNOME/glib/-/blob/2.73.3/gio/gwin32api-package.h. I wonder if it would be possible to add the declarations to mingw-w64 headers. Thank you, Luca Bacci Il giorno lun 29 ago 2022 alle ore 12

[Mingw-w64-public] Feature Request: Add IPackage2

2022-08-29 Thread Luca Bacci
)\Windows Kits\10\Include\\winrt\windows.applicationmodel.h C:\Program Files (x86)\Windows Kits\10\Include\\winrt\windows.applicationmodel.idl Thanks in advance! Luca Bacci ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https

Re: [Mingw-w64-public] Can static libraries (object files) compiled for MSVCRT vs UCRT be mixed?

2022-06-23 Thread Luca Bacci
ould like to proceed, either decision is worthy of respect :-) Luca Il giorno gio 23 giu 2022 alle ore 16:29 LIU Hao ha scritto: > 在 2022-06-23 21:38, Luca Bacci 写道: > >> > >> #define __MSVCRT__ 1 > >> > >> Is that macro necessary in a UCRT-based toolchain? >

Re: [Mingw-w64-public] Can static libraries (object files) compiled for MSVCRT vs UCRT be mixed?

2022-06-23 Thread Luca Bacci
Sorry, the condition should be #if defined(_UCRT) && !defined(GLIB_STATIC_COMPILATION) Luca Il giorno gio 23 giu 2022 alle ore 15:34 Luca Bacci ha scritto: > Thank you very much, Biswapriyo Nath and Martin Storsjö! > > I ask because in GLib we have to work around a MSVCRT

Re: [Mingw-w64-public] Can static libraries (object files) compiled for MSVCRT vs UCRT be mixed?

2022-06-23 Thread Luca Bacci
RT-based toolchain? Thanks again for your help Luca Il giorno gio 23 giu 2022 alle ore 15:06 Martin Storsjö ha scritto: > On Wed, 22 Jun 2022, Luca Bacci wrote: > > > As per the title, say I compile a static library archive using > > mingw-w64-ucrt, can I use that archive wi

[Mingw-w64-public] Can static libraries (object files) compiled for MSVCRT vs UCRT be mixed?

2022-06-22 Thread Luca Bacci
As per the title, say I compile a static library archive using mingw-w64-ucrt, can I use that archive with mingw-w64-msvcrt? (or viceversa) If interop is not supported, is there a way to determine if gcc is compiling for MSVCRT or UCRT, e.g. using a macro? Thank you, Luca Bacci

Re: [Mingw-w64-public] direct2d functions work with C++ API, but not with C API

2022-01-16 Thread Luca Bacci
Probably many of you already know about that blog post by Raymond Chen, but I'll post a link here anyway because it's relevant to this discussion: https://devblogs.microsoft.com/oldnewthing/20220113-00/?p=106152 Il dom 16 gen 2022, 11:52 Vincent Torri ha scritto: > On Sun, Jan 16, 2022 at 10:44

Re: [Mingw-w64-public] Informations about the use of mingw-w64 GCC with the Windows SDK headers

2021-12-07 Thread Luca Bacci
In addition to that, have you ever considered using https://github.com/microsoft/win32metadata to generate mingw win32api headers? Luca Il giorno lun 29 nov 2021 alle ore 13:59 Luca Bacci ha scritto: > Hello, > > I'd like to know if anyone has ever attempted to use the Windows

[Mingw-w64-public] Informations about the use of mingw-w64 GCC with the Windows SDK headers

2021-11-29 Thread Luca Bacci
Hello, I'd like to know if anyone has ever attempted to use the Windows SDK headers with mingw-w64 GCC instead of the re-engineered win32api headers, how many incompatibilities are there and if those incompatibilities are surmountable. It would be great to have support for the Windows SDK headers

Re: [Mingw-w64-public] Question about the license of the mingw-w64 headers

2020-07-30 Thread Luca Bacci
That's great. Thank you very much! Luca Il gio 30 lug 2020, 14:07 Liu Hao ha scritto: > 在 2020/7/30 下午4:34, Luca Bacci 写道: > > Hi, I'm contributing some Windows-specific code to a cross-platform OSS > > project. This project is licensed under the LGPL. Because the

Re: [Mingw-w64-public] Question about the license of the mingw-w64 headers

2020-07-30 Thread Luca Bacci
To make it simple: what is the license of the winuser.h header from mingw-w64? Is it Public Domain or Zope Public License? Thanks! Luca Il gio 30 lug 2020, 10:34 Luca Bacci ha scritto: > Hi, I'm contributing some Windows-specific code to a cross-platform OSS > project. This project

[Mingw-w64-public] Question about the license of the mingw-w64 headers

2020-07-30 Thread Luca Bacci
Hi, I'm contributing some Windows-specific code to a cross-platform OSS project. This project is licensed under the LGPL. Because the code I'm contributing uses some newer windows API only introduced since Windows 8, and because the project must continue to compile with older compiler toolchains (M