#include <common.h>
#include <acess/sys.h>
#include <wm_input.h>
+#include <stddef.h>
// TODO: Move out to a common header
typedef struct
SYSCALL3(ioctl, SYS_IOCTL) // int, int, void*
SYSCALL4(_SysMount, SYS_MOUNT) // char*, char*, char*, char*
SYSCALL6(_SysSelect, SYS_SELECT) // int, fd_set*, fd_set*, fd_set*, tTime*, uint32_t
+SYSCALL1(unlink, SYS_UNLINK) // const char*
SYSCALL3(_SysOpenChild, SYS_OPENCHILD)
#ifndef _ACESS_INTDEFS_H_
#define _ACESS_INTDEFS_H_
+#include <stdint.h>
+#include <limits.h>
+
+#if 0
#define INT_MIN -0x80000000
#define INT_MAX 0x7FFFFFFF
# error "Unknown pointer size"
#endif
-//typedef uint64_t off_t;
+#endif
#endif
extern int _SysMount(const char *Device, const char *Directory, const char *Type, const char *Options);
extern int _SysSelect(int nfds, fd_set *read, fd_set *write, fd_set *err, int64_t *timeout, unsigned int extraevents);
#define select(nfs, rdfds, wrfds, erfds, timeout) _SysSelect(nfs, rdfds, wrfds, erfds, timeout, 0)
+extern int unlink(const char *pathname);
// --- IPC ---
extern int SysSendMessage(pid_t dest, uint length, const void *Data);
#ifndef _SYS_STAT_H_
#define _SYS_STAT_H_
-#include "../acess/intdefs.h" /* Evil */
+//#include "../acess/intdefs.h" /* Evil */
//#include "../stddef.h"
+#include <stdint.h>
-;
typedef void *dev_t; /* TODO: How to identify a device with Acess */
-typedef __uint64_t ino_t;
+typedef uint64_t ino_t;
typedef unsigned int blksize_t;
-typedef __uint64_t blkcnt_t;
+typedef uint64_t blkcnt_t;
typedef unsigned int nlink_t;
-typedef __uint32_t mode_t;
+typedef uint32_t mode_t;
-typedef __uint32_t uid_t;
-typedef __uint32_t gid_t;
+typedef uint32_t uid_t;
+typedef uint32_t gid_t;
#define S_IFMT 0170000 /* type of file */
#define S_IFDIR 0040000 /* directory */
extern void FD_SET(int fd, fd_set *fdsetp);
extern int FD_ISSET(int fd, fd_set *fdsetp);
-typedef __uint8_t u_int8_t;
-typedef __uint16_t u_int16_t;
-typedef __uint32_t u_int32_t;
-
#include "../sys/stat.h"
#endif
#define _SYS_SOCKETS_H_
#include <sys/types.h>
+#include <stddef.h> // size_t
typedef int socklen_t;