The C-level "ptrdiff_t" data type is being mapped to the Java type "int" by
GlueGen, which is incorrect. It should be mapped to type "long" for 64-bit
safety. It is not completely clear why this is happening. Updating
make/stub_includes/common/stddef.h with the correct typedef does not fix the
problem. More investigation is needed. Once this is correctly changed, we need
to provide manual trampoline methods with the original signatures taking "int"
in order to maintain backward binary compatibility.