summaryrefslogtreecommitdiff
path: root/binutils/strings.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2001-09-19 05:33:36 +0000
committerH.J. Lu <hjl@lucon.org>2001-09-19 05:33:36 +0000
commit75e56203c5a58ad68a2015e0c7da2590093a3ec0 (patch)
treee91126f6df5579aaae921d5b82dc556b8c174966 /binutils/strings.c
parent196eb9fb0228e90f1f5c43a65372657f443580da (diff)
downloadbinutils-redhat-75e56203c5a58ad68a2015e0c7da2590093a3ec0.tar.gz
Locale changes from Bruno Haible <haible@clisp.cons.org>.
Diffstat (limited to 'binutils/strings.c')
-rw-r--r--binutils/strings.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/binutils/strings.c b/binutils/strings.c
index 7326cae07a..c6cf10ddca 100644
--- a/binutils/strings.c
+++ b/binutils/strings.c
@@ -59,10 +59,10 @@
#include "bfd.h"
#include <stdio.h>
#include <getopt.h>
-#include <ctype.h>
#include <errno.h>
#include "bucomm.h"
#include "libiberty.h"
+#include "safe-ctype.h"
/* Some platforms need to put stdin into binary mode, to read
binary files. */
@@ -81,14 +81,7 @@
#endif
#endif
-/* Not all printable characters have ASCII codes (depending upon the
- LOCALE set) but on some older systems it is not safe to test isprint
- without first testing isascii... */
-#if defined isascii && !defined HAVE_LOCALE_H
-#define isgraphic(c) (isascii (c) && (isprint (c) || (c) == '\t'))
-#else
-#define isgraphic(c) (isprint (c) || (c) == '\t')
-#endif
+#define isgraphic(c) (ISPRINT (c) || (c) == '\t')
#ifndef errno
extern int errno;
@@ -153,7 +146,7 @@ main (argc, argv)
int exit_status = 0;
boolean files_given = false;
-#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+#if defined (HAVE_SETLOCALE)
setlocale (LC_ALL, "");
#endif
bindtextdomain (PACKAGE, LOCALEDIR);