Request for review: 7102489: RFE: cleanup jlong typedef on __APPLE__ and _LP64 systems

David Holmes david.holmes at
Thu Jan 10 23:33:42 PST 2013

Hi Harold,

On 11/01/2013 4:39 AM, harold seigel wrote:
> Hi,
> Please review the following changes to fix bug 7102489.
> Summary:
> The definition of type jlong differed on Mac OS from the other 64 bit
> platforms. This fix makes it consistent. In order to do this, this fix
> defines new macros, JLONG_FORMAT and JULONG_FORMAT, for printing and
> scanning jlongs and julongs.
> This fix also does some cleanup. Methods jlong_format_specifier() and
> julong_format_specifer() were removed and some format specifiers were
> replaced with appropriate macros.

General clean up looks good. As long as we have jlong and int64 types in 
use I much prefer to JLONG_FORMAT and INT64_FORMAT in the sources.

I still wonder how those os:: functions came about in the first place :)

A few comments ...


   67 #define JLONG_FORMAT "%lld"

Doesn't this need to have both 32-bit and 64-bit variants?



+ #define JLONG_FORMAT "%I64d"

Ditto ?



Why do we need a special case for Apple? AFAIK for ILP32 and LP64 "long 
long" is always 64-bits so %lld should always be valid.



I think the N.B comments could be deleted.



> Open webrev at
> <>
> Bug link at
> Thank you,
> Harold

More information about the hotspot-runtime-dev mailing list