improve the autoconf warning for broken readdir
[rsync/rsync.git] / main.c
diff --git a/main.c b/main.c
index 41d8a6b..dc9a230 100644 (file)
--- a/main.c
+++ b/main.c
@@ -91,17 +91,10 @@ static void report(int f)
     tsize = read_longint(f);
   }
 
-#if HAVE_LONGLONG
-  printf("wrote %lld bytes  read %lld bytes  %g bytes/sec\n",
-        (long long)out,(long long)in,(in+out)/(0.5 + (t-starttime)));
-  printf("total size is %lld  speedup is %g\n",
-        (long long)tsize,(1.0*tsize)/(in+out));
-#else
-  printf("wrote %ld bytes  read %ld bytes  %g bytes/sec\n",
-        (long)out,(long)in,(in+out)/(0.5 + (t-starttime)));
-  printf("total size is %ld  speedup is %g\n",
-        (long)tsize,(1.0*tsize)/(in+out));
-#endif
+  printf("wrote %.0f bytes  read %.0f bytes  %.2f bytes/sec\n",
+        (double)out,(double)in,(in+out)/(0.5 + (t-starttime)));
+  printf("total size is %.0f  speedup is %.2f\n",
+        (double)tsize,(1.0*tsize)/(in+out));
 }
 
 
@@ -273,9 +266,9 @@ oom:
 
 static char *get_local_name(struct file_list *flist,char *name)
 {
-  struct stat st;
+  STRUCT_STAT st;
 
-  if (stat(name,&st) == 0) {
+  if (do_stat(name,&st) == 0) {
     if (S_ISDIR(st.st_mode)) {
       if (chdir(name) != 0) {
        fprintf(FERROR,"chdir %s : %s (1)\n",name,strerror(errno));
@@ -296,7 +289,7 @@ static char *get_local_name(struct file_list *flist,char *name)
   if (!name) 
     return NULL;
 
-  if (mkdir(name,0777 & ~orig_umask) != 0) {
+  if (do_mkdir(name,0777 & ~orig_umask) != 0) {
     fprintf(FERROR,"mkdir %s : %s (1)\n",name,strerror(errno));
     exit_cleanup(1);
   } else {