diff options
author | William Ahern <william@25thandclement.com> | 2016-11-23 16:48:39 -0800 |
---|---|---|
committer | William Ahern <william@25thandclement.com> | 2016-11-23 16:48:39 -0800 |
commit | f25f81ecda73b894066063050e1f706f3382c4cc (patch) | |
tree | 1801f2cf3a3de831426f3279fc62511e8a3f3880 /src | |
parent | 8ea3249320e8380c9abd2a119c7c450c0701cbf5 (diff) | |
download | luaossl-f25f81ecda73b894066063050e1f706f3382c4cc.tar.gz luaossl-f25f81ecda73b894066063050e1f706f3382c4cc.tar.bz2 luaossl-f25f81ecda73b894066063050e1f706f3382c4cc.zip |
use _MSC_FULL_VER not _MSC_VER_FULL, and use more common feature macro names for some builtins
Diffstat (limited to 'src')
-rw-r--r-- | src/openssl.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/openssl.c b/src/openssl.c index 63db361..b14090e 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -81,7 +81,7 @@ #define GNUC_PREREQ(M, m, p) (__GNUC__ > 0 && GNUC_2VER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) >= GNUC_2VER((M), (m), (p))) #define MSC_2VER(M, m, p) ((((M) + 6) * 10000000) + ((m) * 1000000) + (p)) -#define MSC_PREREQ(M, m, p) (_MSC_VER_FULL > 0 && _MSC_VER_FULL >= MSC_2VER((M), (m), (p))) +#define MSC_PREREQ(M, m, p) (_MSC_FULL_VER > 0 && _MSC_FULL_VER >= MSC_2VER((M), (m), (p))) #define OPENSSL_PREREQ(M, m, p) \ (OPENSSL_VERSION_NUMBER >= (((M) << 28) | ((m) << 20) | ((p) << 12)) && !defined LIBRESSL_VERSION_NUMBER) @@ -97,12 +97,16 @@ #define __has_extension(x) 0 #endif -#ifndef HAVE___ASSUME -#define HAVE___ASSUME MSC_PREREQ(8,0,0) +#ifndef HAVE_C___ASSUME +#define HAVE_C___ASSUME MSC_PREREQ(8,0,0) #endif -#ifndef HAVE___BUILTIN_UNREACHABLE -#define HAVE___BUILTIN_UNREACHABLE (GNUC_PREREQ(4,5,0) || __has_builtin(__builtin_unreachable)) +#ifndef HAVE_C___BUILTIN_UNREACHABLE +#define HAVE_C___BUILTIN_UNREACHABLE (GNUC_PREREQ(4,5,0) || __has_builtin(__builtin_unreachable)) +#endif + +#ifndef HAVE_C___DECLSPEC_NORETURN +#define HAVE_C___DECLSPEC_NORETURN MSC_PREREQ(8,0,0) #endif #ifndef HAVE_ASN1_STRING_GET0_DATA @@ -342,9 +346,9 @@ #define NOTUSED #endif -#if HAVE___BUILTIN_UNREACHABLE +#if HAVE_C___BUILTIN_UNREACHABLE #define NOTREACHED __builtin_unreachable() -#elif HAVE___ASSUME +#elif HAVE_C___ASSUME #define NOTREACHED __assume(0) #else #define NOTREACHED (void)0 |