/bin/sh and 32-bit arithmetics [CORRECTED]
Alex Semenyaka
alexs at ratmir.ru
Sat Apr 19 19:16:30 PDT 2003
On Sat, Apr 19, 2003 at 08:50:29PM -0500, Juli Mallett wrote:
> may be doing more work than is necessary. Simply switching to
> "long" in place of "int" for everything (and LONG_ vs INT_) may be
> a better start than using intmax_t? intmax_t may be very slow,
That %qd is just a misktake, sorry. Should be %jd. Wrong merge.
Then, I used jost 'long long' but people from -hackers told me that
the right way is intmax_t. Well, if it conforms to the current style
I can switch it back. Or, use some kind of explicit type.
Just long instead of int is not enough for i386 since it is 32-bit type.
> might be for building i386 with 64-bit long (ha ha ha), and that
> seems what you want- a wider type on a sucky architecture ;)
Well it is a bit sucky but not too much _here_ actually. There is
nothing special with 64-bit arithmetics.
> As for the INTMAX_LEN or whatnot, that's bogusish. There are ways
> of (at run time) deducing the maximum size of a buffer for a
I asked people about the _typical_ solution. Nobody answered, unfortunatelly.
> <fooint>, probably you can shove them into some init routine that
> sh surely has.
>
> Also, I don't know how we feel about C++/C99 style comments in
> the base system.
Oh, I see. I'll change it, it is the easiest thing here
> Thanx,
> juli (who imagines bde would have better advice.)
Really would like to read any opinion from the experienced people.
SY, Alex
More information about the freebsd-standards
mailing list