--- a/hotspot/src/os/windows/vm/os_windows.cpp Wed Apr 24 18:20:04 2013 -0400
+++ b/hotspot/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;