From owner-cvs-sys Fri Jun 7 15:49:03 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA00837 for cvs-sys-outgoing; Fri, 7 Jun 1996 15:49:03 -0700 (PDT) Received: from rocky.sri.MT.net (rocky.sri.MT.net [204.182.243.10]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id PAA00813; Fri, 7 Jun 1996 15:48:47 -0700 (PDT) Received: (from nate@localhost) by rocky.sri.MT.net (8.6.12/8.6.12) id QAA01110; Fri, 7 Jun 1996 16:48:37 -0600 Date: Fri, 7 Jun 1996 16:48:37 -0600 From: Nate Williams Message-Id: <199606072248.QAA01110@rocky.sri.MT.net> To: Bruce Evans Cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-sys@freefall.freebsd.org, nate@freefall.freebsd.org Subject: Re: cvs commit: src/sys/i386/conf files.i386 In-Reply-To: <199606072241.IAA06611@godzilla.zeta.org.au> References: <199606072241.IAA06611@godzilla.zeta.org.au> Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > Modified: sys/i386/conf files.i386 > > Log: > > Added index as a 'standard' file. It could be added as 'optional' for > > ibcs2, but I felt it might be useful in other code as well at a later > > point. > > You probably should have used strchr. index goes with rindex, but > rindex isn't actually used in the [i386] kernel, and Lite2 has almost > completed removing *index from user code. > > OTOH, using a non-STDC function has the advantage that the compiler > won't silently replace it by a possibly-inferior builtin. This > shouldn't be a problem for rindex/strchr since it should be rarely used. > > OTOH, using a non-STDC function has the advantage that gcc may replace > it by a superior builtin :-). I used index for 2 reasons. First, the cop-out reason was because sef suggested it. Secondly, the kernel tends to use the 'BSD' versions of things rather than the 'STDC' versions, so I was trying to stay compatible with the kernel. (ie; we use bzero but not memset, etc..) I can change it if it's a big deal. Nate