OSDN Git Service

fix various typos
[android-x86/external-libdrm.git] / util_math.h
index 3bc5f64..35bf451 100644 (file)
@@ -26,8 +26,9 @@
 
 #define MIN2( A, B )   ( (A)<(B) ? (A) : (B) )
 #define MAX2( A, B )   ( (A)>(B) ? (A) : (B) )
+#define MAX3( A, B, C ) ((A) > (B) ? MAX2(A, C) : MAX2(B, C))
 
 #define __align_mask(value, mask)  (((value) + (mask)) & ~(mask))
-#define ALIGN(value, alignment)    __align_mask(value, (typeof(value))((alignment) - 1))
+#define ALIGN(value, alignment)    __align_mask(value, (__typeof__(value))((alignment) - 1))
 
 #endif /*_UTIL_MATH_H_*/