Next: , Previous: , Up: Top   [Index]

4 The POSIX interface

The POSIX functions are exported by the library (vicare posix). The API attempts to create a one–to–one Scheme functions mapping towards POSIX functions, keeping the same semantics as much as possible; the platform’s own documentation is relevant at the Scheme level. posix not for a list of POSIX functions not interfaced in this library, and reasons for not doing it.

To avoid name collisions with bindings exported by (vicare), when importing (vicare posix) it is mandatory to assign it a prefix as follows:

(import (vicare)
  (prefix (vicare posix) px.))

All the constants needed to use the interface are available as identifier syntaxes exported by the (vicare platform constants) library; if a constant value is not exported file a feature request for the project. If a constant is not defined on a platform: its value is set to #f.

The library (vicare platform features) exports one identifier syntax for each HAVE_ symbol defined by Vicare configure script, expanding to #t or #f.

The availability of the POSIX API can be tested at run–time with the function vicare-built-with-posix-enabled from (vicare) ((vicare-scheme)vicare-built-with-posix-enabled), and at expand–time with the clause posix-enabled of cond-expand from SRFI-0 (see posix-enabled).

Next: , Previous: , Up: Top   [Index]