Anonymous user
C Library: Difference between revisions
Jump to navigation
Jump to search
Added clarification of the term "freestanding"
[unchecked revision] | [unchecked revision] |
m (removed extra commas, added one bullet point) |
(Added clarification of the term "freestanding") |
||
Line 1:
{{stub}}
The ''C standard library'' provides basic functionality such as string manipulation, basic I/O, and memory allocation
There are three situations where you are likely to want to have one:
# If you want to have some traditional C functions that you can use inside your kernel (especially printf), then you will need to link a C library into your kernel when you build it.
# Most applications in userspace expect to be able to access traditional C support functions. These functions are usually supplied to userspace in the form of a "runtime C library", that can be dynamically linked into user applications at runtime.
# The C library header files are used extensively during C and C++ compilations.
==Versions==
The C standard describes two versions of
The <tt>__STDC_HOSTED__</tt> macro expands to <tt>1</tt> on hosted implementations, or <tt>0</tt> on freestanding ones. The freestanding headers are: <tt><float.h></tt>, <tt><iso646.h></tt>, <tt><limits.h></tt>, <tt><stdalign.h></tt>, <tt><stdarg.h></tt>, <tt><stdbool.h></tt>, <tt><stddef.h></tt>, <tt><stdint.h></tt>, and <tt><stdnoreturn.h></tt>.
Line 14 ⟶ 20:
There exists a myraid of implementations of the standard library avalible at your disposal.
There is a comparison table of some of these at: [http://www.etalabs.net/compare_libcs.html]
Line 31 ⟶ 37:
* Under active development, and not at full working release 1.0 yet
* Creative Commons Zero license (basically public domain)
* Good for linking into kernels
* [http://pdclib.e43.eu/ PDCLib website]
|