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 207323a48b54a71760691fa6c82e6c2a0b7e0bd0..22b0d540eb7c2b93a403c48af4f8883921c81c70 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
index ad527cd1deb03e14a138c2f04f76c13b6ea3d084..d7cc346d16d40eeaeb997286739dab4c0dd218f4 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