[BUG] fopen(..., "a") does not seek to end of file until some write operation

2009-11-13 Thread Salvador Fandino
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. Compile and run the attached program several times to see it happening. Cheers, - Salva cygcheck.out Description: Binary data #include int ma

Re: [BUG] fopen(..., "a") does not seek to end of file until some write operation

2009-11-13 Thread Eric Blake
-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,

Re: [BUG] fopen(..., "a") does not seek to end of file until some write operation

2009-11-13 Thread Roger K. Wells
Eric Blake wrote: -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

Re: [BUG] fopen(..., "a") does not seek to end of file until some write operation

2009-11-13 Thread Salvador Fandino
- Original Message > From: Eric Blake > 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 S

Re: [BUG] fopen(..., "a") does not seek to end of file until some write operation

2009-11-13 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Salvador Fandino on 11/13/2009 1:55 PM: >> 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: Ok, so "a" a

Re: [BUG] fopen(..., "a") does not seek to end of file until some write operation

2009-11-13 Thread Dave Korn
Eric Blake wrote: > According to Salvador Fandino on 11/13/2009 1:36 PM: >> 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.

Re: [BUG] fopen(..., "a") does not seek to end of file until some write operation

2009-11-14 Thread Corinna Vinschen
On Nov 14 02:19, Dave Korn wrote: > Eric Blake wrote: > > > According to Salvador Fandino on 11/13/2009 1:36 PM: > > >> 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