[hatari-devel] Definition of SIZEOF_VOID_P

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hello all,

we just had a problem with networking on Previous. There was bad alignment in some structures. Finally the problem was caused by a bad definition of SIZEOF_VOID_P in slirp. It is defined to SIZEOF_CHAR_P which itself is defined in cpu/sysconfig.h:

#ifdef WIN64
....
#define SIZEOF_VOID_P 8
#else
#define SIZEOF_VOID_P 4
#endif

I suggest to change this to a more portable:
#if INTPTR_MAX == INT64_MAX
#define SIZEOF_VOID_P 8
#else
#define SIZEOF_VOID_P 4
#endif

Hatari is not affected immediately as it doesn’t use SLiRP, but this is a potential source of error anyway.

What do you think?

Best wishes,
Andreas


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/