In article <20111229014033.2f33917...@cvs.netbsd.org> you write: >-=-=-=-=-=- > >Module Name: src >Committed By: riz >Date: Thu Dec 29 01:40:32 UTC 2011 > >Modified Files: > src/lib/libperfuse: debug.c > >Log Message: >Cast time_t to intmax_t for printf purposes, and format with %j. Fixes >build on amd64 and probably i386 as well. > >- fprintf(fp, "%lu.%09ld %s %s%s%s %s ", >- pt->pt_start.tv_sec, pt->pt_start.tv_nsec, >+ fprintf(fp, "%ju.%09jd %s %s%s%s %s ", >+ (intmax_t)pt->pt_start.tv_sec, >+ (intmax_t)pt->pt_start.tv_nsec, This is slightly wrong: intmax_t is a signed type so %jd; tv_nsec is guaranteed to be "long" so %09ld without a cast works (what you have there is ok too, but slightly less efficient on 32 bit systems). christos
- Re: CVS commit: src/lib/libperfuse Emmanuel Dreyfus
- re: CVS commit: src/lib/libperfuse matthew green
- re: CVS commit: src/lib/libperfuse matthew green
- Re: CVS commit: src/lib/libperfuse Manuel Bouyer
- Re: CVS commit: src/lib/libperfuse David Laight
- Re: CVS commit: src/lib/libperfuse Alistair Crooks
- Re: CVS commit: src/lib/libperfuse Jeff Rizzo
- re: CVS commit: src/lib/libperfuse matthew green
- Re: CVS commit: src/lib/libperfuse Warner Losh
- re: CVS commit: src/lib/libperfuse matthew green
- Re: CVS commit: src/lib/libperfuse Christos Zoulas
- Re: CVS commit: src/lib/libperfuse Christos Zoulas
- Re: CVS commit: src/lib/libperfuse David Holland
- Re: CVS commit: src/lib/libperfuse Emmanuel Dreyfus
- Re: CVS commit: src/lib/libperfuse David Holland
- Re: CVS commit: src/lib/libperfuse Emmanuel Dreyfus