use __asm__ instead of asm
add feature test macros for glibc
removed unused variable
prefer C89 comments