Makefiles: Make a couple of targets build more quietly.
[pspp] / src / libpspp / pool.c
index 3150c9056b2eb8c91b42662fddf2c590263a9455..a1979abc81b5d68b5916b56c590c6dcfd3f94580 100644 (file)
@@ -26,6 +26,7 @@
 #include "libpspp/temp-file.h"
 #include "libpspp/str.h"
 
+#include "gl/xalloc-oversized.h"
 #include "gl/xalloc.h"
 
 /* Fast, low-overhead memory block suballocator. */
@@ -381,7 +382,7 @@ pool_strdup (struct pool *pool, const char *string)
    strings, because the returned pointere may not be aligned
    properly for other types. */
 char *
-pool_strdup0 (struct pool *pool, const char *string, size_t size)
+pool_memdup0 (struct pool *pool, const char *string, size_t size)
 {
   char *new_string = pool_alloc_unaligned (pool, size + 1);
   memcpy (new_string, string, size);
@@ -394,6 +395,9 @@ pool_strdup0 (struct pool *pool, const char *string, size_t size)
 char *
 pool_vasprintf (struct pool *pool, const char *format, va_list args_)
 {
+  if (!pool)
+    return xvasprintf (format, args_);
+
   struct pool_block *b;
   va_list args;
   int needed, avail;