Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset e3c960e in mainline


Ignore:
Timestamp:
2014-03-15T19:34:00Z (7 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
master
Children:
dc5a1f26
Parents:
c773adc
Message:

fpos_t must be declared in the header (thx Esteban Campostrini)

There is no function for allocating the structure for the user and
by using only the forward declaration the user effectively cannot
create a variable of fpos_t type.

Location:
uspace/lib/posix
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/include/posix/stdio.h

    rc773adc re3c960e  
    155155
    156156/* File Positioning */
    157 typedef struct _posix_fpos __POSIX_DEF__(fpos_t);
     157typedef struct {
     158        off64_t offset;
     159} __POSIX_DEF__(fpos_t);
     160
    158161extern int __POSIX_DEF__(fsetpos)(FILE *stream, const __POSIX_DEF__(fpos_t) *pos);
    159162extern int __POSIX_DEF__(fgetpos)(FILE *restrict stream, __POSIX_DEF__(fpos_t) *restrict pos);
  • uspace/lib/posix/source/stdio.c

    rc773adc re3c960e  
    309309}
    310310
    311 struct _posix_fpos {
    312         off64_t offset;
    313 };
    314 
    315311/** Restores stream a to position previously saved with fgetpos().
    316312 *
Note: See TracChangeset for help on using the changeset viewer.