cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: yangtse: curl/docs/examples 10-at-a-time.c, 1.7, 1.8 anyauthput.c, 1.6, 1.7 fopen.c, 1.11, 1.12 ftpuploadresume.c, 1.4, 1.5

From: Yang Tse <yangsita_at_gmail.com>
Date: Mon, 1 Sep 2008 15:54:39 +0200

2008/8/31, Gisle Vanem wrote:

> > --- anyauthput.c 22 May 2008 21:20:08 -0000 1.6
> > +++ anyauthput.c 31 Aug 2008 12:12:35 -0000 1.7
> >
> ...
> > +#ifdef _MSC_VER
> > +# ifdef _WIN64
> > + typedef __int64 intptr_t;
> > +# else
> > + typedef int intptr_t;
> > +# endif
> > +#endif
> >
>
> How about using 'LONG_PTR'? I should have the correct size on
> Win32/Win64.

Gisle,

Discard what I've said in previous post in this thread. Stepping back
and leaving something alone for a good while lets you see things more
clearly. ;-)

What was committed to CVS is appropriate 'as is', no need to change
anything. What rules here is the sizeof(void *) which under _WIN64 is
8 and under _WIN32 is 4. So, the introduced change for MSVC is
appropriate for both _WIN64 and _WIN32, and allows compilation under
MSVC without an intptr_t.

If the example should be using in some points a pointer to FILE
instead of a pointer to file descriptor and later using fileno() is
something I don't know. It much depends on the intention of example
author.

-- 
-=[Yang]=-
Received on 2008-09-01