Fix detection of i386 in tmpi
authorRoland Schulz <roland@utk.edu>
Sun, 29 Jun 2014 05:17:34 +0000 (01:17 -0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Sun, 29 Jun 2014 07:26:07 +0000 (09:26 +0200)
The i386 without underscore is not recommended for new code and is not
defined if -std=... (other than gnu...) is passed on the command line.
__i386__ is already present for GCC 3.2 so there is no need for the old
name. Also we use __i386__ in other places in the code already.
We dont pass such a flag by default for 4.6, but the user could.
In 5.0 this fixes tmpi if the compiler supports c++11 and we pass
std=c++11.

Fixes #1533

Change-Id: I615cb91d3e3196a90fa4ba03fa183bf47af5d444

include/thread_mpi/atomic.h

index cf5ae9d27ee8bca1ba3e6aee86e318b26a66b417..5e9ef9697a9478fa40e29350c34029a22ae1c76c 100644 (file)
@@ -99,7 +99,7 @@ extern "C"
 #endif
 
 /* now check specifically for several architectures: */
-#if ((defined(i386) || defined(__x86_64__)) && !defined(__OPEN64__))
+#if ((defined(__i386__) || defined(__x86_64__)) && !defined(__OPEN64__))
 /* first x86: */
 #include "atomic/gcc_x86.h"