]> gcc.gnu.org Git - gcc.git/commitdiff
natFileDescriptorWin32.cc (open): Disable Win32 file locking, just like the Sun JVM...
authorAdam Megacz <adam@xwt.org>
Thu, 6 Jun 2002 20:39:37 +0000 (20:39 +0000)
committerAdam Megacz <megacz@gcc.gnu.org>
Thu, 6 Jun 2002 20:39:37 +0000 (20:39 +0000)
2002-06-06  Adam Megacz <adam@xwt.org>

        * java/io/natFileDescriptorWin32.cc (open): Disable Win32 file
        locking, just like the Sun JVM does.

From-SVN: r54322

libjava/ChangeLog
libjava/java/io/natFileDescriptorWin32.cc

index 3b58ee78c9678e0687e21b60789a0b3cb23ad427..86938b1becf266e0ee09786afdd404f25828f7b2 100644 (file)
@@ -1,3 +1,8 @@
+2002-06-06  Adam Megacz <adam@xwt.org>
+
+        * java/io/natFileDescriptorWin32.cc (open): Disable Win32 file
+        locking, just like the Sun JVM does.
+       
 2002-06-05  H.J. Lu  (hjl@gnu.org)
 
        * Makefile.am (libgcj_convenience.la): Revert the last change.
index bc9cbc85bc99c9141ea6137f07d19fe7db46db59..f72e39ce127040428d4f782216090af8306faa87 100644 (file)
@@ -85,7 +85,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] = "";
 
@@ -97,7 +96,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
@@ -108,14 +106,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)
     {
This page took 0.075278 seconds and 5 git commands to generate.