bin/140499: teach perror(1) about localization
Edwin Groothuis
edwin at mavetju.org
Thu Nov 12 07:00:09 UTC 2009
>Number: 140499
>Category: bin
>Synopsis: teach perror(1) about localization
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Nov 12 07:00:09 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Edwin Groothuis
>Release: FreeBSD 8.0-RC1 i386
>Organization:
-
>Environment:
System: FreeBSD k7.mavetju.org 8.0-RC1 FreeBSD 8.0-RC1 #1 r197608: Tue Sep 29 12:34:13 EST 2009 edwin at k7.mavetju.org:/usr/obj/usr/home/edwin/svn/build-8/sys/GENERIC i386
>Description:
Seen:
[~/svn/svn-head/usr.bin/perror] edwin at vaio>LANG=nl_NL.ISO8859-1 perror 2
No such file or directory
Expected:
[~/svn/svn-head/usr.bin/perror] edwin at vaio>LANG=nl_NL.ISO8859-1 ./perror 2
Bestand of map niet gevonden
>How-To-Repeat:
>Fix:
gnn@: feel free to reassign to edwin@ if approved.
Index: perror.c
===================================================================
--- perror.c (revision 199198)
+++ perror.c (working copy)
@@ -32,6 +32,7 @@
#include <stdlib.h>
#include <string.h>
#include <err.h>
+#include <locale.h>
#include <sys/errno.h>
static void usage(void);
@@ -43,6 +44,7 @@
char *errstr;
long errnum;
+ (void) setlocale(LC_MESSAGES, "");
if (argc != 2)
usage();
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list