1998-02-28  Eli Zaretskii  <eliz@is.elta.co.il>

	* tar.c (dos_to_unix_fname) [MSDOS]: New function.
	(decode_options) [MSDOS]: Call it to convert DOS-style backslashes
	into forward slashes in arguments to -C and --name-prefix.

	* names.c (name_next) [MSDOS]: Call dos_to_unix_fname to convert
	all file names to Unix-style forward slashes.

	* extract.c (extract_sparse_file): Make the sizeleft arg be a
	pointer to long.

	* rtapelib.c (rmt_read__, rmt_write__): Make them return ssize_t,
	as rmt.h says.
	(rmt_lseek__): Make it return off_t, as rmt.h says.

	* create.c (start_header) [MSDOS]: Remove redundant call to
	`sprintf'.

1998-02-27  Eli Zaretskii  <eliz@is.elta.co.il>

	* tar.c (decode_options): Mirror any backslashes in the argument
	to --name-prefix.

*** src/tar.c~0	Fri Feb 20 02:27:54 1998
--- src/tar.c	Sat Feb 28 17:45:42 1998
*************** restore_original_directory (void)
*** 492,497 ****
--- 492,509 ----
      chdir (original_directory);
  }
  
+ void
+ dos_to_unix_fname (char *file_name)
+ {
+   register char *p = file_name;
+ 
+   if (p == NULL)
+     return;
+ 
+   for ( ; *p; p++)
+     if (*p == '\\')
+       *p = '/';
+ }
  #endif /* MSDOS */
  
  static void
*************** decode_options (int argc, char *const *a
*** 632,638 ****
  	  /* This is DJGPP-specific.  It canonicalizes the file name, mirrors
  	     all the backslashes and downcases as appropriate.  It is needed
  	     because code that handles the argument to -C doesn't work with
! 	     backslashes.  */
  
  	  _fixpath (optarg, new_arg);
  	  name_add (new_arg);
--- 644,651 ----
  	  /* This is DJGPP-specific.  It canonicalizes the file name, mirrors
  	     all the backslashes and downcases as appropriate.  It is needed
  	     because code that handles the argument to -C doesn't work with
! 	     backslashes, and because we need the absolute pathname of the
! 	     directory, so that it is independent of cwd.  */
  
  	  _fixpath (optarg, new_arg);
  	  name_add (new_arg);
*************** decode_options (int argc, char *const *a
*** 674,686 ****
  #if MSDOS
  	/* Need to mirror the backslashes, some of the rest of
  	   the code cannot cope with DOS-style file names.  */
! 	{
! 	  char *cursor;
! 
! 	  for (cursor = optarg; *cursor; cursor++)
! 	    if (*cursor == '\\')
! 	      *cursor = '/';
! 	}
  #endif
  	archive_name_array[archive_names++] = optarg;
  	break;
--- 687,693 ----
  #if MSDOS
  	/* Need to mirror the backslashes, some of the rest of
  	   the code cannot cope with DOS-style file names.  */
! 	dos_to_unix_fname (optarg);
  #endif
  	archive_name_array[archive_names++] = optarg;
  	break;
*************** decode_options (int argc, char *const *a
*** 918,923 ****
--- 925,934 ----
  
        case NAME_PREFIX_OPTION:
  	name_prefix_option = optarg;
+ #if MSDOS
+ 	/* Make sure we have only forward slashes.  */
+ 	dos_to_unix_fname (optarg);
+ #endif
  	break;
  
        case NO_ATTRIBUTES_OPTION:
*** src/names.c~0	Wed Feb 18 18:29:14 1998
--- src/names.c	Sat Feb 28 14:20:12 1998
*************** name_next (bool change_dirs)
*** 202,212 ****
  	 forward slashes, so we only need to make sure the original
  	 file/directory gets its DOS-style backslashes mirrored.  It seems
  	 that here's the right place to do that.  Use DJGPP v2 or later.  */
! 
!       for (cursor = strchr (name_buffer, '\\');
! 	   cursor;
! 	   cursor = strchr (cursor + 1, '\\'))
! 	*cursor = '/';
  #endif
  
        /* Zap trailing slashes.  */
--- 202,208 ----
  	 forward slashes, so we only need to make sure the original
  	 file/directory gets its DOS-style backslashes mirrored.  It seems
  	 that here's the right place to do that.  Use DJGPP v2 or later.  */
!       dos_to_unix_fname (name_buffer);
  #endif
  
        /* Zap trailing slashes.  */
*** src/extract.c~0	Thu Feb 19 03:57:34 1998
--- src/extract.c	Sat Feb 28 13:57:06 1998
*************** maybe_recoverable (char *file_name)
*** 465,471 ****
  `---*/
  
  static void
