Po Lu wrote: > Unfortunately, I've got the same Sun C that you do. > Could you show the preprocessed source for a call to `offsetof' on your > system? I have a feeling stddef.h on this machine is somehow wrong.
In your preprocessed output you had: enum { ABBR_SIZE_MIN = DEFAULT_MXFAST - ( ( size_t ) ( & ( ( ( struct tm_zone * ) ( ( void * ) 0 ) ) -> abbrs ) ) ) }; Whereas I get in "cc -g3 -O -DHAVE_CONFIG_H -I. -I.. -DGNULIB_STRICT_CHECKING=1 -g -E time_rz.c": enum { ABBR_SIZE_MIN = DEFAULT_MXFAST - ( size_t ) ( & ( ( ( struct tm_zone * ) 0 ) -> abbrs ) ) }; So, indeed, it's either the offsetof or the NULL macro. On my side, gnulib's stddef.h does not define these, but includes /usr/include/stddef.h. /usr/include/stddef.h does not define these, but includes /usr/include/iso/stddef_iso.h. The latter has #define offsetof(s, m) (size_t)(&(((s *)0)->m)) and #ifndef NULL #if defined(_LP64) #define NULL 0L #else #define NULL 0 #endif #endif How does it look on your side? Bruno