[PATCH] Fix locale printing on 64-bit big-endian arches
Jakub Jelinek
jakub@redhat.com
Thu Oct 23 19:49:00 GMT 2003
Hi!
2003-10-23 Jakub Jelinek <jakub@redhat.com>
* locale/programs/locale.c (show_info): Fix printing word values on
64-bit big-endian architectures.
--- libc/locale/programs/locale.c.jj 2003-05-22 02:40:45.000000000 +0200
+++ libc/locale/programs/locale.c 2003-10-23 21:46:06.000000000 +0200
@@ -893,12 +893,12 @@ show_info (const char *name)
break;
case word:
{
- unsigned int val =
- (unsigned int) (unsigned long int) nl_langinfo (item->item_id);
+ union { unsigned int word; char *string; } val;
+ val.string = nl_langinfo (item->item_id);
if (show_keyword_name)
printf ("%s=", item->name);
- printf ("%d\n", val);
+ printf ("%d\n", val.word);
}
break;
case wstring:
Jakub
More information about the Libc-hacker
mailing list