Project

General

Profile

Bug #1028 » cpdup-1.11-explicit_sizes.patch

msylvan, 06/11/2008 08:17 PM

View differences:

cpdup-1.11/hcproto.c 2008-06-11 14:40:46.000000000 -0400
struct HCHead *head;
struct HCLeaf *item;
struct dirent *den;
int desc = 0;
size_t desc = 0;
if (hc == NULL || hc->host == NULL)
return(opendir(path));
......
}
}
if (hcc_get_descriptor(hc, desc, HC_DESC_DIR)) {
fprintf(stderr, "hc_opendir: remote reused active descriptor %d\n",
fprintf(stderr, "hc_opendir: remote reused active descriptor %zd\n",
desc);
return(NULL);
}
......
return(readdir(dir));
trans = hcc_start_command(hc, HC_READDIR);
hcc_leaf_int32(trans, LC_DESCRIPTOR, (int)dir);
hcc_leaf_int32(trans, LC_DESCRIPTOR, (size_t)dir);
if ((head = hcc_finish_command(trans)) == NULL)
return(NULL);
if (head->error)
return(NULL); /* XXX errno */
den = hcc_get_descriptor(hc, (int)dir, HC_DESC_DIR);
den = hcc_get_descriptor(hc, (size_t)dir, HC_DESC_DIR);
if (den == NULL)
return(NULL); /* XXX errno */
if (den->d_name)
......
if (hc == NULL || hc->host == NULL)
return(closedir(dir));
den = hcc_get_descriptor(hc, (int)dir, HC_DESC_DIR);
den = hcc_get_descriptor(hc, (size_t)dir, HC_DESC_DIR);
if (den) {
free(den);
hcc_set_descriptor(hc, (int)dir, NULL, HC_DESC_DIR);
hcc_set_descriptor(hc, (size_t)dir, NULL, HC_DESC_DIR);
trans = hcc_start_command(hc, HC_CLOSEDIR);
hcc_leaf_int32(trans, LC_DESCRIPTOR, (int)dir);
hcc_leaf_int32(trans, LC_DESCRIPTOR, (size_t)dir);
if ((head = hcc_finish_command(trans)) == NULL)
return(-1);
if (head->error)
-- cpdup-1.11/cpdup.c.explicit_sizes 2008-05-24 13:21:36.000000000 -0400
++ cpdup-1.11/cpdup.c 2008-06-11 14:49:59.000000000 -0400
......
* make any required connections.
*/
if (src && (ptr = strchr(src, ':')) != NULL) {
asprintf(&SrcHost.host, "%*.*s", ptr - src, ptr - src, src);
asprintf(&SrcHost.host, "%*.*s", (int)(ptr - src), (int)(ptr - src), src);
src = ptr + 1;
if (UseCpFile) {
fprintf(stderr, "The cpignore options are not currently supported for remote sources\n");
......
exit(1);
}
if (dst && (ptr = strchr(dst, ':')) != NULL) {
asprintf(&DstHost.host, "%*.*s", ptr - dst, ptr - dst, dst);
asprintf(&DstHost.host, "%*.*s", (int)(ptr - dst), (int)(ptr - dst), dst);
dst = ptr + 1;
if (UseFSMIDOpt) {
fprintf(stderr, "The FSMID options are not currently supported for remote targets\n");
-- cpdup-1.11/fsmid.c.explicit_sizes 2008-05-22 19:05:08.000000000 -0400
++ cpdup-1.11/fsmid.c 2008-06-11 15:07:50.000000000 -0400
......
for (node = FSMIDBase; node; node = node->fid_Next) {
if (node->fid_Accessed && node->fid_Code) {
fprintf(fo, "%016llx %d %s\n",
node->fid_Code,
fprintf(fo, "%016llx %zd %s\n",
(long long unsigned)node->fid_Code,
strlen(node->fid_Name),
node->fid_Name
);
(2-2/3)