This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Correctly localized strings
- To: Nick Clifton <nickc at cambridge dot redhat dot com>
- Subject: Re: Correctly localized strings
- From: Michal Svec <rebel at atrey dot karlin dot mff dot cuni dot cz>
- Date: Wed, 25 Apr 2001 10:33:58 +0200 (CEST)
- cc: binutils at sources dot redhat dot com
On 19 Apr 2001, Nick Clifton wrote:
> This second part has a problem though. On some, older, systems,
> isprint() is only defiend to work on values that are accepted by
> isascii() and using values outside of that range will produce
> segmentation faults.
>
> I think that perhaps this part of your patch:
> ought to be changed to:
> > +#if defined isascii && ! defined HAVE_LOCALE_H
OK, lets use this code, it should work (with a small syntax change):
-#ifdef isascii
+#if defined isascii && !defined HAVE_LOCALE_H
Regards
Michal
--- binutils-2.10.91.0.4/binutils/strings.c.orig Wed Apr 25 10:21:09 2001
+++ binutils-2.10.91.0.4/binutils/strings.c Wed Apr 25 10:30:12 2001
@@ -76,7 +76,7 @@
#endif
#endif
-#ifdef 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 +141,7 @@
boolean files_given = false;
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
- setlocale (LC_MESSAGES, "");
+ setlocale (LC_ALL, "");
#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);