Subject: Re: bug#22689: [PATCH] Add logcount

From: Mark Oteiza <[email-masked]>
Date: Sat, 30 Sep 2017 12:03:31 -0400

On 30/09/17 at 06:38pm, Eli Zaretskii wrote:
> > Date: Sat, 30 Sep 2017 10:55:25 -0400
> > From: Mark Oteiza <[email-masked]>
> > Cc: [email-masked]
> > 
> > > Btw, on Windows, a long is a 32-bit type, so I think we need
> > > to check against ULONG_LONG_MAX as well.
> > 
> > I tried implementing your comments (and added a test).  I don't know
> > what to do in the #else for ULONG_LONG_MAX.
> 
> Same as you do for ULONG_MAX, I think.

so the following?

  else if (v <= ULONG_MAX || v <= ULONG_LONG_MAX)
      XSETINT (res, logcount64 (v));