diff options
| author | megacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-06 20:39:37 +0000 |
|---|---|---|
| committer | megacz <megacz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-06 20:39:37 +0000 |
| commit | 7244a5b1c233a9516b3ddbc2c350c54730231a9e (patch) | |
| tree | 15d778095b264f90e5e9ff07a208189ba47637f1 /libjava | |
| parent | 2c2e43fb36438ac5d2fcbd562729bfdbcf080709 (diff) | |
| download | ppe42-gcc-7244a5b1c233a9516b3ddbc2c350c54730231a9e.tar.gz ppe42-gcc-7244a5b1c233a9516b3ddbc2c350c54730231a9e.zip | |
2002-06-06 Adam Megacz <adam@xwt.org>
* java/io/natFileDescriptorWin32.cc (open): Disable Win32 file
locking, just like the Sun JVM does.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54322 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
| -rw-r--r-- | libjava/ChangeLog | 5 | ||||
| -rw-r--r-- | libjava/java/io/natFileDescriptorWin32.cc | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 3b58ee78c96..86938b1becf 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -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. diff --git a/libjava/java/io/natFileDescriptorWin32.cc b/libjava/java/io/natFileDescriptorWin32.cc index bc9cbc85bc9..f72e39ce127 100644 --- a/libjava/java/io/natFileDescriptorWin32.cc +++ b/libjava/java/io/natFileDescriptorWin32.cc @@ -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) { |

