added config.h to define improved macros for platforms.

All source files have been updated to use the new macros