what is libc?
freebsd at edvax.de
Tue Jan 15 11:03:48 UTC 2019
On Tue, 15 Jan 2019 10:33:12 GMT, iam at sdf.org wrote:
> what is libc exactly? is it the only interface between userland
> and the kernel? or does libc do something more? if yes, may i know
> what other functions does libc perform?
The libc, "C standard library", is the system's default C library.
It provides "wrappers" for kernel calls as well as extended
functions specified by the C standard. It serves as the common
programming interface for application development.
Among the "wrappers", it also contains standardized (!) functions
for string handling, error reporting, signal handling, or tools
to deal with date and time. The behaviour of those functions is
specified by the C language standard, which makes it a portable
> also, if suppose the userland were to be written in say "rust",
> would it theoretically be possible to write libc in "rust", and
> then would it have to be called "librust"?
That is probably possible. A "Rust standard library", if it wanted
to mimic what libc provides, would have to implement the content
and functionality of libc in Rust, providing the appropriate
interfaces for that particular language.
> if libc isn't only about "c", why isn't it called libsys?
Because it contains what the _C_ language standard specifies.
However, you _can_ interface it from a different language and
call its functions, but that doesn't change the fact of its
nature and heritage. :-)
> appreciate pointers to material to read to understand the above
> in more depth than is possible via email.
You can find a general description here:
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions