Standard API
This document serves as an overview of HelenOS standard user space API implemented in HelenOS C library and the relation of this API to common standards such as "C Standard Library" (as defined by various ISO C standards, such as C99) and C POSIX Library standards.
General note: The primary aim of HelenOS C library is not to be 100% compatible with the standards. For both many fundamental reasons (HelenOS is not a unix-like operating system) and practical reasons (our subjective dislike of some aspects of the standards, security issues, etc.) the HelenOS C library follows the standards very loosely. Many functions are not implemented because lack of current need or simple because lack of manpower and many functions closely resemble their standard-compliant counterparts, but behave very slightly differently. In an increasing number of cases, a part of the legacy standard-compliant interfaces is replaced by HelenOS native ones.
Native Interfaces
Legacy Interfaces
dirent.h
| Function | Based on | Std Compliant |
| closedir | POSIX-1.2001 | mostly |
| opendir | POSIX-1-2001 | mostly |
| readdir | POSIX-1.2001 | mostly |
| rewinddir | POSIX-1.2001 | mostly |
stdio.h
| Function | Based on | Std Compliant |
| clearerr | POSIX-1.2001, C89, C99 | mostly |
| fclose | POSIX-1.2001, C89, C99 | mostly |
| fdopen | POSIX-1.2001 | mostly |
| feof | POSIX-1.2001, C89, C99 | mostly |
| ferror | POSIX-1.2001, C89, C99 | mostly |
| fflush | POSIX-1.2001, C89, C99 | mostly |
| fgetc | POSIX-1.2001, C89, C99 | mostly |
| fgets | POSIX-1.2001, C89, C99 | mostly |
| fileno | POSIX-1.2001 | mostly |
| fopen | POSIX-1.2001, C89, C99 | mostly |
| fputc | POSIX-1.2001, C89, C99 | mostly |
| fputs | POSIX-1.2001, C89, C99 | mostly |
| fprintf | POSIX-1.2001, C89, C99 | mostly |
| fread | POSIX-1.2001, C89, C99 | mostly |
| freopen | POSIX-1.2001, C89, C99 | mostly |
| fseek | POSIX-1.2001, C89, C99 | mostly |
| ftell | POSIX-1.2001, C89, C99 | mostly |
| fwrite | POSIX-1.2001, C89, C99 | mostly |
| rewind | POSIX-1.2001, C89, C99 | mostly |
| setvbuf | C89, C99 | mostly |
| setbuf | C89, C99 | mostly |
| vfprintf | POSIX-1.2001, C89, C99 | mostly |
| ungetc | POSIX-1.2001, C89, C99 | mostly |
unistd.h
Implemented functions (items marked wit D have been removed in the development version):
| Function | Based on | Std Compliant | Note |
| sleep | POSIX.1-2001 | mostly | |
| usleep | POSIX.1-2001 | mostly | obsoleted and replaced by nanosleep in POSIX.1-2008 |
