From: François Pinard Date: Wed, 16 Nov 1994 02:49:40 +0000 (+0000) Subject: Initial revision X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=c53619af5d1576889f4e08d82a8140ac34d5a2e2;p=chaz%2Ftar Initial revision --- diff --git a/src/port.h b/src/port.h index 4e1e0c4..ee5e22e 100644 --- a/src/port.h +++ b/src/port.h @@ -1,5 +1,5 @@ /* Portability declarations. Requires sys/types.h. - Copyright (C) 1988, 1992 Free Software Foundation + Copyright (C) 1988 Free Software Foundation This file is part of GNU Tar. @@ -17,21 +17,6 @@ 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 @@ -62,7 +47,7 @@ char *alloca (); #define major(dev) (dev) #define minor(dev) (dev) typedef long off_t; -#endif /* __MSDOS__ */ +#endif /* __MSDOS__ */ #if defined(__STDC__) || defined(__TURBOC__) #define PTR void * @@ -71,20 +56,18 @@ typedef long off_t; #define const #endif -/* 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 - -#if !defined(HAVE_MAJOR) && defined(MAJOR_IN_MKDEV) +/* Since major is a function on SVR4, we can't use `ifndef major'. */ +#ifdef MAJOR_IN_MKDEV #include #define HAVE_MAJOR #endif - -#if !defined(HAVE_MAJOR) && defined(MAJOR_IN_SYSMACROS) +#ifdef MAJOR_IN_SYSMACROS #include #define HAVE_MAJOR #endif +#ifdef major /* Might be defined in sys/types.h. */ +#define HAVE_MAJOR +#endif #ifndef HAVE_MAJOR #define major(dev) (((dev) >> 8) & 0xff) @@ -98,12 +81,6 @@ 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) @@ -116,17 +93,17 @@ typedef long off_t; #if defined(STDC_HEADERS) #include #else -char *malloc (), *realloc (); -char *getenv (); +char *malloc(), *realloc(); +char *getenv(); #endif #ifndef _POSIX_VERSION #ifdef __MSDOS__ #include -#else /* !__MSDOS__ */ -off_t lseek (); -#endif /* !__MSDOS__ */ -char *getcwd (); +#else /* !__MSDOS__ */ +off_t lseek(); +#endif /* !__MSDOS__ */ +char *getcwd(); #endif /* !_POSIX_VERSION */ #ifndef NULL @@ -175,14 +152,14 @@ char *getcwd (); #if !defined(S_ISSOCK) && defined(S_IFSOCK) #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) #endif -#if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */ +#if !defined(S_ISMPB) && defined(S_IFMPB) /* V7 */ #define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) #define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) #endif -#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */ +#if !defined(S_ISNWK) && defined(S_IFNWK) /* HP/UX */ #define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) #endif -#if !defined(S_ISCTG) && defined(S_IFCTG) /* contiguous file */ +#if !defined(S_ISCTG) && defined(S_IFCTG) /* contiguous file */ #define S_ISCTG(m) (((m) & S_IFMT) == S_IFCTG) #endif #if !defined(S_ISVTX) diff --git a/src/testpad.c b/src/testpad.c index 5627b24..f622dc9 100644 --- a/src/testpad.c +++ b/src/testpad.c @@ -48,7 +48,6 @@ main () if (fp == 0) { fprintf (stderr, "testpad: cannot open "); - fflush (stderr); perror ("testpad.h"); exit (1); }