Blender V4.3
BLI_endian_defines.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
11/* NOTE: these names are historic and could use a more generic prefix.
12 * This could be done as part of a bigger refactor. */
13
15#if !defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
16# error Either __BIG_ENDIAN__ or __LITTLE_ENDIAN__ must be defined.
17#endif
18
19#define L_ENDIAN 1
20#define B_ENDIAN 0
21
22#ifdef __BIG_ENDIAN__
23# define ENDIAN_ORDER B_ENDIAN
24#else
25# define ENDIAN_ORDER L_ENDIAN
26#endif