Blob Blame History Raw
--- rdist-6.1.5/src/client.c.lfs	2003-12-16 23:43:56.000000000 +0100
+++ rdist-6.1.5/src/client.c	2003-12-16 23:46:56.000000000 +0100
@@ -408,9 +408,9 @@
 	/*
 	 * Send file info
 	 */
-	(void) sendcmd(C_RECVREG, "%o %04o %ld %ld %ld %s %s %s", 
+	(void) sendcmd(C_RECVREG, "%o %04o %lld %ld %ld %s %s %s", 
 		       opts, stb->st_mode & 07777, 
-		       (long) stb->st_size, 
+		       (off_t) stb->st_size, 
 		       stb->st_mtime, stb->st_atime,
 		       user, group, rname);
 	if (response() < 0) {
@@ -418,8 +418,8 @@
 		return(-1);
 	}
 
-	debugmsg(DM_MISC, "Send file '%s' %d bytes\n", 
-		 rname, (long) stb->st_size);
+	debugmsg(DM_MISC, "Send file '%s' %lld bytes\n", 
+		 rname, (off_t) stb->st_size);
 
 	/*
 	 * Set remote time out alarm handler.
@@ -670,9 +670,9 @@
 	/*
 	 * Gather and send basic link info
 	 */
-	(void) sendcmd(C_RECVSYMLINK, "%o %04o %ld %ld %ld %s %s %s", 
+	(void) sendcmd(C_RECVSYMLINK, "%o %04o %lld %ld %ld %s %s %s", 
 		       opts, stb->st_mode & 07777, 
-		       (long) stb->st_size, 
+		       (off_t) stb->st_size, 
 		       stb->st_mtime, stb->st_atime,
 		       user, group, rname);
 	if (response() < 0)
@@ -852,7 +852,7 @@
 	/*
 	 * Parse size
 	 */
-	size = strtol(cp, &cp, 10);
+	size = strtoll(cp, &cp, 10);
 	if (*cp++ != ' ') {
 		error("update: size not delimited");
 		return(US_NOTHING);
@@ -904,8 +904,8 @@
 
 	debugmsg(DM_MISC, "update(%s,) local mode %04o remote mode %04o\n", 
 		 rname, lmode, rmode);
-	debugmsg(DM_MISC, "update(%s,) size %d mtime %d owner '%s' grp '%s'\n",
-		 rname, (int) size, mtime, owner, group);
+	debugmsg(DM_MISC, "update(%s,) size %lld mtime %d owner '%s' grp '%s'\n",
+		 rname, (off_t) size, mtime, owner, group);
 
 	if (statp->st_mtime != mtime) {
 		if (statp->st_mtime < mtime && IS_ON(opts, DO_YOUNGER)) {
@@ -931,8 +931,8 @@
 	}
 
 	if (statp->st_size != size) {
-		debugmsg(DM_MISC, "size does not match (%d != %d).\n",
-			 (int) statp->st_size, size);
+		debugmsg(DM_MISC, "size does not match (%lld != %lld).\n",
+			 statp->st_size, size);
 		return(US_OUTDATE);
 	} 
 
--- rdist-6.1.5/src/server.c.lfs	1998-11-10 05:15:31.000000000 +0100
+++ rdist-6.1.5/src/server.c	2003-12-16 23:50:19.000000000 +0100
@@ -639,8 +639,8 @@
 	case S_IFLNK:
 	case S_IFDIR:
 	case S_IFREG:
-		(void) sendcmd(QC_YES, "%ld %ld %o %s %s",
-			       (long) stb.st_size, 
+		(void) sendcmd(QC_YES, "%lld %ld %o %s %s",
+			       (off_t) stb.st_size, 
 			       stb.st_mtime, 
 			       stb.st_mode & 07777,
 			       getusername(stb.st_uid, target, options), 
@@ -1382,7 +1382,7 @@
 	/*
 	 * Get file size
 	 */
-	size = strtol(cp, &cp, 10);
+	size = strtoll(cp, &cp, 10);
 	if (*cp++ != ' ') {
 		error("recvit: size not delimited");
 		return;
@@ -1435,7 +1435,7 @@
 	}
 
 	debugmsg(DM_MISC,
-		 "recvit: opts = %04o mode = %04o size = %d mtime = %d",
+		 "recvit: opts = %04o mode = %04o size = %lld mtime = %d",
 		 opts, mode, size, mtime);
 	debugmsg(DM_MISC,
        "recvit: owner = '%s' group = '%s' file = '%s' catname = %d isdir = %d",
--- rdist-6.1.5/include/defs.h.lfs	2003-12-16 23:43:56.000000000 +0100
+++ rdist-6.1.5/include/defs.h	2003-12-16 23:43:56.000000000 +0100
@@ -41,6 +41,8 @@
 #include <stdlib.h>
 #endif	/* _POSIX_SOURCE */
 #include <stdio.h>
+#include <string.h>
+#include <mntent.h>
 #include <ctype.h>
 #include <errno.h>
 #include <pwd.h>
@@ -336,15 +338,6 @@
 #endif /* USE_STATDB */
 
 /*
- * System function declarations
- */
-char 			       *hasmntopt();
-char			       *strchr();
-char		 	       *strdup();
-char		 	       *strrchr();
-char 			       *strtok();
-
-/*
  * Our own declarations.
  */
 char			       *exptilde();
--- rdist-6.1.5/Makefile.local.lfs	1998-11-10 04:36:31.000000000 +0100
+++ rdist-6.1.5/Makefile.local	2003-12-16 23:43:56.000000000 +0100
@@ -39,7 +39,7 @@
 # Add any local definitions you want pass to the compiler to DEFS_LOCAL
 # below.  This includes those items found in "config/config.h".
 #
-#DEFS_LOCAL	= -DDIRECT_RCMD
+DEFS_LOCAL	= -O2 -g -pipe -Wall -D_POSIX_SOURCE -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
 
 #
 # Add any local libraries that your system might need to LIBS_LOCAL below.