From 2c3e4a9eeaa99407814ecc64857cbf12fd84f757 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Mon, 21 Aug 2006 22:13:32 +0000 Subject: [PATCH] Don't detect the restrict keyword on Windows. Read the comment for more information. This commit was SVN r11313. --- configure.ac | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 30496ea25a..6a23c973e9 100644 --- a/configure.ac +++ b/configure.ac @@ -279,7 +279,14 @@ if test "$GCC" = "yes"; then CFLAGS="$OMPI_CFLAGS_BEFORE_PICKY -Werror -ansi" fi AC_C_INLINE -AC_C_RESTRICT +# Microsoft compilers support 2 versions of restrict. One for functions, and +# one for variables. The problem is that they don't have an equivalent +# syntax, and the autoconf restrict detection is unable to detect them +# correctly. It detect the restrict keyword as __restrict which break the +# rules for function syntax which is declspec(restrict). +if test "x$ompi_cv_c_compiler_vendor" != "xmicrosoft"; then + AC_C_RESTRICT +fi OMPI_C_WEAK_SYMBOLS if test "$GCC" = "yes"; then CFLAGS="$CFLAGS_save"