X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FLibraries%2Flibposix.so_src%2Finclude_exp%2Fsys%2Fstat.h;h=faac6c1b0853b592d59e3b5a9a18be11e5bd6317;hb=7f2068235fabc311332962711cd3220ce8ee2638;hp=3e9f4303a4d6177de2b6009ad1358518f51b5245;hpb=a8759b69a7dddfeff55bdfde62a9a0765ccc7eee;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/libposix.so_src/include_exp/sys/stat.h b/Usermode/Libraries/libposix.so_src/include_exp/sys/stat.h index 3e9f4303..faac6c1b 100644 --- a/Usermode/Libraries/libposix.so_src/include_exp/sys/stat.h +++ b/Usermode/Libraries/libposix.so_src/include_exp/sys/stat.h @@ -11,6 +11,10 @@ #include #include "sys/types.h" // off_t +#ifdef __cplusplus +extern "C" { +#endif + typedef void *dev_t; /* TODO: How to identify a device with Acess */ typedef uint64_t ino_t; typedef unsigned int blksize_t; @@ -18,9 +22,6 @@ typedef uint64_t blkcnt_t; typedef unsigned int nlink_t; typedef uint32_t mode_t; -typedef uint32_t uid_t; -typedef uint32_t gid_t; - #define S_IFMT 0170000 /* type of file */ #define S_IFDIR 0040000 /* directory */ #define S_IFCHR 0020000 /* character special */ @@ -30,6 +31,9 @@ typedef uint32_t gid_t; #define S_IFSOCK 0140000 /* socket */ #define S_IFIFO 0010000 /* fifo */ +#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) +#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG) +#define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR) struct stat { @@ -51,5 +55,10 @@ struct stat extern int stat(const char *path, struct stat *buf); extern int lstat(const char *path, struct stat *buf); extern int fstat(int fd, struct stat *buf); +extern int mkdir(const char *pathname, mode_t mode); + +#ifdef __cplusplus +} +#endif #endif