! extract_sparse_file (int fd, off_t *sizeleft, off_t totalsize, char *name)
  {
    union block *data_block;
    int sparse_ind = 0;
--- 465,471 ----
  `---*/
  
  static void
! extract_sparse_file (int fd, long *sizeleft, off_t totalsize, char *name)
  {
    union block *data_block;
    int sparse_ind = 0;
*************** rename_if_dos_device_name (char *file_na
*** 547,555 ****
        if (++i > 2)
  	{
  	  ERROR ((0, EACCES, _("%s: Could not create file"), file_name));
! 	  if (current_header->oldgnu_header.isextended)
  	    skip_extended_headers ();
! 	  skip_file ((long) current_stat.st_size);
  	  return file_name;
  	}
        /* Prepend a '_'.  */
--- 547,555 ----
        if (++i > 2)
  	{
  	  ERROR ((0, EACCES, _("%s: Could not create file"), file_name));
! 	  if (current.block->oldgnu_header.isextended)
  	    skip_extended_headers ();
! 	  skip_file ((long) current.stat.st_size);
  	  return file_name;
  	}
        /* Prepend a '_'.  */
*************** extract_archive (void)
*** 620,626 ****
  #if MSDOS
    msdosify_count = 0;
    if (!to_stdout_option)
!     current_file_name = rename_if_dos_device_name (current_file_name);
  
    /* We could have a filename like "9:30:45", and we don't want to treat it as
       if it were an absolute file name with a drive letter.  */
--- 620,626 ----
  #if MSDOS
    msdosify_count = 0;
    if (!to_stdout_option)
!     current.name = rename_if_dos_device_name (current.name);
  
    /* We could have a filename like "9:30:45", and we don't want to treat it as
       if it were an absolute file name with a drive letter.  */
*************** Attempting extraction of symbolic links 
*** 1005,1011 ****
  
  #if MSDOS
  	/* Rename current_link_name if it might get us in trouble.  */
! 	current_link_name = rename_if_dos_device_name (current_link_name);
  #endif
  
  	/* MSDOS does not implement links.  However, DJGPP's link() actually
--- 1005,1011 ----
  
  #if MSDOS
  	/* Rename current_link_name if it might get us in trouble.  */
! 	current.linkname = rename_if_dos_device_name (current.linkname);
  #endif
  
  	/* MSDOS does not implement links.  However, DJGPP's link() actually
*** src/rtapelib.c~0	Wed Feb 18 18:55:28 1998
--- src/rtapelib.c	Sat Feb 28 14:03:14 1998
*************** rmt_close__ (int handle)
*** 480,486 ****
  | Return the number of bytes read on success, -1 on error.		   |
  `-------------------------------------------------------------------------*/
  
! int
  rmt_read__ (int handle, char *buffer, unsigned int length)
  {
    char command_buffer[COMMAND_BUFFER_SIZE];
--- 480,486 ----
  | Return the number of bytes read on success, -1 on error.		   |
  `-------------------------------------------------------------------------*/
  
! ssize_t
  rmt_read__ (int handle, char *buffer, unsigned int length)
  {
    char command_buffer[COMMAND_BUFFER_SIZE];
*************** rmt_read__ (int handle, char *buffer, un
*** 510,516 ****
  | the number of bytes written on success, -1 on error.			   |
  `-------------------------------------------------------------------------*/
  
! int
  rmt_write__ (int handle, char *buffer, unsigned int length)
  {
    char command_buffer[COMMAND_BUFFER_SIZE];
--- 510,516 ----
  | the number of bytes written on success, -1 on error.			   |
  `-------------------------------------------------------------------------*/
  
! ssize_t
  rmt_write__ (int handle, char *buffer, unsigned int length)
  {
    char command_buffer[COMMAND_BUFFER_SIZE];
*************** rmt_write__ (int handle, char *buffer, u
*** 539,545 ****
  | Return the new file offset if successful, -1 if on error.		  |
  `------------------------------------------------------------------------*/
  
! long
  rmt_lseek__ (int handle, off_t offset, int whence)
  {
    char command_buffer[COMMAND_BUFFER_SIZE];
--- 539,545 ----
  | Return the new file offset if successful, -1 if on error.		  |
  `------------------------------------------------------------------------*/
  
! off_t
  rmt_lseek__ (int handle, off_t offset, int whence)
  {
    char command_buffer[COMMAND_BUFFER_SIZE];
*** src/create.c~0	Wed Feb 18 14:27:36 1998
--- src/create.c	Sat Feb 28 18:06:34 1998
*************** start_header (const char *name, struct s
*** 158,174 ****
  	{
  	  if (!warned_once)
  	    {
- 	      char message[60];
- 
  	      /* Don't set warned_once if the next character is a slash,
  		 so that they will see the message about the slash as well.  */
  	      if (name[2] != '/')
  		warned_once = true;
  
! 	      sprintf (message, _("\
  Removing drive spec `%2.2s' from path names in the archive"),
! 		       name);
! 	      WARN ((0, 0, message));
  	    }
  	  name += 2;
  	}
--- 158,171 ----
  	{
  	  if (!warned_once)
  	    {
  	      /* Don't set warned_once if the next character is a slash,
  		 so that they will see the message about the slash as well.  */
  	      if (name[2] != '/')
  		warned_once = true;
  
! 	      WARN ((0, 0, _("\
  Removing drive spec `%2.2s' from path names in the archive"),
! 		       name));
  	    }
  	  name += 2;
  	}
*** src/compare.c~0	Thu Feb 19 19:56:48 1998
--- src/compare.c	Sat Feb 28 13:41:30 1998
*************** diff_archive (void)
*** 749,779 ****
        }
  #else  /* not S_ISLNK */
  
!       status = stat (current_link_name, &stat_data);
        if (status < 0)
  	{
  	  if (errno == ENOENT)
  	    report_difference (_("Target of link does not exist"));
  	  else
  	    {
! 	      WARN ((0, errno, _("Cannot stat file %s"), current_link_name));
  	      report_difference (NULL);
  	    }
  	  break;
  	}
!       status = stat (current_file_name, &stat_data);
        if (status < 0)
  	{
  	  if (errno == ENOENT)
  	    report_difference (_("No such file or directory"));
  	  else
  	    {
! 	      WARN ((0, errno, _("Cannot stat file %s"), current_file_name));
  	      report_difference (NULL);
  	    }
  	}
        else
! 	diff_two_files (current_file_name, current_link_name);
  
  #endif /* not S_ISLNK */
  
--- 749,779 ----
        }
  #else  /* not S_ISLNK */
  
!       status = stat (current.linkname, &stat_data);
        if (status < 0)
  	{
  	  if (errno == ENOENT)
  	    report_difference (_("Target of link does not exist"));
  	  else
  	    {
! 	      WARN ((0, errno, _("Cannot stat file %s"), current.linkname));
  	      report_difference (NULL);
  	    }
  	  break;
  	}
!       status = stat (current.name, &stat_data);
        if (status < 0)
  	{
  	  if (errno == ENOENT)
  	    report_difference (_("No such file or directory"));
  	  else
  	    {
! 	      WARN ((0, errno, _("Cannot stat file %s"), current.name));
  	      report_difference (NULL);
  	    }
  	}
        else
! 	diff_two_files (current.name, current.linkname);
  
  #endif /* not S_ISLNK */
  
*** src/buffer.c~0	Fri Feb 20 00:42:18 1998
--- src/buffer.c	Sat Feb 28 13:37:14 1998
*************** open_archive (enum access_mode wanted_ac
*** 1006,1012 ****
       in create.c) won't work.  So we need to write something and fsync the
       handle, to get meaningful ar_ino.  */
  
!   if (!isatty (archive) && access == ACCESS_WRITE && !_isrmt (archive))
      {
        write (archive, "xyzzy", 5);
        fsync (archive);
--- 1006,1012 ----
       in create.c) won't work.  So we need to write something and fsync the
       handle, to get meaningful ar_ino.  */
  
