aboutsummaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/tar.h30
1 files changed, 26 insertions, 4 deletions
diff --git a/inc/tar.h b/inc/tar.h
index 29bea4b..8663926 100644
--- a/inc/tar.h
+++ b/inc/tar.h
@@ -1,12 +1,27 @@
#ifndef TAR_H
# define TAR_H
-# include <stdio.h>
-# include <stdlib.h>
-# include <stdbool.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+
+# ifndef S_IFDIR
+# define S_IFDIR __S_IFDIR
+# endif
+# ifndef S_IFMT
+# define S_IFMT __S_IFMT
+# endif
+
# include <unistd.h>
+# include <stdbool.h>
# include <getopt.h>
# include <fcntl.h>
+# include <stdio.h>
+# include <stdlib.h>
+# include <strings.h>
+# include <string.h>
+
+
+// # define FILE_NAME_MAX 100
// https://en.wikipedia.org/wiki/Tar_(computing)?oldformat=true#Header
typedef struct
@@ -18,8 +33,15 @@ typedef struct
char file_size[12];
char last_time[12];
char checksum[8];
- char link_indicator[1];
+ char file_type[1];
char link_file_name[100];
+ char ustar[6];
+ char ustar_version[2];
+ char user_name[32];
+ char group_name[32];
+ char device_major_number[8];
+ char device_minor_number[8];
+ char file_name_prefix[155];
} t_header;