Apache Portable Runtime
The Apache Portable Runtime (APR) is a set of functions designed to abstract common I/O functions in a crossplatform manner. We primarily use it for threading and socket i/o. This is actually three packages, apr, apr-util and apr-iconv.
The source and further documentation is available at http://apr.apache.org/
What is the APR?
As described in the [Wikipedia article] about the APR:
The Apache Portable Runtime (APR) is a supporting library for the Apache web server. It provides a set of APIs that map to the underlying operating system. Where the OS doesn't support a particular function, APR will provide a replacement. Thus, the APR can be used to make a program truly portable across platforms.
The APR was originally a part of Apache, but has now been spun off into a separate project of the Apache Software Foundation, and is used by other applications to achieve platform independence.
The range of platform-independent functionality provided by APR includes:
- Memory allocation and memory pool functionality
- Atomic operations
- Dynamic library handling
- File I/O
- Command argument parsing
- Locking
- Hash tables and arrays
- Mmap functionality
- Network sockets and protocols
- Thread, process and mutex functionality
- Shared memory functionality
- Time routines
- User and group ID services
Comparison of APR and other client file storage methods
- A table showing where the APR and other procedural file storage methods are used in the client source can be found here: Local data storage methods used in the viewer