[PVFS2-CVS] commit by slang in pvfs2/test/io/buffer: mt_test1.c mt_test2.c trove-init.c

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


Update of /projects/cvsroot/pvfs2/test/io/buffer
In directory parlweb:/tmp/cvs-serv439/test/io/buffer

Modified Files:
	mt_test1.c mt_test2.c trove-init.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: mt_test1.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/io/buffer/mt_test1.c,v
diff -p -u -r1.2 -r1.3
--- mt_test1.c	16 Oct 2003 14:42:21 -0000	1.2
+++ mt_test1.c	10 Nov 2005 01:27:21 -0000	1.3
@@ -120,9 +120,9 @@ void do_io_read(int *result)
                 if (flag){
                     fprintf(stderr, "cache_req_test ok: flag=%d, status: %d, cbufcnt=%d\n", flag, request[0].status, reply[0].count);
 					for ( ncnt=0; ncnt < reply[0].count; ncnt ++ ) {
-						fprintf(stderr, "[%d] %p len:%Ld\n", ncnt,
+						fprintf(stderr, "[%d] %p len:%lld\n", ncnt,
 									reply[0].cbuf_offset_array[ncnt], 
-									Ld(reply[0].cbuf_size_array[ncnt]));
+									lld(reply[0].cbuf_size_array[ncnt]));
 					}	
 		    		break;		
                 }

Index: mt_test2.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/io/buffer/mt_test2.c,v
diff -p -u -r1.3 -r1.4
--- mt_test2.c	16 Oct 2003 14:42:21 -0000	1.3
+++ mt_test2.c	10 Nov 2005 01:27:21 -0000	1.4
@@ -120,9 +120,9 @@ void do_io_write(int *result)
                 	fprintf(stderr, "cache_req_test ok: flag=%d, status: %d, cbufcnt=%d\n", flag, request[0].status, reply[0].count);
 
 					for ( ncnt=0; ncnt < reply[0].count; ncnt ++ ) {
-                        fprintf(stderr, "[%d] %p len:%Ld\n", ncnt,
+                        fprintf(stderr, "[%d] %p len:%lld\n", ncnt,
                                     reply[0].cbuf_offset_array[ncnt], 
-                                    Ld(reply[0].cbuf_size_array[ncnt]));
+                                    lld(reply[0].cbuf_size_array[ncnt]));
                     }
             	}
         	}

Index: trove-init.c
===================================================================
RCS file: /projects/cvsroot/pvfs2/test/io/buffer/trove-init.c,v
diff -p -u -r1.2 -r1.3
--- trove-init.c	16 Oct 2003 14:42:21 -0000	1.2
+++ trove-init.c	10 Nov 2005 01:27:21 -0000	1.3
@@ -2,7 +2,10 @@
 #include <stdio.h>
 #include <string.h>
 #include <sys/time.h>
+#include <stdlib.h>
+#ifdef HAVE_MALLOC_H
 #include <malloc.h>
+#endif
 
 #include "trove.h"
 
@@ -95,7 +98,7 @@ int trove_init(TROVE_coll_id *coll_id_p,
     if (ret < 0) {
         return -1;
     }
-    fprintf(stderr, "%s: handle=%Ld\n", path_name, Ld(parent_handle));
+    fprintf(stderr, "%s: handle=%lld\n", path_name, lld(parent_handle));
 
     
     /* find the parent directory handle */
@@ -187,7 +190,7 @@ int trove_init(TROVE_coll_id *coll_id_p,
 	*context_p = trove_context;
 
     fprintf(stderr, "+++++++++++++++++++++++++++++++\n");
-    fprintf(stderr, "Trove init: coll_id=%d, handle=%Ld, context=%d\n", coll_id, Ld(parent_handle), trove_context);
+    fprintf(stderr, "Trove init: coll_id=%d, handle=%lld, context=%d\n", coll_id, lld(parent_handle), trove_context);
 
 	free(mybuffer);
     return 0;



More information about the PVFS2-CVS mailing list