Hacker News new | ask | show | jobs
by kazinator 1121 days ago
> The C runtime is privileged because it is already present on all 3 desktop OSes.

Yes, Ubuntu, Debian and Fedora.

On Windows, you don't get a C run time; you ship a MS Visual Studio run-time DLL if you're using Microsoft's tools (and not static linking), or something else with someone else's tools; maybe a CYGWIN1.DLL or whatever.

You get platform libraries like kernel32.dll and user32.dll; but those are not a C run-time. They are easy to call from C, but other than that, they are the OS run time.

Recently Microsoft has made an effort to create a "Universal C Run Time" for Windows; but I think you still have to download and ship that, and there may be reasons for someone to choose a different run-time. (E.g. needing a pretty detailed POSIX implementation.)

1 comments

I thought msvcrt shipped with windows as early as XP; was I wrong?
Even earlier; but that's a private system library you're not supposed to use.

Raymond Chen explains it: https://devblogs.microsoft.com/oldnewthing/20140411-00/?p=12...

Microsoft's new Universal C Run Time addresses the problem of there not being a C library on Windows that is for public use (every compiler vendor providing their own).