bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sun C 5.14


From: Bruno Haible
Subject: Re: Sun C 5.14
Date: Wed, 05 Apr 2023 14:28:36 +0200

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]