Usermode/AxWin4 - (hack) Add downscaled bitmap font
[tpg/acess2.git] / Usermode / Libraries / libposix.so_src / include_exp / sys / stat.h
index 99c526b..faac6c1 100644 (file)
@@ -1,15 +1,20 @@
 /*
- * Acess2 C Library
+ * Acess2 POSIX Emulation Lib
  * - By John Hodge (thePowersGang)
+ *
+ * sys/stat.h
+ * - stat(2)
  */
 #ifndef _SYS_STAT_H_
 #define _SYS_STAT_H_
 
-//#include "../acess/intdefs.h"        /* Evil */
-//#include "../stddef.h"
 #include <stdint.h>
 #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;
@@ -17,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 */
@@ -29,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
 {
@@ -48,6 +53,12 @@ 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

UCC git Repository :: git.ucc.asn.au