Make the compiler work-around more specific

This commit is contained in:
Manuel Pégourié-Gonnard 2014-03-14 18:23:26 +01:00 committed by Paul Bakker
parent 57291a7019
commit a9f86e03ed

View file

@ -1115,13 +1115,16 @@ int mpi_div_mpi( mpi *Q, mpi *R, const mpi *A, const mpi *B )
else else
{ {
/* /*
* The version of Clang shipped by Apple with Mavericks can't * The version of Clang shipped by Apple with Mavericks around
* handle 128-bit division properly. Disable 128-bits division * 2014-03 can't handle 128-bit division properly. Disable
* for Clang on Apple for now, while waiting for more input on the * 128-bits division for this version. Let's be optimistic and
* exact version(s) affected and their identification macros. * assume it'll be fixed in the next minor version (next
* patchlevel is probably a bit too optimistic).
*/ */
#if defined(POLARSSL_HAVE_UDBL) && \ #if defined(POLARSSL_HAVE_UDBL) && \
! ( defined(__x86_64__) && defined(__clang__) && defined(__APPLE__) ) ! ( defined(__x86_64__) && defined(__APPLE__) && \
defined(__clang_major__) && __clang_major__ == 5 && \
defined(__clang_minor__) && __clang_minor__ == 0 )
t_udbl r; t_udbl r;
r = (t_udbl) X.p[i] << biL; r = (t_udbl) X.p[i] << biL;