!   if (!isatty (archive) && wanted_access == ACCESS_WRITE && !_isrmt (archive))
      {
        write (archive, "xyzzy", 5);
        fsync (archive);
*************** tryagain:
*** 1966,1977 ****
  		  if (!isatty (STDIN))
  		    {
  		      save_stdin = dup (STDIN);
! 		      freopen (TTY_NAME, "rt", stdin);
  		    }
  		  if (!isatty (STDOUT))
  		    {
  		      save_stdout = dup (STDOUT);
! 		      freopen (TTY_NAME, "wt", stdout);
  		    }
  
  		  /* `system' is better, since it honors $SHELL.  */
--- 1966,1977 ----
  		  if (!isatty (STDIN))
  		    {
  		      save_stdin = dup (STDIN);
! 		      freopen ("con", "rt", stdin);
  		    }
  		  if (!isatty (STDOUT))
  		    {
  		      save_stdout = dup (STDOUT);
! 		      freopen ("con", "wt", stdout);
  		    }
  
  		  /* `system' is better, since it honors $SHELL.  */
*** lib/Makefile.i~0	Fri Feb 20 03:24:34 1998
--- lib/Makefile.in	Sat Feb 28 10:02:50 1998
***************
*** 197,203 ****
  clean-compile:
  
  distclean-compile:
! 	-rm -f *.tab.c
  
  maintainer-clean-compile:
  
--- 197,203 ----
  clean-compile:
  
  distclean-compile:
! 	-rm -f *_tab.c
  
  maintainer-clean-compile:
  
***************
*** 206,214 ****
  	$(AR) cru libtar.a $(libtar_a_OBJECTS) $(libtar_a_LIBADD)
  	$(RANLIB) libtar.a
  .y.c:
! 	$(YACC) $(YFLAGS) $< && mv y.tab.c $*.c
! 	if test -f y.tab.h; then \
! 	if cmp -s y.tab.h $*.h; then rm -f y.tab.h; else mv y.tab.h $*.h; fi; \
  	else :; fi
  getdate.h: getdate.c
  
--- 206,217 ----
  	$(AR) cru libtar.a $(libtar_a_OBJECTS) $(libtar_a_LIBADD)
  	$(RANLIB) libtar.a
  .y.c:
! 	$(YACC) $(YFLAGS) $<
! 	-test -f y.tab.c && mv y.tab.c y_tab.c
! 	test -f y_tab.c && mv y_tab.c $*.c
! 	-test -f y.tab.h && mv y.tab.h y_tab.h
! 	if test -f y_tab.h; then \
! 	if cmp -s y_tab.h $*.h; then rm -f y_tab.h; else mv y_tab.h $*.h; fi; \
  	else :; fi
  getdate.h: getdate.c
  
***************
*** 349,355 ****
  	@echo Expect 13 shift/reduce conflicts...
  	cd $(srcdir) && \
  	  $(YACC) $(YFLAGS) getdate.y; \
! 	  mv -f y.tab.c getdate.c
  
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
  # Otherwise a system limit (for SysV at least) may be exceeded.
--- 352,359 ----
  	@echo Expect 13 shift/reduce conflicts...
  	cd $(srcdir) && \
  	  $(YACC) $(YFLAGS) getdate.y; \
! 	  if test -f y.tab.c; then mv -f y.tab.c y_tab.c; fi; \
! 	  mv -f y_tab.c getdate.c
  
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
  # Otherwise a system limit (for SysV at least) may be exceeded.
*** doc/Makefile.i~0	Fri Feb 20 03:24:20 1998
--- doc/Makefile.in	Sat Feb 28 14:31:58 1998
***************
*** 393,399 ****
  	  echo "Updating the \`man' page"; \
  	    LANGUAGE=C \
  	      $(PERL) $(srcdir)/helptoman.pl ../src/tar > tar.1-tmp; \
! 	  mv tar.1-tmp $(srcdir)/tar.1; \
  	else \
  	  echo "WARNING: The \`man' page cannot be updated yet."; \
  	  echo "         Retry once the program executable will be ready."; \
--- 393,403 ----
  	  echo "Updating the \`man' page"; \
  	    LANGUAGE=C \
  	      $(PERL) $(srcdir)/helptoman.pl ../src/tar > tar.1-tmp; \
! 	  if test -s tar.1-tmp; then \
! 	   mv tar.1-tmp $(srcdir)/tar.1; \
! 	  else \
! 	   rm -f tar.1-tmp; \
! 	  fi \
  	else \
  	  echo "WARNING: The \`man' page cannot be updated yet."; \
  	  echo "         Retry once the program executable will be ready."; \
*** intl/Makefile.i~0	Mon Sep 22 11:21:12 1997
--- intl/Makefile.in	Sat Feb 28 10:12:16 1998
***************
*** 67,76 ****
  explodename.$lo
  CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
  GETTOBJS = intl-compat.$lo
! DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
  xopen-msg.sed $(HEADERS) $(SOURCES)
  DISTFILES.normal = VERSION
! DISTFILES.gettext = libintl.glibc intlh.inst.in
  
  .SUFFIXES:
  .SUFFIXES: .c .o .lo
--- 67,76 ----
  explodename.$lo
  CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
  GETTOBJS = intl-compat.$lo
! DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl_sed.in \
  xopen-msg.sed $(HEADERS) $(SOURCES)
  DISTFILES.normal = VERSION
! DISTFILES.gettext = libintl.glibc intlh_inst.in
  
  .SUFFIXES:
  .SUFFIXES: .c .o .lo
***************
*** 202,208 ****
  # The dependency for intlh.inst is different in gettext and all other
  # packages.  Because we cannot you GNU make features we have to solve
  # the problem while rewriting Makefile.in.
! @GT_YES@intlh.inst: intlh.inst.in ../config.status
  @GT_YES@	cd .. \
  @GT_YES@	&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
  @GT_YES@	  $(SHELL) ./config.status
--- 202,208 ----
  # The dependency for intlh.inst is different in gettext and all other
  # packages.  Because we cannot you GNU make features we have to solve
  # the problem while rewriting Makefile.in.
! @GT_YES@intlh.inst: intlh_inst.in ../config.status
  @GT_YES@	cd .. \
  @GT_YES@	&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
  @GT_YES@	  $(SHELL) ./config.status
*** po/Makefile.i~0	Mon Sep 22 11:21:42 1997
--- po/Makefile.in-in	Sat Feb 28 10:20:24 1998
***************
*** 46,52 ****
  SOURCES = cat-id-tbl.c
  POFILES = @POFILES@
  GMOFILES = @GMOFILES@
! DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
  stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
  
  POTFILES = \
--- 46,52 ----
  SOURCES = cat-id-tbl.c
  POFILES = @POFILES@
  GMOFILES = @GMOFILES@
! DISTFILES = ChangeLog Makefile.in-in POTFILES.in $(PACKAGE).pot \
  stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
  
  POTFILES = \
***************
*** 156,163 ****
  	  else \
  	    $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
  	  fi; \
! 	  $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
! 			  $(gettextsrcdir)/Makefile.in.in; \
  	else \
  	  : ; \
  	fi
--- 156,163 ----
  	  else \
  	    $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
  	  fi; \
! 	  $(INSTALL_DATA) $(srcdir)/Makefile.in-in \
! 			  $(gettextsrcdir)/Makefile.in-in; \
  	else \
  	  : ; \
  	fi
***************
*** 175,181 ****
  	  rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
  	  rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
  	done
! 	rm -f $(gettextsrcdir)/po-Makefile.in.in
  
  check: all
  
--- 175,181 ----
  	  rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
  	  rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
  	done
! 	rm -f $(gettextsrcdir)/po-Makefile.in-in
  
  check: all
  
***************
*** 230,243 ****
  	  else \
  	    posrcprefix="../"; \
  	  fi; \
! 	  rm -f $@-t $@ \
  	    && (sed -e '/^#/d' -e '/^[ 	]*$$/d' \
  		    -e "s@.*@	$$posrcprefix& \\\\@" < $(srcdir)/$@.in \
! 		| sed -e '$$s/\\$$//') > $@-t \
! 	    && chmod a-w $@-t \
! 	    && mv $@-t $@ )
  
