JLONG_FORMAT_W is derived from INT64_FORMAT_W which uses the PRId64 macro from inttypes.h. For bsd, PRId64 translates into "lld". jlong, on the other hand, is typedef'ed as "long int". This causes the compiler to complain about incompatible types. On the other hand, JLONG_FORMAT seems compatible with type jlong.