libskarnet
skalibs
Software
www.skarnet.org
The stddjb library interface
libstddjb is the base, and the most important part, of skalibs.
It is a set of general-purpose C functions wrapping some
system calls, hiding some Unix portability problems, providing some
basic low-level buffering functions and string handling, and generally
offering a nice API to Unix programming - in many ways nicer and safer
than the "standard" Unix APIs like stdio.h.
It is mostly based on some excellent code written and placed into the
public domain by D. J. Bernstein.
Compiling
- The libstddjb functions are available under the skalibs/stddjb.h
header, which includes a lot of lower-level headers. If you know what
lower-level headers to use, you might speed up your compilation process by
including them directly.
Programming
The following headers are automatically generated at compile-time, when the
headers subsystem is made. The skalibs/stddjb.h file also
includes them.
- skalibs/uint16.h: operations with 16-bit unsigned integers
- skalibs/uint32.h: operations with 32-bit unsigned integers
- skalibs/uint64.h: operations with 64-bit unsigned integers
- skalibs/ushort.h: portable helpers for the "unsigned short" basic type
- skalibs/uint.h: portable helpers for the "unsigned int" basic type
- skalibs/ulong.h: portable helpers for the "unsigned long" basic type
- skalibs/error.h: portable macros for errno management
- skalibs/gidstuff.h: helpers for the "gid_t" type
- skalibs/setgroups.h: stub for the setgroups() function, for systems that do not define it
- skalibs/ip46.h: IPv4/IPv6 abstraction layer
Additionally, stddjb.h also includes the following headers, which
are not associated with any code and are mostly self-explanatory:
- skalibs/gccattributes.h: wrappers around a few GCC-specific optimizations
- skalibs/diuint.h: for associative arrays of unsigned integers
- skalibs/diuint32.h: for associative arrays of 32-bit unsigned integers
- skalibs/environ.h: declaration of the environ variable
- skalibs/nsig.h: the number of system signals, for systems that do not define it
- skalibs/nonposix.h: feature test macros for non-POSIX-compliant systems
- skalibs/siovec.h:
iovec-like
structure for scatter/gather IO operations