! Makefile: Makefile.in.in ../config.status POTFILES
  	cd .. \
  	  && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
  	       $(SHELL) ./config.status
--- 230,243 ----
  	  else \
  	    posrcprefix="../"; \
  	  fi; \
! 	  rm -f t-$@ $@ \
  	    && (sed -e '/^#/d' -e '/^[ 	]*$$/d' \
  		    -e "s@.*@	$$posrcprefix& \\\\@" < $(srcdir)/$@.in \
! 		| sed -e '$$s/\\$$//') > t-$@ \
! 	    && chmod a-w t-$@ \
! 	    && mv t-$@ $@ )
  
! Makefile: Makefile.in-in ../config.status POTFILES
  	cd .. \
  	  && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
  	       $(SHELL) ./config.status
*** Makefile.i~0	Fri Feb 20 03:23:46 1998
--- Makefile.in	Sat Feb 28 10:04:54 1998
***************
*** 119,125 ****
  CONFIG_CLEAN_FILES = 
  DIST_COMMON =  README ABOUT-NLS AUTHORS BACKLOG COPYING ChangeLog \
  INSTALL Makefile.am Makefile.in NEWS README-alpha THANKS TODO \
! acconfig.h acinclude.m4 aclocal.m4 config.h.in configure configure.in \
  install-sh missing mkinstalldirs stamp-h.in
  
  
--- 119,125 ----
  CONFIG_CLEAN_FILES = 
  DIST_COMMON =  README ABOUT-NLS AUTHORS BACKLOG COPYING ChangeLog \
  INSTALL Makefile.am Makefile.in NEWS README-alpha THANKS TODO \
! acconfig.h acinclude.m4 aclocal.m4 config.h-in configure configure.in \
  install-sh missing mkinstalldirs stamp-h.in
  
  
***************
*** 147,158 ****
  
  config.h: stamp-h
  	@:
! stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
  	cd $(top_builddir) \
  	  && CONFIG_FILES= CONFIG_HEADERS=config.h \
  	     $(SHELL) ./config.status
  	@echo timestamp > stamp-h
! $(srcdir)/config.h.in: $(srcdir)/stamp-h.in
  $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
  	cd $(top_srcdir) && $(AUTOHEADER)
  	@echo timestamp > $(srcdir)/stamp-h.in
--- 147,158 ----
  
  config.h: stamp-h
  	@:
! stamp-h: $(srcdir)/config.h-in $(top_builddir)/config.status
  	cd $(top_builddir) \
  	  && CONFIG_FILES= CONFIG_HEADERS=config.h \
  	     $(SHELL) ./config.status
  	@echo timestamp > stamp-h
! $(srcdir)/config.h-in: $(srcdir)/stamp-h.in
  $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
  	cd $(top_srcdir) && $(AUTOHEADER)
  	@echo timestamp > $(srcdir)/stamp-h.in
***************
*** 205,211 ****
  
  tags: TAGS
  
! TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
  	tags=; \
  	here=`pwd`; \
  	list='$(SUBDIRS)'; for subdir in $$list; do \
--- 205,211 ----
  
  tags: TAGS
  
! TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h-in $(TAGS_DEPENDENCIES) $(LISP)
  	tags=; \
  	here=`pwd`; \
  	list='$(SUBDIRS)'; for subdir in $$list; do \
***************
*** 215,222 ****
  	unique=`for i in $$list; do echo $$i; done | \
  	  awk '    { files[$$0] = 1; } \
  	       END { for (i in files) print i; }'`; \
! 	test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
! 	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
  
  mostlyclean-tags:
  
--- 215,222 ----
  	unique=`for i in $$list; do echo $$i; done | \
  	  awk '    { files[$$0] = 1; } \
  	       END { for (i in files) print i; }'`; \
! 	test -z "$(ETAGS_ARGS)config.h-in$$unique$(LISP)$$tags" \
! 	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h-in $$unique $(LISP) -o $$here/TAGS)
  
  mostlyclean-tags:
  
*** doc/tar.t~0	Sat Nov 15 20:58:36 1997
--- doc/tar.texi	Fri Feb 27 19:21:18 1998
***************
*** 850,859 ****
  The @code{tar} program is used to create and manipulate @code{tar}
  archives.  An @dfn{archive} is a single file which contains the contents
  of many files, while still identifying the names of the files, their
