3 ms·
> Not having a standard-compliant libc seems really annoying There are several standard-compliant libc implementations (and C implementations in general) avail
by Joker_vD 4y ago
> Not having a standard-compliant libc seems really annoying
There are several standard-compliant libc implementations (and C implementations in general) available on Windows, pick any one that you fancy. And why should an OS even ship a default runtime for some random programming language anyhow? Just because it was written in that programming language so it gets a preferential treatment? That's breaking the abstraction layering.
- ilyt 4y agoIt already ships default runtimes... talk about something you know maybe ?
- mrpippy 4y agoIf you want to allow people to build curl using various different compilers (and old versions of them) on Windows, it needs to support all their libc’s. And at runtime, libcurl could find itself using a different libc from the application, so a buffer malloc’d in libc can’t be passed to free() by the app.
- Joker_vD 4y ago> And at runtime, libcurl could find itself using a different libc from the application, so a buffer malloc’d in libc can’t be passed to free() by the app. Yes, it's something anybody who has been seriously programming for Windows has been aware since forever. Which is why libraries and plugins generally expose FreeX() for every X they allocate and return.
- pjc50 4y ago> If you want to allow people to build curl using various different compilers (and old versions of them) on Windows, it needs to support all their libc’s. That sounds like a problem that could be solved by not doing that and picking one.
- spacechild1 4y ago> And at runtime, libcurl could find itself using a different libc from the application, so a buffer malloc’d in libc can’t be passed to free() by the app. That's a general issue with C plugins/libraries. You cannot even assume that objects are allocated with malloc() because the library might use its own memory allocator, object pool, etc.