I agree with this logic. If a functions is a mingw-w64 extension (including POSIX/GNU functions) or CRT function completely replaced by mingw-w64, then omitting _CRTIMP and _imp symbols is a good idea. If it is a replacement for CRT function, we may want to provide _imp symbol just so that existing code can still reference it.
If a function is replaced for some CRTs, but still used natively with other CRTs, I think using _CRTIMP is preferable in such case. - Kirill Makurin ________________________________ From: Martin Storsj? <[email protected]> Sent: Friday, January 16, 2026 6:05 PM To: [email protected] <[email protected]> Subject: Re: [Mingw-w64-public] De-duplicate declarations in conio.h and wchar.h On Fri, 16 Jan 2026, Kirill Makurin wrote: > I see, so we should avoid adding _CRTIMP for functions which are also > declared in intrin.h. I'll keep that in mind. IMO this is also a question which depends on what you prioritize - and I'm not sure if we have a common policy for that. Prioritizing likeness to MSVC/WinSDK is one potential priority. Another is pragmatism: If a function is most commonly (or, always) provided by us, then calling it without dllimport is more efficient code, and may avoid needing to provide the __imp_ pointer for the function altogether. // Martin _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
