Merge pull request #3 from stormc/master

added -Wextra compiler option and fixed warnings
Makefile: -D is preprocessor flag; defining _XOPEN_SOURCE=500 is enough for used functions

addresses #3