> compile NEMU
221220000 张三 Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux 00:10:23 up 7:50, 1 user, load average: 0.49, 0.33, 0.27
This commit is contained in:
@ -6,11 +6,17 @@
|
||||
#if !defined(__ISA_NATIVE__) || defined(__NATIVE_USE_KLIB__)
|
||||
|
||||
int printf(const char *fmt, ...) {
|
||||
panic("Not implemented");
|
||||
va_list ap;
|
||||
va_start(ap, fmt);
|
||||
char buf[1024] = { 0 };
|
||||
int ret = vsnprintf(buf, sizeof(buf), fmt, ap);
|
||||
putstr(buf);
|
||||
va_end(ap);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int vsprintf(char *out, const char *fmt, va_list ap) {
|
||||
panic("Not implemented");
|
||||
return vsnprintf(out, SIZE_MAX, fmt, ap);
|
||||
}
|
||||
|
||||
int sprintf(char *out, const char *fmt, ...) {
|
||||
@ -29,8 +35,14 @@ int snprintf(char *out, size_t n, const char *fmt, ...) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int rvsnprintf(char* out, size_t n, const char* fmt, va_list ap);
|
||||
|
||||
int vsnprintf(char *out, size_t n, const char *fmt, va_list ap) {
|
||||
panic("Not implemented");
|
||||
return rvsnprintf(out, n, fmt, ap);
|
||||
}
|
||||
|
||||
static int rvsnprintf(char* out, size_t n, const char* fmt, va_list ap) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -57,7 +57,7 @@ void *memset(void *s, int c, size_t n) {
|
||||
}
|
||||
|
||||
void *memmove(void *dst, const void *src, size_t n) {
|
||||
panic("Not implemented");
|
||||
panic("Not immpliment");
|
||||
}
|
||||
|
||||
void *memcpy(void *out, const void *in, size_t n) {
|
||||
|
Reference in New Issue
Block a user