1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
|
#ifndef _MISSING_H_
#define _MISSING_H_
#include <endian.h>
#include <byteswap.h>
#include <errno.h>
#include <stdint.h>
typedef char uuid_string_t[37];
#define __APPLE_API_PRIVATE
#define __APPLE_API_UNSTABLE
#define __diskdev_cmds_version "540.1-Linux"
#define UF_IMMUTABLE 0x00000002
#define XATTR_MAXNAMELEN 127
#define MAXBSIZE (256 * 4096)
#ifndef true
#define true 1
#endif
#ifndef false
#define false 0
#endif
/* Mac types */
/* 8 Bit */
#ifndef UInt8
#define UInt8 uint8_t
#endif
#ifndef u_int8_t
#define u_int8_t UInt8
#endif
#ifndef SInt8
#define SInt8 int8_t
#endif
/* 16 Bit */
#ifndef UInt16
#define UInt16 uint16_t
#endif
#ifndef u_int16_t
#define u_int16_t UInt16
#endif
#ifndef SInt16
#define SInt16 int16_t
#endif
/* 32 Bit */
#ifndef UInt32
#define UInt32 uint32_t
#endif
#ifndef u_int32_t
#define u_int32_t UInt32
#endif
#ifndef SInt32
#define SInt32 int32_t
#endif
/* 64 Bit */
#ifndef UInt64
#define UInt64 uint64_t
#endif
#ifndef u_int64_t
#define u_int64_t UInt64
#endif
#ifndef SInt64
#define SInt64 int64_t
#endif
#define UniChar u_int16_t
#define Boolean u_int8_t
#define UF_NODUMP 0x00000001
/* syslimits.h */
#define NAME_MAX 255
/* Byteswap stuff */
#define OSSwapHostLongToBig(x) cpu_to_be64(x)
#define OSSwapBigShortToHost(x) be16_to_cpu(x)
#define OSSwapBigToHostInt16(x) be16_to_cpu(x)
#define OSSwapBigLongToHost(x) be32_to_cpu(x)
#define OSSwapBigToHostInt32(x) be32_to_cpu(x)
#define OSSwapBigLongLongToHost(x) be64_to_cpu(x)
#define OSSwapBigToHostInt64(x) be64_to_cpu(x)
#define OSSwapHostToBigInt32(x) cpu_to_be32(x)
#if __BYTE_ORDER == __LITTLE_ENDIAN
/* Big Endian Swaps */
#ifndef be16_to_cpu
#define be16_to_cpu(x) bswap_16(x)
#endif
#ifndef be32_to_cpu
#define be32_to_cpu(x) bswap_32(x)
#endif
#ifndef cpu_to_be32
#define cpu_to_be32(x) bswap_32(x)
#endif
#ifndef be64_to_cpu
#define be64_to_cpu(x) bswap_64(x)
#endif
#ifndef cpu_to_be64
#define cpu_to_be64(x) bswap_64(x)
#endif
#elif __BYTE_ORDER == __BIG_ENDIAN
/* Big endian doesn't swap */
#ifndef be16_to_cpu
#define be16_to_cpu(x) (x)
#endif
#ifndef be32_to_cpu
#define be32_to_cpu(x) (x)
#endif
#ifndef cpu_to_be32
#define cpu_to_be32(x) (x)
#endif
#ifndef be64_to_cpu
#define be64_to_cpu(x) (x)
#endif
#ifndef cpu_to_be64
#define cpu_to_be64(x) (x)
#endif
#endif
#define KAUTH_FILESEC_XATTR "com.apple.system.Security"
#endif
|