On 03/15/2011 12:34 PM, Karl Berry wrote: > The GNU coding standards have had these two items since the beginning. > > First: > Don't use the return value of @code{sprintf}. It returns the number of > characters written on some systems, but not on all systems. > > I don't see this mentioned in the Gnulib entry for sprintf at > http://www.gnu.org/software/gnulib/manual/html_node/sprintf.html > Is it still relevant?
It is not relevant for sprintf. For snprintf, there are still buggy implementations that don't always return the correct value mandated by POSIX, but gnulib works around thos. > > Second: > Be aware that @code{vfprintf} is not always available. > > Again, I don't see it mentioned in > http://www.gnu.org/software/gnulib/manual/html_node/vfprintf.html > though seemingly nearly every other system has some kind of problem. > Is it still relevant? Probably not any modern systems that lack vfprintf these days; however, there are still a host of other modern portability problems to worry about. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature