* lib/.cvsignore: Add system-ioctl.h.
* lib/Makefile.tmpl (noinst_HEADERS): Add system-ioctl.h.
* src/buffer.c: Include system-ioctl.h.
* src/compare.c: Likewise.
* src/delete.c: Likewise.
* src/system.c: Include <getline.h>, <setenv.h>.
* src/tar.c: Include <getline.h>.
+2006-02-20 Paul Eggert <eggert@cs.ucla.edu>
+
+ * bootstrap: Don't claim lib/Makefile.am is generated automatically
+ from itself.
+
+ Avoid installation glitches on Solaris 8 with Sun C 5.4.
+ * lib/.cvsignore: Add system-ioctl.h.
+ * lib/Makefile.tmpl (noinst_HEADERS): Add system-ioctl.h.
+ * src/buffer.c: Include system-ioctl.h.
+ * src/compare.c: Likewise.
+ * src/delete.c: Likewise.
+ * src/system.c: Include <getline.h>, <setenv.h>.
+ * src/tar.c: Include <getline.h>.
+
2006-02-19 Sergey Poznyakoff <gray@gnu.org.ua>
* src/buffer.c (add_chunk_header): Free st.orig_file_name after
strtoull.c
strtoumax.c
sysexit_.h
+system-ioctl.h
system.h
time_r.c
time_r.h
# Makefile for GNU tar library. -*- Makefile -*-
-# Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2004,
+# 2005, 2006 Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## 02110-1301, USA.
noinst_LIBRARIES = libtar.a
-noinst_HEADERS = system.h localedir.h rmt.h paxlib.h stdopen.h
+noinst_HEADERS = system.h system-ioctl.h localedir.h rmt.h paxlib.h stdopen.h
libtar_a_SOURCES = prepargs.c prepargs.h rtapelib.c paxerror.c paxexit.c paxnames.c stdopen.c
localedir = $(datadir)/locale
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#include <system.h>
+#include <system-ioctl.h>
#include <signal.h>
#include <closeout.h>
#include <fnmatch.h>
+#include <getline.h>
#include <human.h>
#include <quotearg.h>
static FILE *read_file;
static int looped;
int prompt;
-
+
if (!read_file && !info_script_option)
/* FIXME: if fopen is used, it will never be closed. */
read_file = archive == STDIN_FILENO ? fopen (TTY_NAME, "r") : stdin;
looped = 1;
}
prompt = looped;
-
+
tryagain:
if (prompt)
{
/* Diff files from a tar archive.
Copyright (C) 1988, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001,
- 2003, 2004, 2005 Free Software Foundation, Inc.
+ 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Written by John Gilmore, on 1987-04-30.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#include <system.h>
+#include <system-ioctl.h>
#if HAVE_LINUX_FD_H
# include <linux/fd.h>
union block *data_block;
size_t data_size;
size_t size = st->stat.st_size;
-
+
mv_begin (st);
while (size)
{
if (!sys_compare_gid (&stat_data, ¤t_stat_info.stat))
report_difference (¤t_stat_info, _("Gid differs"));
- if (tar_timespec_cmp (get_stat_mtime (&stat_data),
+ if (tar_timespec_cmp (get_stat_mtime (&stat_data),
current_stat_info.mtime))
report_difference (¤t_stat_info, _("Mod time differs"));
if (current_header->header.typeflag != GNUTYPE_SPARSE
}
read_and_process (¤t_stat_info, process_rawdata);
-
+
status = close (fd);
if (status != 0)
close_error (current_stat_info.file_name);
/* Delete entries from a tar archive.
- Copyright (C) 1988, 1992, 1994, 1996, 1997, 2000, 2001, 2003 Free
- Software Foundation, Inc.
+ Copyright (C) 1988, 1992, 1994, 1996, 1997, 2000, 2001, 2003, 2004,
+ 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#include <system.h>
+#include <system-ioctl.h>
#include "common.h"
#include <rmt.h>
extern union block *current_block;
extern union block *recent_long_name;
extern union block *recent_long_link;
-extern off_t records_read;
+extern off_t records_read;
extern off_t records_written;
/* The number of records skipped at the start of the archive, when
skip_member ();
break;
}
-
+
/* Fall through. */
case HEADER_SUCCESS_EXTENDED:
logical_status = status;
if (current_block == record_end)
flush_archive ();
status = read_header (false);
-
+
xheader_decode (¤t_stat_info);
-
+
if (status == HEADER_ZERO_BLOCK && ignore_zeros_option)
{
set_next_block_after (current_header);
/* System-dependent calls for tar.
- Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
#include <system.h>
+#include <getline.h>
+#include <setenv.h>
#include "common.h"
#include <rmt.h>
if (archive < 0)
{
int saved_errno = errno;
-
+
if (backup_option)
undo_last_backup ();
errno = saved_errno;
char *argv[4];
char uintbuf[UINTMAX_STRSIZE_BOUND];
int p[2];
-
+
xpipe (p);
pipe_handler = signal (SIGPIPE, SIG_IGN);
char *buf;
size_t size = 0;
FILE *fp;
-
+
xclose (p[PWRITE]);
fp = fdopen (p[PREAD], "r");
rc = getline (&buf, &size, fp);
if (rc > 0 && buf[rc-1] == '\n')
buf[--rc] = 0;
-
+
while (waitpid (pid, &status, 0) == -1)
if (errno != EINTR)
{
waitpid_error (info_script_option);
return -1;
}
-
+
if (WIFEXITED (status))
{
if (WEXITSTATUS (status) == 0 && rc > 0)
free (buf);
return WEXITSTATUS (status);
}
-
+
free (buf);
return -1;
}
#include <system.h>
#include <fnmatch.h>
+#include <getline.h>
#include <argp.h>
#include <argp-namefrob.h>