From 29c60e43dfeca6ce77f2f93dbb8c6fe151155fe1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Pinard?= Date: Wed, 16 Nov 1994 02:49:49 +0000 Subject: [PATCH] *** empty log message *** --- src/port.h | 38 ++++++++++++++++++++++++++++++-------- src/tar.h | 18 +++++++++--------- 2 files changed, 39 insertions(+), 17 deletions(-) diff --git a/src/port.h b/src/port.h index ee5e22e..fa4b879 100644 --- a/src/port.h +++ b/src/port.h @@ -1,5 +1,5 @@ /* Portability declarations. Requires sys/types.h. - Copyright (C) 1988 Free Software Foundation + Copyright (C) 1988, 1992 Free Software Foundation This file is part of GNU Tar. @@ -17,6 +17,21 @@ 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. */ +/* AIX requires this to be the first thing in the file. */ +#ifdef __GNUC__ +#define alloca __builtin_alloca +#else /* not __GNUC__ */ +#if HAVE_ALLOCA_H +#include +#else /* not HAVE_ALLOCA_H */ +#ifdef _AIX + #pragma alloca +#else /* not _AIX */ +char *alloca (); +#endif /* not _AIX */ +#endif /* not HAVE_ALLOCA_H */ +#endif /* not __GNUC__ */ + #include "pathmax.h" #ifdef _POSIX_VERSION @@ -53,19 +68,20 @@ typedef long off_t; #define PTR void * #else #define PTR char * -#define const #endif -/* Since major is a function on SVR4, we can't use `ifndef major'. */ -#ifdef MAJOR_IN_MKDEV -#include +/* Since major is a function on SVR4, we can't just use `ifndef major'. */ +#ifdef major /* Might be defined in sys/types.h. */ #define HAVE_MAJOR #endif -#ifdef MAJOR_IN_SYSMACROS -#include + +#if !defined(HAVE_MAJOR) && defined(MAJOR_IN_MKDEV) +#include #define HAVE_MAJOR #endif -#ifdef major /* Might be defined in sys/types.h. */ + +#if !defined(HAVE_MAJOR) && defined(MAJOR_IN_SYSMACROS) +#include #define HAVE_MAJOR #endif @@ -81,6 +97,12 @@ typedef long off_t; #if !defined(__MSDOS__) && !defined(STDC_HEADERS) #include #endif +#ifdef index +#undef index +#endif +#ifdef rindex +#undef rindex +#endif #define index strchr #define rindex strrchr #define bcopy(s, d, n) memcpy(d, s, n) diff --git a/src/tar.h b/src/tar.h index c6d79c4..64a6fdd 100644 --- a/src/tar.h +++ b/src/tar.h @@ -176,7 +176,7 @@ TAR_EXTERN int cmd_mode; #define CMD_UPDATE 6 /* -u */ #define CMD_EXTRACT 7 /* -x */ #define CMD_DELETE 8 /* -D */ -#define CMD_VERSION 9 /* --version */ +#define CMD_VERSION 9 /* +version */ /* -[0-9][lmh] */ /* CMD_CAT -A */ @@ -218,13 +218,13 @@ TAR_EXTERN int f_verify; /* -W */ TAR_EXTERN int f_exclude; /* -X */ TAR_EXTERN int f_compress; /* -z */ /* -Z */ -TAR_EXTERN int f_do_chown; /* --do-chown */ -TAR_EXTERN int f_totals; /* --totals */ -TAR_EXTERN int f_remove_files; /* --remove-files */ -TAR_EXTERN int f_ignore_failed_read; /* --ignore-failed-read */ -TAR_EXTERN int f_checkpoint; /* --checkpoint */ -TAR_EXTERN int f_show_omitted_dirs; /* --show-omitted-dirs */ -TAR_EXTERN char *f_volno_file; /* --volno-file */ +TAR_EXTERN int f_do_chown; /* +do-chown */ +TAR_EXTERN int f_totals; /* +totals */ +TAR_EXTERN int f_remove_files; /* +remove-files */ +TAR_EXTERN int f_ignore_failed_read; /* +ignore-failed-read */ +TAR_EXTERN int f_checkpoint; /* +checkpoint */ +TAR_EXTERN int f_show_omitted_dirs; /* +show-omitted-dirs */ +TAR_EXTERN char *f_volno_file; /* +volno-file */ /* * We default to Unix Standard format rather than 4.2BSD tar format. @@ -275,7 +275,7 @@ void userec(); union record *endofrecs(); void anno(); -#if defined (HAVE_VPRINTF) && __STDC__ +#if !defined (VPRINTF_MISSING) && defined (__STDC__) void msg(char *, ...); void msg_perror(char *, ...); #else -- 2.44.0