#ifdef __MSDOS__
char TTY_NAME[] = "con";
-#define MKNOD_MISSING
-#define UTILS_MISSING
-#define VALLOC_MISSING
-
#else /* not __MSDOS__ */
char TTY_NAME[] ="/dev/tty";
-#define UTILS_MISSING
-#define CK_PIPE_MISSING
-
#endif /* not __MSDOS__ */
/* End of system-dependent #ifdefs */
-#ifdef VALLOC_MISSING
+#ifndef HAVE_VALLOC
/*
* valloc() does a malloc() on a page boundary. On some systems,
* this can make large block I/O more efficient.
{
return (malloc (size));
}
-#endif
+#endif /* !HAVE_VALLOC */
-#ifdef MKDIR_MISSING
+#ifndef HAVE_MKDIR
/*
* Written by Robert Rother, Mariah Corporation, August 1985.
*
return 0;
}
-#endif
+#endif /* !HAVE_MKDIR */
-#ifdef RENAME_MISSING
+#ifndef HAVE_RENAME
/* Rename file FROM to file TO.
Return 0 if successful, -1 if not. */
{
struct stat from_stats;
- if (stat (from, &from_stats) == 0)
+ if (stat (from, &from_stats))
+ return -1;
+
+ if (unlink (to) && errno != ENOENT)
+ return -1;
+
+ if (link (from, to))
+ return -1;
+
+ if (unlink (from) && errno != ENOENT)
{
- if (unlink (to) && errno != ENOENT)
- return -1;
- if (link (from, to) == 0 && (unlink (from) == 0 || errno == ENOENT))
- return 0;
+ unlink (to);
+ return -1;
}
- return -1;
+
+ return 0;
}
-#endif
+#endif /* !HAVE_RENAME */
-#ifdef BZERO_MISSING
+#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 */
-#ifdef MKNOD_MISSING
+#ifndef HAVE_MKNOD
#ifdef __MSDOS__
typedef int dev_t;
#endif
{
return 0;
}
-#endif /* MKNOD_MISSING */
+#endif /* !HAVE_MKNOD */
#ifdef __TURBOC__
#include <time.h>
_close (fd);
return status;
}
-#endif
+#endif /* __TURBOC__ */
-#ifdef UTILS_MISSING
/* Stash argv[0] here so panic will know what the program is called */
char *myname = 0;
*to_there++='\0';
return ret;
}
-#endif
-#ifdef CK_PIPE_MISSING
void ck_pipe(pipes)
int *pipes;
{
}
}
-#endif
-
-#ifdef STRSTR_MISSING
+#ifndef HAVE_STRSTR
/*
* strstr - find first occurrence of wanted in s
*/
return (char *)0;
return scan;
}
-#endif
+#endif /* !HAVE_STRSTR */
-#ifdef FTRUNCATE_MISSING
+#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;
-#if !defined (VPRINTF_MISSING) && defined (__STDC__)
+#if defined (HAVE_VPRINTF) && __STDC__
#include <stdarg.h>
void
perror(" ");
fflush(stderr);
}
-#endif /* not VPRINTF_MISSING or __STDC__ */
+#endif /* HAVE_VPRINTF and __STDC__ */
-#if !defined(VPRINTF_MISSING) && !defined(__STDC__)
+#if defined(HAVE_VPRINTF) && !__STDC__
#include <varargs.h>
void
msg(str,va_alist)
perror(" ");
fflush(stderr);
}
-#endif /* not VPRINTF_MISSING and not __STDC__ */
+#endif /* HAVE_VPRINTF and not __STDC__ */
-#if defined(VPRINTF_MISSING) && !defined(DOPRNT_MISSING)
+#if !defined(HAVE_VPRINTF) && defined(HAVE_DOPRNT)
void
msg(str,args)
char *str;
perror(" ");
fflush(stderr);
}
-#endif /* VPRINTF_MISSING and not DOPRNT_MISSING */
+#endif /* !HAVE_VPRINTF and HAVE_DOPRNT */
-#if defined(VPRINTF_MISSING) && defined(DOPRNT_MISSING)
+#if !defined(HAVE_VPRINTF) && !defined(HAVE_DOPRNT)
void msg(str,a1,a2,a3,a4,a5,a6)
char *str;
{
errno=save_e;
perror(" ");
}
-#endif /* VPRINTF_MISSING and DOPRNT_MISSING */
+#endif /* !HAVE_VPRINTF and !HAVE_DOPRNT */
-char version_string[] = "GNU tar version 1.11.2";
+/* 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.16";