Mercurial > hg > graal-jvmci-8
diff src/os/windows/vm/os_windows.cpp @ 10195:e12c9b3740db
8012260: ciReplay: Include PID into the name of replay data file
Reviewed-by: kvn, twisti
author | vlivanov |
---|---|
date | Thu, 25 Apr 2013 11:02:32 -0700 |
parents | f36e073d56a4 |
children | 0b55a78c6be5 |
line wrap: on
line diff
--- a/src/os/windows/vm/os_windows.cpp Wed Apr 24 18:20:04 2013 -0400 +++ b/src/os/windows/vm/os_windows.cpp Thu Apr 25 11:02:32 2013 -0700 @@ -1221,8 +1221,10 @@ // Needs to be in os specific directory because windows requires another // header file <direct.h> -const char* os::get_current_directory(char *buf, int buflen) { - return _getcwd(buf, buflen); +const char* os::get_current_directory(char *buf, size_t buflen) { + int n = static_cast<int>(buflen); + if (buflen > INT_MAX) n = INT_MAX; + return _getcwd(buf, n); } //----------------------------------------------------------- @@ -4098,6 +4100,10 @@ return ::open(pathbuf, oflag | O_BINARY | O_NOINHERIT, mode); } +FILE* os::open(int fd, const char* mode) { + return ::_fdopen(fd, mode); +} + // Is a (classpath) directory empty? bool os::dir_is_empty(const char* path) { WIN32_FIND_DATA fd;