summaryrefslogtreecommitdiffstats
path: root/source/n/rdist/rdist-6.1.5-07.lfs.diff
blob: e1fe2a18286fe79bbc913c3e18623d0f1ac07fe7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
--- 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
@@ -414,9 +414,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) {
@@ -424,8 +424,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.
@@ -676,9 +676,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)
@@ -858,7 +858,7 @@
 	/*
 	 * Parse size
 	 */
-	size = strtol(cp, &cp, 10);
+	size = strtoll(cp, &cp, 10);
 	if (*cp++ != ' ') {
 		error("update: size not delimited");
 		return(US_NOTHING);
@@ -910,8 +910,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)) {
@@ -937,8 +937,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
@@ -645,8 +645,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), 
@@ -1388,7 +1388,7 @@
 	/*
 	 * Get file size
 	 */
-	size = strtol(cp, &cp, 10);
+	size = strtoll(cp, &cp, 10);
 	if (*cp++ != ' ') {
 		error("recvit: size not delimited");
 		return;
@@ -1441,7 +1441,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
@@ -22,6 +22,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>
@@ -317,15 +319,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
@@ -20,7 +20,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.