386BSD 0.1 development
[unix-history] / usr / src / usr.bin / tar / port.h
CommitLineData
f87489ac
WJ
1/* Portability declarations.
2 Copyright (C) 1988 Free Software Foundation
3
4This file is part of GNU Tar.
5
6GNU Tar is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 1, or (at your option)
9any later version.
10
11GNU Tar is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Tar; see the file COPYING. If not, write to
18the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19/*
20 * Portability declarations for tar.
21 *
22 * @(#)port.h 1.3 87/11/11 by John Gilmore, 1986
23 */
24
25/*
26 * Everybody does wait() differently. There seem to be no definitions
27 * for this in V7 (e.g. you are supposed to shift and mask things out
28 * using constant shifts and masks.) So fuck 'em all -- my own non
29 * standard but portable macros. Don't change to a "union wait"
30 * based approach -- the ordering of the elements of the struct
31 * depends on the byte-sex of the machine. Foo!
32 */
33#define TERM_SIGNAL(status) ((status) & 0x7F)
34#define TERM_COREDUMP(status) (((status) & 0x80) != 0)
35#define TERM_VALUE(status) ((status) >> 8)
36
37#ifdef MSDOS
38/* missing things from sys/stat.h */
39#define S_ISUID 0
40#define S_ISGID 0
41#define S_ISVTX 0
42
43/* device stuff */
44#define makedev(ma, mi) ((ma << 8) | mi)
45#define major(dev) (dev)
46#define minor(dev) (dev)
47#endif /* MSDOS */