diff --git a/main.c b/main.c index 491d242..5679968 100644 --- a/main.c +++ b/main.c @@ -5,6 +5,11 @@ #include "axl_vlq.h" #include +void *memset(void *s, int c, size_t n) +{ + return axl_memset(s, (i8)c, n); +} + int _start(void) { SetConsoleOutputCP(CP_UTF8); @@ -38,11 +43,11 @@ int _start(void) axl_puts("{"); for(int base = 2; base < 17; ++base) { - i8 buff[32]; - axl_memset(buff, '\0', 32); + i8 buff[32] = {'\0'}; + //axl_memset(buff, '\0', 32); - i8 text[256]; - axl_memset(text, '\0', 256); + i8 text[256] = {'\0'}; + //axl_memset(text, '\0', 256); axl_strcat(text, axl_itoa(i, buff, 10)); axl_strcat(text, "\tof base\t"); diff --git a/makefile b/makefile index 2551326..94f11f2 100644 --- a/makefile +++ b/makefile @@ -1,8 +1,8 @@ CC = clang AXL_SOURCES = $(filter-out main.c %_test.c, $(wildcard *.c)) TEST_EXES = $(patsubst %.c,%.exe,$(wildcard *_test.c)) -TEST_CFLAGS = -Wall -Wextra -Werror -pedantic -std=c11 -static -Oz -fsigned-char -CFLAGS = $(TEST_CFLAGS) -nostdlib -ffreestanding +TEST_CFLAGS = -Wall -Wextra -Werror -pedantic -std=c17 -static -Oz -fsigned-char +CFLAGS = $(TEST_CFLAGS) -nostdlib -ffreestanding -fno-builtin LDFLAGS = -Wl,/SUBSYSTEM:CONSOLE,/ENTRY:_start -fuse-ld=lld LIBS = -lkernel32 SOURCES = $(AXL_SOURCES) main.c