diff options
author | edwin <edwin@FreeBSD.org> | 2009-11-22 05:17:22 +0000 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2009-11-22 05:17:22 +0000 |
commit | ef45471d75f3498ec575145304d3e852d6132cc9 (patch) | |
tree | b1dcc6e12bc20c588832505885eb5483d4632c00 | |
parent | b93ea764d1d0def18567c878f714bdd74d2866f9 (diff) | |
download | FreeBSD-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@
-rw-r--r-- | usr.bin/perror/perror.c | 2 |
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(); |