Mail Archives: cygwin/1998/06/17/15:21:06
At 10:27 PM 6/15/98 -0700, Christopher Donham wrote:
>Hi all,
> A quick question. I seem to be having trouble getting
>fseek to work. For some reason after about 900 bytes,
>fseek ceases to go to the correct point in the file. To
>demonstrate the problem, I have included a test file at
>the end of this message. Uudecode, ungzip, and untar the
>file and then type "make". You will get a program called
>"test". To run the test, type "test test.c". The program
>will read in the file test.c and then try to fseek to every
>byte within the file. It compares the contents of the
>file against the next byte read after an fseek. It prints
>an error if the comparison fails. On my unix machine,
>this program always succeeds. On my NT4 SP3 B19 machine,
>it fails at approximately byte 950 (changes from file to
>file). Any thoughts? What am I doing wrong?
>
>Thanks for any help.
>
>Chris
>
>P.S. Note that you have to delete the ^M's to compile on
>a unix machine.
Sounds to me like you have the old binary/text file problem. I actually
didn't even look at your code but I did try your example and it worked
fine for me on NT4+sp3 and b19.x. I expect the big difference between
my system and yours is binary mounts. Either make this change or force
your code to treat files as binary...
Larry Hall lhall AT rfk DOT com
RFK Partners, Inc. (781) 239-1053
8 Grove Street (781) 239-1655 - FAX
Wellesley, MA 02181 http://www.rfk.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -