strncpy (header->header.arch_name, name, NAMSIZ);
header->header.arch_name[NAMSIZ - 1] = '\0';
- to_oct ((long) (st->st_mode & 07777),
+ to_oct ((long) (f_oldarch ? (st->st_mode & 07777) : st->st_mode),
8, header->header.mode);
to_oct ((long) st->st_uid, 8, header->header.uid);
to_oct ((long) st->st_gid, 8, header->header.gid);
/* Supporting routines which may sometimes be missing.
- Copyright (C) 1988 Free Software Foundation
+ Copyright (C) 1988, 1992 Free Software Foundation
This file is part of GNU Tar.
{
return (malloc (size));
}
-#endif
+#endif /* !HAVE_VALLOC */
#ifndef HAVE_MKDIR
/*
while (cpid != wait(&status)) ; /* Wait for kid to finish */
}
- if (WTERMSIG(status) != 0 || WEXITSTATUS(status) != 0) {
+ if (WIFSIGNALED(status) || WEXITSTATUS(status) != 0) {
errno = EIO; /* We don't know why, but */
return -1; /* /bin/mkdir failed */
}
while (cpid != wait(&status)) ; /* Wait for kid to finish */
}
- if (WTERMSIG(status) != 0 || WEXITSTATUS(status) != 0) {
+ if (WIFSIGNALED(status) || WEXITSTATUS(status) != 0) {
errno = EIO; /* We don't know why, but */
return -1; /* /bin/mkdir failed */
}
return 0;
}
-#endif
+#endif /* !HAVE_MKDIR */
#ifndef HAVE_RENAME
/* Rename file FROM to file TO.
return 0;
}
-#endif
+#endif /* !HAVE_RENAME */
-#ifndef HAVE_BZERO
+#ifdef minix
/* Minix has bcopy but not bzero, and no memset. Thanks, Andy. */
void
bzero (s1, n)
free(fnbuffer);
return -1;
}
-#endif
+#endif /* minix */
#ifdef EMUL_OPEN3
*/
return open(path, flags & (O_RDONLY|O_WRONLY|O_RDWR|O_BINARY));
}
-#endif
+#endif /* EMUL_OPEN3 */
#ifndef HAVE_MKNOD
#ifdef __MSDOS__
_close (fd);
return status;
}
-#endif
+#endif /* __TURBOC__ */
/* Stash argv[0] here so panic will know what the program is called */
char *myname = 0;
return (char *)0;
return scan;
}
-#endif
+#endif /* !HAVE_STRSTR */
-#infdef HAVE_FTRUNCATE
+#ifndef HAVE_FTRUNCATE
#ifdef F_CHSIZE
int
{
return fcntl (fd, F_CHSIZE, length);
}
-#else
+#else /* !F_CHSIZE */
#ifdef F_FREESP
/* code courtesy of William Kucharski, kucharsk@Solbourne.com */
return 0;
}
-#else
+#else /* !F_FREESP */
int
ftruncate(fd, length)
errno = EIO;
return -1;
}
-#endif
-#endif
-#endif
+#endif /* !F_FREESP */
+#endif /* !F_CHSIZE */
+#endif /* !HAVE_FTRUNCATE */
extern FILE *msg_file;
-/* Version info for tar.
- Copyright (C) 1989, Free Software Foundation.
-
-This file is part of GNU Tar.
-
-GNU Tar is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU Tar is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GNU Tar; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-char version_string[] = "GNU tar version 1.10.15";
+char version_string[] = "GNU tar version 1.11.1";