summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/lzma/CPP/Common/MyLinux.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/lzma/CPP/Common/MyLinux.h')
-rw-r--r--3rdparty/lzma/CPP/Common/MyLinux.h37
1 files changed, 35 insertions, 2 deletions
diff --git a/3rdparty/lzma/CPP/Common/MyLinux.h b/3rdparty/lzma/CPP/Common/MyLinux.h
index 1a918993527..a8454d7f58e 100644
--- a/3rdparty/lzma/CPP/Common/MyLinux.h
+++ b/3rdparty/lzma/CPP/Common/MyLinux.h
@@ -1,7 +1,19 @@
// MyLinux.h
-#ifndef __MY_LIN_LINUX_H
-#define __MY_LIN_LINUX_H
+#ifndef ZIP7_INC_COMMON_MY_LINUX_H
+#define ZIP7_INC_COMMON_MY_LINUX_H
+
+// #include "../../C/7zTypes.h"
+
+#define MY_LIN_DT_UNKNOWN 0
+#define MY_LIN_DT_FIFO 1
+#define MY_LIN_DT_CHR 2
+#define MY_LIN_DT_DIR 4
+#define MY_LIN_DT_BLK 6
+#define MY_LIN_DT_REG 8
+#define MY_LIN_DT_LNK 10
+#define MY_LIN_DT_SOCK 12
+#define MY_LIN_DT_WHT 14
#define MY_LIN_S_IFMT 00170000
#define MY_LIN_S_IFSOCK 0140000
@@ -39,4 +51,25 @@
#define MY_LIN_S_IWOTH 00002
#define MY_LIN_S_IXOTH 00001
+/*
+// major/minor encoding for makedev(): MMMMMmmmmmmMMMmm:
+
+inline UInt32 MY_dev_major(UInt64 dev)
+{
+ return ((UInt32)(dev >> 8) & (UInt32)0xfff) | ((UInt32)(dev >> 32) & ~(UInt32)0xfff);
+}
+
+inline UInt32 MY_dev_minor(UInt64 dev)
+{
+ return ((UInt32)(dev) & 0xff) | ((UInt32)(dev >> 12) & ~0xff);
+}
+
+inline UInt64 MY_dev_makedev(UInt32 __major, UInt32 __minor)
+{
+ return (__minor & 0xff) | ((__major & 0xfff) << 8)
+ | ((UInt64) (__minor & ~0xff) << 12)
+ | ((UInt64) (__major & ~0xfff) << 32);
+}
+*/
+
#endif