Page MenuHomeFreeBSD

libc: Use musl's optimized memchr
ClosedPublic

Authored by emaste on Oct 20 2018, 10:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 9:57 PM
Unknown Object (File)
Nov 2 2024, 2:26 AM
Unknown Object (File)
Nov 2 2024, 2:26 AM
Unknown Object (File)
Nov 2 2024, 2:26 AM
Unknown Object (File)
Nov 2 2024, 2:26 AM
Unknown Object (File)
Nov 2 2024, 2:06 AM
Unknown Object (File)
Oct 28 2024, 5:57 PM
Unknown Object (File)
Oct 27 2024, 5:57 PM
Subscribers

Details

Summary

Parentheses added to HASZERO macro to avoid a GCC warning.

Obtained from: musl (snapshot at commit c648cefb)
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Oct 21 2018, 12:08 AM

Update with musl 4d0a82170a25464c39522d7190b9fe302045ddb2:

fix aliasing-based undefined behavior in string functions

use the GNU C may_alias attribute if available, and fallback to naive
byte-by-byte loops if __GNUC__ is not defined.

this patch has been written to minimize changes so that history
remains reviewable; it does not attempt to bring the affected code
into a more consistent or elegant form.

FreeBSD is presumably built only with GCC or Clang (which also defines __GNUC__) so this should have no effect but is preferable.

This revision now requires review to proceed.Nov 12 2018, 2:11 PM

This might have gotten newer updates, but otherwise fine with me.

This revision is now accepted and ready to land.Sep 2 2019, 1:34 PM
This revision was automatically updated to reflect the committed changes.