PipeWire 1.4.8

Loading...
Searching...
No Matches
endian.h
1/* Spa */
2/* SPDX-FileCopyrightText: Copyright © 2019 Wim Taymans */
3/* SPDX-License-Identifier: MIT */
4
5#ifndef SPA_ENDIAN_H
6#define SPA_ENDIAN_H
7
8#if defined(__FreeBSD__) || defined(__MidnightBSD__)
9#include <sys/endian.h>
10#define bswap_16 bswap16
11#define bswap_32 bswap32
12#define bswap_64 bswap64
13#elif defined(_MSC_VER) && defined(_WIN32)
14#include <stdlib.h>
15#define __LITTLE_ENDIAN 1234
16#define __BIG_ENDIAN 4321
17#define __BYTE_ORDER __LITTLE_ENDIAN
18#define bswap_16 _byteswap_ushort
19#define bswap_32 _byteswap_ulong
20#define bswap_64 _byteswap_uint64
21#else
22#include <endian.h>
23#include <byteswap.h>
24#endif
25
26#endif /* SPA_ENDIAN_H */