File: missing.h

package info (click to toggle)
hfsprogs 332.25-11
  • links: PTS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 6,440 kB
  • ctags: 7,805
  • sloc: ansic: 58,120; makefile: 25
file content (121 lines) | stat: -rw-r--r-- 2,185 bytes parent folder | download | duplicates (2)
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
#ifndef _MISSING_H_
#define _MISSING_H_

#include <endian.h>
#include <byteswap.h>
#include <errno.h>
#include <stdint.h>
#include <string.h>
#include <bsd/string.h>

#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 NXSwapHostLongToBig(x)		cpu_to_be32(x)
#define NXSwapBigShortToHost(x) 	be16_to_cpu(x)
#define OSSwapBigToHostInt16(x)		be16_to_cpu(x)
#define NXSwapBigLongToHost(x)		be32_to_cpu(x)
#define OSSwapBigToHostInt32(x)		be32_to_cpu(x)
#define NXSwapBigLongLongToHost(x) 	be64_to_cpu(x)
#define OSSwapBigToHostInt64(x)		be64_to_cpu(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