summaryrefslogtreecommitdiff
path: root/gmon
diff options
context:
space:
mode:
Diffstat (limited to 'gmon')
-rw-r--r--gmon/gmon.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gmon/gmon.c b/gmon/gmon.c
index 8c8906eca4..c8923ab9da 100644
--- a/gmon/gmon.c
+++ b/gmon/gmon.c
@@ -331,8 +331,14 @@ write_gmon (void)
{
char buf[300];
int errnum = errno;
- fprintf (stderr, "_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;
}
}