On Sun, 5 Jun 2011, Ben Laurie wrote:

So, for example int64_t has no printf modifier I am aware of. Likewise its many friends.

In the past I've handled this by having a define somewhere along the lines of...

#if <something>
# define INT_64_T_FMT "%ld"
#else
# define INT_64_T_FMT "%lld"
#endif

but I have no idea where to put such a thing in FreeBSD. Opinions? Also, I guess I'd really need to do a modifier rather than a format, for full generality.

You need to include inttypes.h, which includes machine/_inttypes.h. This will provide the appropriate macro which in this case is PRId64.

Sean
--
s...@freebsd.org
_______________________________________________
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"

Reply via email to