This is the mail archive of the libc-alpha@cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: glibc-2.0.100: bits/string2.h nits


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]