1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:27:45 +00:00

Lots of minor compat stuff while seeing if bash would build.

We're quite far from bash building, but we'll get there eventually!
This commit is contained in:
Andreas Kling 2018-11-05 16:40:48 +01:00
parent e4611248c4
commit e76312ab63
21 changed files with 172 additions and 38 deletions

View file

@ -1,6 +1,8 @@
#include "unistd.h"
#include "string.h"
#include "errno.h"
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <stdarg.h>
#include <assert.h>
#include <Kernel/Syscall.h>
extern "C" {
@ -78,9 +80,12 @@ pid_t getpgrp()
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int open(const char* path, int options)
int open(const char* path, int options, ...)
{
int rc = Syscall::invoke(Syscall::PosixOpen, (dword)path, (dword)options);
va_list ap;
va_start(ap, options);
int rc = Syscall::invoke(Syscall::PosixOpen, (dword)path, (dword)options, (dword)ap);
va_end(ap);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
@ -169,5 +174,15 @@ off_t lseek(int fd, off_t offset, int whence)
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int link(const char*, const char*)
{
assert(false);
}
int unlink(const char*)
{
assert(false);
}
}