AcessNative - Fixing errors caused by API changes
[tpg/acess2.git] / AcessNative / ld-acess_src / exports.h
1 /*
2  * AcessNative Dymamic Linker
3  * - By John Hodge (thePowersGang)
4  *
5  * exports.h
6  * - Syscalls/Symbol definitions
7  */
8 #ifndef _EXPORTS_H_
9 #define _EXPORTS_H_
10
11 // Syscall request (used by acess_*)
12 extern uint64_t _Syscall(int SyscallID, const char *ArgTypes, ...);
13
14 extern int      native_open(const char *Path, int Flags);
15 extern void     native_close(int FD);
16 extern size_t   native_read(int FD, void *Dest, size_t Bytes);
17 extern size_t   native_write(int FD, const void *Src, size_t Bytes);
18 extern int      native_seek(int FD, int64_t Offset, int Dir);
19 extern uint64_t native_tell(int FD);
20
21 extern int      native_execve(const char *filename, char *const argv[], char *const envp[]);
22
23 // Syscalls used by the linker
24 extern int      acess_open(const char *Path, int Flags);
25 extern void     acess_close(int FD);
26 extern size_t   acess_read(int FD, void *Dest, size_t Bytes);
27 extern int      acess_seek(int FD, int64_t Offset, int Dir);
28
29 // Symbol type
30 typedef struct {
31         const char      *Name;
32         void    *Value;
33 }       tSym;
34
35 #endif
36

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