posix_wrap: Flesh out posix_wrap/limits.h a little more
In addition to what was already there, Gnulib's <intprops.h> needs SCHAR_MIN, SCHAR_MAX, SHRT_MIN, INT_MIN, LONG_MIN, and LONG_MAX. Fixes build on CentOS 7. Reported-by: "Chen, Farrah" <farrah.chen@intel.com> Signed-off-by: Colin Watson <cjwatson@ubuntu.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
ebc4b92fc0
commit
ab9b6c43ab
2 changed files with 12 additions and 3 deletions
|
@ -27,8 +27,14 @@
|
||||||
#define ULONG_MAX GRUB_ULONG_MAX
|
#define ULONG_MAX GRUB_ULONG_MAX
|
||||||
#define SIZE_MAX GRUB_SIZE_MAX
|
#define SIZE_MAX GRUB_SIZE_MAX
|
||||||
|
|
||||||
|
#define SCHAR_MIN GRUB_SCHAR_MIN
|
||||||
|
#define SCHAR_MAX GRUB_SCHAR_MAX
|
||||||
|
#define SHRT_MIN GRUB_SHRT_MIN
|
||||||
#define SHRT_MAX GRUB_SHRT_MAX
|
#define SHRT_MAX GRUB_SHRT_MAX
|
||||||
|
#define INT_MIN GRUB_INT_MIN
|
||||||
#define INT_MAX GRUB_INT_MAX
|
#define INT_MAX GRUB_INT_MAX
|
||||||
|
#define LONG_MIN GRUB_LONG_MIN
|
||||||
|
#define LONG_MAX GRUB_LONG_MAX
|
||||||
|
|
||||||
#define CHAR_BIT 8
|
#define CHAR_BIT 8
|
||||||
|
|
||||||
|
|
|
@ -130,23 +130,26 @@ typedef grub_int32_t grub_ssize_t;
|
||||||
# define PRIdGRUB_SSIZE "d"
|
# define PRIdGRUB_SSIZE "d"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define GRUB_SCHAR_MAX 127
|
||||||
|
#define GRUB_SCHAR_MIN (-GRUB_SCHAR_MAX - 1)
|
||||||
#define GRUB_UCHAR_MAX 0xFF
|
#define GRUB_UCHAR_MAX 0xFF
|
||||||
#define GRUB_USHRT_MAX 65535
|
#define GRUB_USHRT_MAX 65535
|
||||||
#define GRUB_SHRT_MAX 0x7fff
|
#define GRUB_SHRT_MAX 0x7fff
|
||||||
|
#define GRUB_SHRT_MIN (-GRUB_SHRT_MAX - 1)
|
||||||
#define GRUB_UINT_MAX 4294967295U
|
#define GRUB_UINT_MAX 4294967295U
|
||||||
#define GRUB_INT_MAX 0x7fffffff
|
#define GRUB_INT_MAX 0x7fffffff
|
||||||
#define GRUB_INT32_MIN (-2147483647 - 1)
|
#define GRUB_INT_MIN (-GRUB_INT_MAX - 1)
|
||||||
#define GRUB_INT32_MAX 2147483647
|
#define GRUB_INT32_MAX 2147483647
|
||||||
|
#define GRUB_INT32_MIN (-GRUB_INT32_MAX - 1)
|
||||||
|
|
||||||
#if GRUB_CPU_SIZEOF_LONG == 8
|
#if GRUB_CPU_SIZEOF_LONG == 8
|
||||||
# define GRUB_ULONG_MAX 18446744073709551615UL
|
# define GRUB_ULONG_MAX 18446744073709551615UL
|
||||||
# define GRUB_LONG_MAX 9223372036854775807L
|
# define GRUB_LONG_MAX 9223372036854775807L
|
||||||
# define GRUB_LONG_MIN (-9223372036854775807L - 1)
|
|
||||||
#else
|
#else
|
||||||
# define GRUB_ULONG_MAX 4294967295UL
|
# define GRUB_ULONG_MAX 4294967295UL
|
||||||
# define GRUB_LONG_MAX 2147483647L
|
# define GRUB_LONG_MAX 2147483647L
|
||||||
# define GRUB_LONG_MIN (-2147483647L - 1)
|
|
||||||
#endif
|
#endif
|
||||||
|
# define GRUB_LONG_MIN (-GRUB_LONG_MAX - 1)
|
||||||
|
|
||||||
typedef grub_uint64_t grub_properly_aligned_t;
|
typedef grub_uint64_t grub_properly_aligned_t;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue