Using gcc -Wpedantic will warn that #define of defined() is non-portable and this patch fixes this.
Two independent fixes: - need to prefix symbols referenced from asm with underscore; - need to undo the C-function prelude.