LibC: Add byteswap.h, forwarding bswap_N to GCC builtins

This commit is contained in:
Kenzi Jeanis 2020-02-03 09:26:37 -06:00 committed by Andreas Kling
parent 3969fcc72e
commit 6c9d66ed4b
Notes: sideshowbarker 2024-07-19 09:40:35 +09:00

11
Libraries/LibC/byteswap.h Normal file
View file

@ -0,0 +1,11 @@
#include <sys/cdefs.h>
#pragma once
__BEGIN_DECLS
#define bswap_16(x) (__builtin_bswap16(x))
#define bswap_32(x) (__builtin_bswap32(x))
#define bswap_64(x) (__builtin_bswap64(x))
__END_DECLS