*/
#ifndef _SYS_TYPES_H
#define _SYS_TYPES_H
-#include <stdint.h>
-
-typedef struct {
- int st_dev; //dev_t
- int st_ino; //ino_t
- int st_mode; //mode_t
- unsigned int st_nlink;
- unsigned int st_uid;
- unsigned int st_gid;
- int st_rdev; //dev_t
- unsigned int st_size;
- long st_atime; //time_t
- long st_mtime;
- long st_ctime;
-} t_fstat;
-
-#define S_IFMT 0170000 /* type of file */
-#define S_IFDIR 0040000 /* directory */
-#define S_IFCHR 0020000 /* character special */
-#define S_IFBLK 0060000 /* block special */
-#define S_IFREG 0100000 /* regular */
-#define S_IFLNK 0120000 /* symbolic link */
-#define S_IFSOCK 0140000 /* socket */
-#define S_IFIFO 0010000 /* fifo */
+
+typedef struct stat t_fstat;
#define FD_SETSIZE 128
+
+#define CLONE_VM 0x10
+
+typedef unsigned long pid_t;
+typedef unsigned long tid_t;
+typedef signed long long int time_t;
+typedef long long int off_t;
+
+typedef unsigned int uint;
+
+typedef unsigned short fd_set_ent_t;
+
/**
* \brief fd_set for select()
*/
typedef struct
{
- uint16_t flags[FD_SETSIZE/16];
+ fd_set_ent_t flags[FD_SETSIZE/16];
} fd_set;
-static inline void FD_ZERO(fd_set *fdsetp) {int i=FD_SETSIZE/16;while(i--)fdsetp->flags[i]=0; }
-static inline void FD_CLR(int fd, fd_set *fdsetp) { fdsetp->flags[fd/16]&=~(1<<(fd%16)); }
-static inline void FD_SET(int fd, fd_set *fdsetp) { fdsetp->flags[fd/16]|=1<<(fd%16); }
-static inline int FD_ISSET(int fd, fd_set *fdsetp) { return fdsetp->flags[fd/16]&(1<<(fd%16)); }
+struct s_sysACL {
+ unsigned long object; /*!< Group or user (bit 31 determines) */
+ unsigned long perms; /*!< Inverted by bit 31 */
+};
+struct s_sysFInfo {
+ unsigned int mount;
+ unsigned long long inode;
+ unsigned int uid;
+ unsigned int gid;
+ unsigned int flags;
+ unsigned long long size;
+ time_t atime;
+ time_t mtime;
+ time_t ctime;
+ int numacls;
+ struct s_sysACL acls[];
+};
+typedef struct s_sysFInfo t_sysFInfo;
+typedef struct s_sysACL t_sysACL;
+
+extern void FD_ZERO(fd_set *fdsetp);
+extern void FD_CLR(int fd, fd_set *fdsetp);
+extern void FD_SET(int fd, fd_set *fdsetp);
+extern int FD_ISSET(int fd, fd_set *fdsetp);
-typedef uint32_t pid_t;
-typedef uint32_t tid_t;
-typedef int64_t time_t;
+#include "../sys/stat.h"
#endif