Jaakko Heinonen <[email protected]> writes:
> Dag-Erling Smorgrav <[email protected]> writes:
> > +#define print_number(i,n,c)                                        \
> > +   do {                                                    \
> > +           if (decimal)                                    \
> > +                   printf("%c%jd", c, (intmax_t)*i);       \
> > +           else                                            \
> > +                   printf("%c%#jx", c, (intmax_t)*i);      \
> > +           i++;                                            \
> > +           n--;                                            \
> > +           c = ',';                                        \
> > +   } while (0)
> Are you sure that this change doesn't cause a regression on platforms
> where sizeof(long) != sizeof(intmax_t)?
>
> For example, previously, on i386 print_number() printed "0xffffffff" for
> -1 while after your change it will print "0xffffffffffffffff" (with %#jx).

You are right, the cast for the hex case should be to uintmax_t.  I
think I got all the other instances right...

DES
-- 
Dag-Erling Smørgrav - [email protected]
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to