add __linux in __platform_getchar

This commit is contained in:
lyon1998 2022-03-18 13:07:20 +08:00
parent 7e0d7a6ba2
commit 91864a8c50

View File

@ -85,7 +85,6 @@ PIKA_WEAK int __platform_sprintf(char* buff, char* fmt, ...) {
return res;
}
PIKA_WEAK void __platform_wait(void) {
while (1) {
};
@ -99,6 +98,11 @@ PIKA_WEAK void* __platform_memcpy(void* dir, const void* src, size_t size) {
}
PIKA_WEAK char __platform_getchar(void) {
#ifdef __linux
return getchar();
#else
__platform_printf("[error]: __platform_getchar need impaltment!\r\n");
while (1) {
}
#endif
}