summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4')
-rw-r--r--m4/attributes.m48
1 files changed, 8 insertions, 0 deletions
diff --git a/m4/attributes.m4 b/m4/attributes.m4
index 436c36b87..d7fc94b12 100644
--- a/m4/attributes.m4
+++ b/m4/attributes.m4
@@ -160,6 +160,14 @@ AC_DEFUN([CC_ATTRIBUTE_ALIAS], [
[$2])
])
+AC_DEFUN([CC_ATTRIBUTE_MALLOC], [
+ CC_CHECK_ATTRIBUTE(
+ [malloc], ,
+ [void * __attribute__((malloc)) my_alloc(int n);],
+ [$1],
+ [$2])
+])
+
AC_DEFUN([CC_FLAG_VISIBILITY], [
AC_REQUIRE([CC_CHECK_WERROR])
ac_save_CFLAGS="$CFLAGS"