Skip to contentSkip to conversation

cluster/cmirror/src cluster.c functions.c loca ...

Cluster-devel [email protected] 1 participant 1 message Jan 18, 2008

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: jbrassow at sourceware.org 2008-01-18 17:11:07

Modified files:
cmirror/src : cluster.c functions.c local.c logging.h
rbtree.c

Log message:
- fix compile problems on x86_64

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/cluster.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.8&r2=1.1.2.9
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/functions.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.8&r2=1.1.2.9
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/local.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.7&r2=1.1.2.8
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/logging.h.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.3&r2=1.1.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cmirror/src/rbtree.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.1.2.3&r2=1.1.2.4

cmirror/src/Attic/cluster.c +7 -6
@@ -165,7 +165,7 @@
 		LOG_DBG("Sending response to %u on cluster: [%s/%llu]",
 			tfr->originator,
 			RQ_TYPE(tfr->request_type & ~DM_CLOG_RESPONSE),
-			tfr->seq);
+			(unsigned long long)tfr->seq);
 		r = cluster_send(tfr);
 		if (r)
 			LOG_ERROR("cluster_send failed");
@@ -624,10 +624,11 @@
 		LOG_DBG("Response to %u from %u recieved [%s/%llu]",
 			tfr->originator, nodeid,
 			RQ_TYPE(tfr->request_type & ~DM_CLOG_RESPONSE),
-			tfr->seq);
+			(unsigned long long)tfr->seq);
 	else
 		LOG_DBG("Request from %u recieved [%s/%llu]",
-			nodeid, RQ_TYPE(tfr->request_type), tfr->seq);
+			nodeid, RQ_TYPE(tfr->request_type),
+			(unsigned long long)tfr->seq);
 
 	if (my_cluster_id == 0xDEAD) {
 		LOG_DBG("Message before init... ignoring.\n");
@@ -757,8 +758,8 @@
 	LOG_PRINT("*****************************************");
 
 	list_for_each_entry_safe(match, tmp, &clog_cpg_list, list) {
-		LOG_DBG("Given handle: %llu", handle);
-		LOG_DBG("      hanlde: %llu", match->handle);
+		LOG_DBG("Given handle: %llu", (unsigned long long)handle);
+		LOG_DBG("      hanlde: %llu", (unsigned long long)match->handle);
 		LOG_DBG("Given name  : %s", gname->value);
 		LOG_DBG("      name  : %s", match->name.value);
 		if (match->handle == handle) {
@@ -928,7 +929,7 @@
 	}
 
 	list_add(&new->list, &clog_cpg_list);
-	LOG_DBG("New   handle: %llu", new->handle);
+	LOG_DBG("New   handle: %llu", (unsigned long long)new->handle);
 	LOG_DBG("New   name: %s", new->name.value);
 
 	/* FIXME: better variable */
cmirror/src/Attic/functions.c +28 -22

150 lines not on this page · raw message

cmirror/src/Attic/local.c +2 -1
@@ -152,7 +152,8 @@
 		return r;
 
 	LOG_DBG("Request from kernel recieved [%s/%s/%llu]",
-		RQ_TYPE(tfr->request_type), SHORT_UUID(tfr->uuid), tfr->seq);
+		RQ_TYPE(tfr->request_type), SHORT_UUID(tfr->uuid),
+		(unsigned long long)tfr->seq);
 	switch (tfr->request_type) {
 	case DM_CLOG_CTR:
 	case DM_CLOG_DTR:
cmirror/src/Attic/logging.h +24 -0
@@ -4,6 +4,30 @@
 #include <stdio.h>
 #include <syslog.h>
 
+#if (BITS_PER_LONG == 64)
+#define PRIu64 "lu"
+#define PRId64 "ld"
+#define PRIo64 "lo"
+#define PRIx64 "lx"
+#define PRIX64 "lX"
+#define SCNu64 "lu"
+#define SCNd64 "ld"
+#define SCNo64 "lo"
+#define SCNx64 "lx"
+#define SCNX64 "lX"
+#else
+#define PRIu64 "Lu"
+#define PRId64 "Ld"
+#define PRIo64 "Lo"
+#define PRIx64 "Lx"
+#define PRIX64 "LX"
+#define SCNu64 "Lu"
+#define SCNd64 "Ld"
+#define SCNo64 "Lo"
+#define SCNx64 "Lx"
+#define SCNX64 "LX"
+#endif
+
 /* SHORT_UUID - print last 8 chars of a string */
 #define SHORT_UUID(x) ((x) + (strlen(x) - 8))
 
cmirror/src/Attic/rbtree.c +4 -4
@@ -57,7 +57,7 @@
 	}
 
 	LOG_DBG("TREE[0x%p]: left_rotate [axis = %llu]",
-		t, *((uint64_t *)KEY(axis)));
+		t, (unsigned long long)*((uint64_t *)KEY(axis)));
 	tmp = RIGHT(axis);
 	RIGHT(axis) = LEFT(tmp);
 	if (LEFT(tmp) != NIL(t))
@@ -87,7 +87,7 @@
 	}
 
 	LOG_DBG("TREE[0x%p]: right_rotate [axis = %llu]",
-		t, *((uint64_t *)KEY(axis)));
+		t, (unsigned long long)*((uint64_t *)KEY(axis)));
 	tmp = LEFT(axis);
 	LEFT(axis) = RIGHT(tmp);
 	if (RIGHT(tmp) != NIL(t))
@@ -179,7 +179,7 @@
 	struct rb_node *tmp;
 
 	LOG_DBG("TREE[0x%p]: inserting %llu",
-		t, *((uint64_t *)KEY(new)));
+		t, (unsigned long long)*((uint64_t *)KEY(new)));
 	if (!t || !new) {
 		errno = EINVAL;
 		return -1;
@@ -320,7 +320,7 @@
 	struct rb_node *x, *y;
 
 	LOG_DBG("TREE[0x%p]: removing %llu",
-		t, *((uint64_t *)KEY(del)));
+		t, (unsigned long long)*((uint64_t *)KEY(del)));
 	if ((LEFT(del) == NIL(t)) || (RIGHT(del) == NIL(t)))
 		y = del;
 	else