3 ms·
There are many, many implementations of the C standard library. Every OS has one—even Windows. There are also many other POSIX ( UNIX-like ) operating systems
by LeFantome 3y ago
There are many, many implementations of the C standard library. Every OS has one—even Windows.
There are also many other POSIX ( UNIX-like ) operating systems such as FreeBSD and OpenBSD which have their own.
Redox has a Rust-based C library called Relibc that even works on Linux.
There are also other C libraries that work on Linux such as dietLibc and of course Bionic, which is the standard C library on Android.
The problem is not the lack of a standard, it is that Glibc does not follow the standard and is itself the de facto choice for desktop Linux. Applications that assume Glibc may not work on other implementations ( like MUSL ).
- cycomanic 3y ago> The problem is not the lack of a standard, it is that Glibc does not follow the standard and is itself the de facto choice for desktop Linux. Applications that assume Glibc may not work on other implementations ( like MUSL ). That's incorrect Glibc does follow the relevant standards, you can simply restrict yourself to only use POSIX and C11, it's just that program authors find the glibc-extensions convenient enough to use them over just the bare standard. That said, some of the other libraries don't even claim to support the relevant standards, e.g. Bionic is not even fully POSIX compliant. So an application that assumes MUSL (which btw, also implements glibc, BSD and Linux extensions), can't use Bionic as a drop in replacement (not sure about Relibc).
- pjmlp 3y ago> Every OS has one—even Windows To note that this is only became a thing when the Universal C Runtime was introduced in Windows 10, until then is was pretty much "Every C compiler provides their own", which was the common approach on non-UNIX systems.