diff configure.in @ 537:836d476763d0

[xemacs-hg @ 2001-05-14 06:27:03 by martinb] Fix for crash in make TAGS on SunOS 4
author martinb
date Mon, 14 May 2001 06:27:10 +0000
parents c69610198c35
children e9a3f8b4de53
line wrap: on
line diff
--- a/configure.in	Mon May 14 05:05:14 2001 +0000
+++ b/configure.in	Mon May 14 06:27:10 2001 +0000
@@ -2304,6 +2304,19 @@
   fi
 fi
 
+define([XE_REALLOC_NULLPTR_BUG],[
+AC_MSG_CHECKING(whether realloc accepts null pointers)
+AC_TRY_RUN([int main ()
+  { char *x = 0;
+    x = realloc (x, 16); if (!x) return 1; x[15] = 'y';
+    x = realloc (x, 64); if (!x) return 1; x[63] = 'z';
+    return 0;
+  }],
+ [AC_MSG_RESULT(yes)], 
+ [AC_MSG_RESULT(no); AC_DEFINE(REALLOC_NULLPTR_BUG) ])])
+
+XE_REALLOC_NULLPTR_BUG
+
 dnl #### mcheck is broken in all versions of Linux libc and glibc.
 dnl Try this again when 2.1 hits the streets.
 dnl Avoid using free-hook.c if support exists for malloc debugging in libc