mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-29 08:11:08 +00:00
Update.
* malloc/memusage.c (me): Use access() to determine whether we should write the output file or not.
This commit is contained in:
parent
1950ebc6cb
commit
cf1bb6d5c0
@ -1,5 +1,8 @@
|
|||||||
2001-01-08 Ulrich Drepper <drepper@redhat.com>
|
2001-01-08 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* malloc/memusage.c (me): Use access() to determine whether we
|
||||||
|
should write the output file or not.
|
||||||
|
|
||||||
* libio/bits/stdio.h (printf): Define macro to map printf call to
|
* libio/bits/stdio.h (printf): Define macro to map printf call to
|
||||||
fprintf which gcc can optimize.
|
fprintf which gcc can optimize.
|
||||||
* stdio-common/printf.c: Undefine printf.
|
* stdio-common/printf.c: Undefine printf.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Profile heap and stack memory usage of running program.
|
/* Profile heap and stack memory usage of running program.
|
||||||
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
|
Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
|
||||||
|
|
||||||
@ -200,7 +200,8 @@ me (void)
|
|||||||
if (!not_me && fd == -1)
|
if (!not_me && fd == -1)
|
||||||
{
|
{
|
||||||
const char *outname = getenv ("MEMUSAGE_OUTPUT");
|
const char *outname = getenv ("MEMUSAGE_OUTPUT");
|
||||||
if (outname != NULL)
|
if (outname != NULL && outname[0] != '\0'
|
||||||
|
&& access (outname, R_OK | W_OK) == 0)
|
||||||
{
|
{
|
||||||
fd = creat (outname, 0666);
|
fd = creat (outname, 0666);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user