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@
This commit is contained in:
Edwin Groothuis 2009-12-06 21:07:47 +00:00
parent 3a5ce93470
commit 0b1ab65e97

View File

@ -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();