Some functions and function families
Error related functions such as
perror()
With the
<stdarg.h>
include file, it is possible to access variadic arguments in functions.
gets / fgets
gets()
reads a line, terminated by a new line or EOF. For this reason, gets
should almost never be used because in normal circustances, it's impossible to know in advance how long the line will be.
fgets()
reads from a file rather than from
stdin and allows to specify the maximum amount to be read.
syscall
// #define _GNU_SOURCE
#include <unistd.h>
#include <sys/syscall.h>
int main() {
//
// Write some text to STDOUT (1). The lenght of the
// text is 12 (last paramter).
//
syscall(SYS_write, 1, "Hello World\n", 12);
}
Links
dietlibc is a libc that is optimized for small size.
uClibc-ng is a small C library for developing embedded Linux systems. Although (much) smaller than the GNU C Library, nearly all applications supported by glibc also work perfectly with uClibc-ng.
It appears to me that uClibc-ng is somewhat related to
µClibc.
klibc is developed and maintained by Linux kernel developers.
picolibc is a set of standard C libraries, both libc and libm, designed for smaller embedded systems with limited ROM and RAM.
Cosmopolitan Libc creates executables from C sources that can be run natively on Linux, Mac, Windows and other platforms
without a virtual machine or interpreter.
(… but with Apple moving to arm64, it might not be running here anymore?)