Added -std=c99 for gcc, checked for errors under GCC.