I'm wondering about the use of log2 in the patch.
1. Is it always available?  Configure doesn't check for it.
2. I don't do any casting to int.  This works for gcc; is it okay for other compilers?

--
Jeff Sparkes
jsparkes@gmail.com