diff options
author | michal <michal@michal-laptop.(none)> | 2007-08-21 20:42:33 +0100 |
---|---|---|
committer | michal <michal@michal-laptop.(none)> | 2007-08-21 20:42:33 +0100 |
commit | 044c19e6b347d13df70dbc9980cec8a464afe214 (patch) | |
tree | d54102b3b75de97268087db005b191934bb0790a | |
parent | af3d6c83d245c3a5b2af3bddfc261c3678afb7d1 (diff) |
Define __MSC__.
Make ALIGN macros more error-proof.
-rw-r--r-- | src/mesa/pipe/p_compiler.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/pipe/p_compiler.h b/src/mesa/pipe/p_compiler.h index a4d05f74cdd..3dd6bc5c5a8 100644 --- a/src/mesa/pipe/p_compiler.h +++ b/src/mesa/pipe/p_compiler.h @@ -38,6 +38,10 @@ #define __WIN32__ #endif +#if defined(_MSC_VER) && !defined(__MSC__) +#define __MSC__ +#endif + typedef unsigned int uint; typedef unsigned char ubyte; @@ -55,8 +59,6 @@ typedef unsigned long long uint64; # define INLINE __inline__ #elif defined(__MSC__) # define INLINE __inline -#elif defined(_MSC_VER) -# define INLINE __inline #elif defined(__ICL) # define INLINE __inline #elif defined(__INTEL_COMPILER) @@ -69,11 +71,11 @@ typedef unsigned long long uint64; #if defined __GNUC__ -#define ALIGN16_DECL(TYPE, NAME, SIZE) TYPE NAME[SIZE] __attribute__(( aligned( 16 ) )) -#define ALIGN16_ASSIGN(P) P +#define ALIGN16_DECL(TYPE, NAME, SIZE) TYPE NAME##___aligned[SIZE] __attribute__(( aligned( 16 ) )) +#define ALIGN16_ASSIGN(NAME) NAME##___aligned #else -#define ALIGN16_DECL(TYPE, NAME, SIZE) TYPE NAME[SIZE + 1] -#define ALIGN16_ASSIGN(P) align16(P) +#define ALIGN16_DECL(TYPE, NAME, SIZE) TYPE NAME##___unaligned[SIZE + 1] +#define ALIGN16_ASSIGN(NAME) align16(NAME##___unaligned) #endif |