Skip to content

Commit

Permalink
specify O_BINARY when opening files on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
dicej committed Feb 7, 2013
1 parent 5241660 commit b38eecb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classpath/java-io.cpp
Expand Up @@ -803,9 +803,9 @@ Java_java_io_RandomAccessFile_open(JNIEnv* e, jclass, jstring path,
jlong length = 0;
#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
#if defined(PLATFORM_WINDOWS)
int fd = ::_wopen(chars, O_RDONLY);
int fd = ::_wopen(chars, O_RDONLY | OPEN_MASK);
#else
int fd = ::open((const char*)chars, O_RDONLY);
int fd = ::open((const char*)chars, O_RDONLY | OPEN_MASK);
#endif
releaseChars(e, path, chars);
if (fd == -1) {
Expand Down

0 comments on commit b38eecb

Please sign in to comment.