Changes between Version 3 and Version 4 of StandardAPI


Ignore:
Timestamp:
2017-04-09T10:59:40Z (8 years ago)
Author:
Jakub Jermář
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • StandardAPI

    v3 v4  
     1= Standard API =
     2
    13This 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.
    24
    3 '''General note:''' The primary aim of ''HelenOS C library'' is not a to be 100% compatible with the standards. For both many fundamental reasons (HelenOS is not an 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.
     5{{{#!box type=note
     6'''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.
     7}}}
    48
    5 == unistd.h ==
     9== Native Interfaces ==
     10
     11  * [wiki:FilesystemAPITutorial]
     12  * [wiki:NetworkAPITutorial]
     13  * [wiki:StringAPI]
     14
     15== Legacy Interfaces ==
     16
     17=== dirent.h ===
     18
     19|| '''Function''' || '''Based on'''         || '''Std Compliant''' ||
     20|| closedir       || POSIX-1.2001           || mostly              ||
     21|| opendir        || POSIX-1-2001           || mostly              ||
     22|| readdir        || POSIX-1.2001           || mostly              ||
     23|| rewinddir      || POSIX-1.2001           || mostly              ||
     24
     25=== stdio.h ====
     26
     27|| '''Function''' || '''Based on'''         || '''Std Compliant''' ||
     28|| clearerr       || POSIX-1.2001, C89, C99 || mostly              ||
     29|| fclose         || POSIX-1.2001, C89, C99 || mostly              ||
     30|| fdopen         || POSIX-1.2001           || mostly              ||
     31|| feof           || POSIX-1.2001, C89, C99 || mostly              ||
     32|| ferror         || POSIX-1.2001, C89, C99 || mostly              ||
     33|| fflush         || POSIX-1.2001, C89, C99 || mostly              ||
     34|| fgetc          || POSIX-1.2001, C89, C99 || mostly              ||
     35|| fgets          || POSIX-1.2001, C89, C99 || mostly              ||
     36|| fileno         || POSIX-1.2001           || mostly              ||
     37|| fopen          || POSIX-1.2001, C89, C99 || mostly              ||
     38|| fputc          || POSIX-1.2001, C89, C99 || mostly              ||
     39|| fputs          || POSIX-1.2001, C89, C99 || mostly              ||
     40|| fprintf        || POSIX-1.2001, C89, C99 || mostly              ||
     41|| fread          || POSIX-1.2001, C89, C99 || mostly              ||
     42|| freopen        || POSIX-1.2001, C89, C99 || mostly              ||
     43|| fseek          || POSIX-1.2001, C89, C99 || mostly              ||
     44|| ftell          || POSIX-1.2001, C89, C99 || mostly              ||
     45|| fwrite         || POSIX-1.2001, C89, C99 || mostly              ||
     46|| rewind         || POSIX-1.2001, C89, C99 || mostly              ||
     47|| setvbuf        || C89, C99               || mostly              ||
     48|| setbuf         || C89, C99               || mostly              ||
     49|| vfprintf       || POSIX-1.2001, C89, C99 || mostly              ||
     50|| ungetc         || POSIX-1.2001, C89, C99 || mostly              ||
     51
     52=== unistd.h ===
    653
    754Implemented functions (items marked wit D have been removed in the development version):
    855
    956|| '''Function''' || '''Based on'''         || '''Std Compliant''' || '''Note'''                                          ||
    10 || chdir (D)      || POSIX-1-2001           || mostly              ||                                                     ||
    11 || close (D)      || POSIX-1.2001           || mostly              ||                                                     ||
    12 || dup2 (D)       || POSIX-1.2001           || mostly              ||                                                     ||
    13 || exit           || POSIX-1.2001, C89, C99 || mostly              || should be defined in stdlib.h by POSIX              ||
    14 || fsync (D)      || POSIX.1-2001           || partially           || non-standard semantics                              ||
    15 || ftruncate (D)  || POSIX.1-2001           || partially           || the absolute offset is aoff64_t                     ||
    16 || getcwd (D)     || POSIX.1-2001           || mostly              ||                                                     ||
    17 || lseek (D)      || POSIX.1-2001           || partially           || relative offset is off64_t                          ||
    18 || read (D)       || POSIX.1-2001           || mostly              ||                                                     ||
    19 || rmdir (D)      || POSIX.1-2001           || mostly              ||                                                     ||
    2057|| sleep          || POSIX.1-2001           || mostly              ||                                                     ||
    21 || unlink (D)     || POSIX.1-2001           || mostly              ||                                                     ||
    2258|| usleep         || POSIX.1-2001           || mostly              || obsoleted and replaced by nanosleep in POSIX.1-2008 ||
    23 || write (D)      || POSIX.1-2001           || mostly              ||                                                     ||
    24 
    25 Unimplemented functions:
    26 
    27 TBD