cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Re: Problems with libcurl, OS X, and curl_off_t (or : What's My Size?)

From: Ryan Wilcox <ryanwilcox_at_mac.com>
Date: Mon, 16 Aug 2004 13:36:19 -0400

On 8/16/04, at 12:00 PM, Casey ODonnell said:

>> Ohhh... yes, I see it now. The documentation tells you what variable type an
>> option expects... I'm working with Casey O'Donnell on wxCurl,
>> I'll go through that and make *sure* we're using the proper types where we
>> need to be... ;)
>
>I only use the _LARGE options [SNIP] ...so
>everywhere I do something with a SIZE, I do it with curl_off_t just to
>be safe.

And that's the funny thing. Here's the line of code, specifically, that throws
fits at us...

<language="C">

    curl_off_t iSize
    
    SetOpt(CURLOPT_POSTFIELDSIZE_LARGE, (long)iSize);
    //SetOpt is a very thin wrapper over curl_easy_setopt()

</language>

Having that long cast in there makes it work for me, but of course at the cost
of being incompatible with large files. Without the cast the CONTENT-SIZE of the
post == 0.

So, again with the confusion...

Hopefully that provides a bit more background information...
_Ryan Wilcox

================================================================
Wilcox Development Solutions: http://www.wilcoxd.com
Toolsmiths for the Internet Age PGP: 0x2F4E9C31
Received on 2004-08-16