Anonymous user
C Library: Difference between revisions
Jump to navigation
Jump to search
Improved the Types section (and changed its name to the more appropriate Versions) as there were complaints on the discussion page.
[unchecked revision] | [unchecked revision] |
(Added details, fixed PDClib url, fixed broken urls.) |
(Improved the Types section (and changed its name to the more appropriate Versions) as there were complaints on the discussion page.) |
||
Line 3:
The ''C standard library'' provides basic functionality such as string manipulation, basic I/O, and memory allocation. Whether you're writing a kernel in C or you plan on supporting existing C programs, you'll want to use it.
==
The C standard describes two versions of the
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>. Note that not all their functionality is available in the freestanding mode.
GCC defaults to a hosted implementation, but can switch to a freestanding one with the <tt>-ffreestanding</tt> argument.
==Implementations==
|