EOF not defined for Ubuntu build, so included cstdio
Merge remote-tracking branch 'upstream/master'