char const *minval_string;
char const *maxval_string = STRINGIFY_BIGINT (maxval, maxbuf);
char const *value_string;
-
+
if (gnu_format)
{
uintmax_t m = maxval + 1 ? maxval + 1 : maxval / 2 + 1;
}
else
minval_string = "0";
-
+
if (negative)
{
char *p = STRINGIFY_BIGINT (- value, valbuf + 1);
}
else
value_string = STRINGIFY_BIGINT (value, valbuf);
-
+
if (substitute)
{
int negsub;
uintmax_t sub = substitute (&negsub) & maxval;
- /* FIXME: This is the only place where GNU_FORMAT differs from
- OLDGNU_FORMAT. Apart from this they are completely identical. */
+ /* NOTE: This is one of the few places where GNU_FORMAT differs from
+ OLDGNU_FORMAT. The actual differences are:
+
+ 1. In OLDGNU_FORMAT all strings in a tar header end in \0
+ 2. Incremental archives use oldgnu_header.
+
+ Apart from this they are completely identical. */
uintmax_t s = (negsub &= archive_format == GNU_FORMAT) ? - sub : sub;
char subbuf[UINTMAX_STRSIZE_BOUND + 1];
char *sub_string = STRINGIFY_BIGINT (s, subbuf + 1);
}
else
substitute = NULL; /* No substitution for formats, other than GNU */
-
+
return to_chars_subst (negative, gnu_format, value, valsize, substitute,
where, size, type);
}
&& S_IROTH == TOREAD && S_IWOTH == TOWRITE && S_IXOTH == TOEXEC
&& archive_format != POSIX_FORMAT
&& archive_format != USTAR_FORMAT
- && archive_format != GNU_FORMAT)
+ && archive_format != GNU_FORMAT
+ && archive_format != OLDGNU_FORMAT)
{
negative = v < 0;
u = v;
if (mode_option)
st->stat.st_mode =
((st->stat.st_mode & ~MODE_ALL)
- | mode_adjust (st->stat.st_mode, mode_option, initial_umask));
+ | mode_adjust (st->stat.st_mode, S_ISDIR (st->stat.st_mode) != 0,
+ initial_umask, mode_option, NULL));
/* Paul Eggert tried the trivial test ($WRITER cf a b; $READER tvf a)
for a few tars and came up with the following interoperability
}
file_count_links (st);
-
+
ok = status == dump_status_ok;
}