* malloc/memusage.c (me): Allow creating the output file.
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.
02111-1307 USA. */
#include <dlfcn.h>
+#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <signal.h>
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);