From 6afed267db47a8aa604a3a9e78ac72efa02363df Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Fri, 23 Feb 2018 13:55:37 +0100 Subject: ec/ecp_nistp{224,256,521}.c: harmonize usage of __uint128_t. Reviewed-by: Matt Caswell Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/5449) --- crypto/ec/ecp_nistp224.c | 4 ++-- crypto/ec/ecp_nistp256.c | 4 ++-- crypto/ec/ecp_nistp521.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'crypto/ec') diff --git a/crypto/ec/ecp_nistp224.c b/crypto/ec/ecp_nistp224.c index 9a9b8a445e..98967275ad 100644 --- a/crypto/ec/ecp_nistp224.c +++ b/crypto/ec/ecp_nistp224.c @@ -40,12 +40,12 @@ NON_EMPTY_TRANSLATION_UNIT # include # include "ec_lcl.h" -# if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) +# if defined(__SIZEOF_INT128__) && __SIZEOF_INT128__==16 /* even with gcc, the typedef won't work for 32-bit platforms */ typedef __uint128_t uint128_t; /* nonstandard; implemented by gcc on 64-bit * platforms */ # else -# error "Need GCC 3.1 or later to define type uint128_t" +# error "Need GCC 4.0 or later to define type uint128_t" # endif typedef uint8_t u8; diff --git a/crypto/ec/ecp_nistp256.c b/crypto/ec/ecp_nistp256.c index d8f7e8aa3f..6381efab45 100644 --- a/crypto/ec/ecp_nistp256.c +++ b/crypto/ec/ecp_nistp256.c @@ -41,13 +41,13 @@ NON_EMPTY_TRANSLATION_UNIT # include # include "ec_lcl.h" -# if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) +# if defined(__SIZEOF_INT128__) && __SIZEOF_INT128__==16 /* even with gcc, the typedef won't work for 32-bit platforms */ typedef __uint128_t uint128_t; /* nonstandard; implemented by gcc on 64-bit * platforms */ typedef __int128_t int128_t; # else -# error "Need GCC 3.1 or later to define type uint128_t" +# error "Need GCC 4.0 or later to define type uint128_t" # endif typedef uint8_t u8; diff --git a/crypto/ec/ecp_nistp521.c b/crypto/ec/ecp_nistp521.c index dcb5415c69..3a0ec0c080 100644 --- a/crypto/ec/ecp_nistp521.c +++ b/crypto/ec/ecp_nistp521.c @@ -40,12 +40,12 @@ NON_EMPTY_TRANSLATION_UNIT # include # include "ec_lcl.h" -# if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) +# if defined(__SIZEOF_INT128__) && __SIZEOF_INT128__==16 /* even with gcc, the typedef won't work for 32-bit platforms */ typedef __uint128_t uint128_t; /* nonstandard; implemented by gcc on 64-bit * platforms */ # else -# error "Need GCC 3.1 or later to define type uint128_t" +# error "Need GCC 4.0 or later to define type uint128_t" # endif typedef uint8_t u8; -- cgit v1.2.3