Mail Archives: djgpp-workers/2001/08/20/00:11:16
> I am just about to go to bed and thought I should send this now and work on
> it tomorrow night. It appears that when I open STDIN as a file and set the
> file position to zero it really goes to the third character in the input
> stream. The input stream is a file that I pipe in usign the "<". I have
> included a sample program below that shows the problem. If the test file is
> "1234567890ABCDEF" then the test program reads the "34567" characters on Win
> 2K, but on Win 98 with the same EXE it reads the "12345" characters.
Interesting observations:
1) I build this, and I see the same problem on W2K and XP
2) Same binary, if I set lfn=n then it works fine.
3) Same source, but built with V2.03 library works.
So, it appears related to LFN stuff, and it appears it was broken after V2.03.
If I remove the fseek(pfp, 0, Seek_set) there is no change in the strange
behavior.
If I remove the fstat at the beginning of this code (and hardwire pfp) the
problem goes away. I'm guessing we are reading the magic number in fstat
and the pointer isn't getting set correctly?
- Raw text -