Functional Style Preprocessor Macros

The C preprocessor has a deservedly poor reputation as a means to define function-like code. However there aren’t many guaranteed alternatives for trivial code generation without resorting to external tools. I’ve been making use of it for some time to iterate over lists of types when manually instantiating …

more ...

Debugging with Library Interposition

At some point when debugging one will encounter a scenario where it is desirable to modify or observe an application’s interaction with an external library (or the system). Various techniques are available, but few are quite as straightforward as ‘library interposition’: the practice of overriding references to symbols from …

more ...

Cross platform unit testing with Wine and Autotools

My current project targets the Windows and Linux operating systems. Development is primarily under Linux and uses the Autotools build system. Windows binaries are generated with the mingw cross compilers. This setup isn’t for everyone, but it suits me quite well.

For my testing needs I use Automake’s …

more ...