----- Original Message ----
> From: Eric Blake <e...@byu.net>
> To: cygwin@cygwin.com; sfand...@yahoo.com
> Sent: Fri, November 13, 2009 9:41:14 PM
> Subject: Re: [BUG] fopen(..., "a") does not seek to end of file until some
> write operation
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to Salvador Fandino on 11/13/2009 1:36 PM:
> > Hii
> >
> > Using ftell() after fopen(..., "a") returns 0 even when the file open for
> appending is not empty. AFAIK, it should return the size of the file.
>
> Not a bug. POSIX allows this behavior, and Linux does it as well.
In Linux (at least on the one I have installed, Ubuntu 9.10) ftell does not
return cero but the EOF offset:
sa...@leon:/tmp$ ./a.out
pos: 0
pos: 12
sa...@leon:/tmp$ ./a.out
pos: 12
pos: 24
sa...@leon:/tmp$ ./a.out
pos: 24
pos: 36
Cheers,
- Salva
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple