浏览代码

Merge pull request #2748 from vnen/fix-2744

Fix Opus driver build for VS2010 and VS2012
Juan Linietsky 9 年之前
父节点
当前提交
9827c3cd26
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      drivers/opus/opus_config.h

+ 8 - 0
drivers/opus/opus_config.h

@@ -7,12 +7,16 @@
 /* Define to 1 if you have the <inttypes.h> header file. */
 /* Define to 1 if you have the <inttypes.h> header file. */
 #define HAVE_INTTYPES_H 1
 #define HAVE_INTTYPES_H 1
 
 
+#if (!defined( _MSC_VER ) || ( _MSC_VER >= 1800 ))
+
 /* Define to 1 if you have the `lrint' function. */
 /* Define to 1 if you have the `lrint' function. */
 #define HAVE_LRINT 1
 #define HAVE_LRINT 1
 
 
 /* Define to 1 if you have the `lrintf' function. */
 /* Define to 1 if you have the `lrintf' function. */
 #define HAVE_LRINTF 1
 #define HAVE_LRINTF 1
 
 
+#endif
+
 /* Define to 1 if you have the <memory.h> header file. */
 /* Define to 1 if you have the <memory.h> header file. */
 #define HAVE_MEMORY_H 1
 #define HAVE_MEMORY_H 1
 
 
@@ -109,7 +113,11 @@
 /* Define to the equivalent of the C99 'restrict' keyword, or to
 /* Define to the equivalent of the C99 'restrict' keyword, or to
    nothing if this is not supported.  Do not define if restrict is
    nothing if this is not supported.  Do not define if restrict is
    supported directly.  */
    supported directly.  */
+#if (!defined( _MSC_VER ) || ( _MSC_VER >= 1800 ))
 #define restrict __restrict
 #define restrict __restrict
+#else
+#undef restrict
+#endif
 /* Work around a bug in Sun C++: it does not support _Restrict or
 /* Work around a bug in Sun C++: it does not support _Restrict or
    __restrict__, even though the corresponding Sun C compiler ends up with
    __restrict__, even though the corresponding Sun C compiler ends up with
    "#define restrict _Restrict" or "#define restrict __restrict__" in the
    "#define restrict _Restrict" or "#define restrict __restrict__" in the