src/os/bsd/vm/os_bsd.cpp

changeset 6755
5656140324ed
parent 6054
3b32d287da89
child 6779
364b73402247
equal deleted inserted replaced
6754:bf4dc2e29b5c 6755:5656140324ed
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)) {
1839 } 1836 }
1840 } 1837 }
1841 } 1838 }
1842 } 1839 }
1843 1840
1844 strcpy(saved_jvm_path, buf); 1841 strncpy(saved_jvm_path, buf, MAXPATHLEN);
1845 } 1842 }
1846 1843
1847 void os::print_jni_name_prefix_on(outputStream* st, int args_size) { 1844 void os::print_jni_name_prefix_on(outputStream* st, int args_size) {
1848 // no prefix required, not even "_" 1845 // no prefix required, not even "_"
1849 } 1846 }

mercurial