diff options
author | Alan Coopersmith <[email protected]> | 2015-02-15 16:19:06 -0800 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-02-24 12:28:06 +0000 |
commit | 2f8e96f71d038c9bde49549a3cb812d63cad9384 (patch) | |
tree | 3d11fad7b398d01778d5e3796b5b1f8c66268aae | |
parent | c65ca6c815aa6dade922e29bb77977749669041d (diff) |
Use __typeof instead of typeof with Solaris Studio compilers
While the C compiler accepts typeof, C++ requires __typeof.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86944
Signed-off-by: Alan Coopersmith <[email protected]>
Cc: "10.5" <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
(cherry picked from commit 4671dca0eecf7dbf3e0d0a13111813756722d57d)
-rw-r--r-- | src/util/u_atomic.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/u_atomic.h b/src/util/u_atomic.h index cf7fff3f35b..9f9ee2c027e 100644 --- a/src/util/u_atomic.h +++ b/src/util/u_atomic.h @@ -177,7 +177,7 @@ char _InterlockedCompareExchange8(char volatile *Destination8, char Exchange8, c sizeof(*v) == sizeof(uint64_t) ? atomic_inc_64((uint64_t *)(v)) : \ (assert(!"should not get here"), 0)) -#define p_atomic_inc_return(v) ((typeof(*v)) \ +#define p_atomic_inc_return(v) ((__typeof(*v)) \ sizeof(*v) == sizeof(uint8_t) ? atomic_inc_8_nv ((uint8_t *)(v)) : \ sizeof(*v) == sizeof(uint16_t) ? atomic_inc_16_nv((uint16_t *)(v)) : \ sizeof(*v) == sizeof(uint32_t) ? atomic_inc_32_nv((uint32_t *)(v)) : \ @@ -191,14 +191,14 @@ char _InterlockedCompareExchange8(char volatile *Destination8, char Exchange8, c sizeof(*v) == sizeof(uint64_t) ? atomic_dec_64((uint64_t *)(v)) : \ (assert(!"should not get here"), 0)) -#define p_atomic_dec_return(v) ((typeof(*v)) \ +#define p_atomic_dec_return(v) ((__typeof(*v)) \ sizeof(*v) == sizeof(uint8_t) ? atomic_dec_8_nv ((uint8_t *)(v)) : \ sizeof(*v) == sizeof(uint16_t) ? atomic_dec_16_nv((uint16_t *)(v)) : \ sizeof(*v) == sizeof(uint32_t) ? atomic_dec_32_nv((uint32_t *)(v)) : \ sizeof(*v) == sizeof(uint64_t) ? atomic_dec_64_nv((uint64_t *)(v)) : \ (assert(!"should not get here"), 0)) -#define p_atomic_cmpxchg(v, old, _new) ((typeof(*v)) \ +#define p_atomic_cmpxchg(v, old, _new) ((__typeof(*v)) \ sizeof(*v) == sizeof(uint8_t) ? atomic_cas_8 ((uint8_t *)(v), (uint8_t )(old), (uint8_t )(_new)) : \ sizeof(*v) == sizeof(uint16_t) ? atomic_cas_16((uint16_t *)(v), (uint16_t)(old), (uint16_t)(_new)) : \ sizeof(*v) == sizeof(uint32_t) ? atomic_cas_32((uint32_t *)(v), (uint32_t)(old), (uint32_t)(_new)) : \ |