summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2012-06-05 15:14:07 +0100
committerLars Wirzenius <liw@liw.fi>2012-06-05 15:14:07 +0100
commit67f22bd1b6c2acfa5d23fa1821a0c9e895d085eb (patch)
tree6fb1b3fb856f5eeffc17da4516cad027c14e0307
parentc373ee95a6670b73b3685c9792a4ae297f760527 (diff)
downloadmoreutils-67f22bd1b6c2acfa5d23fa1821a0c9e895d085eb.tar.gz
Make errno obey locale
-rw-r--r--errno.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/errno.c b/errno.c
index 64a4770..872d11a 100644
--- a/errno.c
+++ b/errno.c
@@ -21,6 +21,7 @@
#include <ctype.h>
#include <errno.h>
+#include <locale.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
@@ -122,6 +123,8 @@ main(int argc, char **argv)
int index = 0;
enum { lookup_mode, list_mode, search_mode } mode = lookup_mode;
+ setlocale(LC_ALL, "");
+
for (;;) {
int c = getopt_long(argc, argv, "hls", options, &index);
if (c == -1)