Hello John, sorry I forgot to mention as i was talking about 64-bit windows only. I have these under #if defined JU_WIN && defined JU_64BIT so for the rest of the platforms it is unchanged - so it is portable. But definitely your way of (Word_t)1U is the much neater :-). Thank you.


From: john skaller <skaller@users.sourceforge.net>
To: "Bisht, Pradeep" <pradeep_bisht@yahoo.com>
Cc: judy-devel@lists.sourceforge.net
Sent: Sat, February 5, 2011 9:20:56 AM
Subject: Re: Judy on 64-bit windows;


On 05/02/2011, at 7:21 PM, Bisht, Pradeep wrote:

> finally i get to make my program work. there were some more 1L in JudyPrivate.h which needed to be changed to 1LL (the proper word size on 64-bit windows).

You mean these?

#define JU_BITPOSMASKB(BITNUM) (1L << ((BITNUM) % cJU_BITSPERSUBEXPB))
#define JU_BITPOSMASKL(BITNUM) (1L << ((BITNUM) % cJU_BITSPERSUBEXPL))

> Is there any regression suite that I can run make sure I have not broken anything? Also I would like to give back to community this code which now works on windows 64-bit - is there way I can do it. Thanks.

Well, you don't have a portable solution here: you cannot use lLL. The right way to do this is:

    (Word_t)1u

with a cast, that's portable.


--
john skaller
skaller@users.sourceforge.net