From a9635e31e23e18ef3681eaf268b63b85536ba157 Mon Sep 17 00:00:00 2001 From: Xwg Date: Tue, 15 Oct 2024 14:21:25 +0800 Subject: [PATCH] Switch from malloc.h to stdlib.h for POSIX compliance Replaced instances of malloc.h with stdlib.h to ensure better POSIX compliance and portability of the code. This change impacts bm_utils.c and varsub.c files. --- bm_utils.c | 3 ++- varsub.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bm_utils.c b/bm_utils.c index cbfc400..6ac4893 100644 --- a/bm_utils.c +++ b/bm_utils.c @@ -68,7 +68,8 @@ #include #include #ifndef _POSIX_SOURCE -#include +//#include +#include #endif /* POSIX_SOURCE */ #include #include diff --git a/varsub.c b/varsub.c index 5fbdf46..b9b1bd5 100644 --- a/varsub.c +++ b/varsub.c @@ -41,7 +41,7 @@ */ #include #ifndef _POSIX_SOURCE -#include +#include #endif /* POSIX_SOURCE */ #if (defined(_POSIX_)||!defined(WIN32)) #include