@@ -129,44 +129,19 @@ fn main() {
129129 . header ( "mach/vm_task.h" )
130130 . header ( "mach/vm_types.h" ) ;
131131
132- // The below doesn't exist in Xcode 14:
133- if xcode < Xcode ( 14 , 0 ) {
134- cfg. header ( "mach/lock_set.h" ) ;
135- }
136-
137132 cfg. skip_struct ( move |s| {
138133 match s. ident ( ) {
139- // TODO: this type is a bitfield and must be verified by hand
140- "mach_msg_type_descriptor_t" |
141-
142- // TODO: this type is a bitfield and must be verified by hand
143- "mach_msg_port_descriptor_t" |
144-
145- // TODO: this type is a bitfield and must be verified by hand
146- "mach_msg_ool_descriptor_t" |
147-
148- // TODO: this type is a bitfield and must be verified by hand
149- "mach_msg_ool_ports_descriptor_t" |
150-
151- // FIXME: this type is not exposed in /usr/include/mach
152- // but seems to be exposed in
153- // SDKs/MacOSX.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/mach
154- "ipc_port" => true ,
155-
156- // FIXME: Changed in XCode 11, figure out what's changed.
157- "vm_region_submap_info_64" if xcode >= Xcode ( 11 , 0 ) => true ,
158-
134+ // TODO: these types are bitfields and must be verified by hand
135+ "mach_msg_type_descriptor_t"
136+ | "mach_msg_port_descriptor_t"
137+ | "mach_msg_ool_descriptor_t"
138+ | "mach_msg_ool_ports_descriptor_t" => true ,
159139 _ => false ,
160140 }
161141 } ) ;
162142
163143 cfg. skip_alias ( move |s| {
164144 match s. ident ( ) {
165- // FIXME: this type is not exposed in /usr/include/mach
166- // but seems to be exposed in
167- // SDKs/MacOSX.sdk/System/Library/Frameworks/Kernel.framework/Versions/A/Headers/mach
168- "ipc_port_t" => true ,
169-
170145 // FIXME: Changed in XCode 11, see `vm_region_submap_info_data_64`'s comment.
171146 "vm_region_submap_info_data_64_t" if xcode >= Xcode ( 11 , 0 ) => true ,
172147
@@ -178,10 +153,6 @@ fn main() {
178153 } ) ;
179154
180155 cfg. skip_fn ( move |s| {
181- // FIXME: The return type of these functions are different in Xcode 13 or higher.
182- if s. ident ( ) . starts_with ( "semaphore" ) {
183- return true ;
184- }
185156 match s. ident ( ) {
186157 // mac_task_self and current_tasl are not functions, but macro that map to the
187158 // mask_task_self_ static variable:
@@ -192,16 +163,6 @@ fn main() {
192163 } ) ;
193164
194165 cfg. skip_const ( move |s| match s. ident ( ) {
195- "MACH_RCV_NOTIFY" | "MACH_RCV_OVERWRITE" if xcode <= Xcode ( 11 , 0 ) => true ,
196-
197- // FIXME: Somehow it fails, like:
198- // bad VM_PROT_NO_CHANGE value at byte 0: rust: 8 (0x8) != c 0 (0x0)
199- // bad VM_PROT_NO_CHANGE value at byte 3: rust: 0 (0x0) != c 1 (0x1)
200- "VM_PROT_NO_CHANGE" if xcode >= Xcode ( 13 , 0 ) => true ,
201-
202- // FIXME: Unavailable since Xcode 14:
203- "EXC_CORPSE_VARIANT_BIT" if xcode >= Xcode ( 14 , 0 ) => true ,
204-
205166 _ => false ,
206167 } ) ;
207168
@@ -210,7 +171,6 @@ fn main() {
210171 match c {
211172 // struct types:
212173 "mach_timespec_t" |
213- "ipc_port_t" |
214174 "vm_statistics_data_t" |
215175 "fsid_t" |
216176 "fsobj_id_t" |
0 commit comments