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-11-22 05:17:22 +00:00
parent e3c2cd7237
commit ec9f71c489
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=199642

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