| Anonymous | Login | Signup for a new account | 11-10-2008 10:49 PST |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
| 0000420 | [uClibc] Architecture Specific | major | always | 09-08-05 03:13 | 02-13-07 10:05 | ||||
| Reporter | stoecker | View Status | public | ||||||
| Assigned To | mjn3 | ||||||||
| Priority | normal | Resolution | fixed | ||||||
| Status | closed | Product Version | 0.9.27 | ||||||
| Summary | 0000420: ftell reports wrong position | ||||||||
| Description |
When opening a file with fopen(file, "a"), the data is appended correctly, but the file position is illegal. It is 0 at the start of writing, whereas it should be the file size The following example shows this problem. The numbers outputted should differ only by 1 and not by filesize as they do now. #include <stdio.h> int main(void) { FILE *fh; int i; fh = fopen("shit", "ab"); i = fseek(fh, 0, SEEK_END); fprintf(fh, "x"); printf("%d %d\n", i, ftell(fh)); fclose(fh); fh = fopen("shit", "ab"); fprintf(fh, "\n"); printf("%d %d\n", i, ftell(fh)); fclose(fh); return 0; } |
||||||||
| Additional Information | |||||||||
| Attached Files | |||||||||
|
|
|||||||||
| Copyright © 2000 - 2006 Mantis Group |