! owner(s), and so forth.  (In addition, archives record access
  permissions, user and group, size in bytes, and last modification time.
  Some archives also record the file names in each archived directory, as
! well as other file and directory information.)  You can use @code{tar}
  to @dfn{create} a new archive in a specified directory.
  
  @cindex member
--- 850,859 ----
  The @code{tar} program is used to create and manipulate @code{tar}
  archives.  An @dfn{archive} is a single file which contains the contents
  of many files, while still identifying the names of the files, their
! owner(s), and so forth@footnote{In addition, archives record access
  permissions, user and group, size in bytes, and last modification time.
  Some archives also record the file names in each archived directory, as
! well as other file and directory information.}.  You can use @code{tar}
  to @dfn{create} a new archive in a specified directory.
  
  @cindex member
***************
*** 967,973 ****
  these standards.  Therefore, if this variable is set and you violate
  one of the POSIX standards in the way you phrase a command, for
  example, GNU @code{tar} will not allow the command and will signal an
! error message.  You would then have to reorder the options or rephrase
  the command to comply with the POSIX standards.
  
  There is a chance in the future that, if you set this environment
--- 967,973 ----
  these standards.  Therefore, if this variable is set and you violate
  one of the POSIX standards in the way you phrase a command, for
  example, GNU @code{tar} will not allow the command and will signal an
! error.  You would then have to reorder the options or rephrase
  the command to comply with the POSIX standards.
  
  There is a chance in the future that, if you set this environment
***************
*** 999,1005 ****
  parts of the manual and reorganised its structure, around version 1.12,
  in view of publication by the FSF.  Some people especially contributed to
  specific aspects of the manual: Karl Berry (dates), Dan Hagerty (backups),
! Eli Zaretski (MS-DOS), and surely others.
  
  @node Reports, , Authors, Introduction
  @section Reporting bugs or suggestions
--- 999,1005 ----
  parts of the manual and reorganised its structure, around version 1.12,
  in view of publication by the FSF.  Some people especially contributed to
  specific aspects of the manual: Karl Berry (dates), Dan Hagerty (backups),
! Eli Zaretskii (MS-DOS), and surely others.
  
  @node Reports, , Authors, Introduction
  @section Reporting bugs or suggestions
***************
*** 1088,1093 ****
--- 1088,1097 ----
  same in Info, which makes people wonder what's going on here.  Should
  use ifinfo and iftex.}
  
+ @FIXME{I fixed the above, I think---eliz.  But shouldn't this section
+ show other fonts, like @dfn{}, @emph{} etc.?}
+ 
+ @iftex
  In the examples, @samp{$} represents a typical shell prompt.  It
  precedes lines you should type; to make this more clear, those lines are
  shown in @kbd{this font}, as opposed to lines which represent the
***************
*** 1100,1119 ****
  @end smallexample
  
  @FIXME{How often do we use smallexample?}
  
  @node basic tar options, frequent subcommands, stylistic conventions, Tutorial
  @section @code{tar} Subcommands and Options
  
  @code{tar} can take a wide variety of arguments which specify and define
! the actions it will have @FIXME{HAVE actions??} on the particular set
  of files or the archive.  The main types of arguments to @code{tar} fall
  into one of two classes: subcommands, and options.
  
  Some arguments fall into a class called @dfn{subcommands}; exactly one of
  these is both allowed and required for any instance of using @code{tar};
! you may @emph{not} specify more than one.  People sometimes speak of
  @dfn{operating modes}.  You are in a particular operating mode when you
! have specified the subcommand which specifies it; there are eight
  subcommands in total, and thus there are eight operating modes.
  
  The other arguments fall into the class known as @dfn{options}.  You are
--- 1104,1133 ----
  @end smallexample
  
  @FIXME{How often do we use smallexample?}
+ @c     About 10 times (@example is used more than 100 times)--eliz
+ @end iftex
+ 
+ @ifinfo
+ In the examples, @samp{$} represents a typical shell prompt.  It
+ precedes lines you should type; to make this more clear, those lines as
+ well as the lines which represent the computer's response are shown in
+ @kbd{like this}.
+ @end ifinfo
+ 
  
  @node basic tar options, frequent subcommands, stylistic conventions, Tutorial
  @section @code{tar} Subcommands and Options
  
  @code{tar} can take a wide variety of arguments which specify and define
! the actions it will perform on the particular set
  of files or the archive.  The main types of arguments to @code{tar} fall
  into one of two classes: subcommands, and options.
  
  Some arguments fall into a class called @dfn{subcommands}; exactly one of
  these is both allowed and required for any instance of using @code{tar};
! you may @emph{not} specify more than one.  People sometimes speak of them as
  @dfn{operating modes}.  You are in a particular operating mode when you
! have specified the subcommand which calls for that mode; there are eight
  subcommands in total, and thus there are eight operating modes.
  
  The other arguments fall into the class known as @dfn{options}.  You are
***************
*** 1179,1184 ****
--- 1193,1206 ----
  not the @code{tar} @emph{subcommand}.  Again, use context to figure out
  which of the meanings the speaker intends.
  
+ @FIXME{I thought I knew about tar, but after reading the last two
+ paragraphs, I'm now totally confused.  Options are actually subcommands,
+ subcommands are sometimes commands and sometimes command lines...HEEEELP!!!
+ Personally, I would just throw this away.  Or at least add the famous
+ quote from ``Soap'' here (``Confused? you @emph{will} be, after you read
+ the rest of the manual.''), so people have an idea that this is a joke.
+ Hmm... it  @emph{is} a joke, is it?---eliz}
+ 
  @node frequent subcommands, Two Frequent Options, basic tar options, Tutorial
  @section The Three Most Frequently Used Subcommands
  
***************
*** 1369,1374 ****
--- 1391,1413 ----
  Because you just created the directory and the files and have changed to
  that directory, you probably don't need to do that this time.
  
+ @FIXME{IMHO, the last paragraph is a classic example of bad teaching.
+ If you tell them to do an @code{ls} every time, just do it; don't say
+ ``You should do it, but let's not this time.''  It's like saying ``Do as
+ I tell, not as I do.''  I suggest the following commented-out paragraph
+ as a replacement for the above:---eliz}
+ 
+ @ignore
+ In general, you should check that the files to be archived exist where
+ you think they do (in the working directory) by running @code{ls}.  So
+ let's do it:
+ 
+ @example
+ $ @kbd{ls}
+ blues	folk	jazz
+ @end example
+ @end ignore
+ 
  It is very important to make sure there isn't already a file in the
  working directory with the archive name you intend to use (in this case,
  @samp{collection.tar}), or that you don't care about its contents.
