blob: ca4571777cf0aeea3019319bc71c40f17005894a [file] [log] [blame]
Angel Pons32859fc2020-04-02 23:48:27 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Stefan Reinauer36c83402009-03-01 10:16:01 +00002
3#ifndef __TYPES_H
4#define __TYPES_H
Elyes HAOUASb12ece92019-05-15 21:01:02 +02005
Julius Wernera2148372019-11-13 19:50:33 -08006/* types.h is supposed to provide the standard headers defined in here: */
Elyes Haouas35c3ae3b2022-10-27 12:25:12 +02007/* IWYU pragma: begin_exports */
Julius Werner98eeb962019-12-11 15:47:42 -08008#include <commonlib/bsd/cb_err.h>
Angel Ponsec3c2e22021-06-08 18:12:27 +02009#include <limits.h>
Julius Wernera2148372019-11-13 19:50:33 -080010#include <stdbool.h>
Stefan Reinauer36c83402009-03-01 10:16:01 +000011#include <stdint.h>
12#include <stddef.h>
Elyes Haouas35c3ae3b2022-10-27 12:25:12 +020013/* IWYU pragma: end_exports */
Stefan Reinauer36c83402009-03-01 10:16:01 +000014
Alexandru Gagniuca4d784e2015-01-25 21:08:42 -060015/*
16 * This may mean something else on architectures where the bits are numbered
17 * from the MSB (e.g. PowerPC), but until we cross that bridge, this macro is
18 * perfectly fine.
19 */
You-Cheng Syu8d6ea6a2019-03-13 21:37:23 +080020#ifndef BIT
Alexandru Gagniuca4d784e2015-01-25 21:08:42 -060021#define BIT(x) (1ul << (x))
You-Cheng Syu8d6ea6a2019-03-13 21:37:23 +080022#endif
Alexandru Gagniuca4d784e2015-01-25 21:08:42 -060023
Furquan Shaikh197c4862021-01-19 22:13:59 -080024#define BITS_PER_BYTE 8
25
Alexandru Gagniucfe9e30d2013-11-23 17:46:04 -060026#endif /* __TYPES_H */