From 2dba83e3c5ba8d289317d9a6d39db80b3384de29 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Wed, 28 Sep 2022 22:16:04 +0200 Subject: [PATCH] Remove M_USE_STDLIB (It wasn't working at all). --- m-core.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/m-core.h b/m-core.h index cc45df31..fdc72dbd 100644 --- a/m-core.h +++ b/m-core.h @@ -32,17 +32,7 @@ #include #include #include - - -/* By default, always use stdlib. Can be turned off in specific environment if needed - by defining M_USE_STDLIB to 0. - If it is disabled, you need to override memory & failure global macros too */ -#ifndef M_USE_STDLIB -# define M_USE_STDLIB 1 -#endif -#if M_USE_STDLIB -# include /* For abort, malloc, realloc, free */ -#endif +#include /* For abort, malloc, realloc, free, strtol, strtoul, strtoll, strtoull, strtod, strtold, rand */ /* By default, always use stdio. Can be turned off in specific environment if needed by defining M_USE_STDIO to 0 */ @@ -51,6 +41,10 @@ #endif #if M_USE_STDIO # include +#else +#if !defined(M_MEMORY_FULL) || !defined(M_ASSERT_INIT) +# error Without stdio.h, definitions for macros M_MEMORY_FULL, M_ASSERT_INIT are mandatory. +#endif #endif /* By default, always use stdarg. Can be turned off in specific environment if needed