remove stray safe_strncpy definition
replace {s,u}int{8,16,32,64} by C99 types
cleanup EXTERN and [U]INT*_MAX macros
fix bit shift warning
replace old fixed width integral type
remove EXTERN usage