diff --git a/port/linux/test/pikaMain-test.cpp b/port/linux/test/pikaMain-test.cpp index 1e4e61230..76598de2b 100644 --- a/port/linux/test/pikaMain-test.cpp +++ b/port/linux/test/pikaMain-test.cpp @@ -1300,7 +1300,7 @@ TEST(pikaMain, class_demo_1_file) { Parser_multiLineToFile((char*)lines); char bytecodebuff[4096] = {0}; FILE* f = __platform_fopen("pika_bytecode.bin", "r"); - __platform_fread(bytecodebuff, 1, 4096, f); + fread(bytecodebuff, 1, 4096, f); pikaVM_runByteCode(self, (uint8_t*)bytecodebuff); /* assert */ EXPECT_STREQ(log_buff[0], (char*)"hello world\r\n"); diff --git a/src/PikaPlatform.c b/src/PikaPlatform.c index 44ab3604a..4dd6a578e 100644 --- a/src/PikaPlatform.c +++ b/src/PikaPlatform.c @@ -139,16 +139,3 @@ PIKA_WEAK size_t __platform_fwrite(const void* ptr, } #endif } - -PIKA_WEAK size_t __platform_fread(void* ptr, - size_t size, - size_t n, - FILE* stream) { -#ifdef __linux - return fread(ptr, size, n, stream); -#else - __platform_printf("[error]: __platform_function need implementation!\r\n"); - while (1) { - } -#endif -} diff --git a/src/PikaPlatform.h b/src/PikaPlatform.h index 6af2beb81..8c1454801 100644 --- a/src/PikaPlatform.h +++ b/src/PikaPlatform.h @@ -104,4 +104,3 @@ char __platform_getchar(void); FILE* __platform_fopen(const char* filename, const char* modes); int __platform_fclose(FILE* stream); size_t __platform_fwrite(const void* ptr, size_t size, size_t n, FILE* stream); -size_t __platform_fread(void* ptr, size_t size, size_t n, FILE* stream);