On 06/02/2011, at 1:46 AM, Doug Baskins wrote:
> Pradeep:
>
> Thank you for your persistence on finding this problem. I do not have the
> resources
> (money to support Microsoft compilers) to get you support in a timely manner.
> I
> depend on the Open Source Community -- such as yourself. I retired in 2002.
> However,
> I am still very active on improved versions of Judy in my spare time.
>
> I did not sleep very well last night because I was thinking on how to help
> you and prevent
> a re-occurrence of this problem in the future.
You already stated that: rely on the community :)
There is NO WAY you can or should handle the technical development and testing
of the research tool AND all the testing and build issues on multiple platforms.
We were discussing this before.
The question is how to get people appropriate access to the repository.
My system (Felix) is using Git, and we have a clone of Judy on GitHub.com.
We do not use any makefiles, autoconf, or any other junk: our build system
is written in Python and we have the files there to just C-compile everything,
no configuration or whatever is required (other than the macros in Judy.h
which make the choices).
This is lucky because Judy is a plain old data structure, as opposed to say
networking support or whatever (try making all that stuff work portably!)
The key technique to portability is quite simple: you have to first chose
your word size Word_t, typically just
typedef uintptr_t Word_t;
will do. The golden rule for bit fiddling is: always use *unsigned* values
because the results are completely deterministic.
It is sometimes messy to calculate bit masks portably, but it can always be
done.
For example:
~(Word_t)0
is all 1 bits,
CHAR_BIT * sizeof(Word_t)
is the count of bits (I forget with sizeof() counts as a constant in C .. it
should
be in C++ I think: you can always just define
#define WORD_T_BITS 64
or 32 depending on the platform .. you can't need more than one or two of these
values.
Basically you have & | ^ ~ as well as << >> to do calculations, it's usually
enough.
The trick is casts. For example:
printf("Word=%llu\n",(unsigned long long)x);
That's never wrong, even if x is only an int :)
There may be better ways to do this.
On old platforms some things WILL break. Do you really want to support x86?
--
john skaller
[email protected]
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world?
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Judy-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/judy-devel