Update.
authorUlrich Drepper <drepper@redhat.com>
Mon, 13 Aug 2001 21:54:43 +0000 (21:54 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 13 Aug 2001 21:54:43 +0000 (21:54 +0000)
* malloc/memusage.c (me): Allow creating the output file.

ChangeLog
malloc/memusage.c

index cb2b3c0..e795141 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2001-08-13  Ulrich Drepper  <drepper@redhat.com>
 
+       * malloc/memusage.c (me): Allow creating the output file.
+
        * sysdeps/unix/sysv/linux/Makefile: Remove -fkeep-inline-functions
        flag for init-first.
 
index b65440f..d619fb9 100644 (file)
@@ -19,6 +19,7 @@
    02111-1307 USA.  */
 
 #include <dlfcn.h>
+#include <errno.h>
 #include <fcntl.h>
 #include <inttypes.h>
 #include <signal.h>
@@ -206,7 +207,7 @@ me (void)
 
       outname = getenv ("MEMUSAGE_OUTPUT");
       if (outname != NULL && outname[0] != '\0'
-         && access (outname, R_OK | W_OK) == 0)
+         && (access (outname, R_OK | W_OK) == 0 || errno == ENOENT))
        {
          fd = creat (outname, 0666);