Date: Sun, 22 Nov 2009 05:17:22 +0000 (UTC) From: Edwin Groothuis <edwin@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r199642 - head/usr.bin/perror Message-ID: <200911220517.nAM5HMHY007326@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: edwin Date: Sun Nov 22 05:17:22 2009 New Revision: 199642 URL: http://svn.freebsd.org/changeset/base/199642 Log: The output of perror(1) is now showing local messages for locales supported by libc/nls PR: bin/140499 Approved by: gnn@ Modified: head/usr.bin/perror/perror.c Modified: head/usr.bin/perror/perror.c ============================================================================== --- head/usr.bin/perror/perror.c Sat Nov 21 20:44:34 2009 (r199641) +++ head/usr.bin/perror/perror.c Sun Nov 22 05:17:22 2009 (r199642) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include <stdlib.h> #include <string.h> #include <err.h> +#include <locale.h> #include <sys/errno.h> static void usage(void); @@ -43,6 +44,7 @@ main(int argc, char **argv) char *errstr; long errnum; + (void) setlocale(LC_MESSAGES, ""); if (argc != 2) usage();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911220517.nAM5HMHY007326>