Specialise RETURN_VALUE macro into RETURN_{INT,STRING,POINTER}.

This avoids the need to pass the required format string on every
call and also eliminates the need for the non-standard typeof() call.
Revise debug macros to work in strict C99.
linux: Define feature macros to get required functions.

This is needed to build with -std=c99.
Compile with -pedantic.
linux: Fix warning by marking vid, pid variables unsigned.