Build issue on Windows because XID is not the same size as a pointer
I just noticed the latest pango (v1.50.5) failed to build on Windows with MinGW-w64 with all the dependencies installed (including X libraries) there were errors because of conversions between pointers and integer type.
On Windows the size of a pointer can't be assumed to be the same as the size of an integer or long integer. Instead the integer type guaranteed to be the same size is intptr_t
(or uintptr_t
) from stdint.h
.
When I replaced typedef unsigned long XID;
with typedef uintptr_t XID;
(and idem dito for VisualID
, though I'm not sure if this is necessary or if there are others), the pango build errors were resolved.