summary refs log tree commit diff
path: root/string
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-10-17 05:49:48 +0000
committerRoland McGrath <roland@gnu.org>1995-10-17 05:49:48 +0000
commitb3a59f408e7462fbd77289e8c3f50606044a585a (patch)
treecfd874921dda17cb953c2f4a44b533db0641639d /string
parent0700dfa143cad61b491c6d596657ee69cd5b35bd (diff)
downloadglibc-b3a59f408e7462fbd77289e8c3f50606044a585a.tar.gz
glibc-b3a59f408e7462fbd77289e8c3f50606044a585a.tar.xz
glibc-b3a59f408e7462fbd77289e8c3f50606044a585a.zip
Tue Oct 17 01:21:21 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
	* stdio-common/psignal.c: Translate signal description strings.
	* string/strsignal.c: Likewise.
	* sysdeps/generic/_strerror.c (_strerror_internal): Translate
	error strings.
	* sysdeps/mach/_strerror.c: Likewise.

	* stdio-common/snprintf.c (__snprintf): Renamed from snprintf;
	call __vsnprintf.
	(snprintf): Define as weak alias.
	* stdio/vsnprintf.c (__vsnprintf): Renamed from vsnprintf.
	(vsnprintf): Define as weak alias.

	* libc-symbols.h [! ASSEMBLER] (_): New macro.
Diffstat (limited to 'string')
-rw-r--r--string/strsignal.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/string/strsignal.c b/string/strsignal.c
index c2c8835a19..ccd2c0e82f 100644
--- a/string/strsignal.c
+++ b/string/strsignal.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1995 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 
 The GNU C Library is free software; you can redistribute it and/or
@@ -36,14 +36,14 @@ DEFUN(strsignal, (signum), int signum)
 {
   if (signum < 0 || signum > NSIG)
     {
-      static char unknown_signal[] = "Unknown signal 000000000000000000";
-      static char fmt[] = "Unknown signal%d";
-      size_t len = sprintf(unknown_signal, fmt, signum);
-      if (len < sizeof(fmt) - 2)
+      static char buf[512];
+      static char fmt[] = ;
+      int len = __snprintf (buf, sizeof buf, _("Unknown signal %d"), signum);
+      if (len < 0)
 	return NULL;
-      unknown_signal[len] = '\0';
-      return unknown_signal;
+      buf[len - 1] = '\0';
+      return buf;
     }
 
-  return (char *) _sys_siglist[signum];
+  return (char *) _(_sys_siglist[signum]);
 }