Re: [Mingw-w64-public] SOLVED Short read mystery

2013-10-16 Thread Edscott Wilson
I appreciate all the responses. This is the result. 1. The option O_BINARY is not available in fcntl.h for gcc, So open(test.dbh, O_RDWR|O_BINARY) does not work. 2. Neither will the unix2dos program work since the file to open is a binary file which must be read byte by byte. 3. fopen(test.dbh,

Re: [Mingw-w64-public] SOLVED Short read mystery

2013-10-16 Thread Ruben Van Boxem
2013/10/16 Edscott Wilson edscott.wilson.gar...@gmail.com I appreciate all the responses. This is the result. 1. The option O_BINARY is not available in fcntl.h for gcc, So open(test.dbh, O_RDWR|O_BINARY) does not work. See MSDN for the flags you are looking for:

Re: [Mingw-w64-public] SOLVED Short read mystery

2013-10-16 Thread niXman
Edscott Wilson писал 2013-10-16 18:53: ... Since I require use of lseek() ... man fseek -- Regards, niXman ___ Dual-target(32 64-bit) MinGW compilers for 32 and 64-bit Windows: http://sourceforge.net/projects/mingw-w64/

Re: [Mingw-w64-public] SOLVED Short read mystery

2013-10-16 Thread Edscott Wilson
2013/10/16 Ruben Van Boxem vanboxem.ru...@gmail.com 2013/10/16 Edscott Wilson edscott.wilson.gar...@gmail.com I appreciate all the responses. This is the result. 1. The option O_BINARY is not available in fcntl.h for gcc, So open(test.dbh, O_RDWR|O_BINARY) does not work. See MSDN for

Re: [Mingw-w64-public] SOLVED Short read mystery

2013-10-16 Thread Edscott Wilson
You are absolutely right. I took a look into fcntl.h and there it was. Apparently my configure script is defining NO_OLDNAMES and not defining _POSIX. I dunno why. But the _O_BINARY option works just fine and allows me to avoid the hack with fopen/fileno. Thanks a bunch. Now I can go ahead and