@@ -69,10 +69,18 @@ typedef void (*dispatch_mach_handler_function_t)(void*, dispatch_mach_reason_t,
69
69
70
70
typedef void (* dispatch_mach_msg_destructor_t )(void * );
71
71
72
+ typedef uint32_t voucher_activity_mode_t ;
73
+
74
+ struct voucher_offsets_s {
75
+ uint32_t vo_version ;
76
+ };
77
+
78
+
72
79
/*
73
80
* Stub out defines for other missing types
74
81
*/
75
82
83
+ // Pulled from OS X man page for kevent
76
84
struct kevent64_s {
77
85
uint64_t ident ; /* identifier for this event */
78
86
int16_t filter ; /* filter for event */
@@ -83,17 +91,13 @@ struct kevent64_s {
83
91
uint64_t ext [2 ]; /* filter-specific extensions */
84
92
};
85
93
86
- typedef uint32_t voucher_activity_mode_t ;
87
-
88
- struct voucher_offsets_s {
89
- uint32_t vo_version ;
90
- };
91
-
92
94
93
- // bogus.. .
95
+ // PAGE_SIZE and SIZE_T_MAX should not be hardcoded like this here .
94
96
#define PAGE_SIZE (4096)
95
97
#define SIZE_T_MAX (0x7fffffff)
96
98
99
+ // Define to 0 the NOTE_ values that are not present on Linux.
100
+ // Revisit this...would it be better to ifdef out the uses instead??
97
101
#define NOTE_VM_PRESSURE 0
98
102
#define NOTE_ABSOLUTE 0
99
103
#define NOTE_NSECONDS 0
@@ -110,16 +114,6 @@ struct voucher_offsets_s {
110
114
#endif
111
115
#define OS_EXPORT
112
116
113
- #ifdef DISPATCH_EXPORT
114
- #undef DISPATCH_EXPORT
115
- #endif
116
- #define DISPATCH_EXPORT
117
-
118
- #ifdef DISPATCH_NONNULL_ALL
119
- #undef DISPATCH_NONNULL_ALL
120
- #endif
121
- #define DISPATCH_NONNULL_ALL
122
-
123
117
#ifdef OS_WARN_RESULT_NEEDS_RELEASE
124
118
#undef OS_WARN_RESULT_NEEDS_RELEASE
125
119
#endif
@@ -135,7 +129,8 @@ struct voucher_offsets_s {
135
129
#define OS_NOTHROW
136
130
137
131
138
- // NOTE (Dave), these and similar macros come from Availabity.h on OS X
132
+ // These and similar macros come from Availabilty.h on OS X
133
+ // Need a better way to do this long term.
139
134
#define __OSX_AVAILABLE_BUT_DEPRECATED (a ,b ,c ,d ) //
140
135
#define __OSX_AVAILABLE_BUT_DEPRECATED_MSG (a ,b ,c ,d ,msg ) //
141
136
0 commit comments