diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 18:26:36 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 18:26:36 +0000 |
commit | 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch) | |
tree | 2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /gmon/gmon.c | |
parent | 7d58530341304d403a6626d7f7a1913165fe2f32 (diff) | |
download | glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.bz2 |
2.5-18.1
Diffstat (limited to 'gmon/gmon.c')
-rw-r--r-- | gmon/gmon.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/gmon/gmon.c b/gmon/gmon.c index 575adbc..1e94aab 100644 --- a/gmon/gmon.c +++ b/gmon/gmon.c @@ -171,7 +171,7 @@ __monstartup (lowpc, highpc) __moncontrol(1); } -weak_alias(__monstartup, monstartup) +weak_alias (__monstartup, monstartup) static void @@ -331,7 +331,7 @@ write_gmon (void) { size_t len = strlen (env); char buf[len + 20]; - sprintf (buf, "%s.%u", env, __getpid ()); + __snprintf (buf, sizeof (buf), "%s.%u", env, __getpid ()); fd = open_not_cancel (buf, O_CREAT|O_TRUNC|O_WRONLY|O_NOFOLLOW, 0666); } @@ -343,14 +343,8 @@ write_gmon (void) { char buf[300]; int errnum = errno; -#ifdef USE_IN_LIBIO - if (_IO_fwide (stderr, 0) > 0) - __fwprintf (stderr, L"_mcleanup: gmon.out: %s\n", - __strerror_r (errnum, buf, sizeof buf)); - else -#endif - fprintf (stderr, "_mcleanup: gmon.out: %s\n", - __strerror_r (errnum, buf, sizeof buf)); + __fxprintf (NULL, "_mcleanup: gmon.out: %s\n", + __strerror_r (errnum, buf, sizeof buf)); return; } } |