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:52:26PM +0100, Martin Husemann wrote:
> 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.

Thanks, that pointed me into the right direction. The proper fix is
described in the upstream bug I filed:

 https://github.com/gluster/glusterfs/issues/3942

and it looks like I can use pre-configure to re-invoke autogen.sh like:

pre-configure:
        cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} sh ./autogen.sh

(from devel/cre2)

Functional testing of the client on amd64 and sparc64 looks good so
far, I'll do some more testing and cleaning up before I poke whoever
owns filesystems/glusterfs with an update.

Kind regards,
           Alex.
-- 
"Opportunity is missed by most people because it is dressed in overalls and
 looks like work."                                      -- Thomas A. Edison


Home | Main Index | Thread Index | Old Index