--- old/src/os/bsd/vm/os_bsd.cpp 2017-06-28 15:43:12.000000000 -0700 +++ new/src/os/bsd/vm/os_bsd.cpp 2017-06-28 15:43:12.000000000 -0700 @@ -1563,7 +1563,7 @@ int _print_dll_info_cb(const char * name, address base_address, address top_address, void * param) { outputStream * out = (outputStream *) param; - out->print_cr(PTR_FORMAT " \t%s", base_address, name); + out->print_cr(INTPTR_FORMAT " \t%s", (intptr_t)base_address, name); return 0; } @@ -2117,9 +2117,9 @@ static void warn_fail_commit_memory(char* addr, size_t size, bool exec, int err) { - warning("INFO: os::commit_memory(" PTR_FORMAT ", " SIZE_FORMAT - ", %d) failed; error='%s' (errno=%d)", addr, size, exec, - os::errno_name(err), err); + warning("INFO: os::commit_memory(" INTPTR_FORMAT ", " SIZE_FORMAT + ", %d) failed; error='%s' (errno=%d)", (intptr_t)addr, size, exec, + os::errno_name(err), err); } // NOTE: Bsd kernel does not really reserve the pages for us. @@ -3629,12 +3629,12 @@ Dl_info dlinfo; memset(&dlinfo, 0, sizeof(dlinfo)); if (dladdr(addr, &dlinfo) != 0) { - st->print(PTR_FORMAT ": ", addr); + st->print(INTPTR_FORMAT ": ", (intptr_t)addr); if (dlinfo.dli_sname != NULL && dlinfo.dli_saddr != NULL) { st->print("%s+%#x", dlinfo.dli_sname, - addr - (intptr_t)dlinfo.dli_saddr); + (uint)((uintptr_t)addr - (uintptr_t)dlinfo.dli_saddr)); } else if (dlinfo.dli_fbase != NULL) { - st->print("", addr - (intptr_t)dlinfo.dli_fbase); + st->print("", (uint)((uintptr_t)addr - (uintptr_t)dlinfo.dli_fbase)); } else { st->print(""); } @@ -3642,7 +3642,7 @@ st->print(" in %s", dlinfo.dli_fname); } if (dlinfo.dli_fbase != NULL) { - st->print(" at " PTR_FORMAT, dlinfo.dli_fbase); + st->print(" at " INTPTR_FORMAT, (intptr_t)dlinfo.dli_fbase); } st->cr();