提交 f2f157f0 编写于 作者: Z zgu

Merge

......@@ -230,7 +230,7 @@ checks: check_os_version check_j2se_version
# Solaris 2.5.1, 2.6).
# Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok.
SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 2.7%
SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 3%
OS_VERSION := $(shell uname -r)
EMPTY_IF_NOT_SUPPORTED = $(filter $(SUPPORTED_OS_VERSION),$(OS_VERSION))
......
......@@ -1299,7 +1299,7 @@ int os::get_line_chars(int fd, char* buf, const size_t bsize){
size_t sz, i = 0;
// read until EOF, EOL or buf is full
while ((sz = (int) read(fd, &buf[i], 1)) == 1 && i < (bsize-1) && buf[i] != '\n') {
while ((sz = (int) read(fd, &buf[i], 1)) == 1 && i < (bsize-2) && buf[i] != '\n') {
++i;
}
......@@ -1320,7 +1320,7 @@ int os::get_line_chars(int fd, char* buf, const size_t bsize){
}
// line is longer than size of buf, skip to EOL
int ch;
char ch;
while (read(fd, &ch, 1) == 1 && ch != '\n') {
// Do nothing
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册