This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug string/21018] Add memcchr function
- From: "eggert at gnu dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Fri, 13 Jan 2017 16:15:35 +0000
- Subject: [Bug string/21018] Add memcchr function
- Auto-submitted: auto-generated
- References: <bug-21018-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21018
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.