]> wimlib.net Git - wimlib/blobdiff - include/wimlib/compiler.h
xmlproc: fix buffer enlargement logic
[wimlib] / include / wimlib / compiler.h
index 2f7125450d4d6fc3852b965ffa3b0d746cd72a16..77cd27f8864ebfe0bdc0b6a4f5fc322647556ca7 100644 (file)
 #undef MAX
 #define MAX(a, b)      max((a), (b))
 
+/* Get the maximum of three variables, without multiple evaluation.  */
+#undef max3
+#define max3(a, b, c)  max(max((a), (b)), (c))
+
 /* Swap the values of two variables, without multiple evaluation.  */
 #ifndef swap
 #  define swap(a, b) ({ typeof(a) _a = (a); (a) = (b); (b) = _a; })