patch to clean out savestring, copystr, mybzero and mybcopy

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Mon Jan 11 19:16:00 GMT 1999


 > From: Per Bothner <bothner@cygnus.com>
 > 
 > > 	This patch cleans out some uses of savestring, copystr, mybzero
 > > and mybcopy, it instead uses xstrdup, or bzero/bcopy.  Okay to install?
 > 
 > While one can argue for using bzero vs memset,
 > I think bcopy should be replaced by memmove/memcpy, in all code
 > that runs on the "host", since we have the appropriate autoconf
 > support.
 > 	--Per Bothner

	I don't understand why one would go out of their way to prefer
either style.  Since these are host programs, we can't rely on
libiberty.a (yet) but system.h will take care of defining bcopy in terms
of memcpy if the need arises.  The reason I wouldn't switch it by hand
is that I'd have to reverse the arguments and that's just begging for a
typo to introduce a bug.  I'd rather let sleeping dogs lie in this case
and comtinue using bcopy.

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Icon CMT Corp.



More information about the Gcc-patches mailing list