In particular, OpenBSD already defines __GNUC_PREREQ__, __BEGIN_DECLS, and __warn_references. Hiding the definitions behind #ifndef guards avoids warnings when building.
This gets rid of a warning on Mac OS X due to the fact that sys/cdefs.h defines it already.
Most macros were not actually used. This gets rid of warnings when building on Linux.