mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-02 02:49:15 +00:00
feat(userspace/libc): implement functions for porting apps
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
@ -19,6 +19,8 @@
|
||||
#include <bits/libc.h>
|
||||
#include <string.h>
|
||||
|
||||
extern int printf(const char *restrict format, ...);
|
||||
|
||||
void sysdep(Exit)(int Status)
|
||||
{
|
||||
call_exit(Status);
|
||||
@ -209,3 +211,29 @@ int sysdep(FileControl)(int Descriptor, int Command, void *Arg)
|
||||
{
|
||||
return call_fcntl(Descriptor, Command, Arg);
|
||||
}
|
||||
|
||||
int sysdep(ClockGetTime)(clockid_t ClockID, struct timespec *TP)
|
||||
{
|
||||
return call_clock_gettime(ClockID, TP);
|
||||
}
|
||||
|
||||
time_t sysdep(Time)(void)
|
||||
{
|
||||
return call_time(NULL);
|
||||
}
|
||||
|
||||
clock_t sysdep(Clock)()
|
||||
{
|
||||
printf("sysdep(Clock): unimplemented\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sysdep(RemoveDirectory)(const char *Pathname)
|
||||
{
|
||||
return call_rmdir(Pathname);
|
||||
}
|
||||
|
||||
int sysdep(Unlink)(const char *Pathname)
|
||||
{
|
||||
return call_unlink(Pathname);
|
||||
}
|
||||
|
Reference in New Issue
Block a user