8 #include <sys/features.h>
10 /* General definitions */
11 #define TMAGIC "ustar" /* ustar plus null byte. */
12 #define TMAGLEN 6 /* Length of the above. */
13 #define TVERSION "00" /* 00 without a null byte. */
14 #define TVERSLEN 2 /* Length of the above. */
16 /* Typeflag field definitions */
17 #define REGTYPE '0' /* Regular file. */
18 #define AREGTYPE '\0' /* Regular file. */
19 #define LNKTYPE '1' /* Link. */
20 #define SYMTYPE '2' /* Symbolic link. */
21 #define CHRTYPE '3' /* Character special. */
22 #define BLKTYPE '4' /* Block special. */
23 #define DIRTYPE '5' /* Directory. */
24 #define FIFOTYPE '6' /* FIFO special. */
25 #define CONTTYPE '7' /* Reserved. */
27 /* Mode field bit definitions (octal) */
28 #define TSUID 04000 /* Set UID on execution. */
29 #define TSGID 02000 /* Set GID on execution. */
30 #if __XSI_VISIBLE || __POSIX_VISIBLE < 200112
31 #define TSVTX 01000 /* On directories, restricted deletion flag. */
33 #define TUREAD 00400 /* Read by owner. */
34 #define TUWRITE 00200 /* Write by owner. */
35 #define TUEXEC 00100 /* Execute/search by owner. */
36 #define TGREAD 00040 /* Read by group. */
37 #define TGWRITE 00020 /* Write by group. */
38 #define TGEXEC 00010 /* Execute/search by group. */
39 #define TOREAD 00004 /* Read by other. */
40 #define TOWRITE 00002 /* Write by other. */
41 #define TOEXEC 00001 /* Execute/search by other. */