mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
core: check if malloc.h is present, independently of function malloc_trim
This commit is contained in:
@@ -192,7 +192,9 @@ include(CheckSymbolExists)
|
||||
check_include_files("langinfo.h" HAVE_LANGINFO_CODESET)
|
||||
check_include_files("sys/resource.h" HAVE_SYS_RESOURCE_H)
|
||||
|
||||
check_include_files("malloc.h" HAVE_MALLOC_H)
|
||||
check_symbol_exists("malloc_trim" "malloc.h" HAVE_MALLOC_TRIM)
|
||||
|
||||
check_function_exists(mallinfo HAVE_MALLINFO)
|
||||
check_function_exists(mallinfo2 HAVE_MALLINFO2)
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#cmakedefine ICONV_2ARG_IS_CONST 1
|
||||
#cmakedefine HAVE_MALLINFO
|
||||
#cmakedefine HAVE_MALLINFO2
|
||||
#cmakedefine HAVE_MALLOC_H
|
||||
#cmakedefine HAVE_MALLOC_TRIM
|
||||
#cmakedefine HAVE_EAT_NEWLINE_GLITCH
|
||||
#cmakedefine HAVE_ASPELL_VERSION_STRING
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_MALLOC_TRIM
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user