Changes in uspace/lib/libc/generic/io/io.c [ed903174:c77a64f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/io/io.c
red903174 rc77a64f 541 541 } 542 542 543 int fseek(FILE *stream, off64_t offset, int whence)544 { 545 off 64_t rc = lseek(stream->fd, offset, whence);546 if (rc == (off 64_t) (-1)) {547 /* errno has been set by lseek 64. */543 int fseek(FILE *stream, long offset, int origin) 544 { 545 off_t rc = lseek(stream->fd, offset, origin); 546 if (rc == (off_t) (-1)) { 547 /* errno has been set by lseek. */ 548 548 return -1; 549 549 } … … 554 554 } 555 555 556 off64_t ftell(FILE *stream) 557 { 558 return lseek(stream->fd, 0, SEEK_CUR); 556 int ftell(FILE *stream) 557 { 558 off_t rc = lseek(stream->fd, 0, SEEK_CUR); 559 if (rc == (off_t) (-1)) { 560 /* errno has been set by lseek. */ 561 return -1; 562 } 563 564 return rc; 559 565 } 560 566
Note:
See TracChangeset
for help on using the changeset viewer.