mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-25 08:05:49 +00:00
types: Define GRUB_CHAR_BIT based on compiler macro instead of using literal
Signed-off-by: Glenn Washburn <development@efficientek.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
71dd2ef76f
commit
f0715577c2
@ -72,6 +72,14 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef __CHAR_BIT__
|
||||
# error __CHAR_BIT__ is not defined
|
||||
#elif __CHAR_BIT__ != 8
|
||||
# error __CHAR_BIT__ is not equal 8
|
||||
#else
|
||||
# define GRUB_CHAR_BIT __CHAR_BIT__
|
||||
#endif
|
||||
|
||||
/* Define various wide integers. */
|
||||
typedef signed char grub_int8_t;
|
||||
typedef short grub_int16_t;
|
||||
@ -317,6 +325,4 @@ static inline void grub_set_unaligned64 (void *ptr, grub_uint64_t val)
|
||||
dd->d = val;
|
||||
}
|
||||
|
||||
#define GRUB_CHAR_BIT 8
|
||||
|
||||
#endif /* ! GRUB_TYPES_HEADER */
|
||||
|
Loading…
Reference in New Issue
Block a user