aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-13 21:54:43 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-13 21:54:43 +0000
commit6f47f6457b69a0cbd2653271158e8742e7e6616a (patch)
treee848217919d19b9acfce5b6810935ded41aee535
parente6df2698a71de1a923f037c2dbdabcf15b7afbd3 (diff)
downloadglibc-6f47f6457b69a0cbd2653271158e8742e7e6616a.tar
glibc-6f47f6457b69a0cbd2653271158e8742e7e6616a.tar.gz
glibc-6f47f6457b69a0cbd2653271158e8742e7e6616a.tar.bz2
glibc-6f47f6457b69a0cbd2653271158e8742e7e6616a.zip
Update.
* malloc/memusage.c (me): Allow creating the output file.
-rw-r--r--ChangeLog2
-rw-r--r--malloc/memusage.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index cb2b3c0a0f..e795141f7d 100644
--- 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.
diff --git a/malloc/memusage.c b/malloc/memusage.c
index b65440f807..d619fb96fb 100644
--- a/malloc/memusage.c
+++ b/malloc/memusage.c
@@ -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);