gcc doesn't have cxx flag ferror-limit
added missing includes for linux
fixed case