1 /* |
1 /* |
2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
1113 void os::die() { |
1113 void os::die() { |
1114 // _exit() on BsdThreads only kills current thread |
1114 // _exit() on BsdThreads only kills current thread |
1115 ::abort(); |
1115 ::abort(); |
1116 } |
1116 } |
1117 |
1117 |
1118 // unused on bsd for now. |
|
1119 void os::set_error_file(const char *logfile) {} |
|
1120 |
|
1121 |
|
1122 // This method is a copy of JDK's sysGetLastErrorString |
1118 // This method is a copy of JDK's sysGetLastErrorString |
1123 // from src/solaris/hpi/src/system_md.c |
1119 // from src/solaris/hpi/src/system_md.c |
1124 |
1120 |
1125 size_t os::lasterror(char *buf, size_t len) { |
1121 size_t os::lasterror(char *buf, size_t len) { |
1126 |
1122 |
1806 return; |
1802 return; |
1807 |
1803 |
1808 // determine if this is a legacy image or modules image |
1804 // determine if this is a legacy image or modules image |
1809 // modules image doesn't have "jre" subdirectory |
1805 // modules image doesn't have "jre" subdirectory |
1810 len = strlen(buf); |
1806 len = strlen(buf); |
|
1807 assert(len < buflen, "Ran out of buffer space"); |
1811 jrelib_p = buf + len; |
1808 jrelib_p = buf + len; |
1812 |
1809 |
1813 // Add the appropriate library subdir |
1810 // Add the appropriate library subdir |
1814 snprintf(jrelib_p, buflen-len, "/jre/lib"); |
1811 snprintf(jrelib_p, buflen-len, "/jre/lib"); |
1815 if (0 != access(buf, F_OK)) { |
1812 if (0 != access(buf, F_OK)) { |