LibC: Add dummy functions for rename() and strftime()
I don't really want to implement them right now, but they are required to exist for some ports.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
#include <BAN/Assert.h>
|
||||
#include <BAN/Debug.h>
|
||||
|
||||
#include <bits/printf.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@@ -603,7 +606,11 @@ int remove(const char* path)
|
||||
}
|
||||
|
||||
// TODO
|
||||
int rename(const char*, const char*);
|
||||
int rename(const char* old, const char* _new)
|
||||
{
|
||||
dwarnln("rename({}, {})", old, _new);
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
void rewind(FILE* file)
|
||||
{
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#include <BAN/Assert.h>
|
||||
#include <BAN/Debug.h>
|
||||
|
||||
#include <sys/syscall.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
@@ -75,3 +78,9 @@ struct tm* localtime(const time_t* timer)
|
||||
// FIXME: support timezones
|
||||
return gmtime(timer);
|
||||
}
|
||||
|
||||
size_t strftime(char* __restrict s, size_t maxsize, const char* __restrict format, const struct tm* __restrict timeptr)
|
||||
{
|
||||
dwarnln("strftime({}, {}, {}, {})", s, maxsize, format, timeptr);
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user