Request for review: 7102489: RFE: cleanup jlong typedef on __APPLE__ and _LP64 systems
david.holmes at oracle.com
Thu Jan 10 23:33:42 PST 2013
On 11/01/2013 4:39 AM, harold seigel wrote:
> Please review the following changes to fix bug 7102489.
> 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"
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 http://cr.openjdk.java.net/~hseigel/bug_7102489/
> Bug link at http://bugs.sun.com/view_bug.do?bug_id=7102489
> Thank you,
More information about the hotspot-runtime-dev