gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for MinGW-W64 port


From: Eli Zaretskii
Subject: Re: Patch for MinGW-W64 port
Date: Thu, 22 Mar 2012 22:26:43 +0200

> Date: Thu, 22 Mar 2012 19:43:24 +0100
> From: Nikos Mavrogiannopoulos <address@hidden>
> Cc: address@hidden
> 
> > -      gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) sd);
> > +      gnutls_transport_set_ptr (session, (gnutls_transport_ptr_t) 
> > ((ptrdiff_t) sd));
> 
> 
> What difference do you see with ptrdiff_t comparing to unsigned long?

64-bit Windows uses the LLP64 model, so `unsigned long' is a 32-bit
type.  By contrast, ptrdiff_t is a (signed) 64-bit type.

> > +    $ac_cv_sizeof_long_long)
> > +      AC_DEFINE([GNUTLS_POINTER_TO_INT_CAST], [(long long)],
> > +                [Additional cast to bring void* to a type castable to 
> > int.])
> > +      ;;
> 
> 
> Why use long long for pointer to int? Isn't in this platform
> sizeof(void*)==sizeof(long)?

No, see above.  On 64-bit Windows, sizeof(void *) == sizeof(long long)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]