mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +00:00
LibC: Add back __bswap{16,32,64}() to endian.h
This commit is contained in:
parent
5f459ee929
commit
31447d58fb
1 changed files with 15 additions and 0 deletions
|
@ -18,6 +18,21 @@ __BEGIN_DECLS
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
static __inline uint16_t __bswap16(uint16_t x)
|
||||
{
|
||||
return __builtin_bswap16(x);
|
||||
}
|
||||
|
||||
static __inline uint32_t __bswap32(uint32_t x)
|
||||
{
|
||||
return __builtin_bswap32(x)
|
||||
}
|
||||
|
||||
static __inline uint64_t __bswap64(uint64_t x)
|
||||
{
|
||||
return __builtin_bswap64(x)
|
||||
}
|
||||
|
||||
#define LITTLE_ENDIAN __LITTLE_ENDIAN
|
||||
#define BIG_ENDIAN __BIG_ENDIAN
|
||||
#define PDP_ENDIAN __PDP_ENDIAN
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue