changeset 46451:a4a8613c08e9

8180039: Use more portable print format/arguments for rlim_t Reviewed-by: dholmes, mgerdin, stuefe
author mikael
date Thu, 11 May 2017 08:40:32 -0700
parents 7a361ede7817
children 0388e4c03d6f
files hotspot/src/os/posix/vm/os_posix.cpp
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hotspot/src/os/posix/vm/os_posix.cpp	Wed May 10 14:03:33 2017 +0000
+++ b/hotspot/src/os/posix/vm/os_posix.cpp	Thu May 11 08:40:32 2017 -0700
@@ -207,30 +207,30 @@
   st->print(" STACK ");
   getrlimit(RLIMIT_STACK, &rlim);
   if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
-  else st->print("%luk", rlim.rlim_cur >> 10);
+  else st->print(UINT64_FORMAT "k", uint64_t(rlim.rlim_cur) >> 10);
 
   st->print(", CORE ");
   getrlimit(RLIMIT_CORE, &rlim);
   if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
-  else st->print("%luk", rlim.rlim_cur >> 10);
+  else st->print(UINT64_FORMAT "k", uint64_t(rlim.rlim_cur) >> 10);
 
   // Isn't there on solaris
 #if !defined(SOLARIS) && !defined(AIX)
   st->print(", NPROC ");
   getrlimit(RLIMIT_NPROC, &rlim);
   if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
-  else st->print("%lu", rlim.rlim_cur);
+  else st->print(UINT64_FORMAT, uint64_t(rlim.rlim_cur));
 #endif
 
   st->print(", NOFILE ");
   getrlimit(RLIMIT_NOFILE, &rlim);
   if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
-  else st->print("%lu", rlim.rlim_cur);
+  else st->print(UINT64_FORMAT, uint64_t(rlim.rlim_cur));
 
   st->print(", AS ");
   getrlimit(RLIMIT_AS, &rlim);
   if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
-  else st->print("%luk", rlim.rlim_cur >> 10);
+  else st->print(UINT64_FORMAT "k", uint64_t(rlim.rlim_cur) >> 10);
   st->cr();
 }