summaryrefslogtreecommitdiffstats
path: root/usr.bin/tar/bsdtar.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tar/bsdtar.h')
-rw-r--r--usr.bin/tar/bsdtar.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/usr.bin/tar/bsdtar.h b/usr.bin/tar/bsdtar.h
index dd37326..f11f451 100644
--- a/usr.bin/tar/bsdtar.h
+++ b/usr.bin/tar/bsdtar.h
@@ -77,6 +77,20 @@ struct bsdtar {
struct links_entry *links_head;
struct archive_dir_entry *archive_dir_head, *archive_dir_tail;
+
+ /* An arbitrary prime number. */
+ #define bsdtar_hash_size 71
+ /* A simple hash of uid/uname for caching uname lookups. */
+ struct {
+ uid_t uid;
+ char *uname;
+ } uname_lookup[bsdtar_hash_size];
+
+ /* A simple hash of gid/gname for caching gname lookups. */
+ struct {
+ gid_t gid;
+ char *gname;
+ } gname_lookup[bsdtar_hash_size];
};
const char *bsdtar_progname(void);
OpenPOWER on IntegriCloud