blob: 8724d4b01f9b6b2aa9a32eb96bb7acb694215cba [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: */
Julius Werner98eeb962019-12-11 15:47:42 -08007#include <commonlib/bsd/cb_err.h>
Angel Ponsec3c2e22021-06-08 18:12:27 +02008#include <limits.h>
Julius Wernera2148372019-11-13 19:50:33 -08009#include <stdbool.h>
Stefan Reinauer36c83402009-03-01 10:16:01 +000010#include <stdint.h>
11#include <stddef.h>
Stefan Reinauer36c83402009-03-01 10:16:01 +000012
Alexandru Gagniuca4d784e2015-01-25 21:08:42 -060013/*
14 * This may mean something else on architectures where the bits are numbered
15 * from the MSB (e.g. PowerPC), but until we cross that bridge, this macro is
16 * perfectly fine.
17 */
You-Cheng Syu8d6ea6a2019-03-13 21:37:23 +080018#ifndef BIT
Alexandru Gagniuca4d784e2015-01-25 21:08:42 -060019#define BIT(x) (1ul << (x))
You-Cheng Syu8d6ea6a2019-03-13 21:37:23 +080020#endif
Alexandru Gagniuca4d784e2015-01-25 21:08:42 -060021
Furquan Shaikh197c4862021-01-19 22:13:59 -080022#define BITS_PER_BYTE 8
23
Alexandru Gagniucfe9e30d2013-11-23 17:46:04 -060024#endif /* __TYPES_H */