Waldek Hebisch wrote:
What I don't understand is that gpidump.pas uses the MedCard type, which is four bytes on Mac OS X.
type GPIInt = MedCard;
where gpc.h uses HOST_WIDE_INT, which is eight bytes on Mac OS X.
typedef HOST_WIDE_INT gpi_int;
gpidump is wrong. OTOH I am slightly surprised by Mac OS X values. Such values are typical for a cross compiler running on 32-bit machine but producing 64-bit code.
They changed HOST_WIDE_INT to eight bytes because of the -mpowerpc64 switch, which can be used to produce 64-bit code even when running the OS in 32-bit mode (to use the G5 more efficient).
See gcc discussions at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13987 http://gcc.gnu.org/ml/gcc-patches/2004-06/msg00398.html http://gcc.gnu.org/ml/gcc-patches/2004-08/msg02339.html.
The gcc discussion seems to suggest, by the way, that we use HOST_WIDEST_FAST_INT if available instead of HOST_WIDE_INT for gpi_int.
Regards,
Ariaan van Os