x86_64 patch for OpenSSI - 5 of 6 - lp64 fixes for CI

John Hughes <[email protected]> Fri, 12 Feb 2010 16:19:07 +0100
Newsgroups gmane.linux.cluster.ssic.devel
Message-ID <[email protected]>
This patch fixes compilation warnings and errors on LP64 systems for CI.

(LP64 = systems where long and pointer are 64 bits, so we get warnings 
moving a clusternode_t into a void* and vice-versa).

To apply:

   1. get the current (12/2/2010) CI cvs to ./ci

   2. save the patch as ./ci-lp64.patch

   3. cd ./ci/kernel

   4. Apply the patch:

      patch -p0 <../../ci-lp64.patch

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev

_______________________________________________
ssic-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ssic-linux-devel
ci-lp64.patch (text/x-patch, 2.8 KB)
Index: cluster/clms/clms_client.c
===================================================================
RCS file: /usr/local/lib/cvs-repo/openssi-future/cluster/clms/Attic/clms_client.c,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.4.2.1
diff -u -p -r1.1.4.4 -r1.1.4.4.2.1
--- cluster/clms/clms_client.c	2 Jan 2010 12:51:58 -0000	1.1.4.4
+++ cluster/clms/clms_client.c	25 Jan 2010 11:23:55 -0000	1.1.4.4.2.1
@@ -822,7 +822,7 @@ clms_client_nodeup_proc(void *argp)
 
 	nsc_daemonize();
 
-	new_node = (clusternode_t)argp;
+	new_node = (long)argp;
 	/*
 	 * Just call clms_client_perform_nodeup(); there is interlocking
 	 * there (via a call to clms_set_nodeup_inprogress()) that prevents
@@ -1354,7 +1354,7 @@ rclms_newnode_info(
 	do {
 		error = spawn_daemon_proc("cc nodeup p",
 					  clms_client_nodeup_proc,
-					  (void *)new_node);
+					  (void *)(long)new_node);
 		if (error != 0)
 			idelay(HZ/10);
 	} while(error != 0);
@@ -1904,7 +1904,7 @@ clms_client_run_trans_queue(void)
 			do {
 				error = spawn_daemon_proc("cc nodeup p",
 							  clms_client_nodeup_proc,
-							  (void *)datap->node);
+							  (void *)(long)datap->node);
 				if (error != 0)
 					idelay(HZ/10);
 			} while(error != 0);
Index: cluster/ics/ics_tcp/ics_llmgmt.c
===================================================================
RCS file: /usr/local/lib/cvs-repo/openssi-future/cluster/ics/ics_tcp/Attic/ics_llmgmt.c,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.3.2.1
diff -u -p -r1.1.4.3 -r1.1.4.3.2.1
--- cluster/ics/ics_tcp/ics_llmgmt.c	2 Jan 2010 12:51:58 -0000	1.1.4.3
+++ cluster/ics/ics_tcp/ics_llmgmt.c	25 Jan 2010 11:23:55 -0000	1.1.4.3.2.1
@@ -2482,7 +2482,7 @@ ics_llsendmsg(ics_sock_conn_data_t *conn
 	sigset_t saved_sigset;
 
 	add_ics_randomness(connp->conn_snd_rand_statep,
-			   ((unsigned)msgp + size) / sizeof(int));
+			   ((unsigned long)msgp + size) / sizeof(int));
 
 	retval = sock_sendmsg(connp->conn_sock, msgp, size);
 	if (retval == size)
Index: cluster/ics/ics_tcp/ics_sock_service.c
===================================================================
RCS file: /usr/local/lib/cvs-repo/openssi-future/cluster/ics/ics_tcp/Attic/ics_sock_service.c,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.3.2.1
diff -u -p -r1.1.4.3 -r1.1.4.3.2.1
--- cluster/ics/ics_tcp/ics_sock_service.c	2 Jan 2010 12:51:58 -0000	1.1.4.3
+++ cluster/ics/ics_tcp/ics_sock_service.c	25 Jan 2010 11:23:55 -0000	1.1.4.3.2.1
@@ -215,7 +215,7 @@ ics_dgram(
 		while (__ics_dgram_parse(rbufp, connp->conn_chan,
 					 connp->conn_node)) {
 			add_ics_randomness(connp->conn_rcv_rand_statep,
-					   ((unsigned)rbufp->rb_hdatap +
+					   ((unsigned long)rbufp->rb_hdatap +
 					   rbufp->rb_len) / sizeof(int));
 			if (connp->conn_chan == ics_reply_chan ||
 			    connp->conn_chan == ics_reply_prio_chan)