***************
*** 1380,1385 ****
--- 1419,1427 ----
  different option, such as @value{op-append}; see @ref{append} for
  information on how to do this.
  
+ @FIXME{I don't think there is an option to prevent overwriting an
+ existing file with an archive when --create is used.---eliz}
+ 
  @node Creating the archive, create verbose, prepare for examples, create
  @subsection Creating the Archive
  
***************
*** 1434,1447 ****
  find the archive file listed as well as the files you saw previously:
  
  @example
! blues   folk   jazz   collection.tar
  @end example
  
  @noindent
  Creating the archive @samp{collection.tar} did not destroy the copies of
  the files in the directory.
  
! Keep in mind that if you don't indicate an subcommand, @code{tar} will not
  run and will prompt you for one.  If you don't name any files, @code{tar}
  will complain.  You must have write access to the working directory,
  or else you will not be able to create an archive in that directory.
--- 1476,1490 ----
  find the archive file listed as well as the files you saw previously:
  
  @example
! $ @kbd{ls}
! blues	collection.tar	folk	jazz
  @end example
  
  @noindent
  Creating the archive @samp{collection.tar} did not destroy the copies of
  the files in the directory.
  
! Keep in mind that if you don't indicate any subcommand, @code{tar} will not
  run and will prompt you for one.  If you don't name any files, @code{tar}
  will complain.  You must have write access to the working directory,
  or else you will not be able to create an archive in that directory.
***************
*** 1476,1482 ****
  In the rest of the examples in this chapter, we will frequently use
  @code{verbose} mode so we can show actions or @code{tar} responses that
  you would otherwise not see, and which are important for you to
! understand.
  
  @node short create, create dir, create verbose, create
  @subsection Short Forms with @samp{create}
--- 1519,1525 ----
  In the rest of the examples in this chapter, we will frequently use
  @code{verbose} mode so we can show actions or @code{tar} responses that
  you would otherwise not see, and which are important for you to
! understand what @code{tar} does.
  
  @node short create, create dir, create verbose, create
  @subsection Short Forms with @samp{create}
***************
*** 1686,1695 ****
  
  Note that you will almost always want the argument of
  @value{op-name-prefix} to end with a directory delimiter (forward slash
! under Unix-like operating systems, back-slash under DOS).  Otherwise you
! will make an archive in which each file has a prefix welded directly to
! the first segment of its name.  While this capability is there for full
! generality, it is probably not what you want.
  
  @node list, extract, create, Tutorial
  @section How to List Archives
--- 1729,1738 ----
  
  Note that you will almost always want the argument of
  @value{op-name-prefix} to end with a directory delimiter (forward slash
! under Unix-like operating systems, forward or back-slash under DOS).
! Otherwise you will make an archive in which each file has a prefix
! welded directly to the first segment of its name.  While this capability
! is there for full generality, it is probably not what you want.
  
  @node list, extract, create, Tutorial
  @section How to List Archives
***************
*** 1737,1744 ****
  like:
  
  @example
! $ @kbd{tar --list --verbose --file=collection.tar folk}
  -rw-rw-rw- myself user 62 1990-05-23 10:55 folk
  @end example
  
  @cindex File name arguments, using @code{--list} with
--- 1780,1789 ----
  like:
  
  @example
! $ @kbd{tar --list --verbose --file=collection.tar}
! -rw-rw-rw- myself user 42 1990-05-21 13:29 blues
  -rw-rw-rw- myself user 62 1990-05-23 10:55 folk
+ -rw-rw-rw- myself user 40 1990-05-21 13:30 jazz
  @end example
  
  @cindex File name arguments, using @code{--list} with
***************
*** 2191,2197 ****
  by prepending an underscore @file{_} to it; thus, @file{aux.c} will be
  extracted as @file{_aux.c}.  (Actually, @code{tar} tries to prepend up
  to 2 underscore characters, each time checking if the new name is a
! regular file.  If both attempts are insuccessful, @code{tar} will print
  an error message and refuse to extract that file.)
  
  As with illegal characters, @code{tar} announces each renamed file when
--- 2236,2242 ----
  by prepending an underscore @file{_} to it; thus, @file{aux.c} will be
  extracted as @file{_aux.c}.  (Actually, @code{tar} tries to prepend up
  to 2 underscore characters, each time checking if the new name is a
! regular file.  If both attempts are unsuccessful, @code{tar} will print
  an error message and refuse to extract that file.)
  
  As with illegal characters, @code{tar} announces each renamed file when
***************
*** 2255,2261 ****
  already exist in order to use @samp{--append}.  (A related subcommand
  is the @samp{--update} subcommand; you can use this to add newer
  versions of archive members to an existing archive.  To learn how to
! do this with @samp{--update}, @pxref{update}.)
  
  @FIXME{Explain in second paragraph whether you can get to the previous
  version -- explain whole situation somewhat more clearly.}
--- 2300,2306 ----
  already exist in order to use @samp{--append}.  (A related subcommand
  is the @samp{--update} subcommand; you can use this to add newer
  versions of archive members to an existing archive.  To learn how to
! do this with @samp{--update}, refer to @ref{update}.)
  
  @FIXME{Explain in second paragraph whether you can get to the previous
  version -- explain whole situation somewhat more clearly.}
***************
*** 2381,2387 ****
  archived earlier, even though the older version of the file will remain
  in the archive unless you delete all versions of the file.
  
! Supposing you change the file @file{blues} and then append the changed
  version to @file{collection.tar}.  As you saw above, the original
  @file{blues} is in the archive @file{collection.tar}.  If you change the
  file and append the new version of the file to the archive, there will
--- 2426,2432 ----
  archived earlier, even though the older version of the file will remain
  in the archive unless you delete all versions of the file.
  
! Suppose you change the file @file{blues} and then append the changed
  version to @file{collection.tar}.  As you saw above, the original
  @file{blues} is in the archive @file{collection.tar}.  If you change the
  file and append the new version of the file to the archive, there will
