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> |
Angel Pons | ec3c2e2 | 2021-06-08 18:12:27 +0200 | [diff] [blame] | 8 | #include <limits.h> |
Julius Werner | a214837 | 2019-11-13 19:50:33 -0800 | [diff] [blame] | 9 | #include <stdbool.h> |
Stefan Reinauer | 36c8340 | 2009-03-01 10:16:01 +0000 | [diff] [blame] | 10 | #include <stdint.h> |
| 11 | #include <stddef.h> |
Stefan Reinauer | 36c8340 | 2009-03-01 10:16:01 +0000 | [diff] [blame] | 12 | |
Alexandru Gagniuc | a4d784e | 2015-01-25 21:08:42 -0600 | [diff] [blame] | 13 | /* |
| 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 Syu | 8d6ea6a | 2019-03-13 21:37:23 +0800 | [diff] [blame] | 18 | #ifndef BIT |
Alexandru Gagniuc | a4d784e | 2015-01-25 21:08:42 -0600 | [diff] [blame] | 19 | #define BIT(x) (1ul << (x)) |
You-Cheng Syu | 8d6ea6a | 2019-03-13 21:37:23 +0800 | [diff] [blame] | 20 | #endif |
Alexandru Gagniuc | a4d784e | 2015-01-25 21:08:42 -0600 | [diff] [blame] | 21 | |
Furquan Shaikh | 197c486 | 2021-01-19 22:13:59 -0800 | [diff] [blame] | 22 | #define BITS_PER_BYTE 8 |
| 23 | |
Alexandru Gagniuc | fe9e30d | 2013-11-23 17:46:04 -0600 | [diff] [blame] | 24 | #endif /* __TYPES_H */ |