This topic was published by DevynCJohnson and viewed 971 times since "". The last page revision was "".
- Topics - 444
Many C Standard Libraries are available for Linux. A "C Standard Library" is a set of programming libraries that follow the ANSI C Standard. The C Standard Library may also be called the "ISO C Library" due to its standardization. Even though the libraries are standardized, variations may exist to support special needs as discussed in this article. For instance, each Standard C Library provides different memory allocation and operating system services.
C Standard Libraries offer ready-made functions and other code. For instance, the math library offers functions for various mathematics such as cosine, square root, etc. When using a standard library, the functions are expected to perform the same task, although they may act differently. For instance, the tangent math function (tan) will return the same tangent of a particular number no matter which C Standard Library is used. However, the internal code will run differently depending on the library's goal.
The C POSIX Library (http://en.wikipedia.org/wiki/C_POSIX_library) is a library specification specifically for POSIX systems and functions.
Linux applications typically use the GNU C Library (glibc). This is a C Standard Library designed for the GNU userland (as seen in GNU/Linux and GNU Hurd). This library follows the POSIX and Unix standards as well as parts of other standards (such as BSD and the System V Interface Definition). C++ is also supported by glibc. Embedded GLIBC (EGLIBC) is a discontinued project that was going to make a variant of glibc for embedded Linux systems (https://www.gnu.org/software/libc/).
Bionic (https://android.googlesource.com/platform/bionic.git) is a C Standard Library used in Android systems. Bionic is similar to libc which is the C Standard Library used by BSD systems. Bionic is developed by Google and others and is licensed under the 3-clause BSD License. Bionic is perfect for Android due to its small size. It is smaller than glibc and uclibc. In addition, the library is specifically designed for CPUs with low clock speeds, as seen in many Android phones. Bionic usually uses the "jemalloc" memory allocator. Like anything, Bionic is not perfect. It does not support wide characters or C++ exception handling. Glibc (GNU C Library) based Linux distros can use Bionic-based applications thanks to the Hybris (libhybris) compatibility layer. Hybris works by converting Bionic syscalls to glibc syscalls.
dietlibc (http://www.fefe.de/dietlibc/) is a cross-platform C Standard Library that is an alternative to uClibc. The library is very lightweight and may not contain all of the functions offered by uClibc. DietLinux is a discontinued distro that was based on dietlibc. dietlibc is licensed under the GPL license.
klibc (ftp://ftp.kernel.org/pub/linux/libs/klibc/) is a small C Standard Library designed by Hans Peter Anvin for the Linux start-up process (bootstrap). klibc is commonly used in the initial RAM file systems of Debian and Ubuntu. klibc may also be found in nfsmount, the Dash shell, cpio, and other Unix utilities.
NOTE: This Hans Peter Anvin is the same person that made the SYSLinux bootloader.
musl (http://www.musl-libc.org/) is a C Standard Library designed for embedded Linux systems and optimized for static linking. The library is licensed under the MIT License and made by Rich Felker. musl is fast, lightweight, and POSIX compliant.
Newlib (https://www.sourceware.org/newlib/) is a cross-platform C Standard Library for embedded systems. Newlib is commonly used on homebrew software for various gaming systems such as the Gameboy Advanced, Sony's PlayStation Portable (PSP), the Nintendo DS, Nintendo's Wii, and Nintendo's GameCube. Newlib is also used as the Standard C Library in Cygwin. Newlib is made and maintained by RedHat.
uClibc (or μClibc) is a C Standard Library designed for embedded Linux systems and mobile Linux systems (http://uclibc.org/). Most Linux applications can be ported from glibc to uClibc by recompiling the software with uClibc instead of glibc. Openmoko (http://wiki.openmoko.org) is a mobile Linux distro that uses glibc.
uClibc++ (or μClibc++) is a C++ Standard Library form of uClibc (http://cxx.uclibc.org/).
MS-Windows uses its own set of C-libraries.
- uClibc vs glibc - http://oopsmonk.blogspot.com/2011/01/uclibc-and-glibc-differences.html
- Library Comparisons - http://www.etalabs.net/compare_libcs.html
- Standard C Library Headers - http://dcjtech.info/topic/standard-c-library-headers/
- Linux Libraries (Paths, Files, and Commands) - http://dcjtech.info/topic/linux-libraries-paths-files-and-commands/
- Cairo Graphics Library - http://dcjtech.info/topic/cairo-graphics-library/
- Newlib Documentation - https://www.sourceware.org/newlib/libc.html