Blame SOURCES/autofs-5.0.8-fix-max-declaration.patch

304803
autofs-5.0.8 - fix max() declaration
304803
304803
From: Ian Kent <raven@themaw.net>
304803
304803
Use a name other than the already defined max().
304803
---
304803
 CHANGELOG            |    1 +
304803
 modules/replicated.c |    6 +++---
304803
 2 files changed, 4 insertions(+), 3 deletions(-)
304803
304803
--- autofs-5.0.7.orig/CHANGELOG
304803
+++ autofs-5.0.7/CHANGELOG
304803
@@ -75,6 +75,7 @@
304803
 - check for non existent negative entries in lookup_ghost().
304803
 - fix options compare.
304803
 - fix fix options compare.
304803
+- fix max() declaration.
304803
 
304803
 25/07/2012 autofs-5.0.7
304803
 =======================
304803
--- autofs-5.0.7.orig/modules/replicated.c
304803
+++ autofs-5.0.7/modules/replicated.c
304803
@@ -73,8 +73,8 @@ static int volatile ifc_last_len = 0;
304803
 /* Get numeric value of the n bits starting at position p */
304803
 #define getbits(x, p, n)	((x >> (p + 1 - n)) & ~(~0 << n))
304803
 
304803
-#define max(x, y)	(x >= y ? x : y)
304803
-#define mmax(x, y, z)	(max(x, y) == x ? max(x, z) : max(y, z))
304803
+#define mymax(x, y)	(x >= y ? x : y)
304803
+#define mmax(x, y, z)	(mymax(x, y) == x ? mymax(x, z) : mymax(y, z))
304803
 
304803
 unsigned int ipv6_mask_cmp(uint32_t *host, uint32_t *iface, uint32_t *mask)
304803
 {
304803
@@ -961,7 +961,7 @@ int prune_host_list(unsigned logopt, str
304803
 
304803
 	max_tcp_count = mmax(v4_tcp_count, v3_tcp_count, v2_tcp_count);
304803
 	max_udp_count = mmax(v4_udp_count, v3_udp_count, v2_udp_count);
304803
-	max_count = max(max_tcp_count, max_udp_count);
304803
+	max_count = mymax(max_tcp_count, max_udp_count);
304803
 
304803
 	if (max_count == v4_tcp_count) {
304803
 		selected_version = NFS4_TCP_SUPPORTED;