summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-05 21:59:42 +0200
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2008-05-05 21:59:42 +0200
commitcfd7b72175341d19baf7a76cc3e66960df0012cd (patch)
tree32bb5e27e08a36102267bbed857bc9cd24660746 /m4
parentac8886fbc94069026f5ad921145d0c9007df7411 (diff)
downloadxine-lib-cfd7b72175341d19baf7a76cc3e66960df0012cd.tar.gz
xine-lib-cfd7b72175341d19baf7a76cc3e66960df0012cd.tar.bz2
Check for malloc attribute and define XINE_MALLOC for use in xineutils.h, rather than just checking for GCC 3.
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"