Changeset 2b3dd78 in mainline for uspace/lib/c/generic/io/io.c


Ignore:
Timestamp:
2018-01-31T12:02:00Z (7 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5595841
Parents:
a0a9cc2 (diff), 14d789c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'upstream/master' into forwardport

change tmon includes because of new stdlib

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/io.c

    ra0a9cc2 r2b3dd78  
    799799}
    800800
    801 int fseek(FILE *stream, long offset, int whence)
     801int fseek64(FILE *stream, off64_t offset, int whence)
    802802{
    803803        errno_t rc;
     
    814814        stream->ungetc_chars = 0;
    815815
    816         struct stat st;
     816        vfs_stat_t st;
    817817        switch (whence) {
    818818        case SEEK_SET:
     
    837837}
    838838
    839 long ftell(FILE *stream)
    840 {
    841         /* The native position is too large for the C99-ish interface. */
    842         if (stream->pos - stream->ungetc_chars > LONG_MAX)
    843                 return EOF;
    844 
     839off64_t ftell64(FILE *stream)
     840{
    845841        if (stream->error)
    846842                return EOF;
     
    853849
    854850        return stream->pos - stream->ungetc_chars;
     851}
     852
     853int fseek(FILE *stream, long offset, int whence)
     854{
     855        return fseek64(stream, offset, whence);
     856}
     857
     858long ftell(FILE *stream)
     859{
     860        off64_t off = ftell64(stream);
     861
     862        /* The native position is too large for the C99-ish interface. */
     863        if (off > LONG_MAX)
     864                return EOF;
     865
     866        return off;
    855867}
    856868
Note: See TracChangeset for help on using the changeset viewer.