ls problem due to bad IRIX locale information

"John Saalwaechter" <[email protected]> Thu, 13 May 2004 19:56:14 -0500
Newsgroups gmane.comp.gnu.fileutils.bugs
Message-ID <[email protected]>
I built coreutils 5.1.3 because I wanted the latest ls features related to 
formatting the filesize field based on locale settings. (BTW, thanks to Paul 
Eggert for putting this in!)

By setting LC_NUMERIC or LANG to en_US, and setting LS_BLOCK_SIZE to "'1", I 
get the expected filesize output (i.e. 123456789 prints out as 
"123,456,789") on Solaris and Linux.

IRIX refused to work properly (at least IRIX 6.5.9m).  I tracked it down to 
the fact that IRIX has incorrect data for the "grouping" member of the 
"lconv" struct that's returned by localeconv().  All the locales in IRIX 
return a null grouping.  This looks like a known problem in IRIX from back 
to 1996! 
(http://groups.google.com/groups?selm=4hlv4l%244vm%40fido.asd.sgi.com).  The 
grouping for en_US should be {3,0}.  But *all* locales in IRIX return {0}.

This bad data in IRIX locales causes the logic in the group_number() 
function in lib/human.c to fail.  I'm not sure what the philosophy is about 
coding around OS deficiencies, but I at least wanted to get this documented 
on the mailing list for others trying to track down this problem.

_________________________________________________________________
Express yourself with the new version of MSN Messenger! Download today - 
it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/