This patch fixes the failure caused by the posix lseek and read versions under windows in cdf_read() . Additionally all the occurences of lseek and read was replaced by _lseek and _reed for windows.