4
0
mirror of https://github.com/QuasarApp/openssl.git synced 2025-05-06 06:29:42 +00:00

numbers: Define 128-bit integers if compiler supports

Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14784)
This commit is contained in:
Amitay Isaacs 2021-03-29 18:06:13 +11:00 committed by Matt Caswell
parent b7dedba8b1
commit bbed0d1cbd

@ -61,6 +61,16 @@
# define UINT64_MAX __MAXUINT__(uint64_t)
# endif
# ifndef INT128_MAX
# if defined(__SIZEOF_INT128__) && __SIZEOF_INT128__ == 16
typedef __int128_t int128_t;
typedef __uint128_t uint128_t;
# define INT128_MIN __MININT__(int128_t)
# define INT128_MAX __MAXINT__(int128_t)
# define UINT128_MAX __MAXUINT__(uint128_t)
# endif
# endif
# ifndef SIZE_MAX
# define SIZE_MAX __MAXUINT__(size_t)
# endif