Don't define xmmalloca if not needed.
authorBruno Haible <bruno@clisp.org>
Mon, 31 Dec 2007 10:55:46 +0000 (11:55 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 31 Dec 2007 10:55:46 +0000 (11:55 +0100)
ChangeLog
lib/xmalloca.c

index 207323a..22b0d54 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-12-30  Bruno Haible  <bruno@clisp.org>
 
+       * lib/xmalloca.c (xmmalloca): Don't define if HAVE_ALLOCA is not
+       defined.
+
+2007-12-30  Bruno Haible  <bruno@clisp.org>
+
        * lib/xmalloca.h: Include xalloc.h.
        (xnmalloca): New macro.
 
index ad527cd..d7cc346 100644 (file)
@@ -22,6 +22,8 @@
 
 #include "xalloc.h"
 
+#if HAVE_ALLOCA
+
 void *
 xmmalloca (size_t n)
 {
@@ -32,3 +34,5 @@ xmmalloca (size_t n)
     xalloc_die ();
   return p;
 }
+
+#endif