This is the mail archive of the 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]
Other format: [Raw text]

[Bug string/21018] Add memcchr function

Paul Eggert <eggert at gnu dot org> changed:

           What    |Removed                     |Added
                 CC|                            |eggert at gnu dot org

--- Comment #3 from Paul Eggert <eggert at gnu dot org> ---
The FreeBSD memcchr is a kernel function, not a C library function, so it's not
really a precedent.

I've seen similar functions in application code (e.g., all_zeros in
grep/src/grep.c, zero_block_p in src/tar/sparse.c). The functions are easy to
write, not likely to be wrong, and not a performance bottleneck since they are
typically applied to input data and the cost of input dwarfs the cost of
running the function. Since these functions would need to be retained in the
source code anyway (which needs to be portable to non-glibc systems) from an
application viewpoint there doesn't seem to be much advantage to adding this
functionality to the glibc API.

You are receiving this mail because:
You are on the CC list for the bug.

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