While doing test builds on AMD64 I noticed that gcc
generated several warnings related to pointer size (64
bits on AMD64) vs variables declared as ints (32bit).
Two of those warnings may have been harmless. Two
others look like they may have caused problems.
This patch takes care of all four warnings by making
sure declarations and casts use long types instead of