bug in ksh?
Jakub Bogusz
qboosh at pld-linux.org
Fri Jul 7 20:13:34 CEST 2006
On Fri, Jul 07, 2006 at 07:53:41PM +0200, Andrzej 'The Undefined' Dopierała wrote:
> On Fri, Jul 07, 2006 at 06:40:47PM +0200, Jakub Bogusz wrote:
> > > i think ksh behaviour is a bug...
> >
> > Does POSIX/SUS specify what integer values should be supported?
> > I can't find it now.
> >
> > I assume that values larger than some value are allowed to give
> > "undefined" results.
> but it may confuse scripts who expect that it works "ok". :/
How big numbers can scripts expect to work "ok"?
I found some rational (but unofficial) interpretation:
http://www.pasc.org/interps/unofficial/db/p1003.2/pasc-1003.2-208.html
Add new paragraphs to rationale in the XRAT volume after P3523, L9347:
Although the 1999 C Standard now requires support for long long
and allows extended integer types with higher ranks, this
standard only requires arithmetic expansions to support signed
long integer arithmetic. Implementations are encouraged to
support signed integer values at least as large as the size of
the largest file allowed on the implementation.
"signed long integer" is 32-bit on x86, 64-bit on x86_64.
We build pdksh _FILE_OFFSET_BITS=64, but "encouraged" is not "required".
> zsh, csh, tcsh works like bash.
>
> so - fix it, or leave?
Feel encouraged to "fix" ;)
--
Jakub Bogusz http://qboosh.cs.net.pl/
More information about the pld-devel-en
mailing list