-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bruno Haible on 3/17/2007 6:32 PM: > * lib/vasnprintf.c (EOVERFLOW): New fallback definition. > (VASNPRINTF): Fail with EOVERFLOW when the given allocated size is > larger than INT_MAX, or when it grow to a value larger than INT_MAX.
This seems awkward to me. I agree that if vasnprintf inherits an INT_MAX limit because it internally uses another *printf function with an INT_MAX limit, then it should not loop endlessly. But since vasnprintf has the nice API property that, unlike all other *printf functions, it does not return an int, it should not need to be limited by INT_MAX; otherwise you are introducing an artificial limitation which goes against the GNU philosophy. Particularly on platforms where size_t is 64 bits, but int is 32 bits, I think it would be nice to have a *printf function that can handle a chunk of memory larger than 2 gigabytes. > * lib/vsprintf.c (vsprintf): Don't pass a size > INT_MAX to vasnprintf. > * lib/sprintf.c (sprintf): Likewise. This part I agree with. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF/Kid84KuGfSFAYARAgpNAKDN4Qgm4vU2JL2F9GeN58I9Dr4IpACgvgjA pHCKtxuOcmPc86TJzpFwihI= =40ew -----END PGP SIGNATURE-----