[PATCH] Fix cast int-to-pointer and pointer-to-int
Joerg Sonnenberger
joerg at britannica.bec.de
Wed Feb 4 14:23:40 PST 2009
On Wed, Feb 04, 2009 at 02:10:36PM -0800, Ian Romanick wrote:
> On Wed, Feb 04, 2009 at 09:04:05PM +0100, Joerg Sonnenberger wrote:
> > On Wed, Feb 04, 2009 at 08:43:43PM +0100, Tomas Carnecky wrote:
> > > By first casting to long and then to the final type. Of course
> > > this assumes that sizeof(long) == sizeof(void *). If the Win32
> > > folks care enough about warnings, we could make macros for this.
> >
> > Please use either uintptr_t (prefered) or size_t (fallback) instead of
> > long. Also really make this a macro so that it can easily be searched
> > for.
>
> mod +1
>
> I think autoconf has some magic to generate typedefs for uintptr_t and
> friends when they are not available. Make it look like that. :)
AC_TYPE_UINTPTR_T.
Joerg
More information about the xorg
mailing list