It just clicked. I'm working on Win64 (LLP64 model), not UNIX (LP64 model). In Win64, an unsigned long is /always/ 32-bits, but in UNIX it scales: 64-bit in a 64-bit compile. In order to get a 64-bit int, I need to define it as "long long" or "int64". That's why John put this conditional declaration:

#ifndef _WORD_T
#define _WORD_T
#if defined(_WIN64)
typedef unsigned long long Word_t, * PWord_t; // expect 32-bit or 64-bit words.
#else
typedef unsigned long Word_t, * PWord_t; // expect 32-bit or 64-bit words.
#endif
#endif

So I suppose I should go through all the source code and find any other "long" declarations, and change them to similar conditional declarations.

It's good to confirm that Judy *was* written to work with a 64-bit Word_t. I shouldn't have anything to worry about, once I add the conditional type declarations. At that point they should be equivalent. Don't you think?

Doug, do you think this would be worthy of a 1.0.6, for us poor Windows developers?


---
Tim Margheim

On 10/19/2012 3:11 PM, Alan Silverstein wrote:
hoping Doug chimes in with better advice, but my recollection is that
you build libJudy two ways, for 32-bit or 64-bit.  If you want 64-bit
pointers (array values), then just use the 64-bit build.  Don't try
changing any defines...  Shouldn't be necessary, and probably won't work
anyway due to the very specific bit-handling inside the library.  All
done with "straight C" but correctness and efficiency is tied to some
assumptions about sizes and packing.

Now am I misunderstanding something?

Alan Silverstein

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Judy-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/judy-devel

Reply via email to