libgreat
Documentation
libgreat provides a library intended to be linked at runtime by something akin to:
LD_LIBRARY_PATH=/path/to/libgreat LD_PRELOAD=libgreat_c89.so yourprogram
Environment
libgreat uses the following environment variables:
GREAT_PROBABILITY
to determine the probability an operation will succeed. If not set, this defaults to 0.5.
GREAT_RANDOM_SEED
to seed the internal PRNG used for failure probability. This is unrelated to srand() and rand() (and other standard random functions present in APIs).
GREAT_SUBSETS
to select which API subsets libgreat may intercept. This is either a single regexp, or a list delimited by non-special punctuation characters (I'd recommend /).
Regexps match against the form header:group:function. For example, stdlib:prng:rand represents rand() from <stdlib.h>. See SelectingSubsets for details.
Symbols
libgreat reserves everything beginning great_ or GREAT_.
Platforms
libgreat runs on POSIX. libgreat provides several APIs, including C89 and C99. libgreat is written in C99.
Compiling
To compile libgreat, check out the trunk and run make as follows:
svn co http://svn.water-powered.com/libgreat/trunk libgreat cd libgreat make CC=gcc