Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Dec 2009 21:07:47 +0000 (UTC)
From:      Edwin Groothuis <edwin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r200186 - stable/8/usr.bin/perror
Message-ID:  <200912062107.nB6L7lFI031648@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: edwin
Date: Sun Dec  6 21:07:47 2009
New Revision: 200186
URL: http://svn.freebsd.org/changeset/base/200186

Log:
  MFC of r199642
  
  The output of perror(1) is now showing local messages for locales
  supported by libc/nls
  
  PR:             bin/140499
  Approved by:    gnn@

Modified:
  stable/8/usr.bin/perror/perror.c
Directory Properties:
  stable/8/usr.bin/perror/   (props changed)

Modified: stable/8/usr.bin/perror/perror.c
==============================================================================
--- stable/8/usr.bin/perror/perror.c	Sun Dec  6 20:30:21 2009	(r200185)
+++ stable/8/usr.bin/perror/perror.c	Sun Dec  6 21:07:47 2009	(r200186)
@@ -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?200912062107.nB6L7lFI031648>