[uClibc] __bzero x bzero
Erik Andersen
andersen at codepoet.org
Thu Mar 18 11:36:55 UTC 2004
On Wed Feb 18, 2004 at 06:16:31PM -0300, Alexandre Oliva wrote:
> This patch was only meant to provide __bzero, that some apps were
> found to be relying on.
>
> At first I thought it was a bug in the app, and that it shouldn't be
> using this symbol at all. But it turns out that include/string.h
> says:
>
> /* We define this function always since `bzero' is sometimes needed when
> the namespace rules does not allow this. */
> extern void __bzero (void *__s, size_t __n) __THROW;
>
> so there seems to be a legitimate argument for libc to provide __bzero
> in addition to bzero. Well, then, the argument carries over to the
> library's internal use of bzero. Since bzero is not in the C
> standard, a user may legitimately define it to whatever s/he likes.
> So we'd better not call bzero ourselves, but rather __bzero, that's in
> the implementation namespace.
>
> This patch implements this change in all locations that used to use
> bzero(). Some grep hits are still left in, in header files, in
> regex.c, that redefines __bzero to bzero, and in the string/string.c
> test program.
Applied, thanks! I changed the calls to __bzero to instead call
memset (which is safe per SuSv3). Thanks!
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
More information about the uClibc
mailing list