about summary refs log tree commit diff
path: root/gmon
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-07-20 07:43:27 +0000
committerUlrich Drepper <drepper@redhat.com>2005-07-20 07:43:27 +0000
commitdf6f89692fd7e802f38f944ed73942354a9911f8 (patch)
tree12debd445b11886fcf433fc6f85e9abe615670cc /gmon
parent10ffcd52f0578b13b48bdf84e73759353b29b673 (diff)
downloadglibc-df6f89692fd7e802f38f944ed73942354a9911f8.tar.gz
glibc-df6f89692fd7e802f38f944ed73942354a9911f8.tar.xz
glibc-df6f89692fd7e802f38f944ed73942354a9911f8.zip
* wcsmbs/bits/wchar2.h: Add definitions for wcrtomb, mbsrtowcs,
	wcsrtombs, mbsnrtowcs, and wcsnrtombs.
	* debug/Makefile (routines): Add wcrtomb_chk, mbsrtowcs_chk,
	wcsrtombs_chk, mbsnrtowcs_chk, and wcsnrtombs_chk.
	* debug/Versions: Add __wcrtomb_chk, __mbsrtowcs_chk,
	__wcsrtombs_chk, __mbsnrtowcs_chk, and __wcsnrtombs_chk.
	* debug/tst-chk1.c: Add tests for new functions.
	* debug/mbsnrtowcs_chk.c: New file.
	* debug/mbsrtowcs_chk.c: New file.
	* debug/wcrtomb_chk.c: New file.
	* debug/wcsnrtombs_chk.c: New file.
	* debug/wcsrtombs_chk.c: New file.

	* include/stdio.h: Add declaration for __fxprintf.
Diffstat (limited to 'gmon')
-rw-r--r--gmon/gmon.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gmon/gmon.c b/gmon/gmon.c
index 8eb0736193..3ad581d2a9 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,9 @@ 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",
+			L"_mcleanup: gmon.out: %s\n",
+			__strerror_r (errnum, buf, sizeof buf));
 	    return;
 	  }
       }