curl-library
Re: curl-7.11.1 questions.
Date: Mon, 26 Apr 2004 15:17:06 +0200 (CEST)
On Mon, 26 Apr 2004, Maya Youlzari wrote:
> In reply to <http://curl.haxx.se/mail/lib-2004-04/0232.html>
Eh, your mail looks very confusing but I'll try to extract the info and reply.
Why are your comments already quoted two levels?
> > >It sounds like a bug. When the transfer is prematurely aborted it is
> > >often due to a bad network and then I think we should not send the final
> > >QUIT command. Would you be able to provide a patch?
> > I think I found the problem (at least it works in my tests) - the
> > following lines are missing before "return CURLE_PARTIAL_FILE;" in file
> > ftp.c (lines 745 and 755)
> > /* shut down the socket to inform the server we're done */
> > sclose(conn->sock[SECONDARYSOCKET]);
> > conn->sock[SECONDARYSOCKET] = CURL_SOCKET_BAD;
> > return CURLE_PARTIAL_FILE;
> > Please approve and add it into the next patch.
I already made an attempt to fix the problem with QUIT being sent when
CURLE_PARTIAL_FILE occurs. It is included in 7.11.2. I added a test case that
verifies that my fix does at least what I wanted it to do.
> > >And you are providing a value that is a curl_off_t variable? This looks
> > >like you're providing a value that is not using the correct variable
> > >size.
> > The problem indeed caused by incorrect variable size even when I am using
> > curl_off_t type. The issue is that curl_off_t defined as off_t and on my
> > SunOs off_t defined as long (32 bits)
So when you run configure, does it detect your curl_off_t to be 4 bytes only?
On my Solaris box configure claims curl_off_t is 8 bytes... See:
http://curl.haxx.se/auto/log.cgi?id=20040426050302-6317
> > so I need to perform casting to (int64_t) which I don't want to do.
Right, it just proves that there's a discrepancy between the library and your
app. curl_off_t should have the same size in both.
> > On the other hand, in libcurl installation the curl_off_t detected as 64
> > bits variable. How you do it in libcurl installation, curl_off_t is still
> > of type off_t?
curl_off_t is an off_t on all platforms that have off_t.
> What cc flags or other definitions should be defined?
With gcc3 installed, configure says this:
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for _LARGE_FILES value needed for large files... no
Otherwise I guess the man pages 'lf64' and 'lfcompile64' are good starting
points to learn more about these issues on Solaris.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-04-26