[PVFS2-CVS] commit by slang in pvfs2/src/io/bmi/bmi_tcp: bmi-tcp.c

CVS commit program cvs at parl.clemson.edu
Wed Nov 9 20:27:04 EST 2005


Update of /projects/cvsroot/pvfs2/src/io/bmi/bmi_tcp
In directory parlweb:/tmp/cvs-serv439/src/io/bmi/bmi_tcp

Modified Files:
	bmi-tcp.c 
Log Message:
* malloc.h is obsolete in freebsd, check for it
* No error.h in freebsd
* linux allows Lu,Lx, and Ld to be interchangeable with llu,llx, and
lld.  Other platforms (solaris, bsd) don't.  Replaced all the L*
with ll*.
* bsd doesn't have mntent.h.  use fstab.h and our own funcs.
* bsd doesn't know about ssize_t.  Use size_t instead.
* bsd doesn't have asm errnos.  Check for each of those
errno macros and if not defined define to -1
* check for db3/db.h db4/db.h header if db path is specified using
--with-db
* darwin has aio support builtin, doesn't need -lrt
* remove kernel stuff in pvfs2-types.h that sets WORDSIZE.  gcc
defines __LP64__ on archs with 64bit longs so we use that instead.
* darwin's open doesn't accept O_LARGEFILE.  off_t is an int64 by
default.  define O_LARGEFILE if it hasn't been.
* need to run ranlib on darwin after libpvfs2.a gets installed to regenerate
table of contents



Index: bmi-tcp.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/bmi/bmi_tcp/bmi-tcp.c,v
diff -p -u -r1.96 -r1.97
--- bmi-tcp.c	25 Oct 2005 18:00:58 -0000	1.96
+++ bmi-tcp.c	10 Nov 2005 01:27:03 -0000	1.97
@@ -1856,7 +1856,12 @@ static int tcp_sock_init(method_addr_p m
 	else
 	{
             /* BMI_sockio_connect_sock returns a PVFS error */
-            PVFS_perror_gossip("Error: BMI_sockio_connect_sock", ret);
+            char buff[300];
+
+            snprintf(buff, 300, "Error: BMI_sockio_connect_sock: (%s):", 
+                     tcp_addr_data->hostname);
+
+            PVFS_perror_gossip(buff, ret);
 	    return (ret);
 	}
     }
@@ -3180,7 +3185,7 @@ static int tcp_accept_init(int *socket, 
     }
 
     *socket = accept(tcp_addr_data->socket, (struct sockaddr*)&peer_sockaddr,
-              &peer_sockaddr_size);
+              (socklen_t *)&peer_sockaddr_size);
 
     if (*socket < 0)
     {
@@ -3191,7 +3196,7 @@ static int tcp_accept_init(int *socket, 
 	    (errno == ENOPROTOOPT) ||
 	    (errno == EHOSTDOWN) ||
 	    (errno == ENONET) ||
-	    (errno == EHOSTUNREACH) ||
+            (errno == EHOSTUNREACH) ||
 	    (errno == EOPNOTSUPP) || (errno == ENETUNREACH))
 	{
 	    /* try again later */



More information about the PVFS2-CVS mailing list