diff --git a/contracts/musl/CMakeLists.txt b/contracts/musl/CMakeLists.txt index 3437ed1ce6d102358698aa58ec04f8ccd7fa9f24..7668f0a86e5abef6ff41345393fae514c60139c8 100644 --- a/contracts/musl/CMakeLists.txt +++ b/contracts/musl/CMakeLists.txt @@ -4,6 +4,7 @@ file(GLOB ENV_SOURCES "upstream/src/env/*.c") file(GLOB ERRNO_SOURCES "upstream/src/errno/*.c") file(GLOB EXIT_SOURCES "upstream/src/exit/*.c") file(GLOB LOCALE_SOURCES "upstream/src/locale/*.c") +file(GLOB MALLOC_SOURCES "upstream/src/malloc/*.c") file(GLOB MBYTE_SOURCES "upstream/src/multibyte/*.c") file(GLOB SEARCH_SOURCES "upstream/src/search/*.c") file(GLOB STDIO_SOURCES "upstream/src/stdio/*.c") @@ -11,7 +12,8 @@ file(GLOB STDLIB_SOURCES "upstream/src/stdlib/*.c") file(GLOB STRING_SOURCES "upstream/src/string/*.c") file(GLOB TIME_SOURCES "upstream/src/time/*.c") file(GLOB THREAD_SOURCES "upstream/src/thread/*.c") #only for __lock __unlock -file(GLOB INTERNAL_SOURCES upstream/src/internal/intscan.c upstream/src/internal/shgetc.c upstream/src/internal/libc.c) +file(GLOB THREAD_SOURCES "upstream/src/misc/*.c") #only for __lock __unlock +set(INTERNAL_SOURCES upstream/src/internal/intscan.c upstream/src/internal/shgetc.c upstream/src/internal/libc.c) add_wast_library(TARGET libc SOURCE_FILES ${CRYPT_SOURCES} ${CTYPE_SOURCES} ${ENV_SOURCES} ${ERRNO_SOURCES} ${EXIT_SOURCES} ${INTERNAL_SOURCES} ${LOCALE_SOURCES} ${MBYTE_SOURCES} diff --git a/contracts/stltest/stltest.cpp b/contracts/stltest/stltest.cpp index c3b82b32216c28ee458938cf4d0064605bce077a..76a0ea027bcb73f9b213f74af4d0bd25c4320adc 100644 --- a/contracts/stltest/stltest.cpp +++ b/contracts/stltest/stltest.cpp @@ -211,9 +211,10 @@ namespace stltest { prints("\nEOS string: "); prints_l(s2.get_data(), s2.get_size()); */ prints("STL test start\n"); - const char* text = "wrap_write text\n"; - //vdprintf(stdout, text, strlen(text)); - printf("Integer\n", 0); + /* doesn't work with WASM::serializeWithInjection + printf("stdout output\n", 0); + fprintf(stderr, "stderr output\n", 0); + */ void* ptr = malloc(10); free(ptr); f("abc", 10, 20);