Re: Perl version of dir_hash_c

2011-07-27 Thread subscription
Bron Gondwana wrote : > I think it's the 32bit vs 64bit issue. There's an open bug for it in > bugzilla. Thanks for info. I found this bug (3381). But now I have another question. I have 2 alternatives. 1. I can change perl script that to use 32bit int (thanks to Leena Heino). 2. I can use patc

Perl version of dir_hash_c

2011-07-26 Thread subscription
Hello, I have found that C and Perl versions (tools/rehash) of dir_hash_c have different results. For part of mailboxes. Perl code : $n = 0; foreach my $b (split(/ */, $auth_user)) { $n = (($n << 3) ^ ($n >> 5)) ^ ord($b); } $h = chr(ord('A') + ($n % 23)); ./mbpath user.biz53p2 Result : A