return _Syscall(SYS_REOPEN, ">i >s >i", FD, Path, Flags);
}
+int acess__SysCopyFD(int srcfd, int dstfd) {
+ return _Syscall(SYS_COPYFD, ">i >i", srcfd, dstfd);
+}
+
+int acess__SysFDFlags(int fd, int mask, int newflags) {
+ return _Syscall(SYS_FDFLAGS, ">i >i >i", fd, mask, newflags);
+}
+
size_t acess__SysRead(int FD, void *Dest, size_t Bytes) {
if(FD & NATIVE_FILE_MASK)
return native_read(FD & (NATIVE_FILE_MASK-1), Dest, Bytes);
int acess_setuid(int ID) { return _Syscall(SYS_SETUID, ">i", ID); }
int acess_setgid(int ID) { return _Syscall(SYS_SETGID, ">i", ID); }
int acess_gettid(void) { return _Syscall(SYS_GETTID, ""); }
-int acess_getpid(void) { return _Syscall(SYS_GETPID, ""); }
-int acess_getuid(void) { return _Syscall(SYS_GETUID, ""); }
+int acess__SysGetPID(void) { return _Syscall(SYS_GETPID, ""); }
+int acess__SysGetUID(void) { return _Syscall(SYS_GETUID, ""); }
int acess_getgid(void) { return _Syscall(SYS_GETGID, ""); }
int acess__SysSendMessage(int DestTID, int Length, void *Data)
DEFSYM(_SysWaitTID),
DEFSYM(gettid),
+ DEFSYM(_SysGetPID),
DEFSYM(setuid),
DEFSYM(setgid),
- DEFSYM(getuid),
+ DEFSYM(_SysGetUID),
DEFSYM(getgid),
DEFSYM(_SysSendMessage),
CFLAGS += -fPIC
endif
else
-CPPFLAGS := -ffreestanding
-CFLAGS := -fno-stack-protector -fPIC
-LDFLAGS := -I/Acess/Libs/ld-acess.so -lld-acess `$(CC) -print-libgcc-file-name`
+ CPPFLAGS := -ffreestanding
+ CFLAGS := -fno-stack-protector -fPIC
+ LDFLAGS := -I/Acess/Libs/ld-acess.so -lld-acess `$(CC) -print-libgcc-file-name`
endif
LDFLAGS += -g -nostdlib -shared -eSoMain -x --no-undefined -L$(OUTPUTDIR)Libs/
#define _SysWaitEvent acess__SysWaitEvent
#define _SysWaitTID acess__SysWaitTID
#define gettid acess_gettid
-#define getpid acess_getpid
-#define getuid acess_getuid
-#define getgid acess_getgid
+#define _SysGetPID acess__SysGetPID
+#define _SysGetUID acess__SysGetUID
+#define _SysGetGID acess__SysGetGID
#define setuid acess_setuid
#define setgid acess_setgid
#define _SysSetName acess__SysSetName
#define _SysOpen acess__SysOpen
#define _SysOpenChild acess__SysOpenChild
#define _SysReopen acess__SysReopen
+#define _SysCopyFD acess__SysCopyFD
+#define _SysFDFlags acess__SysFDFlags
#define _SysClose acess__SysClose
#define _SysRead acess__SysRead
#define _SysWrite acess__SysWrite