Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 70352 invoked by uid 500); 25 Oct 2002 17:21:10 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 70333 invoked from network); 25 Oct 2002 17:21:10 -0000 Date: Fri, 25 Oct 2002 13:21:13 -0400 (EDT) From: rbb@apache.org X-Sender: rbb@shell.ntrnet.net To: Bill Stoddard Cc: APR Development List Subject: RE: [PATCH] Support APR_APPEND (O_APPEND) with apr_file_write on Windows In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Fri, 25 Oct 2002, Bill Stoddard wrote: > > > At 09:27 AM 10/25/2002, Bill Stoddard wrote: > > >The only problem with this patch [...] > > > > > >--- readwrite.c 19 Sep 2002 12:20:20 -0000 1.1.1.1 > > >+++ readwrite.c 25 Oct 2002 13:44:53 -0000 > > >- if (thefile->pOverlapped && !thefile->pipe) { > > >- thefile->pOverlapped->Offset = (DWORD)thefile->filePtr; > > >- thefile->pOverlapped->OffsetHigh = > > (DWORD)(thefile->filePtr >> > > >32); > > >- } > > >- else if (!thefile->pipe && thefile->append) { > > >+ if (thefile->append && !thefile->pipe) { > > >+ int rc; > > >+ rc = apr_file_lock(thefile, APR_FLOCK_EXCLUSIVE); > > >+ if (rc != APR_SUCCESS) { > > >+ rc = APR_SUCCESS; > > >+ } > > > SetFilePointer(thefile->filehand, 0, NULL, FILE_END); > > > > You can't just drop the Overlapped test. there is NO CURRENT POSITION > > if you have opened a file for overlapped I/O. > > I know. Overlapped is not used when writing to the access log. But you are writing code for APR here, not Apache. You can't gaurantee that nobody will try to use Overlapped with APPEND. Ryan _______________________________________________________________________________ Ryan Bloom rbb@apache.org 550 Jean St Oakland CA 94610 -------------------------------------------------------------------------------