Jaakko Heinonen <j...@freebsd.org> writes:
> Dag-Erling Smorgrav <d...@freebsd.org> 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 - d...@des.no
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to