Subject: Re: B19.1 ftell(), fseek() bug
From: [email-masked] (Steve Biskis)

15 May 1998 14:42:35 -0700
Message-ID: <[email-masked]>
Reply-To: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
To: "Carsten Roedel K8/DIC2 Tel. 4276" <[email-masked]>
Cc: <[email-masked]>

Simplest solution:

NEVER use fopen in text mode.
ONLY use fopen in binary mode.

da bisk

----------
> From: Carsten Roedel K8/DIC2 Tel. 4276 <[email-masked]>
> To: [email-masked]
> Subject: B19.1 ftell(), fseek() bug
> Date: Thursday, May 14, 1998 12:59 AM
> 
> I discovered a problem with ftell() and fseek() in cygwin32-B19.1 under
Win95.
> The problem is, when passing the position got from ftell() to fseek(),
> it does not end up at the same location!? Apparantly ftell does account
> the <cr>/<lf> in the byte stream, where fseek does NOT! It seems that
> fseek skips the <cr> bytes. I think that the ftell behaviour is correct,
> it should always tell the correct position in any byte stream, as it
does.
> But, however, it is obvious that ftell and fseek must match together to
> be compatible. 
> 
> As I must get cvs/rcs run on my machine (that's where I discovered the
wrong 
> behavior) I can't wait for a patch. Could someone give me a hint how to
continue?
> Is it worth to load the source code and try to compile gnu-win32 by
myself?
> 
> Any help would be appreciated
> 
> Carsten
> :-) Always remember to keep smiling
> -
> For help on using this list (especially unsubscribing), send a message to
> "[email-masked]" with one line of text: "help".
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".