add -ansi flag to gcc/g++, eliminate use of typeof()
fix some casts, sign errors, initializations, stack arrays
fix a bunch of incomplete struct initializers
clean up headers to reduce warnings about _GNU_SOURCE
more cleanup of include directives; keyword use
#define _GNU_SOURCE in files that need it (instead of globally).