On 08/18/2010 08:35 AM, Daniel P. Berrange wrote: > These printf-args/parse files appear to handle long long int & %llu > combinations correctly. Since mingw32 lacks any vasprintf() at all, > we will be using this gnulib replacement. The vasprintf-posix seems > to only be used where vasprintf() exists but is broken, thus not on > mingw32
The vasprintf module only uses the full printf parsing when told to do so by #ifdef; it prefers the much smaller approach of using snprintf to do all the work when there is no other compelling reason to use full parsing. > > I find it strange that vasprintf is a more liberal license than the > vasprintf-posix, since the former is where all the really cool > code is - the latter just seems to be a few m4 macros that anyone > could reimplement with ease. vasprintf-posix is more than just m4 macros; it also drags in LGPLv3+ module dependencies that implement floating point parsing (such as printf-ldexp and isnand-nolibm), then does the additional checks for which #defines to enable. Among other things, it is these additional #defines that then force the compelling reason for vasnprintf.c to use full-blown parsing rather than the smaller footprint of wrapping snprintf. So our dilemma is that %zu and %llu need to be compelling reasons to turn on a subset of the full-blown parser, since mingw's snprintf lacks those, but without also dragging in the LGPLv3+ floating-point handling. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list