#define __WIN32__
#endif
-#if defined(_MSC_VER) && !defined(__MSC__)
-#define __MSC__
-#endif
-
-
-#if defined(__MSC__)
+#if defined(_MSC_VER)
/* Avoid 'expression is always true' warning */
#pragma warning(disable: 4296)
-#endif /* __MSC__ */
+#endif /* _MSC_VER */
-#if defined(__MSC__)
+#if defined(_MSC_VER)
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
/* Function inlining */
#if defined(__GNUC__)
# define INLINE __inline__
-#elif defined(__MSC__)
+#elif defined(_MSC_VER)
# define INLINE __inline
#elif defined(__ICL)
# define INLINE __inline
-#if defined __GNUC__
+#if defined(__GNUC__)
#define ALIGN16_DECL(TYPE, NAME, SIZE) TYPE NAME##___aligned[SIZE] __attribute__(( aligned( 16 ) ))
#define ALIGN16_ASSIGN(NAME) NAME##___aligned
#define ALIGN16_ATTRIB __attribute__(( aligned( 16 ) ))
* Hard-coded breakpoint.
*/
#ifdef DEBUG
-#if (defined(__i386__) || defined(__386__)) && defined(__GNUC__)
+#if defined(PIPE_ARCH_X86) && defined(PIPE_CC_GCC)
#define debug_break() __asm("int3")
-#elif defined(_M_IX86) && defined(_MSC_VER)
+#elif defined(PIPE_ARCH_X86) && defined(PIPE_CC_MSVC)
#define debug_break() do { _asm {int 3} } while(0)
#else
#define debug_break() _debug_break()
-#if defined(__MSC__) && defined(__WIN32__)
+#if defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86)
static INLINE unsigned ffs( unsigned u )
{
unsigned i;
}
-#if defined(__GNUC__) && defined(__i386__)
+#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)
static INLINE int iround(float f)
{
int r;
__asm__ ("fistpl %0" : "=m" (r) : "t" (f) : "st");
return r;
}
-#elif defined(__MSC__) && defined(__WIN32__)
+#elif defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86)
static INLINE int iround(float f)
{
int r;