While I was researching how fopen
and moreover the structure FILE
are built I found out it wasn't all just GNU libc
. I began to look closer at the various implementations such as Google's Bionic
, Musl
, Newlib
and several others. Having only been aware of Musl
and up until now my understanding was that it was just a more optimized version of gnu libc
. I hadn't given much thought about how, or if, they are allowed to differ and how they are possibly similar with the same respect.
Specifically how does the Posix and ANSI C
standard dictate the various implementations? Meaning are all fopen
and FILE
(all libc functions/structures) determined to be built more or less the same? Or is it that they are opaque and just held to the "standard" of operating the same (return values and interfaces exposed)?
Intuitively, I would think its as I have described but maybe Musl
is literally built more efficiently and optimized from compilation/linkage.
Any insight is greatly appreciated.