• Show log

    Commit

  • Hash : 2fc78e70
    Author : Vicent Marti
    Date : 2011-07-08T23:01:37

    posix: Portable `vsnprintf`
    
    Our good, lovely folks at Microsoft decided that there was no good
    reason to make `vsnprintf` compilant with the C standard, so that
    function in Windows returns -1 on overflow, instead of returning the
    actual byte count needed to write the full string.
    
    We now handle this situation more gracefully with the POSIX
    compatibility layer, by returning the needed byte size using an
    auxiliary method instead of blindly resizing the target buffer until it
    fits.
    
    This means we can now support `printf`s of any size by allocating a
    temporary buffer. That's good.