-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Ben Pfaff on 9/14/2006 10:19 AM:
> Philipp Marek <[EMAIL PROTECTED]> writes:
> 
>> On Thursday 14 September 2006 14:49 Eric Blake wrote:
>>> Gnulib provides umaxtostr.c, which is a convenient way of printing any
>>> integer of unknown width:
>>>
>>> char buf[INT_BUFSIZE_BOUND (uintmax_t)];
>>> sprintf("%s %s", umaxtostr(ino, buf), name);
>> But then I'd need a few of these buffers in a sprintf() call with 15 
>> arguments, and if umaxtostr() is not available on solaris etc. I can't use 
>> it ...
> 
> If you use Gnulib, then umaxtostr will be available everywhere.

Gnulib also provides a portable PRIuMAX, so that you could do this, if you
don't want to commit to providing multiple buffers to umaxtostr:
sprintf("%"PRIuMAX" %s", (uintmax_t) ino, name);

And gettext 0.15 understands PRIuMAX, converting it as needed on various
platforms, if you intend to internationalize your program.

- --
Life is short - so eat dessert first!

Eric Blake             [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFCggi84KuGfSFAYARAumnAJ0cEEVIYckQQwED4475/6fpLGvBbQCgv6qS
F09pOALdKeSaa0YWx9q8CVk=
=wdFV
-----END PGP SIGNATURE-----


_______________________________________________
Autoconf mailing list
Autoconf@gnu.org
http://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to