On Tue, Oct 12, 2010 at 11:56 AM, John Baldwin <j...@freebsd.org> wrote: > On Tuesday, October 12, 2010 2:31:36 pm Garrett Cooper wrote: >> On Tue, Oct 12, 2010 at 5:30 AM, John Baldwin <j...@freebsd.org> wrote: >> > You should use %z to print size_t's, but even better is to just use %t >> > to print a ptrdiff_t (which is the type that holds the difference of two >> > pointers). >> >> Ok. The overall temperature of using PRI* from POSIX seems like >> it's undesirable; is it just POSIX cruft that FreeBSD conforms to in >> theory only and doesn't really use in practice, or is there an example >> of real practical application where it's used in the sourcebase? > > PRI* are ugly. FreeBSD provides it so that we are compliant and so that > portable code can use it, but we do not use it in our source tree because > it is unreadable.
Ok, I'll keep that in mind. >> > The various changes in jobs.c should use '%td' as well rather than (int) >> > casts. >> >> Ok. Tested build and runtime on amd64 and tested build-only with i386. > > Hmm, jobs.c shouldn't need any of the (ptrdiff_t) casts as the expression > being printed is already a ptrdiff_t. See this non-debug code in jobs.c > for example: Good catch. Here's another patch minus the ptrdiff_t casts (again, builds just fine on i386, and runs perfectly fine on amd64). As you can probably tell, I haven't used the ptrdiff_t typedef before :). Thanks! -Garrett
fix-bin-sh-DEBUG-functionality.diff
Description: Binary data
_______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"