nv50/ir: saturate depth writes
[mesa.git] / include / c99_compat.h
index e5d0ae43a501d954b12065b64804165083034b08..b55ad9c181d4402058e4111f4b9cd029143b4f09 100644 (file)
@@ -25,6 +25,8 @@
  *
  **************************************************************************/
 
+#include "no_extern_c.h"
+
 #ifndef _C99_COMPAT_H_
 #define _C99_COMPAT_H_
 
  * MSVC hacks.
  */
 #if defined(_MSC_VER)
+
+#  if _MSC_VER < 1800
+#    error "Microsoft Visual Studio 2013 or higher required"
+#  endif
+
    /*
-    * Visual Studio 2012 will complain if we define the `inline` keyword, but
+    * Visual Studio will complain if we define the `inline` keyword, but
     * actually it only supports the keyword on C++.
     *
     * To avoid this the _ALLOW_KEYWORD_MACROS must be set.
     */
-#  if (_MSC_VER >= 1700) && !defined(_ALLOW_KEYWORD_MACROS)
+#  if !defined(_ALLOW_KEYWORD_MACROS)
 #    define _ALLOW_KEYWORD_MACROS
 #  endif
 
@@ -74,8 +81,6 @@
      /* Intel compiler supports inline keyword */
 #  elif defined(__WATCOMC__) && (__WATCOMC__ >= 1100)
 #    define inline __inline
-#  elif defined(__SUNPRO_C) && defined(__C99FEATURES__)
-     /* C99 supports inline keyword */
 #  elif (__STDC_VERSION__ >= 199901L)
      /* C99 supports inline keyword */
 #  else
@@ -93,8 +98,6 @@
 #ifndef restrict
 #  if (__STDC_VERSION__ >= 199901L)
      /* C99 */
-#  elif defined(__SUNPRO_C) && defined(__C99FEATURES__)
-     /* C99 */
 #  elif defined(__GNUC__)
 #    define restrict __restrict__
 #  elif defined(_MSC_VER)
 #ifndef __func__
 #  if (__STDC_VERSION__ >= 199901L)
      /* C99 */
-#  elif defined(__SUNPRO_C) && defined(__C99FEATURES__)
-     /* C99 */
 #  elif defined(__GNUC__)
 #    define __func__ __FUNCTION__
 #  elif defined(_MSC_VER)
-#    if _MSC_VER >= 1300
-#      define __func__ __FUNCTION__
-#    else
-#      define __func__ "<unknown>"
-#    endif
+#    define __func__ __FUNCTION__
 #  else
 #    define __func__ "<unknown>"
 #  endif