X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=binutils%2Fstrings.c;h=5d3aa6d4fa7f8dab802360c8aadd3619ea45413c;hb=198ce79b6b8e11c56a270eb3686574b87b0e7c75;hp=d72cd1928690badc30473fc2c634a5c908f776cd;hpb=8c2bc6877d75f8cd9073f206fab29920f73d325c;p=deliverable%2Fbinutils-gdb.git diff --git a/binutils/strings.c b/binutils/strings.c index d72cd19286..5d3aa6d4fa 100644 --- a/binutils/strings.c +++ b/binutils/strings.c @@ -76,7 +76,10 @@ #endif #endif -#ifdef isascii +/* 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') @@ -141,7 +144,7 @@ main (argc, argv) boolean files_given = false; #if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES) - setlocale (LC_MESSAGES, ""); + setlocale (LC_ALL, ""); #endif bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE);