pkgsrc-Users archive

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

Re: Portable replacement for __WORDSIZE define?



On Fri, Dec 30, 2022 at 06:32:39PM +0100, Alexander Schreiber wrote:
> The __WORDSIZE issue shows up in libglusterfs/src/glusterfs/dict.h:
> 
>  322  /* POSIX-compliant systems requires the 'time_t' to be a signed integer. */
>  323  #if __WORDSIZE == 64
>  324  #define dict_get_time(dict, key, val) dict_get_int64((dict), (key), (val))

That is totally nonsense.

You can use _LP64 to select between pointer being 64bit and pointer
being 32bit, but that obviously is complete unrelated to the size of
time_t (which is always 64bit on NetBSD and most modern systems).

You need to add a configure test for that property.

Martin


Home | Main Index | Thread Index | Old Index