***************
*** 2534,2539 ****
--- 2579,2588 ----
  -rw-rw-rw- melissa user     65 1997-01-30 14:15 jazz
  @end example
  
+ @FIXME{The long listing will only be printed undet -tvvf.  See the
+ remark above about why I think vv should be used as little as
+ possible.---eliz}
+ 
  We can concatenate these two archives with @code{tar}:
  
  @ignore
***************
*** 2879,2885 ****
  option, you might end up with no file at all.  Without this option, if
  something goes wrong with the extraction, the existing file is not
  overwritten and preserved.  (If you want to be safe either way, use
! both @value{op-unlink-first} and @value{op-backup}; @ref{backup}.)
  
  If you specify the @value{op-recursive-unlink} option, @code{tar} removes
  @emph{anything} that keeps you from extracting a file as far as current
--- 2928,2934 ----
  option, you might end up with no file at all.  Without this option, if
  something goes wrong with the extraction, the existing file is not
  overwritten and preserved.  (If you want to be safe either way, use
! both @value{op-unlink-first} and @value{op-backup}; @xref{backup}.)
  
  If you specify the @value{op-recursive-unlink} option, @code{tar} removes
  @emph{anything} that keeps you from extracting a file as far as current
***************
*** 3113,3125 ****
  Backup options may prove unexpectedly useful when extracting archives
  containing many members having identical name, or when extracting archives
  on systems having file name limitations, making different members appear
! has having similar names through the side-effect of name truncation.
  (This is true only if we have a good scheme for truncated backup names,
  which I'm not sure at all: I suspect work is needed in this area.
  The MS-DOS/MS-Windows version works with numbered backups, even when
  file names are truncated.)
  When any existing file is backed up before being overwritten by extraction,
! then clashing files are automatically be renamed to be unique, and the
  true name is kept for only the last file of a series of clashing files.
  By using verbose mode, users may track exactly what happens.
  We recommend that you @strong{always} use numbered backups when
--- 3162,3174 ----
  Backup options may prove unexpectedly useful when extracting archives
  containing many members having identical name, or when extracting archives
  on systems having file name limitations, making different members appear
! as having similar names through the side-effect of name truncation.
  (This is true only if we have a good scheme for truncated backup names,
  which I'm not sure at all: I suspect work is needed in this area.
  The MS-DOS/MS-Windows version works with numbered backups, even when
  file names are truncated.)
  When any existing file is backed up before being overwritten by extraction,
! then clashing files are automatically renamed to be unique, and the
  true name is kept for only the last file of a series of clashing files.
  By using verbose mode, users may track exactly what happens.
  We recommend that you @strong{always} use numbered backups when
***************
*** 5147,5159 ****
  Accounting for oldish System V machines, limit your file and directory
  names to 14 characters or less.
  
! If you intend to have your @code{tar} archives to be read under MSDOS,
  you should not rely on case distinction for file names, and you might
  use the GNU @code{doschk} program for helping you further diagnosing
! illegal MSDOS names, which are even more limited than System V's.
! @code{tar} compiled for MSDOS @emph{does} try to cope with filenames
! which are illegal on MSDOS file systems (@pxref{Basic tar}), but the
  best portability strategy is to avoid such problems in the first place.
  
  @node dereference, old, Portable Names, Portability
  @subsection Symbolic Links
--- 5196,5212 ----
  Accounting for oldish System V machines, limit your file and directory
  names to 14 characters or less.
  
! If you intend to have your @code{tar} archives to be read under MS-DOS,
  you should not rely on case distinction for file names, and you might
  use the GNU @code{doschk} program for helping you further diagnosing
! illegal MS-DOS names, which are even more limited than System V's.
! @code{tar} compiled for MS-DOS @emph{does} try to cope with filenames
! which are illegal on MS-DOS file systems (@pxref{Basic tar}), but the
  best portability strategy is to avoid such problems in the first place.
+ Even newer versions of MS-Windows, such as Windows 9X and Windows/NT,
+ still have some restrictions on characters which can appear in a file
+ name.  Typically, characters which are special to the shell, like
+ @samp{?}, @samp{*} and @samp{|} are not allowed and should be avoided.
  
  @node dereference, old, Portable Names, Portability
  @subsection Symbolic Links
***************
*** 7541,7547 ****
  errors on some tapes.  Archives written to pipes, some cartridge tape
  drives, and some other devices cannot be verified.
  
! One can explicitely compare an already made archive with the file system
  by using the @value{op-compare} option, instead of using the more automatic
  @value{op-verify} option.  @value{xref-compare}.
  
--- 7594,7600 ----
  errors on some tapes.  Archives written to pipes, some cartridge tape
  drives, and some other devices cannot be verified.
  
! One can explicitly compare an already made archive with the file system
  by using the @value{op-compare} option, instead of using the more automatic
  @value{op-verify} option.  @value{xref-compare}.
  
***************
*** 7666,7672 ****
  needed, you must ensure that wildcard characters reach @code{tar} without
  being interpreted by the shell first.  Using a backslash before @samp{*}
  or @samp{?}, or putting the whole argument between quotes, is usually
! sufficient for this.
  
  Even if @var{name}s are often specified on the command line, they
  can also be read from a text file in the file system, using the
--- 7719,7727 ----
  needed, you must ensure that wildcard characters reach @code{tar} without
  being interpreted by the shell first.  Using a backslash before @samp{*}
  or @samp{?}, or putting the whole argument between quotes, is usually
! sufficient for this.  (On MS-DOS/MS-Windows, you @strong{must} use
! quotes, since the backslash is a directory separator, and cannot be used
! to escape-protect wildcard characters.)
  
  Even if @var{name}s are often specified on the command line, they
  can also be read from a text file in the file system, using the
***************
*** 8761,8771 ****
--- 8816,8833 ----
  Emacs, and choose @samp{tar} from the main Info menu (with @kbd{m tar
  @key{RET}}).
  
+ @c We _do_ have a man page, so:
+ @ignore
  There is currently no @code{man} page for GNU @code{tar}.  If you observe
  such a @code{man} page on the system you are running, either it does not
  belong to GNU @code{tar}, or it has not been produced by GNU.  Currently,
  GNU @code{tar} documentation is provided in Texinfo format only,
  except, of course, the short result of @kbd{tar --help}.
