Adding some preprocessor definitions
Signed-off-by: Paul Holden <paulholden2@gmail.com>

See commit diff for details (code comments)