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

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