[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] more changes for gnulib (needed on 64-bit hosts); plus an awk
From: |
Paul Eggert |
Subject: |
[Bug-tar] more changes for gnulib (needed on 64-bit hosts); plus an awk fix |
Date: |
Mon, 02 May 2005 01:06:45 -0700 |
I installed this into tar, after trying things out on 64-bit SPARC
Solaris with the Sun compiler. There are still a few (sometimes
intermittent) test failures in this environment with incremental
dumps; I'll try to track them down later.
2005-05-02 Paul Eggert <address@hidden>
* tests/multivol04.at: Tell awk to read from /dev/null.
Adjust to recent gnulib changes (for 64-bit hosts).
* src/incremen.c (hash_directory): Likewise.
* src/names.c (hash_string_hasher): Likewise.
* src/tar.c (parse_opt): Set it, and adjust to new modechange API.
Index: src/create.c
===================================================================
RCS file: /cvsroot/tar/tar/src/create.c,v
retrieving revision 1.95
diff -p -u -r1.95 create.c
--- src/create.c 2 May 2005 07:35:47 -0000 1.95
+++ src/create.c 2 May 2005 07:59:14 -0000
@@ -1211,8 +1211,8 @@ create_archive (void)
/* Calculate the hash of a link. */
-static unsigned
-hash_link (void const *entry, unsigned n_buckets)
+static size_t
+hash_link (void const *entry, size_t n_buckets)
{
struct link const *l = entry;
uintmax_t num = l->dev ^ l->ino;
Index: src/incremen.c
===================================================================
RCS file: /cvsroot/tar/tar/src/incremen.c,v
retrieving revision 1.25
diff -p -u -r1.25 incremen.c
--- src/incremen.c 18 Jan 2005 01:18:45 -0000 1.25
+++ src/incremen.c 2 May 2005 07:59:14 -0000
@@ -50,8 +50,8 @@ static Hash_table *directory_table;
#endif
/* Calculate the hash of a directory. */
-static unsigned
-hash_directory (void const *entry, unsigned n_buckets)
+static size_t
+hash_directory (void const *entry, size_t n_buckets)
{
struct directory const *directory = entry;
return hash_string (directory->name, n_buckets);
@@ -520,7 +520,7 @@ purge_directory (char const *directory_n
stat_diag (p);
WARN((0, 0, _("%s: Not purging directory: unable to stat"),
quotearg_colon (p)));
- continue;
+ continue;
}
else if (one_file_system_option && st.st_dev != root_device)
{
@@ -529,7 +529,7 @@ purge_directory (char const *directory_n
quotearg_colon (p)));
continue;
}
-
+
if (! interactive_option || confirm ("delete", p))
{
if (verbose_option)
Index: src/names.c
===================================================================
RCS file: /cvsroot/tar/tar/src/names.c,v
retrieving revision 1.48
diff -p -u -r1.48 names.c
--- src/names.c 15 Feb 2005 15:24:35 -0000 1.48
+++ src/names.c 2 May 2005 07:59:14 -0000
@@ -266,20 +266,20 @@ name_next (int change_dirs)
if (name_buffer_length < source_len)
{
do
- {
+ {
name_buffer_length *= 2;
if (! name_buffer_length)
xalloc_die ();
}
while (name_buffer_length < source_len);
-
+
free (name_buffer);
name_buffer = xmalloc (name_buffer_length + 2);
}
strcpy (name_buffer, source);
/* Zap trailing slashes. */
-
+
cursor = name_buffer + strlen (name_buffer) - 1;
while (cursor > name_buffer && ISSLASH (*cursor))
*cursor-- = '\0';
@@ -867,8 +867,8 @@ excluded_name (char const *name)
/* Hash tables of strings. */
/* Calculate the hash of a string. */
-static unsigned
-hash_string_hasher (void const *name, unsigned n_buckets)
+static size_t
+hash_string_hasher (void const *name, size_t n_buckets)
{
return hash_string (name, n_buckets);
}
Index: tests/multiv04.at
===================================================================
RCS file: /cvsroot/tar/tar/tests/multiv04.at,v
retrieving revision 1.2
diff -p -u -r1.2 multiv04.at
--- tests/multiv04.at 16 Apr 2005 07:22:13 -0000 1.2
+++ tests/multiv04.at 2 May 2005 07:59:14 -0000
@@ -39,7 +39,7 @@ AT_KEYWORDS([multiv04])
AT_TAR_CHECK([
mkdir directory
-awk 'BEGIN { for (i = 0; i < 1024; i++) printf("genfile -f directory/%014X\n",
i); }' | sh
+awk 'BEGIN { for (i = 0; i < 1024; i++) printf("genfile -f directory/%014X\n",
i); }' </dev/null | sh
sleep 2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-tar] more changes for gnulib (needed on 64-bit hosts); plus an awk fix,
Paul Eggert <=