Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <09C1525B7197D3118A4D0008C7E6EEE00794C266@zuk28exm05.ecid.cig.mot.com> From: Zhabitsky Oleg-QOZ001 To: cygwin AT cygwin DOT com Subject: RE: ftell() bug Date: Thu, 28 Nov 2002 11:50:47 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" If you see to MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html /_crt_ftell.asp), you can find out: ============== Note that when a file is opened for appending data, the current file position is determined by the last I/O operation, not by where the next write would occur. For example, if a file is opened for an append and the last operation was a read, the file position is the point where the next read operation would start, not where the next write would start. (When a file is opened for appending, the file position is moved to end of file before any write operation.) If no I/O operation has yet occurred on a file opened for appending, the file position is the beginning of the file. ============== So, it is normal behaviour in your case. Kind regards, Zhabitsky Oleg > -----Original Message----- > From: Christopher Faylor [mailto:cgf-noreply AT cygwin DOT com] > Sent: Thursday, November 28, 2002 5:35 AM > To: cygwin AT cygwin DOT com > Subject: Re: ftell() bug > > > On Fri, Nov 22, 2002 at 10:53:56AM +0500, Serge P. Voronin wrote: > >I'm find a bug in ftell() while compiling with -mno-cygwin flag (see > >attachment). If we compile program without -mno-cygwin flag, then no > >bug present. > > Try compiling the program on linux or unix and see what you get. > You'll see that cygwin output from your program agrees with linux > or unix. IMO, the windows runtime that Mingw (-mno-cygwin) uses > is wrong. However, it doesn't really matter. Cygwin adheres to > UNIX conventions. > > Btw, in the future it would be better to 1) include your test case > as text. There is no reason to encode a text file. 2) describe > your problem rather than asking others to infer it. > > cgf > -- > Please do not send me personal email with cygwin questions or > observations. > Use the resources at http://cygwin.com/ . > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Bug reporting: http://cygwin.com/bugs.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/