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:
parent
e4611248c4
commit
e76312ab63
21 changed files with 172 additions and 38 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue