This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: glibc-2.0.100: bits/string2.h nits
- To: drepper@cygnus.com (Ulrich Drepper)
- Subject: Re: glibc-2.0.100: bits/string2.h nits
- From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
- Date: 13 Nov 1998 10:31:33 +0100
- Cc: "pacman" <pacman-libc@cqc.com>, vonbrand@sleipnir.valparaiso.cl (Horst von Brand), libc-alpha@cygnus.com
- References: <19981109055215.32731.qmail@defiant.cqc.com> <r2lnlgn5of.fsf@happy.cygnus.com>
Ulrich Drepper <drepper@cygnus.com> writes:
|> "pacman" <pacman-libc@cqc.com> writes:
|>
|> > The problem is that there are some functions in C, including strpbrk and
|> > strchr, which cannot be implemented in a clean way because of the way they
|> > abuse pointers. They can't be improved because their interfaces are defined
|> > by the relevant standards in a fundamentally broken way.
|>
|> Correct.
|>
|> > Change (char *)s to (char *)(long)s
|>
|> I've added something similar: (long) is not the right type (well, it
|> normally is but not from the concept). I've used (size_t) instead.
Actually the right type would intptr_t, but that is only available in C9x
mode.
Andreas.