summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2011-03-16 09:15:30 +0000
committerJosé Fonseca <[email protected]>2011-03-16 09:15:30 +0000
commit5fc5820cbc0faf57a48154466b4792294841a690 (patch)
tree279adcbf6a92a0af7bb61a44d6edf0b2b2dbf7b4 /src/mesa/main
parent11150e4667ce11b056d98244754ce3f2a79599a6 (diff)
mesa: Use typecast in BITFIELD64_BIT macro.
Unsigned long is 32bit on several platforms (e.g., Windows), yielding 1UL << 32 to be zero. Note that BITFIELD64_BIT result is often assigned to variables of type GLbitfield, instead of GLbitfield64. That's probably wrong and should be addressed in a later change.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/mtypes.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 95a7988d7e4..831774fa4b1 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -85,11 +85,7 @@
typedef GLuint64 GLbitfield64;
/** Set a single bit */
-#ifdef __cplusplus
-#define BITFIELD64_BIT(b) (1UL << (b))
-#else
-#define BITFIELD64_BIT(b) (1ULL << (b))
-#endif
+#define BITFIELD64_BIT(b) ((GLbitfield64)1 << (b))
/**