norlit-libc is a C library for x86 and x64.
norlit-libc is designed to conform to ISO C standard as well as those defined POSIX standard in the standard headers. norlit-libc do not intend to support other POSIX-specific headers, but may create stubs for them since they are not available in freestanding environment.
Header | Status |
---|---|
<assert.h> | Implemented1 |
<complex.h> | Not supported2 |
<ctype.h> | Implemented |
<errno.h> | Implemented |
<fenv.h> | Under consideration |
<float.h> | Freestanding |
<inttypes.h> | Implemented |
<iso646.h> | Freestanding |
<limits.h> | Freestanding |
<locale.h> | Implemented |
<math.h> | 27/69 (ISO C), 0/6 (POSIX)3 |
<setjmp.h> | Implemented (ISO C) 2/4 (POSIX)4 |
<signal.h> | Stub |
<stdalign.h> | Freestanding |
<stdarg.h> | Freestanding |
<stdatomic.h> | Freestanding5 |
<stdbool.h> | Freestanding |
<stddef.h> | Freestanding |
<stdint.h> | Freestanding |
<stdio.h> | 24/46 (ISO C), 3/22 (POSIX) |
<stdlib.h> | Implemented (ISO C)6 4/27 (POSIX)7 |
<stdnoreturn.h> | Freestanding |
<string.h> | Implemented |
<tgmath.h> | Freestanding8 |
<threads.h> | Not supported9 |
<time.h> | Under consideration |
<uchar.h> | Not supported10 |
<wchar.h> | Not supported11 |
<wctype.h> | Not supported12 |
- Macros in errno.h and signal.h should be system dependent, extract them to include/sys in some way
- stdio.h
norlit-libc currently has no need for uchar and legacy wchar support. Related functions are defined but not implemented. Here is the list.
- <uchar.h>, <wchar.h> and <wctype.h>
- mblen, mbtowc, wctomb
- mbstowcs, wcstombs
- From <inttypes.h>: wcstoimax, wcstoumax
norlit-libc currently has no need for multi-threading, so thread-safe is not concerned. If future support for thread-safety is needed, convert all static variables to thread-local storage or add locks to them. Reentrancy support is also not considered currently.
norlit-libc currently has no need for locale, so only C/POSIX locale is supported. When implementing norlit-libc, functions use current locale will be redirected to *_l functions by first retrieving locale by uselocale((locale_t)0). *_l will do the job instead. To support multiple locale, simply reimplement all files under src/locale
No debug message is available yet↩
Conditional features are not in priority↩
Floating point numbers-related functions may have larger margin of error than expected↩
Current there is only x86 support↩
In GCC it is available in freestanding environment, though C11 does not require it↩
system
is a stub and will abort on call↩long double <-> string conversion is approximated with double <-> string conversion↩
In GCC it is available in freestanding environment, though C11 does not require it↩
Conditional features are not in priority↩
Intended, but violate the standard↩
Intended, but violate the standard↩
Intended, but violate the standard↩