From: Kevin K. <kev...@gm...> - 2025-05-06 18:29:15
|
I do worry a bit about Tcl extensions whose purpose it is to wrap third-party code that may be linked with a different C runtime. While I know - or rather can relearn when I must - how to manage different runtimes within the same process, I've certainly seen a lot of third-party libraries that demand that the whole process use the same runtime (usually MSVCRT) because otherwise memory corruption results - many programmers are unaware of the possibility that malloc() and free() may be coming from different runtimes if the respective callers were built in different DLLs. Would we want to continue supporting MSVCRT(D) and statically linked LIBC's for that reason? On Tue, May 6, 2025 at 3:48 AM Ashok Nadkarni via Tcl-Core < tcl...@li...> wrote: > Jan, > > It occurs to me that 9.1 will stop supporting Windows releases prior to > Win 10. Given that, we can simply drop support for MinGW/MSVCRT as all > Windows systems will have UCRT installed. If that is agreeable, we can drop > the discussion around MSVCRT and focus on other points of contention in > 716/718. > > /Ashok > > > ------------------------------ > *From:* Ashok Nadkarni via Tcl-Core > *Sent:* Tuesday, May 6, 2025 10:17 AM > *To:* Jan Nijtmans > *Cc:* Tcl Core List > *Subject:* Re: [TCLCORE] TIP 716 ready for comments > > No, I'm afraid your post below does not clarify at all. That link you gave > pertains to UCRT, not MSVCRT which, unless I read with my blinders on, is > not mentioned anywhere on that page. Adding UCRT to the discussion, first > with passing of FILE* between runtimes, and now to discussion of > setlocale(), only serves to obfuscate further. > > Further, given the link you gave has no discussion of MSVCRT, what was > the source of your statement <*MSVCRT supports the "utf-8" _encoding_, > not the "utf-8" _locale_*,> ? If you can provide the basis for your > conclusion, that would really help. > > /Ashok > > > ------------------------------ > *From:* Jan Nijtmans > *Sent:* Tuesday, May 6, 2025 3:08 AM > *To:* Ashok Nadkarni > *Cc:* Tcl Core List > *Subject:* Re: [TCLCORE] TIP 716 ready for comments > > Op ma 5 mei 2025 om 19:22 schreef Ashok Nadkarni: > > Now, with regard to the mingw msvcrt comment... > > > > It seems to me from your comment about GetACP() in MingW that you think > I was suggesting the manifest would not work in MingW. That is not so. > GetACP() will work the same way and return utf-8 in the presence of a > manifest but the problem is MSVCRT does not support UTF-8. > > > > I do not know if you read the link that I had referenced in the TIP > https://www.msys2.org/docs/environments/#msvcrt-vs-ucrt > > > > To quote from there - It doesn't support the UTF-8 locale ("It" being > MSVCRT) > > > > When the official release document says MSVCRT does not support UTF-8, I > take that at face value. > > Let me clarify then. See: > > https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale?view=msvc-170 > > With msvcrt, you cannot do a setlocale("en_US.UTF8"), with UCRT it works; > > Tcl doesn't support that either. The only setlocale() call is here: > < > https://core.tcl-lang.org/tcl/file?name=win/tclAppInit.c&ci=ead995eddf5fff98&ln=111 > > > > MSVCRT supports the "utf-8" _encoding_, not the "utf-8" _locale_, > that's a different thing > > Hope this clarifies enough. > > Happy hacking, > Jan Nijtmans > _______________________________________________ > Tcl-Core mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcl-core > -- 73 de ke9tv/2, Kevin |