[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] tar changes to reflect recent gnulib updates
From: |
Paul Eggert |
Subject: |
[Bug-tar] tar changes to reflect recent gnulib updates |
Date: |
Fri, 06 Aug 2004 23:39:07 -0700 |
I installed the following patch to merge the last couple months' worth
of gnulib updates into GNU tar. You need to fetch the latest gnulib
and then do a bootstrap after upgrading to this patch.
2004-08-06 Paul Eggert <address@hidden>
* lib/.cvsignore: Add stat-macros.h.
Remove addext.c, malloc.c, realloc.c.
* src/extract.c: Include <getcwd.h>.
(extract_archive): Rewrite with new macro IS_ABSOLUTE_FILE_NAME.
* src/extract.c (make_directories):
FILESYSTEM_PREFIX_LEN -> FILE_SYSTEM_PREFIX_LEN.
* src/misc.c (must_be_dot_or_slash): Likewise.
* src/names.c (excluded_name, safer_name_suffix, stripped_prefix_len):
Likewise.
* src/tar.c (parse_opt): Likewise.
* src/incremen.c (purge_directory): Fix format buffer typos in warning
strings.
* src/tar.c (options): Add missing initializers to pacify gcc.
(decode_options): Remove unused var.
Index: lib/.cvsignore
===================================================================
RCS file: /cvsroot/tar/tar/lib/.cvsignore,v
retrieving revision 1.10
diff -p -u -r1.10 .cvsignore
--- lib/.cvsignore 3 Aug 2004 04:42:35 -0000 1.10
+++ lib/.cvsignore 7 Aug 2004 06:30:31 -0000
@@ -2,12 +2,23 @@
Makefile
Makefile.am
Makefile.in
-addext.c
alloca.c
alloca.h
alloca_.h
argmatch.c
argmatch.h
+argp-ba.c
+argp-eexst.c
+argp-fmtstream.c
+argp-fmtstream.h
+argp-fs-xinl.c
+argp-help.c
+argp-namefrob.h
+argp-parse.c
+argp-pv.c
+argp-pvh.c
+argp-xinl.c
+argp.h
backupfile.c
backupfile.h
basename.c
@@ -50,7 +61,8 @@ human.c
human.h
lchown.c
lchown.h
-malloc.c
+mempcpy.c
+mempcpy.h
memset.c
mktime.c
modechange.c
@@ -62,7 +74,6 @@ quote.c
quote.h
quotearg.c
quotearg.h
-realloc.c
rmdir.c
safe-read.c
safe-read.h
@@ -72,20 +83,28 @@ save-cwd.c
save-cwd.h
savedir.c
savedir.h
+stat-macros.h
stdbool.h
stdbool_.h
stpcpy.c
stpcpy.h
strcase.h
strcasecmp.c
+strchrnul.c
+strchrnul.h
stripslash.c
strncasecmp.c
+strndup.c
+strndup.h
+strnlen.c
strtoimax.c
strtol.c
strtoll.c
strtoul.c
strtoull.c
strtoumax.c
+sysexit_.h
+sysexits.h
time_r.c
time_r.h
timespec.h
@@ -100,24 +119,3 @@ xstrtol.c
xstrtol.h
xstrtoul.c
xstrtoumax.c
-argp.h
-argp-ba.c
-argp-eexst.c
-argp-fmtstream.c
-argp-fmtstream.h
-argp-fs-xinl.c
-argp-help.c
-argp-namefrob.h
-argp-parse.c
-argp-pv.c
-argp-pvh.c
-argp-xinl.c
-mempcpy.c
-mempcpy.h
-strchrnul.c
-strchrnul.h
-strndup.c
-strndup.h
-strnlen.c
-sysexit_.h
-sysexits.h
Index: src/extract.c
===================================================================
RCS file: /cvsroot/tar/tar/src/extract.c,v
retrieving revision 1.63
diff -p -u -r1.63 extract.c
--- src/extract.c 10 Jul 2004 06:13:28 -0000 1.63
+++ src/extract.c 7 Aug 2004 06:30:31 -0000
@@ -22,6 +22,7 @@
#include "system.h"
#include <quotearg.h>
#include <errno.h>
+#include <xgetcwd.h>
#if HAVE_UTIME_H
# include <utime.h>
@@ -367,7 +368,7 @@ repair_delayed_set_stat (char const *dir
static int
make_directories (char *file_name)
{
- char *cursor0 = file_name + FILESYSTEM_PREFIX_LEN (file_name);
+ char *cursor0 = file_name + FILE_SYSTEM_PREFIX_LEN (file_name);
char *cursor; /* points into the file name */
int did_something = 0; /* did we do anything yet? */
int mode;
@@ -811,8 +812,7 @@ extract_archive (void)
break;
if (absolute_names_option
- || ! (ISSLASH (current_stat_info.link_name
- [FILESYSTEM_PREFIX_LEN (current_stat_info.link_name)])
+ || ! (IS_ABSOLUTE_FILE_NAME (current_stat_info.link_name)
|| contains_dot_dot (current_stat_info.link_name)))
{
while (status = symlink (current_stat_info.link_name, file_name),
Index: src/incremen.c
===================================================================
RCS file: /cvsroot/tar/tar/src/incremen.c,v
retrieving revision 1.22
diff -p -u -r1.22 incremen.c
--- src/incremen.c 29 Jun 2004 10:11:46 -0000 1.22
+++ src/incremen.c 7 Aug 2004 06:30:31 -0000
@@ -521,14 +521,14 @@ purge_directory (char const *directory_n
if (deref_stat (true, p, &st))
{
stat_diag (p);
- WARN((0, 0, _("%s: Not purging directory %s: unable to stat"),
+ WARN((0, 0, _("%s: Not purging directory: unable to stat"),
quotearg_colon (p)));
continue;
}
else if (one_file_system_option && st.st_dev != root_device)
{
WARN((0, 0,
- _("%s: directory %s is on a different device: not purging"),
+ _("%s: directory is on a different device: not purging"),
quotearg_colon (p)));
continue;
}
Index: src/misc.c
===================================================================
RCS file: /cvsroot/tar/tar/src/misc.c,v
retrieving revision 1.19
diff -p -u -r1.19 misc.c
--- src/misc.c 3 Aug 2004 04:45:05 -0000 1.19
+++ src/misc.c 7 Aug 2004 06:30:31 -0000
@@ -207,7 +207,7 @@ static char *after_backup_name;
static bool
must_be_dot_or_slash (char const *file_name)
{
- file_name += FILESYSTEM_PREFIX_LEN (file_name);
+ file_name += FILE_SYSTEM_PREFIX_LEN (file_name);
if (ISSLASH (file_name[0]))
{
Index: src/names.c
===================================================================
RCS file: /cvsroot/tar/tar/src/names.c,v
retrieving revision 1.42
diff -p -u -r1.42 names.c
--- src/names.c 19 May 2004 10:57:25 -0000 1.42
+++ src/names.c 7 Aug 2004 06:30:31 -0000
@@ -935,7 +935,7 @@ new_name (const char *file_name, const c
bool
excluded_name (char const *name)
{
- return excluded_filename (excluded, name + FILESYSTEM_PREFIX_LEN (name));
+ return excluded_filename (excluded, name + FILE_SYSTEM_PREFIX_LEN (name));
}
/* Hash tables of strings. */
@@ -1019,7 +1019,7 @@ safer_name_suffix (char const *file_name
/* Skip file system prefixes, leading file name components that contain
"..", and leading slashes. */
- size_t prefix_len = FILESYSTEM_PREFIX_LEN (file_name);
+ size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (file_name);
for (p = file_name + prefix_len; *p; )
{
@@ -1083,7 +1083,7 @@ safer_name_suffix (char const *file_name
size_t
stripped_prefix_len (char const *file_name, size_t num)
{
- char const *p = file_name + FILESYSTEM_PREFIX_LEN (file_name);
+ char const *p = file_name + FILE_SYSTEM_PREFIX_LEN (file_name);
while (ISSLASH (*p))
p++;
while (*p)
@@ -1105,7 +1105,7 @@ stripped_prefix_len (char const *file_na
bool
contains_dot_dot (char const *name)
{
- char const *p = name + FILESYSTEM_PREFIX_LEN (name);
+ char const *p = name + FILE_SYSTEM_PREFIX_LEN (name);
for (;; p++)
{
Index: src/tar.c
===================================================================
RCS file: /cvsroot/tar/tar/src/tar.c,v
retrieving revision 1.93
diff -p -u -r1.93 tar.c
--- src/tar.c 25 Jun 2004 10:32:44 -0000 1.93
+++ src/tar.c 7 Aug 2004 06:30:31 -0000
@@ -270,7 +270,7 @@ static struct argp_option options[] = {
N_("list the contents of an archive"), 10 },
{"extract", 'x', 0, 0,
N_("extract files from an archive"), 10 },
- {"get", 0, 0, OPTION_ALIAS, NULL},
+ {"get", 0, 0, OPTION_ALIAS, NULL, 0 },
{"create", 'c', 0, 0,
N_("create a new archive"), 10 },
{"diff", 'd', 0, 0,
@@ -527,7 +527,7 @@ static struct argp_option options[] = {
/* FIXME -V (--label) conflicts with the default short option for
--version */
- {0, 0, 0, 0}
+ {0, 0, 0, 0, 0, 0}
};
struct tar_args {
@@ -754,7 +754,7 @@ parse_opt(int key, char *arg, struct arg
if (NEWER_OPTION_INITIALIZED (newer_mtime_option))
USAGE_ERROR ((0, 0, _("More than one threshold date")));
- if (FILESYSTEM_PREFIX_LEN (arg) != 0
+ if (FILE_SYSTEM_PREFIX_LEN (arg) != 0
|| ISSLASH (*arg)
|| *arg == '.')
{
@@ -1278,7 +1278,6 @@ find_argp_option (struct argp_option *op
static void
decode_options (int argc, char **argv)
{
- int optchar; /* option letter */
int index;
struct tar_args args;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-tar] tar changes to reflect recent gnulib updates,
Paul Eggert <=