summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorVicent Marti <tanoku@gmail.com>2011-07-08 23:01:37 +0200
committerVicent Marti <tanoku@gmail.com>2011-07-09 02:40:16 +0200
commit2fc78e700cc4684c1e5899d7a4a619da1e3e3679 (patch)
treed279604bbf713973972fccb3f4ce0db97ac97676 /src/commit.c
parentd483a911b89eaecb3af603efe2dceeb402cbf3ae (diff)
downloadlibgit2-2fc78e700cc4684c1e5899d7a4a619da1e3e3679.tar.gz
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.
Diffstat (limited to 'src/commit.c')
0 files changed, 0 insertions, 0 deletions