Do not assume that __clang__ being defined implied __GNUC__ defined as well

This commit is contained in:
Frank Denis 2017-12-19 21:41:56 +01:00
parent b1273b0411
commit 1f1b0afb5c
7 changed files with 7 additions and 7 deletions

View File

@ -635,7 +635,7 @@ AC_SUBST(HAVE_AVX_ASM_V)
AC_MSG_CHECKING(for 128-bit arithmetic)
HAVE_TI_MODE_V=0
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#if !defined(__GNUC__) && !defined(__SIZEOF_INT128__)
#if !defined(__clang__) && !defined(__GNUC__) && !defined(__SIZEOF_INT128__)
# error mode(TI) is a gcc extension, and __int128 is not available
#endif
#if defined(__clang__) && !defined(__x86_64__) && !defined(__ARM_NEON)

View File

@ -5,7 +5,7 @@
#if defined(_MSC_VER)
# define POLY1305_NOINLINE __declspec(noinline)
#elif defined(__GNUC__)
#elif defined(__clang__) || defined(__GNUC__)
# define POLY1305_NOINLINE __attribute__((noinline))
#else
# define POLY1305_NOINLINE

View File

@ -13,7 +13,7 @@
#if defined(_MSC_VER)
# define POLY1305_NOINLINE __declspec(noinline)
#elif defined(__GNUC__)
#elif defined(__clang__) || defined(__GNUC__)
# define POLY1305_NOINLINE __attribute__((noinline))
#else
# define POLY1305_NOINLINE

View File

@ -21,7 +21,7 @@ typedef __m128i xmmi;
# if defined(_MSC_VER)
# define POLY1305_NOINLINE __declspec(noinline)
# elif defined(__GNUC__)
# elif defined(__clang__) || defined(__GNUC__)
# define POLY1305_NOINLINE __attribute__((noinline))
# else
# define POLY1305_NOINLINE

View File

@ -2,7 +2,7 @@
#ifndef sodium_export_H
#define sodium_export_H
#ifndef __GNUC__
#if !defined(__clang__) && !defined(__GNUC__)
# ifdef __attribute__
# undef __attribute__
# endif

View File

@ -196,7 +196,7 @@ xor_buf(unsigned char *out, const unsigned char *in, size_t n)
}
}
#ifndef __GNUC__
#if !defined(__clang__) && !defined(__GNUC__)
# ifdef __attribute__
# undef __attribute__
# endif

View File

@ -25,7 +25,7 @@
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# elif !defined(alloca)
# if defined(__GNUC__)
# if defined(__clang__) || defined(__GNUC__)
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca