aboutsummaryrefslogtreecommitdiff
path: root/gmon/gmon.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /gmon/gmon.c
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.zip
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.bz2
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'gmon/gmon.c')
-rw-r--r--gmon/gmon.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/gmon/gmon.c b/gmon/gmon.c
index 1e94aab..575adbc 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];
- __snprintf (buf, sizeof (buf), "%s.%u", env, __getpid ());
+ sprintf (buf, "%s.%u", env, __getpid ());
fd = open_not_cancel (buf, O_CREAT|O_TRUNC|O_WRONLY|O_NOFOLLOW, 0666);
}
@@ -343,8 +343,14 @@ write_gmon (void)
{
char buf[300];
int errnum = errno;
- __fxprintf (NULL, "_mcleanup: gmon.out: %s\n",
- __strerror_r (errnum, buf, sizeof buf));
+#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));
return;
}
}