Files
libstdwullie/include/LocalHeader.h
2026-08-11 21:08:39 +00:00

41 lines
947 B
C

// this code is licenced under Wrathmark licence
// © 2026 wullie wulliestudio.com
// please see attached licence for full usage and rights
#ifndef LOCALHEADER_H
#define LOCALHEADER_H
// syscall macros, replaces the number based on system
#ifdef __linux__
#define SYS_read 0
#define SYS_write 1
#define SYS_open 2
#define SYS_close 3
#define SYS_sleep 35
#define SYS_exit 60
#define SYS_mkdir 83
#define SYS_getTime 228
#elif __FreeBSD__
#define SYS_read 3
#define SYS_write 4
#define SYS_open 5
#define SYS_close 6
#define SYS_sleep 244
#define SYS_exit 1
#define SYS_mkdir 136
#define SYS_getTime 232
#endif
// functions that SHOULD NOT be exposed to a dev using the library
void exit(int code);
long syscall1(long number, long args1);
long syscall2(long number, long args1, long args2);
long syscall3(long number, long args1, long args2, long args3);
long syscall4(long number, long args1, long args2, long args3, long args4);
#endif