summaryrefslogtreecommitdiff
path: root/src/incremen.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2014-01-07 11:15:56 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2014-01-07 11:16:23 -0800
commit47da28892e6860a3a6fc06745f640e3bb878c757 (patch)
treec07bf505360fc45b933172b7c6eb38da505a271b /src/incremen.c
parent5c5f62e0dce825fc14541df2cb8209f7252d5e7c (diff)
downloadtar-47da28892e6860a3a6fc06745f640e3bb878c757.tar.gz
tar: work aruond IBM XL C bug
* src/incremen.c (show_snapshot_field_ranges) (write_directory_file_entry): Use simpler array size expression, one that evaluates to the same value. This works around a compiler bug with IBM XL C. Problem reported by Yannick Bergeron in <http://lists.gnu.org/archive/html/bug-tar/2014-01/msg00009.html>.
Diffstat (limited to 'src/incremen.c')
-rw-r--r--src/incremen.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/incremen.c b/src/incremen.c
index f6b311ef..d850b686 100644
--- a/src/incremen.c
+++ b/src/incremen.c
@@ -759,7 +759,7 @@ scan_directory (struct tar_stat_info *st)
entry = dumpdir_next (itr))
{
char *full_name = namebuf_name (nbuf, entry + 1);
-
+
if (*entry == 'I') /* Ignored entry */
*entry = 'N';
else if (excluded_name (full_name))
@@ -792,7 +792,7 @@ scan_directory (struct tar_stat_info *st)
diag = stat_diag;
}
}
-
+
if (diag)
{
file_removed_diag (full_name, false, diag);
@@ -806,7 +806,7 @@ scan_directory (struct tar_stat_info *st)
else if (directory->children == ALL_CHILDREN)
pd_flag |= PD_FORCE_CHILDREN | ALL_CHILDREN;
*entry = 'D';
-
+
stsub.parent = st;
procdir (full_name, &stsub, pd_flag, entry);
restore_parent_fd (&stsub);
@@ -823,7 +823,7 @@ scan_directory (struct tar_stat_info *st)
*entry = 'N';
else
*entry = 'Y';
-
+
tar_stat_destroy (&stsub);
}
}
@@ -832,7 +832,7 @@ scan_directory (struct tar_stat_info *st)
else if (directory->tagfile)
maketagdumpdir (directory);
}
-
+
namebuf_free (nbuf);
free (dirp);
@@ -1296,8 +1296,8 @@ void
show_snapshot_field_ranges (void)
{
struct field_range const *p;
- char minbuf[max (SYSINT_BUFSIZE, INT_BUFSIZE_BOUND (intmax_t))];
- char maxbuf[max (SYSINT_BUFSIZE, INT_BUFSIZE_BOUND (uintmax_t))];
+ char minbuf[SYSINT_BUFSIZE];
+ char maxbuf[SYSINT_BUFSIZE];
printf("This tar's snapshot file field ranges are\n");
printf (" (%-15s => [ %s, %s ]):\n\n", "field name", "min", "max");
@@ -1406,7 +1406,7 @@ write_directory_file_entry (void *entry, void *data)
if (DIR_IS_FOUND (directory))
{
- char buf[max (SYSINT_BUFSIZE, INT_BUFSIZE_BOUND (intmax_t))];
+ char buf[SYSINT_BUFSIZE];
char const *s;
s = DIR_IS_NFS (directory) ? "1" : "0";