HomeFreeBSD

byteswap.h: Add a glibc/linux compatible byteswap.h

Description

byteswap.h: Add a glibc/linux compatible byteswap.h

For endian.h to work instead of sys/endian.h, some software needs
byteswap.h available. It must define {,}byteswap_{16,32,64}.
Included sys/_endian.h to get an appropriate
byteswap16, etc
and defines the new macros in terms of them. Enhance _endian.h
to allow it to be included from here too.

Sponsored by: Netflix
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D32051

Details

Provenance
impAuthored on Jan 20 2023, 11:33 PM
Reviewer
markj
Differential Revision
D32051: byteswap.h: Add a glibc/linux compatible byteswap.h
Parents
rG30e0d2a51026: linux: For better compatibility, provide compatible endian.h
Branches
Unknown
Tags
Unknown