icc build fix

This was SVN commit r7204.
This commit is contained in:
janwas 2009-11-16 23:45:56 +00:00
parent f7e16d9f3e
commit 7738eecbb0
3 changed files with 9 additions and 2 deletions

View File

@ -106,7 +106,7 @@ extern wchar_t* wcsdup(const wchar_t* str);
// rint*, fminf, fpclassify (too few/diverse to make separate HAVE_ for each)
#if HAVE_C99 || GCC_VERSION
#if HAVE_C99 || ICC_VERSION || GCC_VERSION
# define HAVE_C99_MATH 1
#else
# define HAVE_C99_MATH 0

View File

@ -61,6 +61,11 @@
// (must come before any system headers because it fixes off_t)
#include "lib/posix/posix_types.h"
// (must come before any use of <math.h> due to incompatibility with ICC's mathimf.h)
#if ICC_VERSION
#include <mathimf.h>
#endif
#include "lib/sysdep/arch.h"
#include "lib/sysdep/stl.h"

View File

@ -54,7 +54,9 @@ LIB_API const char* cpu_IdentifierString();
**/
#if MSC_VERSION
# include <intrin.h>
# pragma intrinsic(_ReadWriteBarrier)
# if !ICC_VERSION
# pragma intrinsic(_ReadWriteBarrier)
# endif
# define cpu_MemoryBarrier() _ReadWriteBarrier()
#elif GCC_VERSION
# define cpu_MemoryBarrier() asm volatile("" : : : "memory")