#define MAP_HUGETLB 0x40000
#define MAP_FILE 0
+#define MAP_HUGE_SHIFT 26
+#define MAP_HUGE_MASK 0x3f
+#define MAP_HUGE_64KB (16 << 26)
+#define MAP_HUGE_512KB (19 << 26)
+#define MAP_HUGE_1MB (20 << 26)
+#define MAP_HUGE_2MB (21 << 26)
+#define MAP_HUGE_8MB (23 << 26)
+#define MAP_HUGE_16MB (24 << 26)
+#define MAP_HUGE_256MB (28 << 26)
+#define MAP_HUGE_1GB (30 << 26)
+#define MAP_HUGE_2GB (31 << 26)
+#define MAP_HUGE_16GB (34U << 26)
+
#define PROT_NONE 0
#define PROT_READ 1
#define PROT_WRITE 2
#define SHM_HUGETLB 04000
#define SHM_NORESERVE 010000
+#define SHM_HUGE_SHIFT 26
+#define SHM_HUGE_MASK 0x3f
+#define SHM_HUGE_64KB (16 << 26)
+#define SHM_HUGE_512KB (19 << 26)
+#define SHM_HUGE_1MB (20 << 26)
+#define SHM_HUGE_2MB (21 << 26)
+#define SHM_HUGE_8MB (23 << 26)
+#define SHM_HUGE_16MB (24 << 26)
+#define SHM_HUGE_256MB (28 << 26)
+#define SHM_HUGE_1GB (30 << 26)
+#define SHM_HUGE_2GB (31 << 26)
+#define SHM_HUGE_16GB (34U << 26)
+
typedef unsigned long shmatt_t;
void *shmat(int, const void *, int);