diff --git a/abstract-machine/klib/include/klib.h b/abstract-machine/klib/include/klib.h index 5f279ef..ecb24c8 100644 --- a/abstract-machine/klib/include/klib.h +++ b/abstract-machine/klib/include/klib.h @@ -9,7 +9,7 @@ extern "C" { #endif -#define __NATIVE_USE_KLIB__ +//#define __NATIVE_USE_KLIB__ // string.h void *memset (void *s, int c, size_t n); diff --git a/abstract-machine/klib/src/printf.c b/abstract-machine/klib/src/printf.c index 40764f1..d79f9d9 100644 --- a/abstract-machine/klib/src/printf.c +++ b/abstract-machine/klib/src/printf.c @@ -1,5 +1,7 @@ #include +#if !defined(__ISA_NATIVE__) || defined(__NATIVE_USE_KLIB__) + int num_to_ascii(int num, int power, int size, char *buf) { if (size <= 1) { return 0; @@ -80,3 +82,5 @@ int rvsnprintf(char* out, size_t n, const char* fmt, va_list ap) { *out = '\0'; return ret; } + +#endif \ No newline at end of file