summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-06-24 13:56:41 +0900
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-06-24 13:56:41 +0900
commite8b52b3f5682c969e58077d42f5aebdad5d32e89 (patch)
treee91e08f43b5e916d11daf748701e1c4c243f451b /src/gallium
parent0d947674305a349662b3ab57733c54f9f4c1a8b3 (diff)
gallium: Drop deprecated __MSC__ macro.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/include/pipe/p_compiler.h15
-rw-r--r--src/gallium/include/pipe/p_debug.h4
-rw-r--r--src/gallium/include/pipe/p_util.h6
3 files changed, 10 insertions, 15 deletions
diff --git a/src/gallium/include/pipe/p_compiler.h b/src/gallium/include/pipe/p_compiler.h
index 521ef2d189..d2b8c41be3 100644
--- a/src/gallium/include/pipe/p_compiler.h
+++ b/src/gallium/include/pipe/p_compiler.h
@@ -39,20 +39,15 @@
#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;
@@ -114,7 +109,7 @@ typedef unsigned char boolean;
/* Function inlining */
#if defined(__GNUC__)
# define INLINE __inline__
-#elif defined(__MSC__)
+#elif defined(_MSC_VER)
# define INLINE __inline
#elif defined(__ICL)
# define INLINE __inline
@@ -138,7 +133,7 @@ typedef unsigned char boolean;
-#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 ) ))
diff --git a/src/gallium/include/pipe/p_debug.h b/src/gallium/include/pipe/p_debug.h
index 9011557006..a5816c3cbb 100644
--- a/src/gallium/include/pipe/p_debug.h
+++ b/src/gallium/include/pipe/p_debug.h
@@ -132,9 +132,9 @@ void _debug_break(void);
* 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()
diff --git a/src/gallium/include/pipe/p_util.h b/src/gallium/include/pipe/p_util.h
index f62faf616a..cf2447822a 100644
--- a/src/gallium/include/pipe/p_util.h
+++ b/src/gallium/include/pipe/p_util.h
@@ -224,7 +224,7 @@ static INLINE int align_int(int x, int align)
-#if defined(__MSC__) && defined(__WIN32__)
+#if defined(PIPE_CC_MSVC) && defined(PIPE_ARCH_X86)
static INLINE unsigned ffs( unsigned u )
{
unsigned i;
@@ -341,14 +341,14 @@ static INLINE int ifloor(float f)
}
-#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;