Date: Thu, 12 Nov 2009 17:48:56 +1100 (EST) From: Edwin Groothuis <edwin@mavetju.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/140499: teach perror(1) about localization Message-ID: <20091112064856.ABB674513C@k7.mavetju.org> Resent-Message-ID: <200911120700.nAC709Xp074042@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@k7.mavetju.org:/usr/obj/usr/home/edwin/svn/build-8/sys/GENERIC i386 >Description: Seen: [~/svn/svn-head/usr.bin/perror] edwin@vaio>LANG=nl_NL.ISO8859-1 perror 2 No such file or directory Expected: [~/svn/svn-head/usr.bin/perror] edwin@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091112064856.ABB674513C>