LibC: Add stubs for tmpfile, mktemp and fchmod
This commit is contained in:
parent
2797fe116f
commit
6cda639869
|
@ -73,6 +73,7 @@ int mblen(const char* s, size_t n);
|
||||||
size_t mbstowcs(wchar_t* __restrict pwcs, const char* __restrict s, size_t n);
|
size_t mbstowcs(wchar_t* __restrict pwcs, const char* __restrict s, size_t n);
|
||||||
int mbtowc(wchar_t* __restrict pwc, const char* __restrict s, size_t n);
|
int mbtowc(wchar_t* __restrict pwc, const char* __restrict s, size_t n);
|
||||||
char* mkdtemp(char* _template);
|
char* mkdtemp(char* _template);
|
||||||
|
char* mktemp(char* _template);
|
||||||
int mkstemp(char* _template);
|
int mkstemp(char* _template);
|
||||||
long mrand48(void);
|
long mrand48(void);
|
||||||
long nrand48(unsigned short xsubi[3]);
|
long nrand48(unsigned short xsubi[3]);
|
||||||
|
|
|
@ -840,3 +840,8 @@ int vsscanf(const char* s, const char* format, va_list arguments)
|
||||||
}, &s
|
}, &s
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FILE* tmpfile(void)
|
||||||
|
{
|
||||||
|
ASSERT_NOT_REACHED();
|
||||||
|
}
|
||||||
|
|
|
@ -514,6 +514,11 @@ int putenv(char* string)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char* mktemp(char*)
|
||||||
|
{
|
||||||
|
ASSERT_NOT_REACHED();
|
||||||
|
}
|
||||||
|
|
||||||
size_t mbstowcs(wchar_t* __restrict pwcs, const char* __restrict s, size_t n)
|
size_t mbstowcs(wchar_t* __restrict pwcs, const char* __restrict s, size_t n)
|
||||||
{
|
{
|
||||||
auto* us = reinterpret_cast<const unsigned char*>(s);
|
auto* us = reinterpret_cast<const unsigned char*>(s);
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#include <BAN/Assert.h>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -11,6 +13,11 @@ int chmod(const char* path, mode_t mode)
|
||||||
return syscall(SYS_CHMOD, path, mode);
|
return syscall(SYS_CHMOD, path, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int fchmod(int, mode_t)
|
||||||
|
{
|
||||||
|
ASSERT_NOT_REACHED();
|
||||||
|
}
|
||||||
|
|
||||||
int fstat(int fildes, struct stat* buf)
|
int fstat(int fildes, struct stat* buf)
|
||||||
{
|
{
|
||||||
return syscall(SYS_FSTAT, fildes, buf);
|
return syscall(SYS_FSTAT, fildes, buf);
|
||||||
|
|
Loading…
Reference in New Issue