8134538: Duplicate implementations of os::lasterror

Method os::lasterror was moved to os_posix.cpp

Reviewed-by: hseigel, kbarrett, coleenp
This commit is contained in:
Patricio Chilano Mateo 2018-07-03 15:08:01 -04:00 committed by Coleen Phillimore
parent c0ebf80159
commit 209071d135
5 changed files with 13 additions and 66 deletions

View file

@ -2010,23 +2010,6 @@ void os::print_jni_name_suffix_on(outputStream* st, int args_size) {
// no suffix required
}
// This method is a copy of JDK's sysGetLastErrorString
// from src/solaris/hpi/src/system_md.c
size_t os::lasterror(char *buf, size_t len) {
if (errno == 0) return 0;
const char *s = os::strerror(errno);
size_t n = ::strlen(s);
if (n >= len) {
n = len - 1;
}
::strncpy(buf, s, n);
buf[n] = '\0';
return n;
}
// sun.misc.Signal
extern "C" {