Re: [Mingw-w64-public] [RFD] Split standard and non-standard CRT functions

2024-08-26 Thread Rafael Kitover
вс, 25 авг. 2024 г. в 13:44, LIU Hao : > You can't use MSVCRT functions by simply linking with `-lmsvcrt`; it would > precede default > libraries, specifically, the Cygwin DLL. I explained this but some US government shits are rewriting my emails so you did not see my explanation. If you do: gc

Re: [Mingw-w64-public] [RFD] Split standard and non-standard CRT functions

2024-08-24 Thread Rafael Kitover
сб, 24 авг. 2024 г. в 14:20, LIU Hao : > I think that linking MS CRT within a Cygwin program could be dangerous, as > Cygwin has its own CRT. > mingw-w64 headers should only be used to access Windows APIs. As you previously said, this is potentially dangerous for functions that modify global stat

Re: [Mingw-w64-public] [RFD] Split standard and non-standard CRT functions

2024-08-24 Thread Rafael Kitover
сб, 24 авг. 2024 г. в 07:27, LIU Hao : > If you are compiling for Cygwin, there's a standard one in POSIX: > >https://pubs.opengroup.org/onlinepubs/9699919799/functions/strcasecmp.html I just used this as an example, what I am proposing is a general solution for calling non-standard MSVCRT fun

[Mingw-w64-public] [RFD] Split standard and non-standard CRT functions

2024-08-24 Thread Rafael Kitover
Currently, when building for and using the Cygwin runtime, non-standard CRT functions are not available in the headers, and there is no import library for the CRT to link them. For example, the Cygwin "string.h" does not define `stricmp()`, a non-standard MSVCRT function, which I will use as an ex

Re: [Mingw-w64-public] [PATCH] headers: Disable conflicting OLE methods on Cygwin

2024-08-15 Thread Rafael Kitover
Just updated this example to be more correct and added a command for MSVC. ___ 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: Disable conflicting OLE methods on Cygwin

2024-08-13 Thread Rafael Kitover
вт, 13 авг. 2024 г. в 14:21, LIU Hao : > /usr/include/w32api/comip.h:21:10: fatal error: new.h: No such file or > directory >21 | #include > ``` The reason for this is that the version of the headers in the MSYS environment are very out of date, they are currently on the last sta

[Mingw-w64-public] [QUESTION] Linking a CRT function from a Cygwin program

2024-08-12 Thread Rafael Kitover
Apologies in advance if this is the wrong place to ask about this. I recently ran into a problem in a project I'm working on, which is a binary using the Cygwin runtime, where linking failed to find a CRT function, stricmp() in this case. For the time being, I used a trivial reimplementation of t

Re: [Mingw-w64-public] [PATCH] headers: Disable conflicting OLE methods on Cygwin

2024-08-12 Thread Rafael Kitover
Just wanted to say that I really appreciate your help with this, I think I was discussing your nano fork with you some years ago. I believe this is enough, because I've used it to build and run some WMI code. I made a repo so you can verify this for yourself: https://github.com/rkitover/mingw-wi

[Mingw-w64-public] [PATCH] headers: Disable conflicting OLE methods on Cygwin

2024-08-11 Thread Rafael Kitover
tes via a type alias. Disable these methods under `__CYGWIN__`. Signed-off-by: Rafael Kitover --- mingw-w64-headers/include/comutil.h | 12 1 file changed, 12 insertions(+) diff --git a/mingw-w64-headers/include/comutil.h b/mingw-w64-headers/include/comutil.h index c3e2d4739..ee071fbe

[Mingw-w64-public] [PATCH] headers: Remove some dup OLE methods in comutil.h

2024-08-11 Thread Rafael Kitover
methods. Signed-off-by: Rafael Kitover --- mingw-w64-headers/include/comutil.h | 49 - 1 file changed, 49 deletions(-) diff --git a/mingw-w64-headers/include/comutil.h b/mingw-w64-headers/include/comutil.h index c3e2d4739..e44ace172 100644 --- a/mingw-w64-headers/inc