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 02:05:24 +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.

Hmmm. I didn't inspect enough the source of that example. It failed to
compile with MSVC due to the lack of 'intptr_t', and I simply provided
a valid definition of it for MSVC.

But, as you have noticed intptr_t is being used in that example
assuming size characteristics of that data type that actually it
doesn't have.

As you point out, it could simply use (long *) or maybe even better
just (void *)

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