C Library: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
→Versions: fare-well edit. ;-) |
m removed extra commas, added one bullet point |
||
Line 5: | Line 5: | ||
==Versions== |
==Versions== |
||
The C standard describes two versions of the standard library: the |
The C standard describes two versions of the standard library: the complete hosted library and the freestanding one, providing only a subset of the hosted library that doesn't need to interact with the environment. System software should typically use the former, while applications should have the latter available. |
||
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>. |
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 20: | Line 20: | ||
===Newlib=== |
===Newlib=== |
||
* The license is unrestricted (not GPL or LGPL), but each file likely has a different copyright notice. |
* The license is unrestricted (not GPL or LGPL), but each file likely has a different copyright notice. |
||
* Requires threading, so is more appropriate for a runtime library |
|||
* [http://sourceware.org/newlib/ newlib website] |
* [http://sourceware.org/newlib/ newlib website] |
||