[PATCH 1/2] xfree86: Fix type of IOPortBase to be a pointer

Jeremy Huddleston jeremyhu at apple.com
Sun Oct 16 04:56:07 PDT 2011

On Oct 16, 2011, at 3:49 AM, Mark Kettenis wrote:

>> This addresses issues on 64bit systems where the IOPortBase is higher in
>> memory space.
>> -_X_EXPORT unsigned int IOPortBase;  /* Memory mapped I/O port area */
>> +_X_EXPORT pointer IOPortBase;  /* Memory mapped I/O port area */
> Sorry, but you can't do it that way, at least not without making
> further changes to compiler.h.  There's stuff in there that does
> arithmetic using IOPortBase and pointer arithmetic on a void pointer
> isn't properly defined.
> Perhaps it's best to change IOPortBase to be an "unsigned long".  That
> should be good enough for all ILP32 and LP64 plaforms, and it would be
> ABI compatible on all ILP32 platforms.

Ugg... well if there's math on it, it should be a uintptr_t.

More information about the xorg-devel mailing list