Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 33248 invoked by uid 500); 18 Jun 2000 12:31:48 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 33237 invoked from network); 18 Jun 2000 12:31:47 -0000 Date: Sun, 18 Jun 2000 08:29:03 -0400 Message-Id: <200006181229.IAA29966@k5.localdomain> X-Authentication-Warning: k5.localdomain: trawick set sender to trawick@ibm.net using -f From: Jeff Trawick To: new-httpd@apache.org In-reply-to: <200006180521.PAA23334@silk.apana.org.au> (brianh@kheldar.apana.org.au) Subject: Re: cvs commit: apache-2.0/src/lib/apr/file_io/win32 readwrite.c Reply-to: trawick@ibm.net References: <200006180521.PAA23334@silk.apana.org.au> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N > From: "Brian Havard" > Date: Sun, 18 Jun 2000 15:21:20 +1000 (EST) > > On 17 Jun 2000 21:14:10 -0000, trawick@locus.apache.org wrote: > > >trawick 00/06/17 14:14:10 > > > > Modified: src/lib/apr/file_io/win32 readwrite.c > > Log: > > Win32 changes to ap_read() and ap_fgets(): > > > > . ap_read() wasn't checking for *nbytes <= 0 on entry; it now handles > > it like the Unix code > > Shouldn't be necessary, the while loop's size > 0 condition should handle a > 0 length read properly. Looking the same is nice too :) I guess I picked the wrong one to establish the standard. I'll remove it from both Win32 and Unix when I get a chance. > > . ap_read() returns APR_EOF if it hits eof before giving the caller any > > data > > Did we reach a consesus on this? I didn't see one. Win32 and Unix now work the same, and that behavior is the same as stdio, the Unix syscall read(), the Win32 syscall (ReadFile() or whatever), the OS/2 syscall DosRead(), etc. That sounds like a pretty good consensus to me. I really don't think that this is a case where it is helpful to create a new programming paradigm. > > . ap_fgets() clobbered the '\n' > > I see that as a good thing. When would you actually want it? It is the only way to know that what was read in wasn't a complete line. That is required. It is also the way that the Unix ap_fgets() code always worked. It is also the way that stdio works. -- Jeff Trawick | trawick@ibm.net | PGP public key at web site: http://www.geocities.com/SiliconValley/Park/9289/ Born in Roswell... married an alien...