You might also want to check out the iMatix SFL, to quote their webpage:
The SFL (Standard Function Library) from iMatix is a portable function
library for C/C++ programs. The SFL is the result of many years' development,
and is provided as Open Source software for the benefit of the
Internet community.
The SFL is written in ANSI C and has been ported to MS-DOS, Windows, OS/2, Linux
and other UNIX systems (IBM AIX, SunOS, HP/UX, Solaris, NetBSD, FreeBSD,
SCO OpenServer,> Digital UNIX) and Digital OpenVMS. It comes with complete sources and
documentation in HTML.
The SFL provides about 450 functions that cover these areas:
- Compression, encryption, and encoding;
- Datatype conversion and formatting;
- Dates, times, and calendars;
- Directory and environment access;
- User and process groups;
- Inverted bitmap indices;
- Symbol tables;
- Error message files;
- Configuration files;
- String manipulation and searching;
- File access;
- Internet socket access;
- Internet programming (MIME, CGI);
- SMTP (e-mail) access;
- Server (batch) programming;
- Program tracing.
The SFL is free software that you may use and distribute for private or commercial
purposes according to the SFL License Agreement.
More details about the API itself, see here.