Hi,
The gcc used is TDM-GCC-64 (http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm64-gcc-5.1.0-2.exe/download). The Windows platform is Windows 10.
When I open a binary file in O_RDONLY mode, and then try to read it, the read() call returns "0" bytes even before reading the whole file.
I tried with O_RDONLY | O_BINARY mode, read() call reads few more bytes than without O_BIANRY mode but it still does not read the whole file. It returns "0" bytes even before reading the whole file.
I am attaching the source code (cat.c) and its executable (cat.exe) and a test binary file (cp.exe).
I compiled cat.c using: gcc -static cat.c -o cat.exe
Trying to read cp.exe: cat.exe cp.exe
BlueGem Technologies
Anonymous