src/java.base/unix/native/libjli/java_md_common.c
Print this page
@@ -21,10 +21,11 @@
* 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,20 +145,14 @@
va_end(vl);
}
void JLI_ReportErrorMessageSys(const char* fmt, ...) {
va_list vl;
- char *emsg;
+ char buf[1024];
- /*
- * 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);
- }
+ // 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);