]> git.ipfire.org Git - thirdparty/curl.git/commit
mprintf: use `_snprintf()` when compiled with VS2013 and older
authorViktor Szakats <commit@vsz.me>
Thu, 26 Feb 2026 23:38:07 +0000 (00:38 +0100)
committerViktor Szakats <commit@vsz.me>
Fri, 27 Feb 2026 14:57:48 +0000 (15:57 +0100)
commitfa8bd1cc09125b368d4295c19331bf33e2d0c602
treece6035843ae345f39d12d4137e555097c0af3ee2
parent00b215b894cac0e21f620a88c299408a57ee2f75
mprintf: use `_snprintf()` when compiled with VS2013 and older

To support floats and doubles when using these old compilers.

Before this patch, these tests most likely failed with them:
```
FAIL 557: 'curl_mprintf() testing' printf, unittest
FAIL 566: 'HTTP GET with CURLINFO_CONTENT_LENGTH_DOWNLOAD and 0 bytes transfer' HTTP, HTTP GET
FAIL 599: 'HTTP GET with progress callback and redirects changing content sizes' HTTP, HTTP POST, chunked Transfer-Encoding
FAIL 1148: 'progress-bar' HTTP, progressbar
```

Also:
- mention `_snprintf()` in the `_CRT_SECURE_NO_WARNINGS` comment.

Follow-up to 7de35515d90d364e851cdde712062b942d6bf36a #20218

Closes #20761
lib/curl_setup.h
lib/mprintf.c