curl-users
Re: Error Compiling Curl
Date: Thu, 07 Mar 2002 12:00:50 -0500
> Well, libcurl currently has no proper support for large files, so I think
it
> would be an idea (as a short-term fix) to make expected_size a double and
> then typecast the assignment. Like in this patch:
>
> diff -u -r1.22 file.c
> --- lib/file.c 11 Oct 2001 09:32:19 -0000 1.22
> +++ lib/file.c 4 Mar 2002 23:12:40 -0000
> @@ -140,7 +140,7 @@
> */
> CURLcode res = CURLE_OK;
> struct stat statbuf;
> - ssize_t expected_size=-1;
> + double expected_size=-1;
> ssize_t nread;
> struct SessionHandle *data = conn->data;
> char *buf = data->state.buffer;
> @@ -155,7 +155,7 @@
> /*VMS?? -- This only works reliable for STREAMLF files */
> if( -1 != fstat(fd, &statbuf)) {
> /* we could stat it, then read out the size */
> - expected_size = statbuf.st_size;
> + expected_size = (double)statbuf.st_size;
> }
>
> /* The following is a shortcut implementation of file reading
>
> I'd be happy to get to know if this works.
Didn't work for me.
> I'm also interested in getting the large files support fixed once and for
> all, should anyone want to grab that issue.
I decided to compile without largefile support. Still, I am getting compile
errors (I am now using 7.9.5)
$
./configure --prefix=/home/victord/curl --with-ssl=/usr --disable-debug --di
sable-largefile
$ gmake
...
formdata.c || echo './'`formdata.c
rm -f .libs/formdata.lo
gcc -DHAVE_CONFIG_H -I../include -I../lib -I../lib -I/usr/include/openssl -I
/usr/include -g -O2 -c formdata.c -MT formdata.lo -MD -MP -MF
.deps/formdata.TPlo -fPIC -DPIC -o .libs/formdata.lo
formdata.c: In function `GetStr':
formdata.c:146: warning: assignment makes pointer from integer without a
cast
formdata.c: In function `FormAdd':
formdata.c:759: warning: assignment makes pointer from integer without a
cast
formdata.c:779: warning: passing arg 1 of `AddFormInfo' makes pointer from
integer without a cast
formdata.c:790: warning: assignment makes pointer from integer without a
cast
formdata.c:809: warning: passing arg 2 of `AddFormInfo' makes pointer from
integer without a cast
formdata.c:820: warning: assignment makes pointer from integer without a
cast
formdata.c:870: warning: assignment makes pointer from integer without a
cast
formdata.c: In function `curl_formadd':
formdata.c:924: `__builtin_va_alist' undeclared (first use in this function)
formdata.c:924: (Each undeclared identifier is reported only once
formdata.c:924: for each function it appears in.)
formdata.c: In function `AddFormDataf':
formdata.c:963: `__builtin_va_alist' undeclared (first use in this function)
gmake[2]: *** [formdata.lo] Error 1
gmake[2]: Leaving directory `/home/victord/curl-7.9.5/lib'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/home/victord/curl-7.9.5/lib'
gmake: *** [all-recursive] Error 1
Received on 2002-03-07