Bug#175755: fopen does not positions the stream at the end of the file in mode a+

2003-01-08 Thread Ander
El mié, 08-01-2003 a las 05:10, GOTO Masanori escribió:
 At 07 Jan 2003 23:02:03 +0100,
 Ander wrote:
  Package: libc6
  Version: 2.3.1-8
  Severity: critical
  
  Opening a file with fopen in mode a+ will position the stream at the
  begining of the file and not at the end.
  
  I am using Debian GNU/Linux testing/unstable, kernel 2.4.19 and libc6
  2.3.1-8
  
 
 Send us minimal test program.
 You have to check below test.  You find it works fine.
 
I have check your test and it works, but check this one:

#include stdio.h

int main(void)
{
FILE *archivo;
int pos;

archivo=fopen(main.c,a+);
pos=ftell(archivo);
printf(file pos after opening: %i\n,pos);
fseek(archivo,0,SEEK_SET);
pos=ftell(archivo);
printf(file pos after SEEK_SET: %i\n,pos);
fseek(archivo,0,SEEK_END);
pos=ftell(archivo);
printf(file pos after SEEK_END: %i\n,pos);
fclose(archivo);

return 0;
}

-- 

Ander Lozano Pérez
[EMAIL PROTECTED]
http://perso.wanadoo.es/ander1 - http://diasce.es.gnome.org



signature.asc
Description: Esta parte del mensaje esta firmada digitalmente


Bug#175755: fopen does not positions the stream at the end of the file in mode a+

2003-01-07 Thread Ander
Package: libc6
Version: 2.3.1-8
Severity: critical

Opening a file with fopen in mode a+ will position the stream at the
begining of the file and not at the end.

I am using Debian GNU/Linux testing/unstable, kernel 2.4.19 and libc6
2.3.1-8




signature.asc
Description: Esta parte del mensaje esta firmada digitalmente


Bug#175755: fopen does not positions the stream at the end of the file in mode a+

2003-01-07 Thread GOTO Masanori
At 07 Jan 2003 23:02:03 +0100,
Ander wrote:
 Package: libc6
 Version: 2.3.1-8
 Severity: critical
 
 Opening a file with fopen in mode a+ will position the stream at the
 begining of the file and not at the end.
 
 I am using Debian GNU/Linux testing/unstable, kernel 2.4.19 and libc6
 2.3.1-8
 

Send us minimal test program.
You have to check below test.  You find it works fine.

gotom:~ cat 175755.c 
#include stdio.h

main() 
{
FILE *fp;

fp = fopen(/tmp/aaa, a+);

fwrite(a\n, 1, 2, fp);
}
gotom:~ cat /tmp/aaa
---
gotom:~ gcc 175755.c 
gotom:~ ./a.out 
gotom:~ cat /tmp/aaa
---
a
gotom:~ 


-- gotom


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Bug#175755: fopen does not positions the stream at the end of the file in mode a+

2003-01-07 Thread Ander
Package: libc6
Version: 2.3.1-8
Severity: critical

Opening a file with fopen in mode a+ will position the stream at the
begining of the file and not at the end.

I am using Debian GNU/Linux testing/unstable, kernel 2.4.19 and libc6
2.3.1-8



signature.asc
Description: Esta parte del mensaje esta firmada digitalmente


Bug#175755: fopen does not positions the stream at the end of the file in mode a+

2003-01-07 Thread GOTO Masanori
At 07 Jan 2003 23:02:03 +0100,
Ander wrote:
 Package: libc6
 Version: 2.3.1-8
 Severity: critical
 
 Opening a file with fopen in mode a+ will position the stream at the
 begining of the file and not at the end.
 
 I am using Debian GNU/Linux testing/unstable, kernel 2.4.19 and libc6
 2.3.1-8
 

Send us minimal test program.
You have to check below test.  You find it works fine.

gotom:~ cat 175755.c 
#include stdio.h

main() 
{
FILE *fp;

fp = fopen(/tmp/aaa, a+);

fwrite(a\n, 1, 2, fp);
}
gotom:~ cat /tmp/aaa
---
gotom:~ gcc 175755.c 
gotom:~ ./a.out 
gotom:~ cat /tmp/aaa
---
a
gotom:~ 


-- gotom