--- a/hotspot/src/share/vm/runtime/os.hpp Tue Mar 15 20:37:35 2016 +0000
+++ b/hotspot/src/share/vm/runtime/os.hpp Sat Mar 12 08:35:05 2016 +0100
@@ -617,6 +617,22 @@
static size_t lasterror(char *buf, size_t len);
static int get_last_error();
+ // Replacement for strerror().
+ // Will return the english description of the error (e.g. "File not found", as
+ // suggested in the POSIX standard.
+ // Will return "Unknown error" for an unknown errno value.
+ // Will not attempt to localize the returned string.
+ // Will always return a valid string which is a static constant.
+ // Will not change the value of errno.
+ static const char* strerror(int e);
+
+ // Will return the literalized version of the given errno (e.g. "EINVAL"
+ // for EINVAL).
+ // Will return "Unknown error" for an unknown errno value.
+ // Will always return a valid string which is a static constant.
+ // Will not change the value of errno.
+ static const char* errno_name(int e);
+
// Determines whether the calling process is being debugged by a user-mode debugger.
static bool is_debugger_attached();