Patch to projects.html: glibc's string function macros

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Tue Oct 31 14:16:00 GMT 2000


 > From: Richard Henderson <rth@cygnus.com>
 > 
 > On Mon, Oct 30, 2000 at 06:49:43PM -0500, Kaveh R. Ghazi wrote:
 > > One note, when expanding strstr(s1, "c") -> strchr(s1, c), I didn't
 > > hardcode strchr but instead I switched on TARGET_MEM_FUNCTIONS and
 > > issued `index' for the BSD case.  (I did this by changing the
 > > `library_name' when calling builtin_function to register strchr.)
 > 
 > I don't think you should do this.  Pedanticly, "strchr" is in
 > the standard library namespace and "index" isn't.
 > r~

Yes, but that same rationale would apply to memcpy/memset vs
bcopy/bzero.  And yet, someone saw the need to switch on
TARGET_MEM_FUNCTIONS.

I don't feel strongly about it, so I'll checkin as you suggest without
`index' later tonight, unless you change your mind. :-)

		--Kaveh

PS: any thoughts on creating proper testsuite entries?
I.e. scan-assembler-not vs overriding the libc copy with an abort
wrapper?  http://gcc.gnu.org/ml/gcc-patches/2000-10/msg01095.html
Thanks.
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions


More information about the Gcc-patches mailing list