This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: patch to make Win32 file locking work like POSIX -- objections?
- From: "Jon Beniston" <jbeniston at siroyan dot com>
- To: <java-patches at gcc dot gnu dot org>, "Adam Megacz" <patches at lists dot megacz dot com>
- Date: Fri, 15 Mar 2002 10:30:05 -0000
- Subject: Re: patch to make Win32 file locking work like POSIX -- objections?
- References: <86ofhqblqr.fsf@megacz.com>
>
> Does anybody object to this? The original author of
> natFileDescriptorWin32 had file locking on -- I was wondering if that
> was a conscious choice or just something that hadn't been dealt with
> yet.
If that was me, then it was definitely unconscious, much like the rest of my
coding...
Cheers,
JonB
>
> If there aren't any objections, I'll commit this.
>
> - a
>
> Index: natFileDescriptorWin32.cc
> ===================================================================
> RCS file: /cvs/gcc/gcc/libjava/java/io/natFileDescriptorWin32.cc,v
> retrieving revision 1.5.2.2
> diff -u -r1.5.2.2 natFileDescriptorWin32.cc
> --- natFileDescriptorWin32.cc 2002/03/10 03:34:59 1.5.2.2
> +++ natFileDescriptorWin32.cc 2002/03/15 02:39:07
> @@ -82,7 +82,7 @@
>
> HANDLE handle = NULL;
> DWORD access = 0;
> - DWORD share = FILE_SHARE_READ;
> + DWORD share = FILE_SHARE_READ | FILE_SHARE_WRITE;
> DWORD create = OPEN_EXISTING;
> char buf[MAX_PATH] = "";
>
> @@ -94,7 +94,6 @@
> if ((jflags & READ) && (jflags & WRITE))
> {
> access = GENERIC_READ | GENERIC_WRITE;
> - share = 0;
> if (jflags & APPEND)
> create = OPEN_ALWAYS;
> else
> @@ -105,7 +104,6 @@
> else
> {
> access = GENERIC_WRITE;
> - share = 0;
> if (jflags & APPEND)
> create = OPEN_ALWAYS;
> else
>
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************