cURL / Mailing Lists / curl-library / Single Mail


[PATCH] formadd: support >2GB files on windows

From: Daniel Stenberg <>
Date: Fri, 30 Oct 2015 08:40:21 +0100 (CET)

Hey friends,

I've had this little patch brewing over in issue #425 [1] for a while with
little comments, but I really wouldn't mind if someone who actually has and
use Windows could have a look and possibly even try it out. I hesitate to
merge it without more discussion/tests.

The original problem being that curl_formadd() right now uses 'long' for a
size so that it can't be set larger than 2GB on any windows version (even if
64bit) and other 32bit systems. This patch introduces a new option to pass in
a 'curl_off_t' size, thus upping the limit to 64bit (for most systems).

This patch is also provide in a separate branch in git if you rather prefer
that. Send feed back here or in the github issue, whatever you prefer!

[1] =

(patch is gzipped to possibly preserve the newlines in the test case better)


List admin:

Received on 2015-10-30