Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jun 1996 16:48:37 -0600
From:      Nate Williams <nate@sri.MT.net>
To:        Bruce Evans <bde@zeta.org.au>
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
Message-ID:  <199606072248.QAA01110@rocky.sri.MT.net>
In-Reply-To: <199606072241.IAA06611@godzilla.zeta.org.au>
References:  <199606072241.IAA06611@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help

> >  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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606072248.QAA01110>