Import of pkgsrc-2016Q3

This commit is contained in:
2016-10-14 07:49:11 +02:00
committed by Lionel Sambuc
parent 9d819b6d54
commit 1242aa1e36
35952 changed files with 949749 additions and 377083 deletions

View File

@@ -1,22 +1,37 @@
$NetBSD: patch-aa,v 1.1.1.1 2008/12/17 11:56:26 obache Exp $
$NetBSD: patch-aa,v 1.2 2015/12/12 04:00:30 kamil Exp $
--- fdupes.c.orig 2001-03-15 02:16:09.000000000 +0000
Add casts to silence printf errors.
Do not overwrite stdin.
--- fdupes.c.orig 2013-04-20 18:02:18.000000000 +0000
+++ fdupes.c
@@ -588,7 +588,7 @@ void printmatches(file_t *files)
@@ -643,7 +643,7 @@ void printmatches(file_t *files)
while (files != NULL) {
if (files->hasdupes) {
if (!ISFLAG(flags, F_OMITFIRST)) {
- if (ISFLAG(flags, F_SHOWSIZE)) printf("%ld byte%seach:\n", files->size,
+ if (ISFLAG(flags, F_SHOWSIZE)) printf("%ld byte%seach:\n", (long)files->size,
- if (ISFLAG(flags, F_SHOWSIZE)) printf("%lld byte%seach:\n", files->size,
+ if (ISFLAG(flags, F_SHOWSIZE)) printf("%lld byte%seach:\n", (long long)files->size,
(files->size != 1) ? "s " : " ");
if (ISFLAG(flags, F_DSAMELINE)) escapefilename("\\ ", &files->d_name);
printf("%s%c", files->d_name, ISFLAG(flags, F_DSAMELINE)?' ':'\n');
@@ -676,7 +676,7 @@ void autodelete(file_t *files)
@@ -796,7 +796,7 @@ void deletefiles(file_t *files, int prom
do {
printf("Set %d of %d, preserve files [1 - %d, all]",
curgroup, groups, counter);
- if (ISFLAG(flags, F_SHOWSIZE)) printf(" (%ld byte%seach)", files->size,
+ if (ISFLAG(flags, F_SHOWSIZE)) printf(" (%ld byte%seach)", (long)files->size,
- if (ISFLAG(flags, F_SHOWSIZE)) printf(" (%lld byte%seach)", files->size,
+ if (ISFLAG(flags, F_SHOWSIZE)) printf(" (%lld byte%seach)", (long long)files->size,
(files->size != 1) ? "s " : " ");
printf(": ");
fflush(stdout);
@@ -1164,8 +1164,9 @@ int main(int argc, char **argv) {
}
else
{
- stdin = freopen("/dev/tty", "r", stdin);
- deletefiles(files, 1, stdin);
+ FILE* fd;
+ fd = freopen("/dev/tty", "r", stdin);
+ deletefiles(files, 1, fd);
}
}