From: Adam Megacz Date: Thu, 6 Jun 2002 20:06:03 +0000 (+0000) Subject: natFileDescriptorWin32.cc (open): Disable Win32 file locking, just like the Sun JVM... X-Git-Tag: releases/gcc-3.1.1~195 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f083a90c912292993929ce76144db947a466ca5;p=thirdparty%2Fgcc.git natFileDescriptorWin32.cc (open): Disable Win32 file locking, just like the Sun JVM does. 2002-06-06 Adam Megacz * java/io/natFileDescriptorWin32.cc (open): Disable Win32 file locking, just like the Sun JVM does. From-SVN: r54320 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 26840d3bb6a6..d4202a2763e9 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2002-06-06 Adam Megacz + + * java/io/natFileDescriptorWin32.cc (open): Disable Win32 file + locking, just like the Sun JVM does. + 2002-06-03 Mark Mitchell 2002-05-23 Bryce McKinlay diff --git a/libjava/java/io/natFileDescriptorWin32.cc b/libjava/java/io/natFileDescriptorWin32.cc index 286598fb1a24..8c659a499367 100644 --- a/libjava/java/io/natFileDescriptorWin32.cc +++ b/libjava/java/io/natFileDescriptorWin32.cc @@ -82,7 +82,6 @@ java::io::FileDescriptor::open (jstring path, jint jflags) { HANDLE handle = NULL; DWORD access = 0; - DWORD share = FILE_SHARE_READ; DWORD create = OPEN_EXISTING; char buf[MAX_PATH] = ""; @@ -94,7 +93,6 @@ java::io::FileDescriptor::open (jstring path, jint jflags) { if ((jflags & READ) && (jflags & WRITE)) { access = GENERIC_READ | GENERIC_WRITE; - share = 0; if (jflags & APPEND) create = OPEN_ALWAYS; else @@ -105,14 +103,13 @@ java::io::FileDescriptor::open (jstring path, jint jflags) { else { access = GENERIC_WRITE; - share = 0; if (jflags & APPEND) create = OPEN_ALWAYS; else create = CREATE_ALWAYS; } - handle = CreateFile(buf, access, share, NULL, create, 0, NULL); + handle = CreateFile(buf, access, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, create, 0, NULL); if (handle == INVALID_HANDLE_VALUE) {