Fix some 64-bit warnings and incompatibilities: fastcall edition.

Thanks, Lionel. I also fixed some warnings for 64bit.