Angel Pons | 32859fc | 2020-04-02 23:48:27 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Stefan Reinauer | 36c8340 | 2009-03-01 10:16:01 +0000 | [diff] [blame] | 2 | |
| 3 | #ifndef __TYPES_H |
| 4 | #define __TYPES_H |
Elyes HAOUAS | b12ece9 | 2019-05-15 21:01:02 +0200 | [diff] [blame] | 5 | |
Julius Werner | a214837 | 2019-11-13 19:50:33 -0800 | [diff] [blame] | 6 | /* types.h is supposed to provide the standard headers defined in here: */ |
Julius Werner | 98eeb96 | 2019-12-11 15:47:42 -0800 | [diff] [blame] | 7 | #include <commonlib/bsd/cb_err.h> |
Julius Werner | a214837 | 2019-11-13 19:50:33 -0800 | [diff] [blame] | 8 | #include <stdbool.h> |
Stefan Reinauer | 36c8340 | 2009-03-01 10:16:01 +0000 | [diff] [blame] | 9 | #include <stdint.h> |
| 10 | #include <stddef.h> |
Stefan Reinauer | 36c8340 | 2009-03-01 10:16:01 +0000 | [diff] [blame] | 11 | |
Alexandru Gagniuc | a4d784e | 2015-01-25 21:08:42 -0600 | [diff] [blame] | 12 | /* |
| 13 | * This may mean something else on architectures where the bits are numbered |
| 14 | * from the MSB (e.g. PowerPC), but until we cross that bridge, this macro is |
| 15 | * perfectly fine. |
| 16 | */ |
You-Cheng Syu | 8d6ea6a | 2019-03-13 21:37:23 +0800 | [diff] [blame] | 17 | #ifndef BIT |
Alexandru Gagniuc | a4d784e | 2015-01-25 21:08:42 -0600 | [diff] [blame] | 18 | #define BIT(x) (1ul << (x)) |
You-Cheng Syu | 8d6ea6a | 2019-03-13 21:37:23 +0800 | [diff] [blame] | 19 | #endif |
Alexandru Gagniuc | a4d784e | 2015-01-25 21:08:42 -0600 | [diff] [blame] | 20 | |
Furquan Shaikh | 197c486 | 2021-01-19 22:13:59 -0800 | [diff] [blame] | 21 | #define BITS_PER_BYTE 8 |
| 22 | |
Alexandru Gagniuc | fe9e30d | 2013-11-23 17:46:04 -0600 | [diff] [blame] | 23 | #endif /* __TYPES_H */ |