Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3BEED119.E912DFAA@phekda.freeserve.co.uk> Date: Sun, 11 Nov 2001 19:27:21 +0000 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com Subject: Re: RESEND: Patch to computer st_blksize in struct stat References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. Eli Zaretskii wrote: > > On Sun, 11 Nov 2001, Richard Dawe wrote: > > > Below is a patch to compute st_blksize in struct stat. This is > > basically the st_blocks patch with the st_blocks stuff removed. > > > > OK to commit? > > It's fine with me, but: > > 1) Please don't use tolower (or any other ctype functions) when you > manipulate file names. Only ASCII characters should be subject to > case conversions, whereas ctype function are locale-sensitive. So > please downcase with explicit code. OK, I'll fix that. I'll add some text to develop.txi too. > 2) I'm a bit worried by the possible slow-down, due to the call to > statfs. Could you compare the old and the new versions, at least > on hard disks, floppies, and CDs? I'll look at that later in the week. A single stat call may be hurt badly, but programs that stat files on the same drive a lot shouldn't be hurt much, because of the caching mechanism. If it really is a lot slower, we could add another flag to _djstat_flags for those people really concerned with performance (_STAT_BLKSIZE perhaps). Thanks for your critique, bye, Rich =] -- Richard Dawe http://www.phekda.freeserve.co.uk/richdawe/