+ @end ignore
+ 
+ A short reference to @code{tar} in the form of a @code{man} page is also
+ provided.  Currently, it doesn't tell much more that @kbd{tar --help}
+ does.
  
  @menu
  * verbose::
1998-02-28 +02  Eli Zaretskii  <eliz@is.elta.co.il>

	* userspec.c (parse_user_spec) [__DJGPP__]: Make function know
	about any arbitrary user and group by pretending to be the user
	and to belong to the group specified in `spec_arg' argument.

	* idcache.c (getuidbyname) [__DJGPP__]: Make function know about
	any arbitrary user name.
	(getgidbyname) [__DJGPP__]: Make function know about any arbitrary
	group name.

*** lib/userspec.c~0	Mon Jun  9 22:13:44 1997
--- lib/userspec.c	Sat Feb 28 17:38:28 1998
*************** parse_user_spec (spec_arg, uid, gid, use
*** 153,158 ****
--- 153,167 ----
    if (u == NULL && g == NULL)
      return "can not omit both user and group";
  
+ #ifdef __DJGPP__
+   /* Pretend that we are the user U whose group is G.  This makes
+      pwd and grp functions ``know'' about the UID and GID of these.  */
+   if (u && !is_number (u))
+     setenv ("USER", u, 1);
+   if (g && !is_number (g))
+     setenv ("GROUP", g, 1);
+ #endif
+ 
    if (u != NULL)
      {
        pwd = getpwnam (u);
*** lib/idcache.c~0	Mon Jun  9 21:42:48 1997
--- lib/idcache.c	Sat Feb 28 18:45:42 1998
*************** struct group *getgrnam ();
*** 43,48 ****
--- 43,52 ----
  char *xmalloc ();
  char *xstrdup ();
  
+ #ifdef __DJGPP__
+ static char digits[] = "0123456789";
+ #endif
+ 
  struct userid
  {
    union
*************** getuidbyname (user)
*** 106,111 ****
--- 110,124 ----
        return 0;
  
    pwent = getpwnam (user);
+ #ifdef __DJGPP__
+   /* We need to pretend to be the user USER, to make
+      pwd functions know about an arbitrary user name.  */
+   if (!pwent && strspn (user, digits) < strlen (user))
+     {
+       setenv ("USER", user, 1);
+       pwent = getpwnam (user);	/* now it will succeed */
+     }
+ #endif
  
    tail = (struct userid *) xmalloc (sizeof (struct userid));
    tail->name = xstrdup (user);
*************** getgidbyname (group)
*** 175,180 ****
--- 188,202 ----
        return 0;
  
    grent = getgrnam (group);
+ #ifdef __DJGPP__
+   /* We need to pretend to belong to group GROUP, to make
+      grp functions know about any arbitrary group name.  */
+   if (!grent && strspn (group, digits) < strlen (group))
+     {
+       setenv ("GROUP", group, 1);
+       grent = getgrnam (group);	/* now it will succeed */
+     }
+ #endif
  
    tail = (struct userid *) xmalloc (sizeof (struct userid));
    tail->name = xstrdup (group);
*** src/extract.c~2	Sat Mar  7 18:09:22 1998
--- src/extract.c	Sat Mar 21 12:34:32 1998
*************** Attempting extraction of symbolic links 
*** 1010,1018 ****
  	current.linkname = rename_if_dos_device_name (current.linkname);
  #endif
  
! 	/* DOSWIN does not implement links.  However, link() actually
! 	   copies the file.  */
! 	status = link (current.linkname, CURRENT_FILE_NAME);
  
  	if (status == 0)
  	  break;
--- 1010,1046 ----
  	current.linkname = rename_if_dos_device_name (current.linkname);
  #endif
  
! 	/* Adjust relative names of symlink targets if we are extracting
! 	   them as hard links.
! 	   We don't need to test for DOSWIN-style absolute  file names,
! 	   since archives with links can only come from Unix.  */
! 	if (current.block->header.typeflag == SYMTYPE
! 	    && current.linkname[0] != '/')
! 	  {
! 	    char fullname[PATH_MAX];
! 	    char *link_dir = dirname (CURRENT_FILE_NAME);
! 	    char *link_name;
! 
! 	    if (link_dir)
! 	      {
! 		strcpy (fullname, link_dir);
! 		strcat (fullname, "/");
! 		strcat (fullname, current.linkname);
! 		link_name = fullname;
! 	      }
! 	    else
! 	      link_name = current.linkname;
! 
! 	    status = link (link_name, CURRENT_FILE_NAME);
! 	    if (link_dir)
! 	      free (link_dir);
! 	  }
! 	else
! 	  {
! 	    /* DOSWIN does not implement links.  However, link() actually
! 	       copies the file on DOSWIN systems.  */
! 	    status = link (current.linkname, CURRENT_FILE_NAME);
! 	  }
  
  	if (status == 0)
  	  break;
*** src/compare.c~1	Sat Mar  7 17:20:38 1998
--- src/compare.c	Sat Mar 21 12:38:52 1998
*************** diff_archive (void)
*** 750,756 ****
        }
  #else  /* not S_ISLNK */
  
!       status = stat (current.linkname, &stat_data);
        if (status < 0)
  	{
  	  if (errno == ENOENT)
--- 750,783 ----
        }
  #else  /* not S_ISLNK */
  
!       /* Adjust relative names of symlink targets if symlinks aren't
! 	 supported.
! 	 We don't need to test for DOSWIN-style absolute  file names,
! 	 since archives with links can only come from Unix.  */
!       if (current.block->header.typeflag == SYMTYPE
! 	  && current.linkname[0] != '/')
! 	{
! 	  char fullname[PATH_MAX];
! 	  char *link_dir = dirname (current.name);
! 	  char *link_name;
! 
! 	  if (link_dir)
! 	    {
! 	      strcpy (fullname, link_dir);
! 	      strcat (fullname, "/");
! 	      strcat (fullname, current.linkname);
! 	      link_name = fullname;
! 	    }
! 	  else
! 	    link_name = current.linkname;
! 
! 	  status = stat (link_name, &stat_data);
! 	  if (link_dir)
! 	    free (link_dir);
! 	}
!       else
! 	status = stat (current.linkname, &stat_data);
! 
        if (status < 0)
  	{
  	  if (errno == ENOENT)
