diff options
author | edwin <edwin@FreeBSD.org> | 2009-12-06 21:07:47 +0000 |
---|---|---|
committer | edwin <edwin@FreeBSD.org> | 2009-12-06 21:07:47 +0000 |
commit | d27f4c464f9a5611f7e6905d7ace26965d5ffed0 (patch) | |
tree | 1534edd1b00ae0ee5c3ae878e7f77b5e3992843b /usr.bin/perror | |
parent | 45ffbd76a0f8910e5ded86c634cd3d297c1e5c51 (diff) | |
download | FreeBSD-src-d27f4c464f9a5611f7e6905d7ace26965d5ffed0.zip FreeBSD-src-d27f4c464f9a5611f7e6905d7ace26965d5ffed0.tar.gz |
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@
Diffstat (limited to 'usr.bin/perror')
-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(); |