aboutsummaryrefslogtreecommitdiff
path: root/binutils/strings.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2001-09-19 05:33:36 +0000
committerH.J. Lu <hjl.tools@gmail.com>2001-09-19 05:33:36 +0000
commit3882b010780ca1aa1ed5d7b38e936cd2d6d5486b (patch)
treec806a73a13afd3265ba6b538ba73cae065c591f5 /binutils/strings.c
parent6b819c92c4512ccfba90f0caa204ab687fae8254 (diff)
downloadgdb-3882b010780ca1aa1ed5d7b38e936cd2d6d5486b.zip
gdb-3882b010780ca1aa1ed5d7b38e936cd2d6d5486b.tar.gz
gdb-3882b010780ca1aa1ed5d7b38e936cd2d6d5486b.tar.bz2
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 7326cae..c6cf10d 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);