Re: [Mingw-w64-public] [PATCH] crt: Check pseudo relocations for overflows and error out clearly
在 10/7/21 5:54 PM, Martin Storsjö 写道: + ptrdiff_t max_unsigned = (1LL << bits) - 1; + ptrdiff_t min_signed = (~(ptrdiff_t)0) << (bits - 1); The idea sounds correct. However it is undefined behavior to shift a negative number to the left, so would you like to change the second line to ``` ptrdiff_t min_signed = UINTPTR_MAX << (bits - 1); ``` As the other uses a `long long` constant, do you prefer `ULLONG_MAX` to `UINTPTR_MAX`? -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Check pseudo relocations for overflows and error out clearly
在 2021-10-08 17:36, Martin Storsjö 写道: Normally, when correctly configured, the pseudo relocations should be in fields that are large enough to hold the full target offset/address. But if the relocations nevertheless end up truncated, error out clearly instead of running into a hard to diagnose crash at runtime. Thanks for the update. This patch looks good to me, please go ahead and apply. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 1/2] crt: Add APIs in computenetwork.def
在 2021-10-08 02:09, Biswapriyo Nath 写道: From f381f33abc67c51626ff564155bfa7d9aabc8f7a Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Thu, 7 Oct 2021 23:36:16 +0530 Subject: [PATCH 1/2] crt: Add APIs in computenetwork.def Signed-off-by: Biswapriyo Nath --- mingw-w64-crt/lib-common/computenetwork.def | 6 ++ 1 file changed, 6 insertions(+) Thanks. These patches look good to me. I pushed them to master. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: Add ata.h
在 2021-10-08 04:12, Mark Harmstone 写道: Signed-off-by: Mark Harmstone --- mingw-w64-headers/ddk/include/ddk/ata.h | 1732 +++ 1 file changed, 1732 insertions(+) create mode 100644 mingw-w64-headers/ddk/include/ddk/ata.h Thanks. Both patches look good to me. I applied them to master and pushed. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 v2] dcomp.h: add some missing interfaces
在 2021-10-13 15:41, Steve Lhomme 写道: Hi, I just noticed this code was merged and then reverted. It was an accident to push it. We concluded that there were issues with this patch. One of those errors was: ``` mingw-w64-headers/include/dcomp.h:23:19: error: unknown type name 'IDCompositionSurface'; did you mean 'IDCompositionSurfaceVtbl'? 23 | #define INTERFACE IDCompositionSurface | ^~~~ ``` +DECLARE_INTERFACE_IID_(IDCompositionSaturationEffect, IDCompositionFilterEffect, "A08DEBDA-3258-4FA4-9F16-9174D3FE93B1") +{ +#if defined(_MSC_VER) && defined(__cplusplus) + STDMETHOD(SetSaturation)(THIS_ float ratio) PURE; + STDMETHOD(SetSaturation)(THIS_ IDCompositionAnimation* animation) PURE; +#else + STDMETHOD(SetSaturation)(THIS_ IDCompositionAnimation* animation) PURE; + STDMETHOD(SetSaturation)(THIS_ float ratio ) PURE; +#endif +}; I have had some discussion with Jacek on IRC. The second block here, which declares two overloaded methods, doesn't seem to compile as C. What is the compilation error ? This is exactly the same that already exist in this file for IDCompositionTranslateTransform, IDCompositionScaleTransform, IDCompositionRotateTransform, IDCompositionSkewTransform, etc. Other than the error above, if we compile this header as C, this struct would have two distinct fields with the name `SetSaturation`, which would be invalid. (To work around this issue, some wine headers rename one of them by suffixing an underscore.) -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 to add MFTranscodeContainerType guids
在 2021-10-14 14:48, Michel Zou 写道: ok thanks, here is an updated version Thanks for the patch. It looks good to me. I have pushed it to master. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: Add some names in mstcpip.h
在 2021-10-11 14:13, Biswapriyo Nath 写道: From fcf842b9164c76c8a19f321d4c124ba36cafb95e Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Mon, 11 Oct 2021 11:41:39 +0530 Subject: [PATCH] headers: Add some names in mstcpip.h Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/include/mstcpip.h | 241 +++- 1 file changed, 237 insertions(+), 4 deletions(-) Thanks for the patch. I pushed it to master. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Split out the strtold/wcstold frontend aliases to separate object files
在 2021-10-14 18:22, Martin Storsjö 写道: This avoids linker conflicts if object files refer to both 'strtold' or 'wcstold' and include them from libucrt*.a before other object files pull in the __mingw_* counterparts. Signed-off-by: Martin Storsjö --- mingw-w64-crt/Makefile.am | 1 + mingw-w64-crt/gdtoa/strtodnrp.c | 4 -- mingw-w64-crt/gdtoa/strtopx.c | 10 +++ .../misc/{wcstold.c => mingw_wcstold.c} | 6 +- mingw-w64-crt/misc/wcstold.c | 68 +-- 5 files changed, 13 insertions(+), 76 deletions(-) copy mingw-w64-crt/misc/{wcstold.c => mingw_wcstold.c} (89%) This patch looks good to me. Thanks. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 3/3] winuser.h: Add PW_RENDERFULLCONTENT define.
在 2021-10-15 04:55, Jacek Caban 写道: Signed-off-by: Jacek Caban --- mingw-w64-headers/include/winuser.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) These three patches look good to me, too. Thanks. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: Add ioringapi.h
在 2021-10-15 20:06, Biswapriyo Nath 写道: > +#ifdef __cplusplus > +extern "C" { > +#endif > + > +STDAPI QueryIoRingCapabilities(IORING_CAPABILITIES* capabilities); > +STDAPI_(BOOL) IsIoRingOpSupported(HIORING ioRing, IORING_OP_CODE op); Should `WINBOOL` be preferred to `BOOL` here? -- Best regards, LIU Hao OpenPGP_signature Description: PGP signature ___ 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] headers: Add ioringapi.h
在 2021-10-16 12:36, Biswapriyo Nath 写道: Liu Hao: Opps! Forgot that. Updated patch file attached. unlvsur: This is just to check if your projects compile without linking. Thanks for the patch. I pushed it to master. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Add APIs in ntdll.def
在 2021-10-17 13:13, Biswapriyo Nath 写道: From 748a7ff9e9f60a8137e55529e06ee55271a7ba6e Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Sun, 17 Oct 2021 10:40:12 +0530 Subject: [PATCH] crt: Add APIs in ntdll.def Signed-off-by: Biswapriyo Nath --- mingw-w64-crt/lib-common/ntdll.def.in | 60 +++ mingw-w64-crt/lib32/ntdll.def | 55 2 files changed, 115 insertions(+) Thanks for the patch. I pushed it to master. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] adsiid: add missing GUIDs
在 2021-10-20 14:40, Jeremy Drake via Mingw-w64-public 写道: Obtained from program that printed them out, linked to Windows SDK, and then merging the output with the existing file. A few of the GUIDs in ADSIid.h were undefined in ADSIid.Lib: Thanks for the patch. Applied to master and pushed. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: Add missing WINAPI attribute in mfidl.idl
在 2021-10-19 20:57, Biswapriyo Nath 写道: From ea40c3fc9c90c498e6ee31597b53d975df2e095c Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Tue, 19 Oct 2021 18:24:39 +0530 Subject: [PATCH] headers: Add missing WINAPI attribute in mfidl.idl This fixes qt6-multimedia build in i686 mingw Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/include/mfidl.idl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Thanks for the patch. Pushed to master now. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: Import wmsecure.idl from wine
在 2021-10-21 23:38, Biswapriyo Nath 写道: From a82ed5bd10ced3aba842cf6ab6dd9baf5f70751b Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Thu, 21 Oct 2021 21:04:54 +0530 Subject: [PATCH] headers: Import wmsecure.idl from wine Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/wine-import.sh| 1 + 1 files changed, 1 insertions(+) Thanks. This patch looks good to me, too. I pushed it to master. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: Add some interfaces in mfidl.idl
在 2021-10-21 23:38, Biswapriyo Nath 写道: 0001-headers-Add-some-interfaces-in-mfidl.idl.patch From 5109f7273105838fadf3af121bfb964dc0f8e1af Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Thu, 21 Oct 2021 21:03:55 +0530 Subject: [PATCH] headers: Add some interfaces in mfidl.idl Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/include/mfidl.idl | 36 + 1 file changed, 36 insertions(+) Thanks for the patch. Pushed to master. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: Enable __USE_MINGW_ACCESS implicitly when targeting UCRT
在 2021-10-25 15:21, Martin Storsjö 写道: So if we want to override/redirect access() on UCRT, we need to replace the access() function altogether in the import library. How about defining `X_OK` as zero, so it should have no effect at all? -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] About -mthreads
在 2021-10-23 22:50, Óscar Fuentes 写道: But, AFAIK, -mthreads is unnecesary nowadays and mingwthrd is just a stub. Is this correct? The comment in 'mingwthrd_mt.c' says so, but `-mthreads` also defines `-D_MT` which isn't otherwise defined. Some projects have it in their CMakeFiles.txt, however . I'm planning to submit a patch to gcc for obsoleting the switch. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: Import wmsecure.idl from wine
在 2021-10-28 00:02, Biswapriyo Nath 写道: Missed the new patch to add it in makefile.am. Thus wmsecure.h is not generated. Ah yes, my mistake. I pushed it to master alone with the other one. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 3/3] winuser.h: Add PW_RENDERFULLCONTENT define.
在 2021-10-30 23:18, Tom Ritter 写道: Hi, I wanted to follow up on this patch series and ask if they could be landed? Thanks. Perhaps Jacek has been busy with other stuff. I have pushed these three patches to master for now. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] Reliability of our C++ atomics implementation
在 2021-10-30 03:34, Óscar Fuentes 写道: I was about to start using in my projects but then bumped into https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101037 I can reproduce the problem with gcc 11.2 from MSYS2 and, needless to say, pictures as "completely broken". Is the Mingw-w64 community aware of issues like this? Is there any ongoing work on this area I can contribute to? IIRC time ago there was some initiative for moving away from the pthreads emulation layer. Those atomic operations that map directly to hardware instructions (such as `std::atomic`) should be quite reliable, because they are simple enough. The winpthreads mutex, despite the inefficiency, should also be quite reliable. But there are some issues with the winpthread condition variable (including occasional deadlocks), which have never been addressed. Note you mentioned `std::atomic_flag` in the report above. I haven't looked at libsstdc++ source but I suppose it uses global mutexes and condition variables from libatomic. Therefore the `wait` function may suffer from the condition variable bug. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] Reliability of our C++ atomics implementation
在 2021-11-05 01:42, Óscar Fuentes 写道: The reproducer in the gcc bugzilla ticket does not use condition variables. It never enters pthread_cond_signal. So we have a bug elsewhere. It indeed does, indirectly. See #3: ``` (gdb) bt #0 0x7ffc7f0b07a4 in ntdll!ZwWaitForKeyedEvent () from C:\Windows\SYSTEM32\ntdll.dll #1 0x7ffc6e1436cf in ?? () from C:\MSYS2\mingw64\bin\mcfgthread-12.dll #2 0x7ffc6e143eb3 in ?? () from C:\MSYS2\mingw64\bin\mcfgthread-12.dll #3 0x7ff772a039db in std::__condvar::wait (this=0x7ff772a04108 , __m=...) at C:/MSYS2/mingw64/include/c++/11.2.1/bits/std_mutex.h:155 #4 0x7ff772a03585 in std::__detail::__waiter_pool::_M_do_wait (this=0x7ff772a040c0 , __addr=0x7ff772a04100 , __old=6180) at C:/MSYS2/mingw64/include/c++/11.2.1/bits/atomic_wait.h:268 #5 0x7ff772a038a8 in std::__detail::__waiter >::_M_do_wait_v(bool, std::atomic_flag::wait(bool, std::memory_order) const::{lambda()#1}) (this=0xfe8adff940, __old=true, __vfn=...) at C:/MSYS2/mingw64/include/c++/11.2.1/bits/atomic_wait.h:400 #6 0x7ff772a03b81 in std::__atomic_wait_address_vstd::memory_order) const::{lambda()#1}>(bool const*, bool, std::atomic_flag::wait(bool, std::memory_order) const::{lambda()#1}) (__addr=0x7ff772a08040 , __old=true, __vfn=...) at C:/MSYS2/mingw64/include/c++/11.2.1/bits/atomic_wait.h:430 #7 0x7ff772a015da in std::atomic_flag::wait (__m=std::memory_order::seq_cst, __old=true, this=) at C:/MSYS2/mingw64/include/c++/11.2.1/bits/atomic_base.h:241 #8 ping () at test.cc:11 #9 0x7ff772a03aba in std::__invoke_impl (__f=@0x283b8431908: 0x7ff772a01563 ) at C:/MSYS2/mingw64/include/c++/11.2.1/bits/invoke.h:61 #10 0x7ff772a03c72 in std::__invoke (__fn=@0x283b8431908: 0x7ff772a01563 ) at C:/MSYS2/mingw64/include/c++/11.2.1/bits/invoke.h:96 #11 0x7ff772a03188 in std::thread::_Invoker >::_M_invoke<0ull> (this=0x283b8431908) at C:/MSYS2/mingw64/include/c++/11.2.1/bits/std_thread.h:253 #12 0x7ff772a031a7 in std::thread::_Invoker >::operator() (this=0x283b8431908) at C:/MSYS2/mingw64/include/c++/11.2.1/bits/std_thread.h:260 #13 0x7ff772a0304c in std::thread::_State_impl > >::_M_run (this=0x283b8431900) at C:/MSYS2/mingw64/include/c++/11.2.1/bits/std_thread.h:211 #14 0x7ffc322e1ec1 in ?? () from C:\MSYS2\mingw64\bin\libstdc++-6.dll #15 0x7ffc6e14392e in ?? () from C:\MSYS2\mingw64\bin\mcfgthread-12.dll #16 0x7ffc6e141473 in ?? () from C:\MSYS2\mingw64\bin\mcfgthread-12.dll #17 0x7ffc6e145eac in ?? () from C:\MSYS2\mingw64\bin\mcfgthread-12.dll #18 0x7ffc6e1416bd in ?? () from C:\MSYS2\mingw64\bin\mcfgthread-12.dll #19 0x7ffc7d3e7034 in KERNEL32!BaseThreadInitThunk () from C:\Windows\System32\kernel32.dll #20 0x7ffc7f062651 in ntdll!RtlUserThreadStart () from C:\Windows\SYSTEM32\ntdll.dll #21 0x in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) ``` I can reproduce this deadlock sometimes. Not sure how it could happen, though. The patch that you referenced was probably obsoleted by 330025c54b85512d54b6960fad07498365c8fee3, which takes a different approach. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 1/2] headers: Import bits IDL files from wine
在 2021-11-07 01:28, Biswapriyo Nath 写道: From c2d8a597e4b878a0051d977cb25955b3138a3d96 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Sat, 6 Nov 2021 22:51:26 +0530 Subject: [PATCH 1/2] headers: Import bits IDL files from wine Required for python-pywin32 project Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/Makefile.am| 6 ++ mingw-w64-headers/wine-import.sh | 6 ++ 2 files changed, 12 insertions(+) Thanks for the patches. I pushed them to master. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: Import fontsub.h from wine
在 11/23/21 12:33 AM, Biswapriyo Nath 写道: From 6cd3064694345b877bd63312bc8d2a042a2c14ae Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Mon, 22 Nov 2021 21:59:44 +0530 Subject: [PATCH] headers: Import fontsub.h from wine Required for google/skia project Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/wine-import.sh | 1 + 1 file changed, 1 insertion(+) Thanks. This patch looks good to me. Pushed to master now. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] gdiplusgraphics: resolve ambiguity of Graphics class constructor
在 11/26/21 11:18 PM, julian uy 写道: ...but I'm not too sure if this is correct if HANDLE being NULL is not valid. If this is a correct solution, I have attached the patch in git format-patch format. Those constructors match Windows SDK so I would like to leave them intact. The ambiguity issue seems to be caused by `HDC` and `HWND` being the same type. Could you try compiling this little snippet with your configuration, and let us know about the error? If they are distinct types then there shouldn't be ambiguity. ``` HWND hwnd = 0; HDC hdc = 0; hwnd = hdc; hdc = hwnd; ``` -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Add fontsub in lib32
在 2021-11-28 00:01, Biswapriyo Nath 写道: From 72ae639313c4b6f8da6e132b1c742d4ff76a Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Sat, 27 Nov 2021 21:29:38 +0530 Subject: [PATCH] crt: Add fontsub in lib32 Required for google/skia project Signed-off-by: Biswapriyo Nath --- mingw-w64-crt/lib32/Makefile.am | 1 + mingw-w64-crt/lib32/fontsub.def | 4 2 files changed, 5 insertions(+) create mode 100644 mingw-w64-crt/lib32/fontsub.def Thanks for the patch. Pushed to master now. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: Add missing names in windns.h
在 2021-12-02 03:47, Biswapriyo Nath 写道: + typedef struct _DNS_CONNECTION_PROXY_INFO { +DWORD Version; +WCHAR *pwszFriendlyName; +DWORD Flags; +DNS_CONNECTION_PROXY_INFO_SWITCH Switch; +__C89_NAMELESS union { + struct _DNS_CONNECTION_PROXY_INFO_CONFIG { +WCHAR *pwszServer; +WCHAR *pwszUsername; +WCHAR *pwszPassword; +WCHAR *pwszException; +WCHAR *pwszExtraInfo; +WORD Port; + } Config; + struct _DNS_CONNECTION_PROXY_INFO_SCRIPT { +WCHAR *pwszScript; +WCHAR *pwszUsername; +WCHAR *pwszPassword; + } Script; +}; + } DNS_CONNECTION_PROXY_INFO, *PDNS_CONNECTION_PROXY_INFO; This piece of code cannot be compiled as C++: ``` mingw-w64-headers/include/windns.h:1151:14: error: ‘struct _DNS_CONNECTION_PROXY_INFO::union>::_DNS_CONNECTION_PROXY_INFO_CONFIG’ invalid; an anonymous union may only have public non-static data members [-fpermissive] 1151 | struct _DNS_CONNECTION_PROXY_INFO_CONFIG { | ^ mingw-w64-headers/include/windns.h:1159:14: error: ‘struct _DNS_CONNECTION_PROXY_INFO::union>::_DNS_CONNECTION_PROXY_INFO_SCRIPT’ invalid; an anonymous union may only have public non-static data members [-fpermissive] 1159 | struct _DNS_CONNECTION_PROXY_INFO_SCRIPT { | ^ ``` In C, nested structs behave as if they were declared outside. Therefore this should be equivalent to ``` struct _DNS_CONNECTION_PROXY_INFO_CONFIG { WCHAR *pwszServer; WCHAR *pwszUsername; WCHAR *pwszPassword; WCHAR *pwszException; WCHAR *pwszExtraInfo; WORD Port; }; struct _DNS_CONNECTION_PROXY_INFO_SCRIPT { WCHAR *pwszScript; WCHAR *pwszUsername; WCHAR *pwszPassword; }; typedef struct _DNS_CONNECTION_PROXY_INFO { DWORD Version; WCHAR *pwszFriendlyName; DWORD Flags; DNS_CONNECTION_PROXY_INFO_SWITCH Switch; __C89_NAMELESS union { struct _DNS_CONNECTION_PROXY_INFO_CONFIG Config; struct _DNS_CONNECTION_PROXY_INFO_SCRIPT Script; }; } DNS_CONNECTION_PROXY_INFO, *PDNS_CONNECTION_PROXY_INFO; ``` Does this idea look good to you? -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 2/2] Add other defines to ks.h
在 2021-11-12 11:58, Tom Ritter 写道: Sorry about that! If you think it necessary to adjust spacing or casing, please remove such changes and send them as a separate patch. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: Add missing names in windns.h
在 12/3/21 2:23 AM, Biswapriyo Nath 写道: Thanks for the explanation. Yeah, that looks fine to me. Here is the patch with that fix. Thanks for the update. I pushed this one to master. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 to add htonll/ntohll
在 2021-12-17 02:13, Michel Zou 写道:> Hi, > It turns out that these are inline functions, here is a new patch. > xan > Thanks. Pushed to master. Next time, please send a patch created by `git format`, and please do sign off the commit with `git commit -s`. -- Best regards, LIU Hao ___ 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 2/2] Add missing KSCategories to ks.h
在 2021-12-17 22:41, Tom Ritter 写道: From 10ca079810ea8d50340e98fc7b6579f73595d668 Mon Sep 17 00:00:00 2001 From: Tom Ritter Date: Fri, 17 Dec 2021 09:39:03 -0500 Subject: [PATCH 2/2] Add missing KScategories --- mingw-w64-headers/include/ks.h | 125 + 1 file changed, 125 insertions(+) This patch looks good to me. Pushed to master now. Thanks. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 2/2] crt: Add timespec_get import lib aliases
在 2021-12-18 03:10, Martin Storsjö 写道: Normally, timespec_get is aliased to either _timespec32_get or _timespec64_get via an inline function in time.h. But by providing a fallback alias in the import library, configure scripts that try linking the function without actually including time.h will also succeed - we also have other similar aliases added in 42aa3325fcfee934d7b706b701e49ee7a3c94982. Signed-off-by: Martin Storsjö --- mingw-w64-crt/lib-common/api-ms-win-crt-time-l1-1-0.def | 1 + mingw-w64-crt/lib-common/ucrtbase.def.in| 1 + 2 files changed, 2 insertions(+) Thanks for the rigorous work! This series of patches look good to me. Please go ahead and apply. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Provide opengl32 and glu32 import libraries for arm32 and arm64
在 2021-12-19 06:34, Martin Storsjö 写道: These DLLs are available out of the box on arm32 and arm64 since Windows 11. However these DLLs themselves are only the main interface (containing the fallback, essentially unusable, OpenGL 1.1 GDI implementation); without a separate ICD (installable client driver), it's near useless. Currently (Dec 2021), such a driver (implementing OpenGL on top of D3D12) is installable in the "OpenCL and OpenGL Compatibility Pack" in Microsoft Store (but it's only available for regular third party applications if you install the Windows Insider version of it). And even then, it's not necessarily available for all architectures. (In a brief test, it seems like the driver is available for i686 and aarch64 processes, but not for x86_64 or armv7). By providing these, we risk that people porting software to Windows 10 on ARM accidentally end up relying on them (earlier, they got clear link errors showing that these really aren't available), ending up with executables that only run on Windows 11. For some projects with existing support for Windows 10 on ARM, this is handled by entirely disabling building of intermediate wrapper libraries such as glew or libepoxy; then the main application only detects the presence of glew or libepoxy, and disables OpenGL functionality if not found. (This has been tested with VLC, where the glew dependency already is hardcoded to not be built for these targets, so this doesn't change anything for the build output of VLC.) Signed-off-by: Martin Storsjö --- mingw-w64-crt/{lib64 => lib-common}/glu32.def| 0 mingw-w64-crt/{lib64 => lib-common}/opengl32.def | 0 mingw-w64-crt/libarm32/Makefile.am | 2 ++ mingw-w64-crt/libarm64/Makefile.am | 2 ++ 4 files changed, 4 insertions(+) rename mingw-w64-crt/{lib64 => lib-common}/glu32.def (100%) rename mingw-w64-crt/{lib64 => lib-common}/opengl32.def (100%) LGTM, too. Thanks. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Add fallback _vscprintf_emu code for __ms_vsnprintf()
在 2021-12-23 22:20, Pali Rohár 写道: Original MSVC 6.0 msvcrt.dll library does not provide _vscprintf() function. Therefore usage of snprintf() with this DLL library cause application crash. Add simple fallback implementation of _vscprintf() just for __ms_vsnprintf() to allow usage of snprintf() function also when using original msvcrt.dll library. This fallback implementation is static and not exported outside of vsnprintf.c source file. --- mingw-w64-crt/stdio/vsnprintf.c | 67 + 1 file changed, 67 insertions(+) I have an impression that we have not been supporting for VC6 since many years ago. All code targeting MSVCRT now requires Windows XP and the MSVCRT.DLL from it. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: De-duplicate _vscprintf/_vsnprintf code
在 12/23/21 10:03 PM, Pali Rohár 写道: Functions __ms_snprintf() and __ms_vsnprintf() contains same logic and code around _vscprintf() and _vsnprintf() wrappers. Remove duplicated code from __ms_snprintf() and redirects __ms_snprintf() to __ms_vsnprintf(). --- mingw-w64-crt/stdio/snprintf.c | 22 +- 1 file changed, 1 insertion(+), 21 deletions(-) Thanks for cleaning it up. Pushed to master now. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 2/2] Add other defines to ks.h
在 2022-01-01 03:38, Biswapriyo Nath 写道: This seems to cause a build failure in mpv as reported here https://sourceforge.net/p/mingw-w64/discussion/723797/thread/c7085ad79b/ Will removing duplicates from 'ks.h' be a solution? I can see such definitions in 'ksmedia.h', but they are not available in 'ks.h'. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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: add timeapi.h
在 1/1/22 5:21 PM, Michel Zou 写道: > diff --git a/mingw-w64-headers/include/timeapi.h > b/mingw-w64-headers/include/timeapi.h > new file mode 100644 > index 0..5ac5a9d77 > --- /dev/null > +++ b/mingw-w64-headers/include/timeapi.h > @@ -0,0 +1,11 @@ > +/** > + * This file has no copyright assigned and is placed in the Public Domain. > + * This file is part of the mingw-w64 runtime package. > + * No warranty is given; refer to the file DISCLAIMER.PD within this package. > + */ > +#ifndef _INC_TIMEAPI > +#define _INC_TIMEAPI > + > +// timeBeginPeriod and al are defined in mmsystem.h > +#include > + There was no `#endif` in this patch. Also C99 comments are not allowed in headers; please use C89 comments instead. -- Best regards, LIU Hao OpenPGP_signature Description: PGP signature ___ 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: add timeapi.h
在 2022-01-02 21:34, Michel Zou 写道: Ok, here is an amended version of the patch. Thanks. Pushed. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] add ERROR_COMMITMENT_MINIMUM
在 2022-01-01 18:30, Michel Zou 写道: hi again, here is a patch to add a missing error enum value Thanks. I pushed this one, too. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] Macro redefinitions in ks.h and ksmedia.h
I wrote a script which collected the output of `gcc -E -Wp,-dM` (which is, all macros) and diffed the outputs of our headers with MS headers. This issue was more complicated than I thought, as some of them seemed to have been removed since Vista. Attached are patches that make GCC output the _exact_ list of macros from our headers, comparing to those from MS headers, tested with `-D_WIN32_WINNT=0x` and `-D_WIN32_WINNT=0x0502`. Please test them against your projects which make use of such headers, and please report further issues accordingly. -- Best regards, LIU Hao From 78c980ef5fc8582d429b0d484c38d36567e9cf8a Mon Sep 17 00:00:00 2001 From: LIU Hao Date: Sun, 2 Jan 2022 23:32:00 +0800 Subject: [PATCH 1/2] headers/ksmedia: Hide macros that are no longer available Signed-off-by: LIU Hao --- mingw-w64-headers/include/ksmedia.h | 29 + 1 file changed, 29 insertions(+) diff --git a/mingw-w64-headers/include/ksmedia.h b/mingw-w64-headers/include/ksmedia.h index eb50d61d..2ed9f78e 100644 --- a/mingw-w64-headers/include/ksmedia.h +++ b/mingw-w64-headers/include/ksmedia.h @@ -386,6 +386,7 @@ DEFINE_GUIDSTRUCT("DFF220F2-F70F-11D0-B917-00A0C9223196",KSNODETYPE_MULTITRACK_R DEFINE_GUIDSTRUCT("DFF220F3-F70F-11D0-B917-00A0C9223196",KSNODETYPE_SYNTHESIZER); #define KSNODETYPE_SYNTHESIZER DEFINE_GUIDNAMED(KSNODETYPE_SYNTHESIZER) +#if NTDDI_VERSION < NTDDI_VISTA #define STATIC_KSNODETYPE_SWSYNTH \ 0x423274A0,0x8B81,0x11D1,0xA0,0x50,0x00,0x00,0xF8,0x00,0x47,0x88 DEFINE_GUIDSTRUCT("423274A0-8B81-11D1-A050-F8004788",KSNODETYPE_SWSYNTH); @@ -395,6 +396,7 @@ DEFINE_GUIDSTRUCT("423274A0-8B81-11D1-A050-F8004788",KSNODETYPE_SWSYNTH); 0xCB9BEFA0,0xA251,0x11D1,0xA0,0x50,0x00,0x00,0xF8,0x00,0x47,0x88 DEFINE_GUIDSTRUCT("CB9BEFA0-A251-11D1-A050-F8004788",KSNODETYPE_SWMIDI); #define KSNODETYPE_SWMIDI DEFINE_GUIDNAMED(KSNODETYPE_SWMIDI) +#endif /* NTDDI_VERSION < NTDDI_VISTA */ #define STATIC_KSNODETYPE_DRM_DESCRAMBLE \ 0xFFBB6E3F,0xCCFE,0x4D84,0x90,0xD9,0x42,0x14,0x18,0xB0,0x3A,0x8E @@ -416,6 +418,13 @@ DEFINE_GUIDSTRUCT("6994AD05-93EF-11D0-A3CC-00A0C9223196",KSCATEGORY_VIDEO); DEFINE_GUIDSTRUCT("6994AD06-93EF-11D0-A3CC-00A0C9223196",KSCATEGORY_TEXT); #define KSCATEGORY_TEXT DEFINE_GUIDNAMED(KSCATEGORY_TEXT) +#if NTDDI_VERSION >= NTDDI_VISTA +#define STATIC_KSCATEGORY_REALTIME \ + 0xEB115FFCL,0x10C8,0x4964,0x83,0x1D,0x6D,0xCB,0x02,0xE6,0xF2,0x3F +DEFINE_GUIDSTRUCT("EB115FFC-10C8-4964-831D-6DCB02E6F23F",KSCATEGORY_REALTIME); +#define KSCATEGORY_REALTIME DEFINE_GUIDNAMED(KSCATEGORY_REALTIME) +#endif /* NTDDI_VERSION >= NTDDI_VISTA */ + #define STATIC_KSCATEGORY_NETWORK \ 0x67C9CC3C,0x69C4,0x11D2,0x87,0x59,0x00,0xA0,0xC9,0x22,0x31,0x96 DEFINE_GUIDSTRUCT("67C9CC3C-69C4-11D2-8759-00A0C9223196",KSCATEGORY_NETWORK); @@ -436,6 +445,7 @@ DEFINE_GUIDSTRUCT("3503EAC4-1F26-11D1-8AB0-00A0C9223196",KSCATEGORY_VIRTUAL); DEFINE_GUIDSTRUCT("BF963D80-C559-11D0-8A2B-00A0C9255AC1",KSCATEGORY_ACOUSTIC_ECHO_CANCEL); #define KSCATEGORY_ACOUSTIC_ECHO_CANCEL DEFINE_GUIDNAMED(KSCATEGORY_ACOUSTIC_ECHO_CANCEL) +#if NTDDI_VERSION < NTDDI_VISTA #define STATIC_KSCATEGORY_SYSAUDIO \ 0xA7C7A5B1,0x5AF3,0x11D1,0x9C,0xED,0x00,0xA0,0x24,0xBF,0x04,0x07 DEFINE_GUIDSTRUCT("A7C7A5B1-5AF3-11D1-9CED-00A024BF0407",KSCATEGORY_SYSAUDIO); @@ -455,6 +465,7 @@ DEFINE_GUIDSTRUCT("9BAF9572-340C-11D3-ABDC-00A0C90AB16F",KSCATEGORY_AUDIO_GFX); 0x9EA331FA,0xB91B,0x45F8,0x92,0x85,0xBD,0x2B,0xC7,0x7A,0xFC,0xDE DEFINE_GUIDSTRUCT("9EA331FA-B91B-45F8-9285-BD2BC77AFCDE",KSCATEGORY_AUDIO_SPLITTER); #define KSCATEGORY_AUDIO_SPLITTER DEFINE_GUIDNAMED(KSCATEGORY_AUDIO_SPLITTER) +#endif /* NTDDI_VERSION < NTDDI_VISTA */ #define STATIC_KSCATEGORY_SYNTHESIZER STATIC_KSNODETYPE_SYNTHESIZER #define KSCATEGORY_SYNTHESIZER KSNODETYPE_SYNTHESIZER @@ -462,6 +473,7 @@ DEFINE_GUIDSTRUCT("9EA331FA-B91B-45F8-9285-BD2BC77AFCDE",KSCATEGORY_AUDIO_SPLITT #define STATIC_KSCATEGORY_DRM_DESCRAMBLE STATIC_KSNODETYPE_DRM_DESCRAMBLE #define KSCATEGORY_DRM_DESCRAMBLE KSNODETYPE_DRM_DESCRAMBLE +#if NTDDI_VERSION < NTDDI_VISTA #define STATIC_KSCATEGORY_AUDIO_DEVICE \ 0xFBF6F530,0x07B9,0x11D2,0xA7,0x1E,0x00,0x00,0xF8,0x00,0x47,0x88 DEFINE_GUIDSTRUCT("FBF6F530-07B9-11D2-A71E-F8004788",KSCATEGORY_AUDIO_DEVICE); @@ -481,6 +493,7 @@ DEFINE_GUIDSTRUCT("D6C50671-72C1-11D2-9755-F8004788",KSCATEGORY_PREFERRED_WA 0xD6C50674,0x72C1,0x11D2,0x97,0x55,0x00,0x00,0xF8,0x00,0x47,0x88 DEFINE_GUIDSTRUCT("D6C50674-72C1-11D2-9755-F8004
Re: [Mingw-w64-public] Macro redefinitions in ks.h and ksmedia.h
在 2022-01-03 00:46, Biswapriyo Nath 写道: Thank you for working on this. I have tested that mpv now builds with this fix. I have used ucrt64 in msys64 environment with gcc and rebuilt both headers and crt packages with these two patches. Thanks for the feedback. Pushed to master now. Apologies for the trouble. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] Informations about the use of mingw-w64 GCC with the Windows SDK headers
在 12/7/21 10:07 PM, Luca Bacci 写道: In addition to that, have you ever considered using https://github.com/microsoft/win32metadata to generate mingw win32api headers? Luca I haven't had a look at it so far. Some random search results on web suggest that its main objective is to ease integration of new APIs into C# or Rust; note this doesn't include C. But I do consider it a great improvement, if someone can figure out how to generate mingw-w64-compatible headers with it. 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 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! It would hardly be possible to use MS headers verbatim: 1) The `long` type is defined as 4 bytes in MS headers (note this also applies to literals such as `42L`), but in mingw-w64 headers it's variable. We have `__MSABI_LONG` which, when building native applications expands to a `long`, but for Cygwin or MSYS2 where `long` is 8 bytes expands to an `int`. 2) GCC does not allow nameless `struct` or `union` members to contain another `struct`. They have to be moved outside. 3) MSVC `__inline` in C behaves like `inline` in C++, while there is no exact equivalent in GCC. Failure to inline such functions (such as compiling with `-O0`) would cause undefined references. The closest and safest thing (to allow such code to build) is `static __inline` I think. 4) `BOOL` is an alias for `bool` in Objective-C so we have to take `WINBOOL` for `BOOL` in MS headers. This list is not exhaustive. It is no simple matter. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] Add IVirtualDesktopManager interface
在 1/7/22 11:45 AM, Biswapriyo Nath 写道: The interface declaration should be added in IDL file. Header files are generated from IDL files using widl tool. Yes. Please remove hunks for generate files. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] Add IVirtualDesktopManager interface
在 1/7/22 11:54 PM, Tom Ritter 写道: I've attached a patch of just the idl file. I had generated the .h file from the idl file using the widl in-tree; but if the generated file is not updated in this patch; when is it updated? The person who commits the patch will does that for you. This may be done either by hand or as part of an automated procedure. Generated stuff goes into a separated commit which can't be cherry-pick'd whatsoever. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Add fallback _vscprintf_emu code for __ms_vsnprintf()
在 2022-01-01 05:54, Pali Rohár 写道: Well, if you want from me any improvements in this patch, I can do it. Just let me know what is needed to fix/change. However, cleaning the code from such workarounds seems tempting. I wonder if there is a real use case for this or is it just an experiment for fun? There is a real use case to allow writing new DLL plugins with modern mingw-w64 tools for older applications which were compiled with VC6 (and which use VC6 msvcrt.dll). Jacek, do we accept this patch, or suggest a `_vscprintf` in 'libmsvcrt.a' which overrides the one from MSVCRT (and provides it if MSVCRT doesn't, so it's always available)? The latter seems better. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] Add IVirtualDesktopManager interface
在 2022-01-11 03:29, Tom Ritter 写道: I've changed BOOL -> WINBOOL (although this is the only use of WINBOOL in the file) -tom Thanks for the patch. I pushed it to master now. Use of `WINBOOL` instead of `BOOL` (which is a typedef for `bool` in objc) is mandatory for new stuff. There may be some left-behind `BOOL`s but no one has complained about them so far. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] wtypes.h: replace #include <...> with #include "..." for rpc
在 1/13/22 10:07 PM, Jonathan Marler 写道: Been 3 months since my last email, what's going on with this? On Tue, Oct 19, 2021 at 11:03 PM Jonathan Marler wrote: Jacek were you able to forward this discussion to Wine? If so do you have a link to that discussion? Thanks. This patch applies to a file that is directly copied from wine; any changes will be overwritten. Thus it will not be accepted. I'm adding wine as CC now. The original thread is located at https://sourceforge.net/p/mingw-w64/mailman/message/37341200/. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] wtypes.h: replace #include <...> with #include "..." for rpc
在 1/18/22 12:11 AM, Jacek Caban 写道: Not really, the file is generated from wtypes.idl, which is not shared with Wine. It, however, requires widl change, and widl is shared with Wine. Ah thanks for pointing this out. I only had a look at the commit history of 'wtypes.h' without looking at the IDL file. It looks like the WIDL version info got committed in a2eb3ea3aaa7c780c4b4ab30d71169f442788864. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: Use oleacc.dll.tlb for oleacc typelib.
在 1/17/22 11:40 PM, Jacek Caban 写道: Signed-off-by: Jacek Caban --- It's needed due to importlib handling changes in recent widl. mingw-w64-headers/Makefile.am | 2 +- mingw-w64-headers/tlb/{oleacc.idl => oleacc.dll.idl} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename mingw-w64-headers/tlb/{oleacc.idl => oleacc.dll.idl} (100%) LGTM. Thanks. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 1/2] crt: Add fallback _vscprintf() implementation
Bootstrapping GCC now fails with this error: ``` gcc -c -DHAVE_CONFIG_H -g -D__USE_MINGW_ANSI_STDIO=1 -I. -I../../gcc/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -Wshadow=local -pedantic -D_GNU_SOURCE ../../gcc/libiberty/vfork.c -o vfork.o ../../gcc/libiberty/vsnprintf.c:60:1: error: redefinition of 'vsnprintf' 60 | vsnprintf (char *s, size_t n, const char *format, va_list ap) | ^ In file included from ../../gcc/libiberty/../include/libiberty.h:49, from ../../gcc/libiberty/vsnprintf.c:56: C:/MSYS2/mingw32/i686-w64-mingw32/include/stdio.h:464:5: note: previous definition of 'vsnprintf' with type 'int(char *, size_t, const char *, char *)' {aka 'int(char *, unsigned int, const char *, char *)'} 464 | int vsnprintf (char *__stream, size_t __n, const char *__format, __builtin_va_list __local_argv) | ^ make[3]: *** [Makefile:1641: vsnprintf.o] Error 1 make[3]: *** Waiting for unfinished jobs make[3]: Leaving directory '/d/lh_mouse/GitHub/MINGW-packages-dev/mingw-w64-gcc-git/src/build-i686-w64-mingw32/libiberty-linker-plugin' ``` Apparently the 'configure' script of libiberty thought `vsnprintf()` was not available and decided they should provide it which conflicted with our definition in 'stdio.h'. 'config.log' says: ``` configure:6675: checking for vsnprintf configure:6675: gcc -o conftest.exe -g -D__USE_MINGW_ANSI_STDIO=1 -static-libstdc++ -static-libgcc -pipe -Wl,--dynamicbase,--nxcompat,--no-seh -Wl,--large-address-aware -Wl,--disable-dynamicbase -Wl,--stack,12582912 conftest.c >&5 conftest.c:107:6: warning: conflicting types for built-in function 'vsnprintf'; expected 'int(char *, unsigned int, const char *, char *)' [-Wbuiltin-declaration-mismatch] 107 | char vsnprintf (); | ^ conftest.c:95:1: note: 'vsnprintf' is declared in header '' 94 | # include 95 | #else C:/MSYS2/mingw32/lib/gcc/i686-w64-mingw32/11.2.1/../../../../i686-w64-mingw32/bin/ld.exe: C:/MSYS2/mingw32/lib/gcc/i686-w64-mingw32/11.2.1/../../../../i686-w64-mingw32/lib/../lib/libmsvcrt.a(lib32_libmsvcrt_ extra_a-_vscprintf.o): in function `emu_vscprintf': D:/lh_mouse/GitHub/MINGW-packages/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/stdio/_vscprintf.c:49: undefined reference to `_set_errno' C:/MSYS2/mingw32/lib/gcc/i686-w64-mingw32/11.2.1/../../../../i686-w64-mingw32/bin/ld.exe: D:/lh_mouse/GitHub/MINGW-packages/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/stdio/_vscprintf.c:23: undefined reference to `_set_errno' collect2.exe: error: ld returned 1 exit status configure:6675: $? = 1 ``` -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 1/2] crt: Add fallback _vscprintf() implementation
在 2022-01-21 18:51, Martin Storsjö 写道: That's strange, as _set_errno should be provided by libmingwex.a, which should be implicitly linked in at this stage? I tried bootstrapping a cross gcc toolchain with mingw-w64 898141aa957b99812f2f4d2cf89255798d578d54 targeting i686, with GCC 11.2.0, and it seemed to build just fine for me. This seems easy to reproduce in MSYS2: ``` lh_mouse@lhmouse-pc ~/Desktop $ cat conftest.c extern int snprintf(char*, unsigned, const char*, ...); int main(void) { char temp[42]; snprintf(temp, 10, ""); } lh_mouse@lhmouse-pc ~/Desktop $ gcc conftest.c C:/MSYS2/mingw32/lib/gcc/i686-w64-mingw32/11.2.1/../../../../i686-w64-mingw32/bin/ld.exe: C:/MSYS2/mingw32/lib/gcc/i686-w64-mingw32/11.2.1/../../../../i686-w64-mingw32/lib/../lib/libmsvcrt.a(lib32_libmsvcrt_extra_a-_vscprintf.o): in function `emu_vscprintf': D:/lh_mouse/GitHub/MINGW-packages/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/stdio/_vscprintf.c:49: undefined reference to `_set_errno' C:/MSYS2/mingw32/lib/gcc/i686-w64-mingw32/11.2.1/../../../../i686-w64-mingw32/bin/ld.exe: D:/lh_mouse/GitHub/MINGW-packages/mingw-w64-crt-git/src/mingw-w64/mingw-w64-crt/stdio/_vscprintf.c:23: undefined reference to `_set_errno' collect2.exe: error: ld returned 1 exit status lh_mouse@lhmouse-pc ~/Desktop $ ``` -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Move misc/seterrno.c from src_libmingwex into src_msvcrt32 and src_msvcrt64
在 2022-01-21 22:53, Martin Storsjö 写道: The _set_errno function is defined in arm versions of msvcrt.dll, and in all the newer numbered versions of msvcr*.dll, and UCRT. This avoids issues with the recently added _vscprintf in libmsvcrt.a which depends on _set_errno, which was present in libmingwex.a. When linking with ld.bfd, a later library can't pull in symbols from earlier libraries (unless specifying --start-group --end-group around the list of those libraries). Signed-off-by: Martin Storsjö --- mingw-w64-crt/Makefile.am | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) This patch looks good itself. BTW I am not sure why this function is ever necessary; the error number could have been assigned to `errno` directly. More over, our `_get_errno()` is incorrect because it returns the current error number, while according to MSDN [1] it should return zero upon success and `EINVAL` otherwise. I think it worth another patch. [1] https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/get-errno?view=msvc-170 -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] _FILE_OFFSET_BITS + stat macro + conflicts
在 2022-01-21 22:32, Christoph Reiter 写道: In qt6 it's not so easy since it's a public header, we undef stat there in some cases. I'm wondering if there is anything mingw-w64 could do to prevent/improve this? It's too unfortunate that we have this thing as a macro which applies to both the `stat` function and the `stat` structure. We could have provided an inline wrapper for `stat()` but there is hardly a workaround for the other, as it is not a typedef but a tag. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Remove the x86_64 version of libcrtdll.a
在 2022-01-24 19:49, Martin Storsjö 写道: There is no crtdll.dll in x86_64 Windows, and the def file indicates that it's been generated from msvcrt.dll, not crtdll.dll. Signed-off-by: Martin Storsjö --- mingw-w64-crt/Makefile.am | 4 - mingw-w64-crt/lib64/crtdll.def | 853 - 2 files changed, 857 deletions(-) delete mode 100644 mingw-w64-crt/lib64/crtdll.def LGTM. Thanks. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Move misc/seterrno.c from src_libmingwex into src_msvcrt32 and src_msvcrt64
在 2022-01-24 19:45, Martin Storsjö 写道: Yes, that's probably true - do you feel like you can pick up fixing that? OK. Patch sent. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] [PATCH] crt/misc: Make `_{get, set}_errno()` return `EINVAL` in case of errors
These shall work in compliance with [1] and [2]. [1] https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/get-errno?view=msvc-170 [2] https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/set-errno?view=msvc-170 Signed-off-by: LIU Hao --- mingw-w64-crt/misc/seterrno.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mingw-w64-crt/misc/seterrno.c b/mingw-w64-crt/misc/seterrno.c index 952675da..ab54c668 100644 --- a/mingw-w64-crt/misc/seterrno.c +++ b/mingw-w64-crt/misc/seterrno.c @@ -8,11 +8,17 @@ errno_t __cdecl _set_errno (int _Value) { errno = _Value; - return errno; + return 0; } errno_t __cdecl _get_errno (int *_Value) { - if(_Value) *_Value=errno; - return errno; + if(!_Value) + { +errno = EINVAL; +return EINVAL; + } + + *_Value = errno; + return 0; } -- 2.34.1 OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt/misc: Make `_{get, set}_errno()` return `EINVAL` in case of errors
在 2022-01-25 04:57, Martin Storsjö 写道: LGTM, thanks! Thanks. Pushed now. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Fix v*scanf functions
在 2022-01-16 22:44, Pali Rohár 写道: diff --git a/mingw-w64-crt/stdio/scanf2-argcount-template.c b/mingw-w64-crt/stdio/scanf2-argcount-template.c new file mode 100644 index ..c07e11797c39 --- /dev/null +++ b/mingw-w64-crt/stdio/scanf2-argcount-template.c @@ -0,0 +1,22 @@ +/** + * This file has no copyright assigned and is placed in the Public Domain. + * This file is part of the mingw-w64 runtime package. + * No warranty is given; refer to the file DISCLAIMER.PD within this package. + */ + +#include + +size_t FUNC(const TYPE *format); +size_t FUNC(const TYPE *format) +{ + size_t count = 0; + for (; *format; format++) { +if (*format != (TYPE)'%') + continue; +format++; +if (*format == (TYPE)'%' || *format == (TYPE)'*') + continue; +count++; + } + return count; +} I am afraid there are two issues about this function: One is that it may read pass the end of the format string if it contains a stray `%` at the end (which however is undefined behavior) but I don't think it is a good idea to not handle it properly. The other is that `%` does not necessarily start an argument specifier. For example `"abc%[01%]"` contains only one specifier for one argument, and this function produces a wrong result. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Fix v*scanf functions
在 1/26/22 04:05, Pali Rohár 写道: Yes, this is truth. However amd64 asm code already reads more pointers from stack (when number of them is smaller then number of arguments needed to pass via registers when doing function call), so I think that this function can be documented that returns "minimal number of arguments". So it is really an issue? Or should be function extended to skip all characters between [ and ]? For the sake of simplicity, I think it should be acceptable to return an upper limit, so I suggest we rename these functions to `__ms_scanf_max_arg_count_internal` etc. This also eliminates the need to check for `%*`; we only need to count `%` characters and assume there can be no more arguments than them. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] Recommended target triplet for ucrt?
在 2022-01-29 23:09, Marc-André Lureau 写道: Hi, So far, the recommended target triplet for mingw64 is: CPU-w64-mingw32. If you want to have both msvcrt & ucrt toolchains installed (see Fedora ucrt proposal [1]), what should be the triplet for targeting ucrt ? So far, I have settled on x86_64-w64-mingw32ucrt, since autotools config.sub is accepting mingw32*. Does that seem reasonable? There was some discussion about this [1], without a conclusion. MSYS2 uses the same triplet for both MSVCRT and UCRT. I thought there was also a proposal in the form `arch-vender-os-abi` like `arm-none-linux-gnueabi`, so we get `x86_64-w64-mingw32-ucrt` in this case, but I have not seen anyone use it ever. [1] https://sourceforge.net/p/mingw-w64/mailman/message/37196692/ -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] include: Add new defines in httpext.h
在 2022-01-29 14:06, Biswapriyo Nath 写道: From a6fa84d29748ad65ef7a7475f9ae5c6bb2c41e64 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Sat, 29 Jan 2022 11:33:13 +0530 Subject: [PATCH] include: Add new defines in httpext.h Required for pywin32 project Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/include/httpext.h | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) Thanks. This patch looks good to me. Pushed to master now. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 1/3] headers: Add vdslun.idl file
在 2/4/22 16:09, Marc-André Lureau 写道: Hi Reviewed-by: Marc-André Lureau I can add that line for you. Please wait a few days before I can check in these patches. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 1/3] headers: Add vdslun.idl file
在 2022-02-04 13:06, Biswapriyo Nath 写道: From d655077eccdf17c288e0f7a7721b4982fa05419c Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Fri, 4 Feb 2022 10:35:06 +0530 Subject: [PATCH 1/3] headers: Add vdslun.idl file Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/Makefile.am| 1 + mingw-w64-headers/include/vdslun.idl | 105 +++ 2 files changed, 106 insertions(+) create mode 100644 mingw-w64-headers/include/vdslun.idl Thanks for these patches. I have pushed them to master now. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Move crtdll.mri from lib-common/ to lib32/
在 2022-02-06 20:35, Pali Rohár 写道: crtdll.mri is used only for building 32-bit version of libcrtdll.a library. --- mingw-w64-crt/Makefile.am | 2 +- mingw-w64-crt/{lib-common => lib32}/crtdll.mri | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename mingw-w64-crt/{lib-common => lib32}/crtdll.mri (100%) Thanks. This patch looks good to me. Pushed now. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Optimize __ms_vsnprintf() for LTO
在 2/8/22 16:33, Martin Storsjö 写道: On Sun, 6 Feb 2022, Pali Rohár wrote: Mark _vscprintf() and _scprintf() functions with attribute pure as their return value depends only on passed arguments. In function __ms_vsnprintf() check only for n==0 and move _vscprintf() call at the end of function. This allows LTO to optimize out _vscprintf() call from __ms_vsnprintf() function if caller of snprintf() or vsnprintf() does not use return value. It works because _vscprintf() is direct return value of __ms_vsnprintf() and function marked as pure is automatically optimized out if its return value is not used. --- mingw-w64-crt/stdio/vsnprintf.c | 10 +- mingw-w64-headers/crt/stdio.h | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) This looks ok to me, so I pushed it. Please use `__pure__` instead of `pure` in standard library headers. The latter is subject to user-defined macros. Although I have no objection against this patch, I do wonder whether it is practical to build the CRT with LTO. There are some symbols (e.g. the TLS directory) that mean to 'be there unconditionally', which might be stripped by LTO and cause undefined references (I thought I had seen this before, not sure). -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: Use __MINGW_ATTRIB_PURE instead of __attribute__((pure))
在 2/8/22 21:12, Martin Storsjö 写道: Using __attribute__((pure)) can conflict with a user-defined macro "pure" - the correct form for system headers would use "__pure__" instead. We have an existing macro that expands to this (with some compiler variance handling too). Signed-off-by: Martin Storsjö --- mingw-w64-headers/crt/stdio.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) LGTM. Thanks. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: Enable WIDL_EXPLICIT_AGGREGATE_RETURNS on arm/aarch64 too
在 2/8/22 18:45, Martin Storsjö 写道: While clang does match MSVC with regards to aggregate returns, when run in MSVC mode, it matches GCC when run in mingw mode - and the same behaviour extends to arm/aarch64 too. Thus, this workaround needs to be enabled on all architectures, not only on x86. Signed-off-by: Martin Storsjö --- mingw-w64-headers/crt/_mingw_mac.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) LGTM, too. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Optimize __ms_vsnprintf() for LTO
在 2/8/22 17:43, Pali Rohár 写道: Well, I have tried to compile just a simple executable application with "snprintf" call which do not check return value of snprintf function and with LTO built of CRT was _vscprintf call fully eliminated without any undefined reference issues and application worked correctly. It's good to know that LTO actually works here. Thanks for the information. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] make dsparse library common
在 2022-01-13 22:07, Jonathan Marler 写道: It's been 3 months since the last email on this thread but the patch hasn't been integrated, what's the status? I don't see the import library for DSPARSE.DLL from Windows SDK, so I wonder whether any projects need it. There was also a problem in your patch: You cannot reuse the libarm DEF file for lib32, because those functions use __stdcall calling convention and have different symbol names from others. You may generate a DEF file with dlltool and use that. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 1/4] headers: Add vsanimation.h
在 2022-02-07 22:25, Biswapriyo Nath 写道: From e47c9a15108381a5578f44caed4b3ac8809042a4 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Mon, 7 Feb 2022 19:50:42 +0530 Subject: [PATCH 1/4] headers: Add vsanimation.h Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/include/vsanimation.h | 242 1 file changed, 242 insertions(+) create mode 100644 mingw-w64-headers/include/vsanimation.h Thanks. These four patches look good to me. I have pushed them to master. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 1/2] headers: Add vsbackup.idl
在 2022-02-11 00:34, Biswapriyo Nath 写道: From 45882b4586fcc438742bcf63bf49e2b17281120d Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Thu, 10 Feb 2022 22:02:23 +0530 Subject: [PATCH 1/2] headers: Add vsbackup.idl Signed-off-by: Biswapriyo Nath --- mingw-w64-crt/libsrc/vss-uuid.c| 1 + mingw-w64-headers/Makefile.am | 1 + mingw-w64-headers/include/vsbackup.idl | 496 + 3 files changed, 498 insertions(+) create mode 100644 mingw-w64-headers/include/vsbackup.idl I couldn't find such an IDL in Windows SDK. I suspect that we need an IDL so these interfaces can be used in C as well? If so then probably plain `inline` specifiers shouldn't be used. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 1/2] headers: Add vsbackup.idl
在 2022-02-12 23:02, Biswapriyo Nath 写道: Yes, I created the IDL file manually. May I ask the reason why `inline` should not be added? Should those be static functions? It's because `inline` is not available in C89 and (even in C99) it has some fundamental differences from the C++ `inline`. Generally speaking, `static __inline` is preferred for simplicity. The differences are explained earlier [1]. The most important one is that in C, unless `__attribute__((__always_inline__))` is also specified or optimization is enabled, GCC will not attempt to inline `inline` functions, so a definition without `inline` has to exist, otherwise users may get undefined references. [1] https://sourceforge.net/p/mingw-w64/mailman/message/37319453/ -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 1/2] headers: Add vsbackup.idl
在 2022-02-13 00:21, Biswapriyo Nath 写道: Thanks for the explanation. Fixed patch file is attached. Thanks for the patches. Pushed now. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 3/3] headers: Add mfmediacapture.idl
在 2022-02-13 04:37, Biswapriyo Nath 写道: From 3db3346875a5f73f520f59c929bf5b0493e31e91 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Sun, 13 Feb 2022 01:51:42 +0530 Subject: [PATCH 3/3] headers: Add mfmediacapture.idl Signed-off-by: Biswapriyo Nath --- mingw-w64-crt/libsrc/mfuuid.c| 1 + mingw-w64-headers/Makefile.am| 1 + mingw-w64-headers/include/mfmediacapture.idl | 35 3 files changed, 37 insertions(+) create mode 100644 mingw-w64-headers/include/mfmediacapture.idl Thanks for these patches. I have pushed them to master now. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Check the return value from MultiByteToWideChar in btowc
在 2/16/22 06:09, Martin Storsjö 写道: If MultiByteToWideChar failed, it could still have overwritten the output variable. Signed-off-by: Martin Storsjö --- mingw-w64-crt/misc/btowc.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) LGTM. Thanks. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] winpthreads: Add a missing (void) in the parameters for pthread_getevent
在 2/18/22 00:23, NightStrike 写道: Adding unnecessary spam because of yet another poor choice of clang is not something we should be catering towards. Users can compile with -Wno-strict-prototypes if it bothers them that much. No this is not 'unnecessary'. In C the declaration `void* pthread_getevent();` is equivalent to `void* pthread_getevent(...);` despite lack of any means to get arguments (`va_start` requires a named parameter). Ancient code that predated ISO C used to define functions like int fputc(); /* declaration */ int fputc() /* definition*/ int c; /* arguments */ FILE* fp; { /* ... */ } so empty parentheses are there to provide compatibility, and leaving them there for now is not only not unnecessary, but totally incorrect in C. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 2/2] headers: Add default parameter value in vsbackup.idl
在 2022-02-18 21:05, Biswapriyo Nath 写道: From 257f46f9780f1a2ead1bd72976e3c4c27ddd6cea Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Fri, 18 Feb 2022 18:33:28 +0530 Subject: [PATCH 2/2] headers: Add default parameter value in vsbackup.idl Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/include/vsbackup.idl | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) Thanks. These patches look good to me. I have pushed them to master now. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] assertion failure in winpthreads/src/rwlock.c, line 40
在 2022-02-17 03:40, Jeremy Drake via Mingw-w64-public 写道: Is this assertion failure a sign of a bug in winpthreads, or a sign of a bug in glib (such as releasing a lock that is not held, for instance)? Releasing a lock that the calling thread does not own results in undefined behavior [1]. Returning `EPERM` here is recommended, but not required. I haven't looked into the source, though. It may be a winpthreads bug or a glib bug, or both. [1] Issue 7, https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_unlock.html -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Add missing __cdecl signature to ucrt functions
在 2022-02-20 04:20, Martin Storsjö 写道: On Sat, 19 Feb 2022, Pali Rohár wrote: When assigning function pointer to variable, both function and variable should have same signature. Fix it. --- The patch looks ok to me, but I presume this is only a pedantic fix with no noticeable effect other than that - because if no calling convention is specified, __cdecl is the default? I think we should always add `__cdecl` explicitly. MSVC has `/Gd`, `/Gr`, `/Gv`, `/Gz` which specify default calling conventions if none is given. GCC also has `-mrtd` [1] which sets the default one to `__stdcall` but I haven't seen many people use it so far. [1] https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: stdio.h: Add _(v)scprintf optimization
在 2022-02-19 09:02, Pali Rohár 写道: Redirect (v)snprintf() call with n==0 arg directly to _(v)scprintf() call at compile time. With this change gcc can optimize out __ms_(v)snprintf() call even when MinGW-w64 runtime was not compiled with LTO. --- mingw-w64-headers/crt/stdio.h | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) Thanks for the patch. Pushed now. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 v2] dcomp.h: add some missing interfaces
在 2022-02-24 23:14, Steve Lhomme 写道: IDCompositionSurface was not modified by the patch that was reverted: https://github.com/mirror/mingw-w64/commit/586baa17bb41dd78addd8cbb6415cfd24d24e925 So that can't be the reason to revert the change. Indeed, when compiled as C++ there is no such error; some old revisions (such as 3cdd004f1dc5571eb77369b6a6eb791c909a11ae) also do not compile as C, despite the misleading `defined(__cplusplus)` check. Hence I suspect this patch is okay. Apologies for the trouble. Pushed to master now. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] Cannot include GCC 8.1 Windows build (without MSYS)
在 3/1/22 20:38, Vishal Subramanyam 写道: Hey, Whenever I include in any of my programs, with the "-std=c++17" option, I get a huge output with a lot of errors. I suggest you use MSYS2 because they actively maintain new toolchains. You only need the package manager. Once complete environments (mingw32, mingw64, ucrt64, etc.) have been set up, it is possible to pack individual sysroot directories (`/mingw32`, `/mingw64`, `/ucrt64`, etc.), transfer them to another computer, and then unpack them to recover the same environments. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: confirm the IDXVAHD_Device/IDXVAHD_VideoProcessor layout
在 2022-02-28 20:52, Steve Lhomme 写道: Verified with https://github.com/microsoft/win32metadata/blob/4656cf4a75aaff953b0730ac5955ab6aea2b4cc6/generation/WinSDK/RecompiledIdlHeaders/um/dxvahd.idl Also added the GUIDs. --- mingw-w64-headers/include/dxvahd.h | 24 mingw-w64-headers/include/dxvahd.idl | 12 ++-- 2 files changed, 14 insertions(+), 22 deletions(-) Thanks for the patch, but please do not include generated files next time (it has to be checked in by a separate commit). Pushed to master now. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] Cannot include GCC 8.1 Windows build (without MSYS)
在 3/2/22 16:50, Vishal Subramanyam 写道: On Wed, 2 Mar 2022 09:30:37 +0800 LIU Hao wrote: I suggest you use MSYS2 because they actively maintain new toolchains. MSYS2 doesn't seem to work on my computer. Getting an error related to cygheap or something. Anyway, I managed to find a Windows build of GCC 11 with MinGW-64 9.0 (on winlibs.com). Their builds don't seem to use MSYS. Because GCC uses the GNU autotools build system which requires a POSIX shell, either MSYS2 or Cygwin is a musthave. The built GCC is a native program and does not require a shell. (Side note: The GCC LTO wrappers might cease to work if you do not have a shell.) -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 2/2] crt: Fix building lc_locale_func.c for libcrtdll_extra.a
在 2/20/22 04:27, Martin Storsjö 写道: On Sat, 19 Feb 2022, Pali Rohár wrote: Object files in archive libcrtdll_extra.a (which are linked into import library for crtdll.dll) cannot use msvcrt.h as it uses msvcrt.dll runtime library. Maybe clarify "uses", e.g. like this: "as it tries to load symbols at runtime from msvcrt.dll using GetProcAddress" So avoid using msvcrt.h and __mingw_get_msvcrt_handle() in crtdll.dll runtime and directly use "setlocale_codepage_hack" implementation. This fixes building of lc_locale_func.c for libcrtdll_extra.a archive. --- This patch looks reasonable to me. Is there any progress about these patches? I haven't see them checked in so far. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] Need ConvertStringToBSTR and ConvertBSTRToString API for unrar
在 2022-03-05 22:12, Biswapriyo Nath 写道: unrar project needs ConvertStringToBSTR and ConvertBSTRToString APIs which are implemented in comsupp library in MSVC. Can I add those APIs in mingw-w64? Will there be any license/legal issue? What could the potential issues be? There are a lot of things linked statically from our CRT, so I don't mind adding more. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] winstorecompat: fix CreateFileW mask for dwSecurityQosFlags
在 2022/3/8 15:52, Steve Lhomme 写道: The possible values are * SECURITY_ANONYMOUS which is 0<<16 aka 0x * SECURITY_IDENTIFICATION which is 1<<16 aka 0x0001 * SECURITY_IMPERSONATION which is 2<<16 aka 0x0002 * SECURITY_DELEGATION which is which is 3<<16 aka 0x0003 * SECURITY_CONTEXT_TRACKING which is 0x0004 * SECURITY_EFFECTIVE_ONLY which is 0x0008 So the proper mask should be 0x000F instead of 0x000F0. There's an extra 0. Signed-off-by: Steve Lhomme --- mingw-w64-libraries/winstorecompat/src/CreateFileW.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Thanks. Looks good to me. Pushed. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 1/2] fwpuclnt: update to Windows 11 exports
在 2022-03-10 11:58, Biswapriyo Nath 写道: I'm not sure what I am supposed to "check" on these? Does it mean I should copy the stdcall decoration from NtClose onto these? Yes, those sdcall decoration are same as NtClose. WfpCloseDPConfigureHandle and WfpRIOChannelClose are just wrapper of NtClose, implemented as `jmp cs:NtClose`. And that's why there are no `@xx` suffixes in such i686 symbols; you will have to check their target functions, and add stdcall suffixes yourself. x86_64 and ARM don't distinguish stdcall from cdecl so it's fine. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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 1/3] headers: Add webauthn.h file
在 2022-03-09 14:46, Biswapriyo Nath 写道: From 74e9bd919c3fa3fcb37da2c68c493529c6f3db6c Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Wed, 9 Mar 2022 12:14:00 +0530 Subject: [PATCH 1/3] headers: Add webauthn.h file Tested with libfido2 project Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/include/webauthn.h | 369 +++ 1 file changed, 369 insertions(+) create mode 100644 mingw-w64-headers/include/webauthn.h Thanks. These patches look good to me. Pushed. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] MinGW-w64 vs Windows SDK
在 2022-03-10 06:20, Vishal Subramanyam 写道: Hey, I'm confused about the header files and libraries that MinGW-w64 provides? Does it provide just header files (along with certain libraries like libstdc++) that enable the compiler to link against Microsoft-provided DLLs (along with some MinGW-specific DLLs)? What is the relation between the files and programs provided by the Windows SDK and MinGW-w64? How are they similar/different? Does the Windows SDK offer additional DLLs and header files (or additional header files that expose functions in the system DLLs not exposed by MinGW's header files)? Apart from the Win32 API, does MinGW support newer APIs like WinRT? Thanks, Vishal Subramanyam P.S. As a noob, how can I be of help to the project? For Windows targets, GCC uses Application Binary Interfaces (ABI) that are largely compatible with what MSVC uses (except `long double` on x86). We provide headers that can be fed to GCC (and Clang in GCC mode), as they have trouble in compiling MS headers. We provide libraries that can be picked up by the GNU linker (and LLD). Therefore, we make it possible to use the GNU compiler and linker to compile source code into executables on top of MSVCRT.DLL, KERNEL32.DLL, etc. without an emulation layer or subsystem whatsoever. While the C ABI is large compatible, the C++ ABI is much more complex when we take exceptions and name mangling into account. Hence, it is usually not possible to call C++ functions that have been exported from DLLs produced by MSVC, unless they are `extern "C"` ones. (Also please note libstdc++ (with standard headers) is provided by GCC, not mingw-w64.) We can also provide something that MSVC doesn't, for example `*printf()` and `*scanf()` that conform to the C99 standard, and winpthreads that provide POSIX threading APIs. Our headers and libraries are maintained actively by the community, so new stuff may come in at any time. We try to keep up with Windows SDK, but which is also evolving, therefore we may be kept back a little. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Add comsupp library
在 2022-03-11 15:19, Biswapriyo Nath 写道: 0001-crt-Add-comsupp-library.patch From 809cd7851d20d423fc1e9dd9df6cd107d343d7fc Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Fri, 11 Mar 2022 12:47:59 +0530 Subject: [PATCH] crt: Add comsupp library Required for unrar project Signed-off-by: Biswapriyo Nath --- mingw-w64-crt/Makefile.am| 17 +++ mingw-w64-crt/libsrc/comsupp.cpp | 84 2 files changed, 101 insertions(+) create mode 100644 mingw-w64-crt/libsrc/comsupp.cpp I am not sure whether we can take this GPL'd piece of code from ReactOS without confirmation. Would please ask ReactOS developers to disclaim copy right of it? -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] include/wdm.h: Fix -Wsign-compare warning in RtlExtendedMagicDivide()
在 2022-03-12 21:11, Pali Rohár 写道: x86_64-w64-mingw32-gcc throws following -Wsign-compare warning when compiling 64-bit NT kernel drivers which include ddk/ntddk.h file: ddk/wdm.h: In function ‘RtlExtendedMagicDivide’: ddk/wdm.h:9531:32: warning: operand of ?: changes signedness from ‘long long int’ to ‘ULONG64’ {aka ‘long long unsigned int’} due to unsignedness of other operand [-Wsign-compare] ret.QuadPart = Pos ? ret64 : -(LONG64)ret64; ^~ Member ret.QuadPart is of type LONGLONG, so explicitly cast both parts of ret64 ternary operator to LONG64. --- mingw-w64-headers/ddk/include/ddk/wdm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Thanks. Looks good to me. Pushed. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Add comsupp library
在 2022-03-16 22:22, Biswapriyo Nath 写道: diff --git a/COPYING.MinGW-w64-runtime/COPYING.MinGW-w64-runtime.txt b/COPYING.MinGW-w64-runtime/COPYING.MinGW-w64-runtime.txt index ca6a077..dcf0807 100644 --- a/COPYING.MinGW-w64-runtime/COPYING.MinGW-w64-runtime.txt +++ b/COPYING.MinGW-w64-runtime/COPYING.MinGW-w64-runtime.txt I am a bit unclear about this hunk: The purpose of having two COPYING files is described in COPYING.MinGW-w64.txt: The copyright and license notices have been divided in two files: The notices in COPYING.MinGW-w64.txt (this file) apply only to MinGW-w64 itself. These don't apply to the binaries built with MinGW-w64 unless you specifically tell MinGW-w64 to link against these parts, for example, by enabling profiling code. This description is a bit obscure but I hope I can interpret it a bit: The runtime is always compiled into any binary files that are linked against mingw-w64, so the runtime notices shall always be carried. The non-runtime part is only compiled into binary files that use them as told by our users, so the non-runtime notices are not always needed. AFAICT this newly added notice should be categorized as a non-runtime notice. What do you think? -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Add comsupp library
在 2022/3/16 23:25, Biswapriyo Nath 写道: As you wish. Here is the 2nd update. I suddenly realize this is C++ source. This may pull in libstdc++ and libgcc (or libc++, whatever). Microsoft docs say this function returns a string that the user has to `delete[]` so I suspect we can't rewrite this function in C, only because we can't allocate C++ memory there. On the other hand, this only makes a difference when one wants to build the CRT without a C++ compiler. This also doesn't seem the case, as both GCC and Clang are written in C++, so a C++ compiler is required to build the compiler, and probably others. Not sure about what others may think; I am okay with this patch. If any issues emerge after this change, we will have to turn these into inline functions. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] winpthreads: return EINVAL for already detached threads
在 2022-03-16 00:22, Steve Lhomme 写道: Apparently these 2 error codes have been removed in recent versions of POSIX: * https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_detach.html * https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_join.html I don't know if there's a way to signal what version of POSIX winpthread is following or if we should only handle the newer error code Note The behavior is undefined if the value specified by the thread argument to pthread_join() does not refer to a joinable thread. which means there is no suggested error code, and whatever return value is acceptable, including zero. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] winpthreads: return EINVAL for already detached threads
在 2022-03-18 14:36, Steve Lhomme 写道: Yes. That's the behavior after 1003.1-2017. Before the old behavior was expected. That's a terrible silent API change. Anyway, the bug that triggered this issue within UPNP has been fixed and so the change is not needed anymore. Well I don't think we need this change. Since thread handles may be reused (on Linux `pthread_t` is just a pointer) it is hardly reliable for `pthread_detach()` to detect such errors. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] headers: Add missing waveform flag
在 2022-03-19 14:03, Biswapriyo Nath 写道: From 07bcf1bc85571b515787f700eb2d8cdc0bc8999c Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Sat, 19 Mar 2022 11:32:46 +0530 Subject: [PATCH] headers: Add missing waveform flag Signed-off-by: Biswapriyo Nath --- mingw-w64-headers/include/mmsystem.h | 1 + 1 file changed, 1 insertion(+) Thanks for the patch. Pushed. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Add comsupp library
在 2022-03-20 12:50, Biswapriyo Nath 写道: If this comsupp library can not be integrated with main crt libraries, is it possible to add this library in mingw-w64-libraries folder and then add option (e.g. --enable-extras) in configure.ac to build from that folder? It is also what Microsoft people do. Thus I think it is doable. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Add comsupp library
在 2022-03-20 16:39, Martin Storsjö 写道: Sure, moving it out elsewhere is an option too. I wouldn't entirely rule out putting it in mingw-w64-crt either, but we'd need to tweak the C++ compiler detection code - I haven't had time to try that yet. I recommend that we don't bring C++ into the CRT, unless we decide to rewrite everything with C++ which is impractical in foreseeable future. Having a standalone library also eliminates the need of having another chapter in COPYING - only the library itself needs it. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ 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] crt: Move bthprops to lib-common
在 2022-03-26 14:15, Biswapriyo Nath 写道: From 26dc7398619c3a81c38e6824f674564e483ca536 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Sat, 26 Mar 2022 11:44:05 +0530 Subject: [PATCH] crt: Move bthprops to lib-common Signed-off-by: Biswapriyo Nath --- mingw-w64-crt/{lib64 => lib-common}/bthprops.def | 0 mingw-w64-crt/libarm32/Makefile.am | 1 + mingw-w64-crt/libarm64/Makefile.am | 1 + 3 files changed, 2 insertions(+) rename mingw-w64-crt/{lib64 => lib-common}/bthprops.def (100%) Thanks. The patch looks good to me. Pushed. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public