3 ms·
Reimplementing parts of the standard library is important for applications where you don't neccessarily have access to a standards-compliant libc (read Windows)
by dangerbird2 9y ago
Reimplementing parts of the standard library is important for applications where you don't neccessarily have access to a standards-compliant libc (read Windows), or if you have need custom malloc/free implementations. Similar techniques are used in automake and similar build generators to provide non-standard libc function implementations. precompiled headers can help with the fact that good portions of the header will be #ifdef'ed away.
- asveikau 9y agoI think you completely missed the point of what you're replying to. You can put those reimplentations in a different file. You don't have to expose the consumer of the library to them by jamming the whole thing, both interface and implementation, in a single header. This is like library design by the folks who mistakenly say that what they do with '#include <stdio.h>' is they are "including a library". Eg. Compile and link are the same thing in a lot of people's minds, I think increasingly these days as C expertise is diminishing.
- pjmlp 9y agoYeah it looks like they are afraid of touching a linker.
- banachtarski 9y agoI develop on linux primarily but occasionally windows also. The stdlib is totally fine! When did you last compile on Windows? 2011?
- pjmlp 9y agoAll Windows compilers have ANSI C compliant libraries.