]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
- fixed a oom check
authorAndrew Tridgell <tridge@samba.org>
Thu, 27 Jan 2005 09:40:11 +0000 (10:40 +0100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 27 Jan 2005 09:40:11 +0000 (10:40 +0100)
- attempt to get sol10/x86 to build

configure.in
util.c

index 3229ef0b7d126038675ca39c2721b3806e515171..321c592fcb7af46a71139ff92d52234a5142d22c 100644 (file)
@@ -15,6 +15,14 @@ AC_PROG_INSTALL
 AC_DEFINE([_GNU_SOURCE], 1,
           [Define _GNU_SOURCE so that we get all necessary prototypes])
 
+# The definition of _GNU_SOURCE potentially causes a change of the value
+# of _XOPEN_SOURCE. So define it only conditionally.
+AH_VERBATIM([_XOPEN_SOURCE],
+[/* Define on UNIX to activate XPG/5 features.  */
+#if !defined(_XOPEN_SOURCE)
+# define _XOPEN_SOURCE 500
+#endif])
+
 # If GCC, turn on warnings.
 if test "x$GCC" = "xyes"
 then
diff --git a/util.c b/util.c
index ec5ccdd4950736231aa6516667048b025e548f0d..40efa8329937ee413e6906564307ee007dfb37e2 100644 (file)
--- a/util.c
+++ b/util.c
@@ -151,7 +151,7 @@ void x_asprintf(char **ptr, const char *format, ...)
        vasprintf(ptr, format, ap);
        va_end(ap);
        
-       if (!ptr) fatal("out of memory in x_asprintf");
+       if (!*ptr) fatal("out of memory in x_asprintf");
 }
 
 /*