Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/include/posix/sys/stat.h

    r0dd4779 r7f9df7b9  
    3939#include "types.h"
    4040#include "../time.h"
    41 
    42 #ifndef __POSIX_DEF__
    43 #define __POSIX_DEF__(x) x
    44 #endif
    4541
    4642/* values are the same as on Linux */
     
    112108#define S_ISSOCK(m) ((m & S_IFSOCK) != 0) /* socket? (Not in POSIX.1-1996.) */
    113109
    114 struct __POSIX_DEF__(stat) {
    115         __POSIX_DEF__(dev_t)     st_dev;     /* ID of device containing file */
    116         __POSIX_DEF__(ino_t)     st_ino;     /* inode number */
    117         __POSIX_DEF__(mode_t)    st_mode;    /* protection */
    118         __POSIX_DEF__(nlink_t)   st_nlink;   /* number of hard links */
    119         __POSIX_DEF__(uid_t)     st_uid;     /* user ID of owner */
    120         __POSIX_DEF__(gid_t)     st_gid;     /* group ID of owner */
    121         __POSIX_DEF__(dev_t)     st_rdev;    /* device ID (if special file) */
    122         __POSIX_DEF__(off_t)     st_size;    /* total size, in bytes */
    123         __POSIX_DEF__(blksize_t) st_blksize; /* blocksize for file system I/O */
    124         __POSIX_DEF__(blkcnt_t)  st_blocks;  /* number of 512B blocks allocated */
     110struct stat {
     111        dev_t     st_dev;     /* ID of device containing file */
     112        ino_t     st_ino;     /* inode number */
     113        mode_t    st_mode;    /* protection */
     114        nlink_t   st_nlink;   /* number of hard links */
     115        uid_t     st_uid;     /* user ID of owner */
     116        gid_t     st_gid;     /* group ID of owner */
     117        dev_t     st_rdev;    /* device ID (if special file) */
     118        off_t     st_size;    /* total size, in bytes */
     119        blksize_t st_blksize; /* blocksize for file system I/O */
     120        blkcnt_t  st_blocks;  /* number of 512B blocks allocated */
    125121        time_t          st_atime;   /* time of last access */
    126122        time_t          st_mtime;   /* time of last modification */
     
    128124};
    129125
    130 extern int __POSIX_DEF__(fstat)(int fd, struct __POSIX_DEF__(stat) *st);
    131 extern int __POSIX_DEF__(lstat)(const char *__restrict__ path, struct __POSIX_DEF__(stat) *__restrict__ st);
    132 extern int __POSIX_DEF__(stat)(const char *__restrict__ path, struct __POSIX_DEF__(stat) *__restrict__ st);
    133 extern int __POSIX_DEF__(chmod)(const char *path, __POSIX_DEF__(mode_t) mode);
    134 extern __POSIX_DEF__(mode_t) __POSIX_DEF__(umask)(__POSIX_DEF__(mode_t) mask);
    135 extern int __POSIX_DEF__(mkdir)(const char *path, __POSIX_DEF__(mode_t) mode);
     126extern int fstat(int fd, struct stat *st);
     127extern int lstat(const char *__restrict__ path, struct stat *__restrict__ st);
     128extern int stat(const char *__restrict__ path, struct stat *__restrict__ st);
     129extern int chmod(const char *path, mode_t mode);
     130extern mode_t umask(mode_t mask);
     131extern int mkdir(const char *path, mode_t mode);
    136132
    137133
Note: See TracChangeset for help on using the changeset viewer.