tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: int vs. long in test(1)




On Jun 19, 2008, at 6:43 AM, Alan Barrett wrote:

On Thu, 19 Jun 2008, Thomas Klausner wrote:
sh(1)'s test (-current/amd64) doesn't deal with big numbers (> MAXINT)
 [...]
Do we want to convert the code to use strtoimax() and return a long
(with checks) or even something bigger?

I think it would make sense to use intmax_t.  We already do that for
the integers in shell arithmatic with the $((...)) syntax.


Isn't that wrong then for 64bit machines where int is 32 and the spec says "signed long" is what should be used here?

James




Home | Main Index | Thread Index | Old Index