summaryrefslogtreecommitdiffstats
path: root/usr.bin/perror
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2009-11-22 05:17:22 +0000
committeredwin <edwin@FreeBSD.org>2009-11-22 05:17:22 +0000
commitef45471d75f3498ec575145304d3e852d6132cc9 (patch)
treeb1dcc6e12bc20c588832505885eb5483d4632c00 /usr.bin/perror
parentb93ea764d1d0def18567c878f714bdd74d2866f9 (diff)
downloadFreeBSD-src-ef45471d75f3498ec575145304d3e852d6132cc9.zip
FreeBSD-src-ef45471d75f3498ec575145304d3e852d6132cc9.tar.gz
The output of perror(1) is now showing local messages for locales
supported by libc/nls PR: bin/140499 Approved by: gnn@
Diffstat (limited to 'usr.bin/perror')
-rw-r--r--usr.bin/perror/perror.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/perror/perror.c b/usr.bin/perror/perror.c
index 6d852a7..ef3db35 100644
--- a/usr.bin/perror/perror.c
+++ b/usr.bin/perror/perror.c
@@ -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();
OpenPOWER on IntegriCloud