[PATCH] Use conservative default for malloc(0) when cross-compiling #24460

Colin Watson cjwatson at canonical.com
Sat Oct 10 05:28:28 PDT 2009


When cross-compiling, AC_RUN_IFELSE can't run test programs.
MALLOC_ZERO_RETURNS_NULL=yes is a conservative default in this case.

Signed-off-by: Colin Watson <cjwatson at canonical.com>
Signed-off-by: Gaetan Nadon <memsize at videotron.ca>
---
 xorg-macros.m4.in |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index 6f9635f..393186f 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -339,7 +339,8 @@ main() {
     exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
 }],
 		[MALLOC_ZERO_RETURNS_NULL=yes],
-		[MALLOC_ZERO_RETURNS_NULL=no])
+		[MALLOC_ZERO_RETURNS_NULL=no],
+		[MALLOC_ZERO_RETURNS_NULL=yes])
 fi
 AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
 
-- 
1.6.0.4


--Boundary_(ID_p6Jn/hx7owzsE087OkCKhw)--


More information about the xorg-devel mailing list