about summary refs log tree commit diff
path: root/gmon
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-07-21 08:25:57 +0000
committerJakub Jelinek <jakub@redhat.com>2005-07-21 08:25:57 +0000
commit736e2ab430e006ba09a2fe34d7887d3812ac808f (patch)
treef2d5948776e91112fcfd9199a757cd58e1be867a /gmon
parent366c71f353afc163b8d31c9db6e90919b5c2e1c0 (diff)
downloadglibc-736e2ab430e006ba09a2fe34d7887d3812ac808f.tar.gz
glibc-736e2ab430e006ba09a2fe34d7887d3812ac808f.tar.xz
glibc-736e2ab430e006ba09a2fe34d7887d3812ac808f.zip
Updated to fedora-glibc-20050721T0814
Diffstat (limited to 'gmon')
-rw-r--r--gmon/gmon.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/gmon/gmon.c b/gmon/gmon.c
index 8eb0736193..d292454ab5 100644
--- a/gmon/gmon.c
+++ b/gmon/gmon.c
@@ -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;
 	  }
       }