Usermode/include - A pile of hack known as the Acess fcntl.h
authorJohn Hodge <[email protected]>
Mon, 17 Oct 2011 03:11:07 +0000 (11:11 +0800)
committerJohn Hodge <[email protected]>
Mon, 17 Oct 2011 03:11:07 +0000 (11:11 +0800)
- Macros a few Acess syscalls into the posix equivalents

Usermode/include/fcntl.h [new file with mode: 0644]

diff --git a/Usermode/include/fcntl.h b/Usermode/include/fcntl.h
new file mode 100644 (file)
index 0000000..5fee9a1
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * Acess2 C Library (UNIX Emulation)
+ * - By John Hodge (thePowersGang)
+ *
+ * fcntl.h
+ * - ??
+ */
+
+#ifndef _FCNTL_H_
+#define _FCNTL_H_
+
+#include <sys/sys.h>
+
+// Hacks to handle different behaviors in Acess
+
+// Open doesn't take a chmod
+#define open(_1,_2,...)        open(_1, _2)
+
+// Close returns void
+#define close(_1)      (close(_1),0)
+
+// Acess doesn't implement lseek
+#define lseek(_1,_2,_3)        (seek(_1,_2,_3),tell(_1))
+
+#endif
+

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