Remove duplicated stdio.h include

This commit is contained in:
2026-07-26 18:08:07 +02:00
parent 47e0cf129e
commit 8c9cc08de0
2 changed files with 7 additions and 12 deletions
+1
View File
@@ -40,6 +40,7 @@
#ifdef TARGET_LINUX #ifdef TARGET_LINUX
#include "stdio.h" #include "stdio.h"
#include <string.h>
#define MAIN int main(int argc, char *argv[]) #define MAIN int main(int argc, char *argv[])
#define PRINT(fmt, ...) fprintf(stdout, fmt, ##__VA_ARGS__) #define PRINT(fmt, ...) fprintf(stdout, fmt, ##__VA_ARGS__)
#define PRINT_ERROR(fmt, ...) \ #define PRINT_ERROR(fmt, ...) \
+1 -7
View File
@@ -3,10 +3,6 @@
#include "bh_platform.h" #include "bh_platform.h"
#include "__WASM_ARRAY_FILE__" #include "__WASM_ARRAY_FILE__"
#ifdef TARGET_LINUX
#include <stdio.h>
#include <string.h>
#endif
// FAIL* instrumentation symbols // FAIL* instrumentation symbols
void fail_start_trace(void) {} void fail_start_trace(void) {}
@@ -64,9 +60,7 @@ static BumpPool pools[] = {
{linear_pool_buf, LINEAR_POOL_SIZE, 0}, {linear_pool_buf, LINEAR_POOL_SIZE, 0},
}; };
static size_t align_up(size_t x, size_t a) { static size_t align_up(size_t x, size_t a) { return (x + a - 1) & ~(a - 1); }
return (x + a - 1) & ~(a - 1);
}
static size_t alloc_size(void *ptr) { static size_t alloc_size(void *ptr) {
size_t header_size = align_up(sizeof(size_t), ALIGNMENT); size_t header_size = align_up(sizeof(size_t), ALIGNMENT);