remove unused headers and functions
-std=c99 -> -std=gnu99