On 07/17/2012 03:27 AM, Jim Meyering wrote: > ohav chochmah wrote: >> Why not reuse memccpy (in glibc)? as in 'memccpy(to, from, '\0', size)'. >> Not only for sake of reusing, but memccpy is highly optimized for >> ia64, and may be optimized for other arches in the future. >
> > but (for portability) that would require a gnulib module for memccpy. > Such a module would be welcome regardless, but here it seems like > it's not worth the complication, since the few uses of stzncpy are not > performance sensitive. An additional point: memccpy is POSIX, stzncpy is not. We should implement a memccpy module in gnulib anyways, but according to the current glibc docs, it is already portable to pretty much everywhere but BeOS (even mingw has it). -- Eric Blake [email protected] +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
