cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Is libcurl supported on Win64 OS (using Itanium 64 processor)?

From: Satish Mittal <satish.mittal_at_gmail.com>
Date: Mon, 15 May 2006 20:00:14 +0530

Hi,

I and Ravi debugged it on Win64 and figured out that the crash was coming
because of data misalignment on 64-bit platform. Using code of libcurl
7.15.1, the error was coming in file http_chunks.c line 112 (*wrote = 0). In
function Curl_httpchunk_read, wrote is defined as size_t*, but we assign
wrotep to wrote. wrotep is sszise_t* but it's typecasted to size_t*.

It seems on Win 64-bit, ssize_t is defined as int (32-bit) but size_t is
64-bit. Hence data misalignment. We tried replacing replace all occurences
of ssize_t with size_t, and it fixed the issue for us.

Later on, we figured out that the same issue was already pointed out in the
link mentioned by Daniel! But i think there is a typo in the fix mentioned
in that link: Instead of
 #define ssize_t SSIZE_T,
 it should be
 #define ssize_t size_t.

I think we can wrap up this fix in something like (#ifdef WIN64 || #ifdef
_WIN64) and make it permanent in libcurl, even if ssize_t is already taken
care of in Visual Studio 8, so that users having any other VS version don't
face this issue. In our case, we were using Intel compiler instead of .NET
compiler.

Regards,
Satish

On 5/15/06, Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> On Mon, 15 May 2006, RAVI KIRAN wrote:
>
> Since you're talking libcurl, I've cc'ed my reply to the libcurl mailing
> list
> and I suggest we continue and take follow-ups on this topic on that list
> only.
>
> > I need libcurl to be used on Itanium 64bit (IA64) machine using OS
> Windows
> > 2003 SP 1. In the curl download site http://curl.haxx.se/download.html I
> > din't find any download for Win64.
>
> We only point out packages we know of and I don't know of anyone offering
> win64 packages of curl. The download packages beyond the source ones are
> not
> provided by the curl project but by friendly persons and organizations.
>
> > I downloaded the one available under win32 - MSVC title (versin is
> 7.15.1)
>
> AFAIK, you can use the "generic" ones too.
>
> > and built it successfully but on running a sample application provided
> in
> > the tests I find that the application runs successfully but in the event
> > viewer I can see there is an application error and on reloging I find a
> > error report generated with *.hdmp and *.mdmp data dumps.
>
> Well, someone said you need a little tweak to build libcurl for win64 but
> I
> haven't really got very much input on it:
>
> http://curl.haxx.se/feedback/display.cgi?id=11467622585020&support=yes
> >
> > I couldn't find any document which suggests libcurl is supported on
> Win64.
> > Can anybody tell me is it supported? and if any one is using it?
>
> libcurl builds and runs on more than 40 different OS and CPU combinations,
> including a large amount of 64bit architectures. I can't see any reason
> why we
> couldn't build and run fine on win64 as well.
>
> But of course there may still be bugs and quirks since win64 seems to be a
> very rarely used environment and I don't think very many people have used
> or
> even tried libcurl on it yet.
>
> > One more thing is on Win64 I am using the Intel compiler and not .NET
> > compiler.
>
> Please build libcurl from source and help us by telling what changes you
> need
> to do to fix the win64 problems you experience. It is a bit hard to fix
> problems for systems you don't have with a problem desscribed as vaguely
> such
> as yours.
>
> --
> Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
>
Received on 2006-05-15