src/java.base/unix/native/libjli/java_md_common.c
Print this page
*** 21,30 ****
--- 21,31 ----
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include "java.h"
+ // #include "jdk_strerror.h"
/*
* If app is "/foo/bin/javac", or "/foo/bin/sparcv9/javac" then put
* "/foo" into buf.
*/
*** 144,163 ****
va_end(vl);
}
void JLI_ReportErrorMessageSys(const char* fmt, ...) {
va_list vl;
! char *emsg;
! /*
! * TODO: its safer to use strerror_r but is not available on
! * Solaris 8. Until then....
! */
! emsg = strerror(errno);
! if (emsg != NULL) {
! fprintf(stderr, "%s\n", emsg);
! }
va_start(vl, fmt);
vfprintf(stderr, fmt, vl);
fprintf(stderr, "\n");
va_end(vl);
--- 145,158 ----
va_end(vl);
}
void JLI_ReportErrorMessageSys(const char* fmt, ...) {
va_list vl;
! char buf[1024];
! // jdk_strerror(errno, buf, (size_t) 1024)
! fprintf(stderr, "%s\n", strerror(errno));
va_start(vl, fmt);
vfprintf(stderr, fmt, vl);
fprintf(stderr, "\n");
va_end(vl);