mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:47:34 +00:00
LibC: Add byteswap.h, forwarding bswap_N to GCC builtins
This commit is contained in:
parent
3969fcc72e
commit
6c9d66ed4b
1 changed files with 11 additions and 0 deletions
11
Libraries/LibC/byteswap.h
Normal file
11
Libraries/LibC/byteswap.h
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue