changeset 52892:442d322bb6d8

8214944: replace strerror by os::strerror Reviewed-by: dholmes, neliasso
author mbaesken
date Thu, 06 Dec 2018 09:48:33 +0100
parents e1fcdc7ead4d
children f14aa990b330
files src/hotspot/os/aix/os_aix.cpp src/hotspot/os/bsd/os_bsd.cpp src/hotspot/os/linux/os_linux.cpp src/hotspot/os/solaris/os_solaris.cpp src/hotspot/os/windows/os_windows.cpp src/hotspot/share/gc/z/zErrno.cpp src/hotspot/share/logging/logFileOutput.cpp
diffstat 7 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/os/aix/os_aix.cpp	Fri Dec 07 10:48:39 2018 +0300
+++ b/src/hotspot/os/aix/os_aix.cpp	Thu Dec 06 09:48:33 2018 +0100
@@ -4359,7 +4359,7 @@
 static inline time_t get_mtime(const char* filename) {
   struct stat st;
   int ret = os::stat(filename, &st);
-  assert(ret == 0, "failed to stat() file '%s': %s", filename, strerror(errno));
+  assert(ret == 0, "failed to stat() file '%s': %s", filename, os::strerror(errno));
   return st.st_mtime;
 }
 
--- a/src/hotspot/os/bsd/os_bsd.cpp	Fri Dec 07 10:48:39 2018 +0300
+++ b/src/hotspot/os/bsd/os_bsd.cpp	Thu Dec 06 09:48:33 2018 +0100
@@ -3388,7 +3388,7 @@
 static inline struct timespec get_mtime(const char* filename) {
   struct stat st;
   int ret = os::stat(filename, &st);
-  assert(ret == 0, "failed to stat() file '%s': %s", filename, strerror(errno));
+  assert(ret == 0, "failed to stat() file '%s': %s", filename, os::strerror(errno));
 #ifdef __APPLE__
   return st.st_mtimespec;
 #else
--- a/src/hotspot/os/linux/os_linux.cpp	Fri Dec 07 10:48:39 2018 +0300
+++ b/src/hotspot/os/linux/os_linux.cpp	Thu Dec 06 09:48:33 2018 +0100
@@ -5946,7 +5946,7 @@
 static inline struct timespec get_mtime(const char* filename) {
   struct stat st;
   int ret = os::stat(filename, &st);
-  assert(ret == 0, "failed to stat() file '%s': %s", filename, strerror(errno));
+  assert(ret == 0, "failed to stat() file '%s': %s", filename, os::strerror(errno));
   return st.st_mtim;
 }
 
--- a/src/hotspot/os/solaris/os_solaris.cpp	Fri Dec 07 10:48:39 2018 +0300
+++ b/src/hotspot/os/solaris/os_solaris.cpp	Thu Dec 06 09:48:33 2018 +0100
@@ -1652,7 +1652,7 @@
 static inline time_t get_mtime(const char* filename) {
   struct stat st;
   int ret = os::stat(filename, &st);
-  assert(ret == 0, "failed to stat() file '%s': %s", filename, strerror(errno));
+  assert(ret == 0, "failed to stat() file '%s': %s", filename, os::strerror(errno));
   return st.st_mtime;
 }
 
--- a/src/hotspot/os/windows/os_windows.cpp	Fri Dec 07 10:48:39 2018 +0300
+++ b/src/hotspot/os/windows/os_windows.cpp	Thu Dec 06 09:48:33 2018 +0100
@@ -1563,7 +1563,7 @@
 static inline time_t get_mtime(const char* filename) {
   struct stat st;
   int ret = os::stat(filename, &st);
-  assert(ret == 0, "failed to stat() file '%s': %s", filename, strerror(errno));
+  assert(ret == 0, "failed to stat() file '%s': %s", filename, os::strerror(errno));
   return st.st_mtime;
 }
 
--- a/src/hotspot/share/gc/z/zErrno.cpp	Fri Dec 07 10:48:39 2018 +0300
+++ b/src/hotspot/share/gc/z/zErrno.cpp	Thu Dec 06 09:48:33 2018 +0100
@@ -46,5 +46,5 @@
 }
 
 const char* ZErrno::to_string() const {
-  return strerror(_error);
+  return os::strerror(_error);
 }
--- a/src/hotspot/share/logging/logFileOutput.cpp	Fri Dec 07 10:48:39 2018 +0300
+++ b/src/hotspot/share/logging/logFileOutput.cpp	Thu Dec 06 09:48:33 2018 +0100
@@ -248,7 +248,7 @@
   _stream = os::fopen(_file_name, FileOpenMode);
   if (_stream == NULL) {
     errstream->print_cr("Error opening log file '%s': %s",
-                        _file_name, strerror(errno));
+                        _file_name, os::strerror(errno));
     return false;
   }