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

Changeset 8fe46a0 in mainline


Ignore:
Timestamp:
2017-04-04T20:35:43Z (5 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
59f388a
Parents:
a6fc88a
Message:

Remove mode_t from libc

Location:
uspace/lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/sys/types.h

    ra6fc88a r8fe46a0  
    3838#include <libarch/types.h>
    3939
    40 typedef unsigned int mode_t;
    41 
    4240/** Relative offset */
    4341typedef int64_t off64_t;
  • uspace/lib/posix/include/posix/sys/stat.h

    ra6fc88a r8fe46a0  
    115115        __POSIX_DEF__(dev_t)     st_dev;     /* ID of device containing file */
    116116        __POSIX_DEF__(ino_t)     st_ino;     /* inode number */
    117         mode_t          st_mode;    /* protection */
     117        __POSIX_DEF__(mode_t)    st_mode;    /* protection */
    118118        __POSIX_DEF__(nlink_t)   st_nlink;   /* number of hard links */
    119119        __POSIX_DEF__(uid_t)     st_uid;     /* user ID of owner */
     
    131131extern int __POSIX_DEF__(lstat)(const char *restrict path, struct __POSIX_DEF__(stat) *restrict st);
    132132extern int __POSIX_DEF__(stat)(const char *restrict path, struct __POSIX_DEF__(stat) *restrict st);
    133 extern int __POSIX_DEF__(chmod)(const char *path, mode_t mode);
    134 extern mode_t __POSIX_DEF__(umask)(mode_t mask);
    135 extern int __POSIX_DEF__(mkdir)(const char *path, mode_t mode);
     133extern int __POSIX_DEF__(chmod)(const char *path, __POSIX_DEF__(mode_t) mode);
     134extern __POSIX_DEF__(mode_t) __POSIX_DEF__(umask)(__POSIX_DEF__(mode_t) mask);
     135extern int __POSIX_DEF__(mkdir)(const char *path, __POSIX_DEF__(mode_t) mode);
    136136
    137137
  • uspace/lib/posix/include/posix/sys/types.h

    ra6fc88a r8fe46a0  
    5353typedef int64_t __POSIX_DEF__(pid_t);
    5454typedef sysarg_t __POSIX_DEF__(dev_t);
     55typedef unsigned int __POSIX_DEF__(mode_t);
    5556
    5657/* PThread Types */
  • uspace/lib/posix/source/fcntl.c

    ra6fc88a r8fe46a0  
    105105{
    106106        int rc;
    107         mode_t posix_mode = 0;
     107        posix_mode_t posix_mode = 0;
    108108        if (posix_flags & O_CREAT) {
    109109                va_list args;
    110110                va_start(args, posix_flags);
    111                 posix_mode = va_arg(args, mode_t);
     111                posix_mode = va_arg(args, posix_mode_t);
    112112                va_end(args);
    113113                (void) posix_mode;
  • uspace/lib/posix/source/sys/stat.c

    ra6fc88a r8fe46a0  
    124124 * @return Zero on success, -1 otherwise.
    125125 */
    126 int posix_chmod(const char *path, mode_t mode)
     126int posix_chmod(const char *path, posix_mode_t mode)
    127127{
    128128        /* HelenOS doesn't support permissions, return success. */
     
    137137 * @return Previous file mode creation mask.
    138138 */
    139 mode_t posix_umask(mode_t mask)
     139posix_mode_t posix_umask(posix_mode_t mask)
    140140{
    141141        /* HelenOS doesn't support permissions, return empty mask. */
     
    150150 * @return Zero on success, -1 otherwise.
    151151 */
    152 int posix_mkdir(const char *path, mode_t mode)
     152int posix_mkdir(const char *path, posix_mode_t mode)
    153153{
    154154        int rc = rcerrno(vfs_link_path, path, KIND_DIRECTORY, NULL);
Note: See TracChangeset for help on using the changeset viewer.