Mercurial > hg > graal-jvmci-8
comparison src/share/vm/jvmci/jvmciRuntime.cpp @ 22589:ca8e46278bae
Create default for os::default_file_open_flags on Solaris; JVMCIRuntime::parse_lines: use ::open instead of os::open
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Mon, 21 Sep 2015 11:48:40 +0200 |
parents | 3e3d5678a6bf |
children | bc2d4dac0cd3 |
comparison
equal
deleted
inserted
replaced
22588:3e3d5678a6bf | 22589:ca8e46278bae |
---|---|
1013 } | 1013 } |
1014 | 1014 |
1015 void JVMCIRuntime::parse_lines(char* path, ParseClosure* closure, bool warnStatFailure) { | 1015 void JVMCIRuntime::parse_lines(char* path, ParseClosure* closure, bool warnStatFailure) { |
1016 struct stat st; | 1016 struct stat st; |
1017 if (::stat(path, &st) == 0 && (st.st_mode & S_IFREG) == S_IFREG) { // exists & is regular file | 1017 if (::stat(path, &st) == 0 && (st.st_mode & S_IFREG) == S_IFREG) { // exists & is regular file |
1018 int file_handle = os::open(path, os::default_file_open_flags(), 0); | 1018 int file_handle = ::open(path, os::default_file_open_flags(), 0); |
1019 if (file_handle != -1) { | 1019 if (file_handle != -1) { |
1020 char* buffer = NEW_C_HEAP_ARRAY(char, st.st_size + 1, mtInternal); | 1020 char* buffer = NEW_C_HEAP_ARRAY(char, st.st_size + 1, mtInternal); |
1021 int num_read; | 1021 int num_read; |
1022 num_read = (int) ::read(file_handle, (char*) buffer, st.st_size); | 1022 num_read = (int) ::read(file_handle, (char*) buffer, st.st_size); |
1023 if (num_read == -1) { | 1023 if (num_read == -1) { |