comparison src/os/bsd/vm/os_bsd.cpp @ 18007:364b73402247

Merge
author asaha
date Thu, 22 May 2014 11:09:06 -0700
parents 6048424d3865 5656140324ed
children f73af4455d7d
comparison
equal deleted inserted replaced
17920:382a82b0a3e7 18007:364b73402247
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.
1127 void os::die() { 1127 void os::die() {
1128 // _exit() on BsdThreads only kills current thread 1128 // _exit() on BsdThreads only kills current thread
1129 ::abort(); 1129 ::abort();
1130 } 1130 }
1131 1131
1132 // unused on bsd for now.
1133 void os::set_error_file(const char *logfile) {}
1134
1135
1136 // This method is a copy of JDK's sysGetLastErrorString 1132 // This method is a copy of JDK's sysGetLastErrorString
1137 // from src/solaris/hpi/src/system_md.c 1133 // from src/solaris/hpi/src/system_md.c
1138 1134
1139 size_t os::lasterror(char *buf, size_t len) { 1135 size_t os::lasterror(char *buf, size_t len) {
1140 1136
1785 return; 1781 return;
1786 1782
1787 // determine if this is a legacy image or modules image 1783 // determine if this is a legacy image or modules image
1788 // modules image doesn't have "jre" subdirectory 1784 // modules image doesn't have "jre" subdirectory
1789 len = strlen(buf); 1785 len = strlen(buf);
1786 assert(len < buflen, "Ran out of buffer space");
1790 jrelib_p = buf + len; 1787 jrelib_p = buf + len;
1791 1788
1792 // Add the appropriate library subdir 1789 // Add the appropriate library subdir
1793 snprintf(jrelib_p, buflen-len, "/jre/lib"); 1790 snprintf(jrelib_p, buflen-len, "/jre/lib");
1794 if (0 != access(buf, F_OK)) { 1791 if (0 != access(buf, F_OK)) {
1818 } 1815 }
1819 } 1816 }
1820 } 1817 }
1821 } 1818 }
1822 1819
1823 strcpy(saved_jvm_path, buf); 1820 strncpy(saved_jvm_path, buf, MAXPATHLEN);
1824 } 1821 }
1825 1822
1826 void os::print_jni_name_prefix_on(outputStream* st, int args_size) { 1823 void os::print_jni_name_prefix_on(outputStream* st, int args_size) {
1827 // no prefix required, not even "_" 1824 // no prefix required, not even "_"
1828 } 1825 }