/* automatically generated by rust-bindgen 0.69.1 */
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage> {
storage: Storage,
}
impl<Storage> __BindgenBitfieldUnit<Storage> {
#[inline]
pub const fn new(storage: Storage) -> Self {
Self { storage }
}
}
impl<Storage> __BindgenBitfieldUnit<Storage>
where
Storage: AsRef<[u8]> + AsMut<[u8]>,
{
#[inline]
pub fn get_bit(&self, index: usize) -> bool {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = self.storage.as_ref()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
byte & mask == mask
}
#[inline]
pub fn set_bit(&mut self, index: usize, val: bool) {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = &mut self.storage.as_mut()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
if val {
*byte |= mask;
} else {
*byte &= !mask;
}
}
#[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
let mut val = 0;
for i in 0..(bit_width as usize) {
if self.get_bit(i + bit_offset) {
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
val |= 1 << index;
}
}
val
}
#[inline]
pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
self.set_bit(index + bit_offset, val_bit_is_set);
}
}
}
pub const HS_VERSION_STRING: &[u8; 18] = b"5.4.11 2024-01-01\0";
pub const HS_VERSION_32BIT: u32 = 84151040;
pub const HS_MAJOR: u32 = 5;
pub const HS_MINOR: u32 = 4;
pub const HS_PATCH: u32 = 11;
pub const __API_TO_BE_DEPRECATED: u32 = 100000;
pub const __API_TO_BE_DEPRECATED_MACOS: u32 = 100000;
pub const __API_TO_BE_DEPRECATED_IOS: u32 = 100000;
pub const __API_TO_BE_DEPRECATED_TVOS: u32 = 100000;
pub const __API_TO_BE_DEPRECATED_WATCHOS: u32 = 100000;
pub const __API_TO_BE_DEPRECATED_MACCATALYST: u32 = 100000;
pub const __API_TO_BE_DEPRECATED_DRIVERKIT: u32 = 100000;
pub const __MAC_10_0: u32 = 1000;
pub const __MAC_10_1: u32 = 1010;
pub const __MAC_10_2: u32 = 1020;
pub const __MAC_10_3: u32 = 1030;
pub const __MAC_10_4: u32 = 1040;
pub const __MAC_10_5: u32 = 1050;
pub const __MAC_10_6: u32 = 1060;
pub const __MAC_10_7: u32 = 1070;
pub const __MAC_10_8: u32 = 1080;
pub const __MAC_10_9: u32 = 1090;
pub const __MAC_10_10: u32 = 101000;
pub const __MAC_10_10_2: u32 = 101002;
pub const __MAC_10_10_3: u32 = 101003;
pub const __MAC_10_11: u32 = 101100;
pub const __MAC_10_11_2: u32 = 101102;
pub const __MAC_10_11_3: u32 = 101103;
pub const __MAC_10_11_4: u32 = 101104;
pub const __MAC_10_12: u32 = 101200;
pub const __MAC_10_12_1: u32 = 101201;
pub const __MAC_10_12_2: u32 = 101202;
pub const __MAC_10_12_4: u32 = 101204;
pub const __MAC_10_13: u32 = 101300;
pub const __MAC_10_13_1: u32 = 101301;
pub const __MAC_10_13_2: u32 = 101302;
pub const __MAC_10_13_4: u32 = 101304;
pub const __MAC_10_14: u32 = 101400;
pub const __MAC_10_14_1: u32 = 101401;
pub const __MAC_10_14_4: u32 = 101404;
pub const __MAC_10_14_6: u32 = 101406;
pub const __MAC_10_15: u32 = 101500;
pub const __MAC_10_15_1: u32 = 101501;
pub const __MAC_10_15_4: u32 = 101504;
pub const __MAC_10_16: u32 = 101600;
pub const __MAC_11_0: u32 = 110000;
pub const __MAC_11_1: u32 = 110100;
pub const __MAC_11_3: u32 = 110300;
pub const __MAC_11_4: u32 = 110400;
pub const __MAC_11_5: u32 = 110500;
pub const __MAC_11_6: u32 = 110600;
pub const __MAC_12_0: u32 = 120000;
pub const __MAC_12_1: u32 = 120100;
pub const __MAC_12_2: u32 = 120200;
pub const __MAC_12_3: u32 = 120300;
pub const __MAC_13_0: u32 = 130000;
pub const __MAC_13_1: u32 = 130100;
pub const __IPHONE_2_0: u32 = 20000;
pub const __IPHONE_2_1: u32 = 20100;
pub const __IPHONE_2_2: u32 = 20200;
pub const __IPHONE_3_0: u32 = 30000;
pub const __IPHONE_3_1: u32 = 30100;
pub const __IPHONE_3_2: u32 = 30200;
pub const __IPHONE_4_0: u32 = 40000;
pub const __IPHONE_4_1: u32 = 40100;
pub const __IPHONE_4_2: u32 = 40200;
pub const __IPHONE_4_3: u32 = 40300;
pub const __IPHONE_5_0: u32 = 50000;
pub const __IPHONE_5_1: u32 = 50100;
pub const __IPHONE_6_0: u32 = 60000;
pub const __IPHONE_6_1: u32 = 60100;
pub const __IPHONE_7_0: u32 = 70000;
pub const __IPHONE_7_1: u32 = 70100;
pub const __IPHONE_8_0: u32 = 80000;
pub const __IPHONE_8_1: u32 = 80100;
pub const __IPHONE_8_2: u32 = 80200;
pub const __IPHONE_8_3: u32 = 80300;
pub const __IPHONE_8_4: u32 = 80400;
pub const __IPHONE_9_0: u32 = 90000;
pub const __IPHONE_9_1: u32 = 90100;
pub const __IPHONE_9_2: u32 = 90200;
pub const __IPHONE_9_3: u32 = 90300;
pub const __IPHONE_10_0: u32 = 100000;
pub const __IPHONE_10_1: u32 = 100100;
pub const __IPHONE_10_2: u32 = 100200;
pub const __IPHONE_10_3: u32 = 100300;
pub const __IPHONE_11_0: u32 = 110000;
pub const __IPHONE_11_1: u32 = 110100;
pub const __IPHONE_11_2: u32 = 110200;
pub const __IPHONE_11_3: u32 = 110300;
pub const __IPHONE_11_4: u32 = 110400;
pub const __IPHONE_12_0: u32 = 120000;
pub const __IPHONE_12_1: u32 = 120100;
pub const __IPHONE_12_2: u32 = 120200;
pub const __IPHONE_12_3: u32 = 120300;
pub const __IPHONE_12_4: u32 = 120400;
pub const __IPHONE_13_0: u32 = 130000;
pub const __IPHONE_13_1: u32 = 130100;
pub const __IPHONE_13_2: u32 = 130200;
pub const __IPHONE_13_3: u32 = 130300;
pub const __IPHONE_13_4: u32 = 130400;
pub const __IPHONE_13_5: u32 = 130500;
pub const __IPHONE_13_6: u32 = 130600;
pub const __IPHONE_13_7: u32 = 130700;
pub const __IPHONE_14_0: u32 = 140000;
pub const __IPHONE_14_1: u32 = 140100;
pub const __IPHONE_14_2: u32 = 140200;
pub const __IPHONE_14_3: u32 = 140300;
pub const __IPHONE_14_5: u32 = 140500;
pub const __IPHONE_14_6: u32 = 140600;
pub const __IPHONE_14_7: u32 = 140700;
pub const __IPHONE_14_8: u32 = 140800;
pub const __IPHONE_15_0: u32 = 150000;
pub const __IPHONE_15_1: u32 = 150100;
pub const __IPHONE_15_2: u32 = 150200;
pub const __IPHONE_15_3: u32 = 150300;
pub const __IPHONE_15_4: u32 = 150400;
pub const __IPHONE_16_0: u32 = 160000;
pub const __IPHONE_16_1: u32 = 160100;
pub const __IPHONE_16_2: u32 = 160200;
pub const __TVOS_9_0: u32 = 90000;
pub const __TVOS_9_1: u32 = 90100;
pub const __TVOS_9_2: u32 = 90200;
pub const __TVOS_10_0: u32 = 100000;
pub const __TVOS_10_0_1: u32 = 100001;
pub const __TVOS_10_1: u32 = 100100;
pub const __TVOS_10_2: u32 = 100200;
pub const __TVOS_11_0: u32 = 110000;
pub const __TVOS_11_1: u32 = 110100;
pub const __TVOS_11_2: u32 = 110200;
pub const __TVOS_11_3: u32 = 110300;
pub const __TVOS_11_4: u32 = 110400;
pub const __TVOS_12_0: u32 = 120000;
pub const __TVOS_12_1: u32 = 120100;
pub const __TVOS_12_2: u32 = 120200;
pub const __TVOS_12_3: u32 = 120300;
pub const __TVOS_12_4: u32 = 120400;
pub const __TVOS_13_0: u32 = 130000;
pub const __TVOS_13_2: u32 = 130200;
pub const __TVOS_13_3: u32 = 130300;
pub const __TVOS_13_4: u32 = 130400;
pub const __TVOS_14_0: u32 = 140000;
pub const __TVOS_14_1: u32 = 140100;
pub const __TVOS_14_2: u32 = 140200;
pub const __TVOS_14_3: u32 = 140300;
pub const __TVOS_14_5: u32 = 140500;
pub const __TVOS_14_6: u32 = 140600;
pub const __TVOS_14_7: u32 = 140700;
pub const __TVOS_15_0: u32 = 150000;
pub const __TVOS_15_1: u32 = 150100;
pub const __TVOS_15_2: u32 = 150200;
pub const __TVOS_15_3: u32 = 150300;
pub const __TVOS_15_4: u32 = 150400;
pub const __TVOS_16_0: u32 = 160000;
pub const __TVOS_16_1: u32 = 160100;
pub const __TVOS_16_2: u32 = 160200;
pub const __WATCHOS_1_0: u32 = 10000;
pub const __WATCHOS_2_0: u32 = 20000;
pub const __WATCHOS_2_1: u32 = 20100;
pub const __WATCHOS_2_2: u32 = 20200;
pub const __WATCHOS_3_0: u32 = 30000;
pub const __WATCHOS_3_1: u32 = 30100;
pub const __WATCHOS_3_1_1: u32 = 30101;
pub const __WATCHOS_3_2: u32 = 30200;
pub const __WATCHOS_4_0: u32 = 40000;
pub const __WATCHOS_4_1: u32 = 40100;
pub const __WATCHOS_4_2: u32 = 40200;
pub const __WATCHOS_4_3: u32 = 40300;
pub const __WATCHOS_5_0: u32 = 50000;
pub const __WATCHOS_5_1: u32 = 50100;
pub const __WATCHOS_5_2: u32 = 50200;
pub const __WATCHOS_5_3: u32 = 50300;
pub const __WATCHOS_6_0: u32 = 60000;
pub const __WATCHOS_6_1: u32 = 60100;
pub const __WATCHOS_6_2: u32 = 60200;
pub const __WATCHOS_7_0: u32 = 70000;
pub const __WATCHOS_7_1: u32 = 70100;
pub const __WATCHOS_7_2: u32 = 70200;
pub const __WATCHOS_7_3: u32 = 70300;
pub const __WATCHOS_7_4: u32 = 70400;
pub const __WATCHOS_7_5: u32 = 70500;
pub const __WATCHOS_7_6: u32 = 70600;
pub const __WATCHOS_8_0: u32 = 80000;
pub const __WATCHOS_8_1: u32 = 80100;
pub const __WATCHOS_8_3: u32 = 80300;
pub const __WATCHOS_8_4: u32 = 80400;
pub const __WATCHOS_8_5: u32 = 80500;
pub const __WATCHOS_9_0: u32 = 90000;
pub const __WATCHOS_9_1: u32 = 90100;
pub const __WATCHOS_9_2: u32 = 90200;
pub const MAC_OS_X_VERSION_10_0: u32 = 1000;
pub const MAC_OS_X_VERSION_10_1: u32 = 1010;
pub const MAC_OS_X_VERSION_10_2: u32 = 1020;
pub const MAC_OS_X_VERSION_10_3: u32 = 1030;
pub const MAC_OS_X_VERSION_10_4: u32 = 1040;
pub const MAC_OS_X_VERSION_10_5: u32 = 1050;
pub const MAC_OS_X_VERSION_10_6: u32 = 1060;
pub const MAC_OS_X_VERSION_10_7: u32 = 1070;
pub const MAC_OS_X_VERSION_10_8: u32 = 1080;
pub const MAC_OS_X_VERSION_10_9: u32 = 1090;
pub const MAC_OS_X_VERSION_10_10: u32 = 101000;
pub const MAC_OS_X_VERSION_10_10_2: u32 = 101002;
pub const MAC_OS_X_VERSION_10_10_3: u32 = 101003;
pub const MAC_OS_X_VERSION_10_11: u32 = 101100;
pub const MAC_OS_X_VERSION_10_11_2: u32 = 101102;
pub const MAC_OS_X_VERSION_10_11_3: u32 = 101103;
pub const MAC_OS_X_VERSION_10_11_4: u32 = 101104;
pub const MAC_OS_X_VERSION_10_12: u32 = 101200;
pub const MAC_OS_X_VERSION_10_12_1: u32 = 101201;
pub const MAC_OS_X_VERSION_10_12_2: u32 = 101202;
pub const MAC_OS_X_VERSION_10_12_4: u32 = 101204;
pub const MAC_OS_X_VERSION_10_13: u32 = 101300;
pub const MAC_OS_X_VERSION_10_13_1: u32 = 101301;
pub const MAC_OS_X_VERSION_10_13_2: u32 = 101302;
pub const MAC_OS_X_VERSION_10_13_4: u32 = 101304;
pub const MAC_OS_X_VERSION_10_14: u32 = 101400;
pub const MAC_OS_X_VERSION_10_14_1: u32 = 101401;
pub const MAC_OS_X_VERSION_10_14_4: u32 = 101404;
pub const MAC_OS_X_VERSION_10_14_6: u32 = 101406;
pub const MAC_OS_X_VERSION_10_15: u32 = 101500;
pub const MAC_OS_X_VERSION_10_15_1: u32 = 101501;
pub const MAC_OS_X_VERSION_10_16: u32 = 101600;
pub const MAC_OS_VERSION_11_0: u32 = 110000;
pub const MAC_OS_VERSION_12_0: u32 = 120000;
pub const MAC_OS_VERSION_13_0: u32 = 130000;
pub const __DRIVERKIT_19_0: u32 = 190000;
pub const __DRIVERKIT_20_0: u32 = 200000;
pub const __DRIVERKIT_21_0: u32 = 210000;
pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 130100;
pub const __ENABLE_LEGACY_MAC_AVAILABILITY: u32 = 1;
pub const __DARWIN_ONLY_64_BIT_INO_T: u32 = 1;
pub const __DARWIN_ONLY_UNIX_CONFORMANCE: u32 = 1;
pub const __DARWIN_ONLY_VERS_1050: u32 = 1;
pub const __DARWIN_UNIX03: u32 = 1;
pub const __DARWIN_64_BIT_INO_T: u32 = 1;
pub const __DARWIN_VERS_1050: u32 = 1;
pub const __DARWIN_NON_CANCELABLE: u32 = 0;
pub const __DARWIN_SUF_EXTSN: &[u8; 14] = b"$DARWIN_EXTSN\0";
pub const __DARWIN_C_ANSI: u32 = 4096;
pub const __DARWIN_C_FULL: u32 = 900000;
pub const __DARWIN_C_LEVEL: u32 = 900000;
pub const __STDC_WANT_LIB_EXT1__: u32 = 1;
pub const __DARWIN_NO_LONG_LONG: u32 = 0;
pub const _DARWIN_FEATURE_64_BIT_INODE: u32 = 1;
pub const _DARWIN_FEATURE_ONLY_64_BIT_INODE: u32 = 1;
pub const _DARWIN_FEATURE_ONLY_VERS_1050: u32 = 1;
pub const _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE: u32 = 1;
pub const _DARWIN_FEATURE_UNIX_CONFORMANCE: u32 = 3;
pub const __has_ptrcheck: u32 = 0;
pub const __PTHREAD_SIZE__: u32 = 8176;
pub const __PTHREAD_ATTR_SIZE__: u32 = 56;
pub const __PTHREAD_MUTEXATTR_SIZE__: u32 = 8;
pub const __PTHREAD_MUTEX_SIZE__: u32 = 56;
pub const __PTHREAD_CONDATTR_SIZE__: u32 = 8;
pub const __PTHREAD_COND_SIZE__: u32 = 40;
pub const __PTHREAD_ONCE_SIZE__: u32 = 8;
pub const __PTHREAD_RWLOCK_SIZE__: u32 = 192;
pub const __PTHREAD_RWLOCKATTR_SIZE__: u32 = 16;
pub const __DARWIN_WCHAR_MIN: i32 = -2147483648;
pub const _FORTIFY_SOURCE: u32 = 2;
pub const __DARWIN_NSIG: u32 = 32;
pub const NSIG: u32 = 32;
pub const _ARM_SIGNAL_: u32 = 1;
pub const SIGHUP: u32 = 1;
pub const SIGINT: u32 = 2;
pub const SIGQUIT: u32 = 3;
pub const SIGILL: u32 = 4;
pub const SIGTRAP: u32 = 5;
pub const SIGABRT: u32 = 6;
pub const SIGIOT: u32 = 6;
pub const SIGEMT: u32 = 7;
pub const SIGFPE: u32 = 8;
pub const SIGKILL: u32 = 9;
pub const SIGBUS: u32 = 10;
pub const SIGSEGV: u32 = 11;
pub const SIGSYS: u32 = 12;
pub const SIGPIPE: u32 = 13;
pub const SIGALRM: u32 = 14;
pub const SIGTERM: u32 = 15;
pub const SIGURG: u32 = 16;
pub const SIGSTOP: u32 = 17;
pub const SIGTSTP: u32 = 18;
pub const SIGCONT: u32 = 19;
pub const SIGCHLD: u32 = 20;
pub const SIGTTIN: u32 = 21;
pub const SIGTTOU: u32 = 22;
pub const SIGIO: u32 = 23;
pub const SIGXCPU: u32 = 24;
pub const SIGXFSZ: u32 = 25;
pub const SIGVTALRM: u32 = 26;
pub const SIGPROF: u32 = 27;
pub const SIGWINCH: u32 = 28;
pub const SIGINFO: u32 = 29;
pub const SIGUSR1: u32 = 30;
pub const SIGUSR2: u32 = 31;
pub const __DARWIN_OPAQUE_ARM_THREAD_STATE64: u32 = 0;
pub const SIGEV_NONE: u32 = 0;
pub const SIGEV_SIGNAL: u32 = 1;
pub const SIGEV_THREAD: u32 = 3;
pub const ILL_NOOP: u32 = 0;
pub const ILL_ILLOPC: u32 = 1;
pub const ILL_ILLTRP: u32 = 2;
pub const ILL_PRVOPC: u32 = 3;
pub const ILL_ILLOPN: u32 = 4;
pub const ILL_ILLADR: u32 = 5;
pub const ILL_PRVREG: u32 = 6;
pub const ILL_COPROC: u32 = 7;
pub const ILL_BADSTK: u32 = 8;
pub const FPE_NOOP: u32 = 0;
pub const FPE_FLTDIV: u32 = 1;
pub const FPE_FLTOVF: u32 = 2;
pub const FPE_FLTUND: u32 = 3;
pub const FPE_FLTRES: u32 = 4;
pub const FPE_FLTINV: u32 = 5;
pub const FPE_FLTSUB: u32 = 6;
pub const FPE_INTDIV: u32 = 7;
pub const FPE_INTOVF: u32 = 8;
pub const SEGV_NOOP: u32 = 0;
pub const SEGV_MAPERR: u32 = 1;
pub const SEGV_ACCERR: u32 = 2;
pub const BUS_NOOP: u32 = 0;
pub const BUS_ADRALN: u32 = 1;
pub const BUS_ADRERR: u32 = 2;
pub const BUS_OBJERR: u32 = 3;
pub const TRAP_BRKPT: u32 = 1;
pub const TRAP_TRACE: u32 = 2;
pub const CLD_NOOP: u32 = 0;
pub const CLD_EXITED: u32 = 1;
pub const CLD_KILLED: u32 = 2;
pub const CLD_DUMPED: u32 = 3;
pub const CLD_TRAPPED: u32 = 4;
pub const CLD_STOPPED: u32 = 5;
pub const CLD_CONTINUED: u32 = 6;
pub const POLL_IN: u32 = 1;
pub const POLL_OUT: u32 = 2;
pub const POLL_MSG: u32 = 3;
pub const POLL_ERR: u32 = 4;
pub const POLL_PRI: u32 = 5;
pub const POLL_HUP: u32 = 6;
pub const SA_ONSTACK: u32 = 1;
pub const SA_RESTART: u32 = 2;
pub const SA_RESETHAND: u32 = 4;
pub const SA_NOCLDSTOP: u32 = 8;
pub const SA_NODEFER: u32 = 16;
pub const SA_NOCLDWAIT: u32 = 32;
pub const SA_SIGINFO: u32 = 64;
pub const SA_USERTRAMP: u32 = 256;
pub const SA_64REGSET: u32 = 512;
pub const SA_USERSPACE_MASK: u32 = 127;
pub const SIG_BLOCK: u32 = 1;
pub const SIG_UNBLOCK: u32 = 2;
pub const SIG_SETMASK: u32 = 3;
pub const SI_USER: u32 = 65537;
pub const SI_QUEUE: u32 = 65538;
pub const SI_TIMER: u32 = 65539;
pub const SI_ASYNCIO: u32 = 65540;
pub const SI_MESGQ: u32 = 65541;
pub const SS_ONSTACK: u32 = 1;
pub const SS_DISABLE: u32 = 4;
pub const MINSIGSTKSZ: u32 = 32768;
pub const SIGSTKSZ: u32 = 131072;
pub const SV_ONSTACK: u32 = 1;
pub const SV_INTERRUPT: u32 = 2;
pub const SV_RESETHAND: u32 = 4;
pub const SV_NODEFER: u32 = 16;
pub const SV_NOCLDSTOP: u32 = 8;
pub const SV_SIGINFO: u32 = 64;
pub const __WORDSIZE: u32 = 64;
pub const INT8_MAX: u32 = 127;
pub const INT16_MAX: u32 = 32767;
pub const INT32_MAX: u32 = 2147483647;
pub const INT64_MAX: u64 = 9223372036854775807;
pub const INT8_MIN: i32 = -128;
pub const INT16_MIN: i32 = -32768;
pub const INT32_MIN: i32 = -2147483648;
pub const INT64_MIN: i64 = -9223372036854775808;
pub const UINT8_MAX: u32 = 255;
pub const UINT16_MAX: u32 = 65535;
pub const UINT32_MAX: u32 = 4294967295;
pub const UINT64_MAX: i32 = -1;
pub const INT_LEAST8_MIN: i32 = -128;
pub const INT_LEAST16_MIN: i32 = -32768;
pub const INT_LEAST32_MIN: i32 = -2147483648;
pub const INT_LEAST64_MIN: i64 = -9223372036854775808;
pub const INT_LEAST8_MAX: u32 = 127;
pub const INT_LEAST16_MAX: u32 = 32767;
pub const INT_LEAST32_MAX: u32 = 2147483647;
pub const INT_LEAST64_MAX: u64 = 9223372036854775807;
pub const UINT_LEAST8_MAX: u32 = 255;
pub const UINT_LEAST16_MAX: u32 = 65535;
pub const UINT_LEAST32_MAX: u32 = 4294967295;
pub const UINT_LEAST64_MAX: i32 = -1;
pub const INT_FAST8_MIN: i32 = -128;
pub const INT_FAST16_MIN: i32 = -32768;
pub const INT_FAST32_MIN: i32 = -2147483648;
pub const INT_FAST64_MIN: i64 = -9223372036854775808;
pub const INT_FAST8_MAX: u32 = 127;
pub const INT_FAST16_MAX: u32 = 32767;
pub const INT_FAST32_MAX: u32 = 2147483647;
pub const INT_FAST64_MAX: u64 = 9223372036854775807;
pub const UINT_FAST8_MAX: u32 = 255;
pub const UINT_FAST16_MAX: u32 = 65535;
pub const UINT_FAST32_MAX: u32 = 4294967295;
pub const UINT_FAST64_MAX: i32 = -1;
pub const INTPTR_MAX: u64 = 9223372036854775807;
pub const INTPTR_MIN: i64 = -9223372036854775808;
pub const UINTPTR_MAX: i32 = -1;
pub const SIZE_MAX: i32 = -1;
pub const RSIZE_MAX: i32 = -1;
pub const WINT_MIN: i32 = -2147483648;
pub const WINT_MAX: u32 = 2147483647;
pub const SIG_ATOMIC_MIN: i32 = -2147483648;
pub const SIG_ATOMIC_MAX: u32 = 2147483647;
pub const PRIO_PROCESS: u32 = 0;
pub const PRIO_PGRP: u32 = 1;
pub const PRIO_USER: u32 = 2;
pub const PRIO_DARWIN_THREAD: u32 = 3;
pub const PRIO_DARWIN_PROCESS: u32 = 4;
pub const PRIO_MIN: i32 = -20;
pub const PRIO_MAX: u32 = 20;
pub const PRIO_DARWIN_BG: u32 = 4096;
pub const PRIO_DARWIN_NONUI: u32 = 4097;
pub const RUSAGE_SELF: u32 = 0;
pub const RUSAGE_CHILDREN: i32 = -1;
pub const RUSAGE_INFO_V0: u32 = 0;
pub const RUSAGE_INFO_V1: u32 = 1;
pub const RUSAGE_INFO_V2: u32 = 2;
pub const RUSAGE_INFO_V3: u32 = 3;
pub const RUSAGE_INFO_V4: u32 = 4;
pub const RUSAGE_INFO_V5: u32 = 5;
pub const RUSAGE_INFO_V6: u32 = 6;
pub const RUSAGE_INFO_CURRENT: u32 = 6;
pub const RU_PROC_RUNS_RESLIDE: u32 = 1;
pub const RLIMIT_CPU: u32 = 0;
pub const RLIMIT_FSIZE: u32 = 1;
pub const RLIMIT_DATA: u32 = 2;
pub const RLIMIT_STACK: u32 = 3;
pub const RLIMIT_CORE: u32 = 4;
pub const RLIMIT_AS: u32 = 5;
pub const RLIMIT_RSS: u32 = 5;
pub const RLIMIT_MEMLOCK: u32 = 6;
pub const RLIMIT_NPROC: u32 = 7;
pub const RLIMIT_NOFILE: u32 = 8;
pub const RLIM_NLIMITS: u32 = 9;
pub const _RLIMIT_POSIX_FLAG: u32 = 4096;
pub const RLIMIT_WAKEUPS_MONITOR: u32 = 1;
pub const RLIMIT_CPU_USAGE_MONITOR: u32 = 2;
pub const RLIMIT_THREAD_CPULIMITS: u32 = 3;
pub const RLIMIT_FOOTPRINT_INTERVAL: u32 = 4;
pub const WAKEMON_ENABLE: u32 = 1;
pub const WAKEMON_DISABLE: u32 = 2;
pub const WAKEMON_GET_PARAMS: u32 = 4;
pub const WAKEMON_SET_DEFAULTS: u32 = 8;
pub const WAKEMON_MAKE_FATAL: u32 = 16;
pub const CPUMON_MAKE_FATAL: u32 = 4096;
pub const FOOTPRINT_INTERVAL_RESET: u32 = 1;
pub const IOPOL_TYPE_DISK: u32 = 0;
pub const IOPOL_TYPE_VFS_ATIME_UPDATES: u32 = 2;
pub const IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES: u32 = 3;
pub const IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME: u32 = 4;
pub const IOPOL_TYPE_VFS_TRIGGER_RESOLVE: u32 = 5;
pub const IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION: u32 = 6;
pub const IOPOL_TYPE_VFS_IGNORE_PERMISSIONS: u32 = 7;
pub const IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE: u32 = 8;
pub const IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES: u32 = 9;
pub const IOPOL_TYPE_VFS_DISALLOW_RW_FOR_O_EVTONLY: u32 = 10;
pub const IOPOL_SCOPE_PROCESS: u32 = 0;
pub const IOPOL_SCOPE_THREAD: u32 = 1;
pub const IOPOL_SCOPE_DARWIN_BG: u32 = 2;
pub const IOPOL_DEFAULT: u32 = 0;
pub const IOPOL_IMPORTANT: u32 = 1;
pub const IOPOL_PASSIVE: u32 = 2;
pub const IOPOL_THROTTLE: u32 = 3;
pub const IOPOL_UTILITY: u32 = 4;
pub const IOPOL_STANDARD: u32 = 5;
pub const IOPOL_APPLICATION: u32 = 5;
pub const IOPOL_NORMAL: u32 = 1;
pub const IOPOL_ATIME_UPDATES_DEFAULT: u32 = 0;
pub const IOPOL_ATIME_UPDATES_OFF: u32 = 1;
pub const IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT: u32 = 0;
pub const IOPOL_MATERIALIZE_DATALESS_FILES_OFF: u32 = 1;
pub const IOPOL_MATERIALIZE_DATALESS_FILES_ON: u32 = 2;
pub const IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT: u32 = 0;
pub const IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME: u32 = 1;
pub const IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT: u32 = 0;
pub const IOPOL_VFS_TRIGGER_RESOLVE_OFF: u32 = 1;
pub const IOPOL_VFS_CONTENT_PROTECTION_DEFAULT: u32 = 0;
pub const IOPOL_VFS_CONTENT_PROTECTION_IGNORE: u32 = 1;
pub const IOPOL_VFS_IGNORE_PERMISSIONS_OFF: u32 = 0;
pub const IOPOL_VFS_IGNORE_PERMISSIONS_ON: u32 = 1;
pub const IOPOL_VFS_SKIP_MTIME_UPDATE_OFF: u32 = 0;
pub const IOPOL_VFS_SKIP_MTIME_UPDATE_ON: u32 = 1;
pub const IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_OFF: u32 = 0;
pub const IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON: u32 = 1;
pub const IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_DEFAULT: u32 = 0;
pub const IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_ON: u32 = 1;
pub const WNOHANG: u32 = 1;
pub const WUNTRACED: u32 = 2;
pub const WCOREFLAG: u32 = 128;
pub const _WSTOPPED: u32 = 127;
pub const WEXITED: u32 = 4;
pub const WSTOPPED: u32 = 8;
pub const WCONTINUED: u32 = 16;
pub const WNOWAIT: u32 = 32;
pub const WAIT_ANY: i32 = -1;
pub const WAIT_MYPGRP: u32 = 0;
pub const _QUAD_HIGHWORD: u32 = 1;
pub const _QUAD_LOWWORD: u32 = 0;
pub const __DARWIN_LITTLE_ENDIAN: u32 = 1234;
pub const __DARWIN_BIG_ENDIAN: u32 = 4321;
pub const __DARWIN_PDP_ENDIAN: u32 = 3412;
pub const __DARWIN_BYTE_ORDER: u32 = 1234;
pub const LITTLE_ENDIAN: u32 = 1234;
pub const BIG_ENDIAN: u32 = 4321;
pub const PDP_ENDIAN: u32 = 3412;
pub const BYTE_ORDER: u32 = 1234;
pub const EXIT_FAILURE: u32 = 1;
pub const EXIT_SUCCESS: u32 = 0;
pub const RAND_MAX: u32 = 2147483647;
pub const HS_SUCCESS: u32 = 0;
pub const HS_INVALID: i32 = -1;
pub const HS_NOMEM: i32 = -2;
pub const HS_SCAN_TERMINATED: i32 = -3;
pub const HS_COMPILER_ERROR: i32 = -4;
pub const HS_DB_VERSION_ERROR: i32 = -5;
pub const HS_DB_PLATFORM_ERROR: i32 = -6;
pub const HS_DB_MODE_ERROR: i32 = -7;
pub const HS_BAD_ALIGN: i32 = -8;
pub const HS_BAD_ALLOC: i32 = -9;
pub const HS_SCRATCH_IN_USE: i32 = -10;
pub const HS_ARCH_ERROR: i32 = -11;
pub const HS_INSUFFICIENT_SPACE: i32 = -12;
pub const HS_UNKNOWN_ERROR: i32 = -13;
pub const HS_EXT_FLAG_MIN_OFFSET: u32 = 1;
pub const HS_EXT_FLAG_MAX_OFFSET: u32 = 2;
pub const HS_EXT_FLAG_MIN_LENGTH: u32 = 4;
pub const HS_EXT_FLAG_EDIT_DISTANCE: u32 = 8;
pub const HS_EXT_FLAG_HAMMING_DISTANCE: u32 = 16;
pub const HS_FLAG_CASELESS: u32 = 1;
pub const HS_FLAG_DOTALL: u32 = 2;
pub const HS_FLAG_MULTILINE: u32 = 4;
pub const HS_FLAG_SINGLEMATCH: u32 = 8;
pub const HS_FLAG_ALLOWEMPTY: u32 = 16;
pub const HS_FLAG_UTF8: u32 = 32;
pub const HS_FLAG_UCP: u32 = 64;
pub const HS_FLAG_PREFILTER: u32 = 128;
pub const HS_FLAG_SOM_LEFTMOST: u32 = 256;
pub const HS_FLAG_COMBINATION: u32 = 512;
pub const HS_FLAG_QUIET: u32 = 1024;
pub const HS_CPU_FEATURES_AVX2: u32 = 4;
pub const HS_CPU_FEATURES_AVX512: u32 = 8;
pub const HS_CPU_FEATURES_AVX512VBMI: u32 = 16;
pub const HS_TUNE_FAMILY_GENERIC: u32 = 0;
pub const HS_TUNE_FAMILY_SNB: u32 = 1;
pub const HS_TUNE_FAMILY_IVB: u32 = 2;
pub const HS_TUNE_FAMILY_HSW: u32 = 3;
pub const HS_TUNE_FAMILY_SLM: u32 = 4;
pub const HS_TUNE_FAMILY_BDW: u32 = 5;
pub const HS_TUNE_FAMILY_SKL: u32 = 6;
pub const HS_TUNE_FAMILY_SKX: u32 = 7;
pub const HS_TUNE_FAMILY_GLM: u32 = 8;
pub const HS_TUNE_FAMILY_ICL: u32 = 9;
pub const HS_TUNE_FAMILY_ICX: u32 = 10;
pub const HS_MODE_BLOCK: u32 = 1;
pub const HS_MODE_NOSTREAM: u32 = 1;
pub const HS_MODE_STREAM: u32 = 2;
pub const HS_MODE_VECTORED: u32 = 4;
pub const HS_MODE_SOM_HORIZON_LARGE: u32 = 16777216;
pub const HS_MODE_SOM_HORIZON_MEDIUM: u32 = 33554432;
pub const HS_MODE_SOM_HORIZON_SMALL: u32 = 67108864;
pub const HS_OFFSET_PAST_HORIZON: i32 = -1;
pub type __int8_t = ::std::os::raw::c_schar;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int16_t = ::std::os::raw::c_short;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_longlong;
pub type __uint64_t = ::std::os::raw::c_ulonglong;
pub type __darwin_intptr_t = ::std::os::raw::c_long;
pub type __darwin_natural_t = ::std::os::raw::c_uint;
pub type __darwin_ct_rune_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub union __mbstate_t {
pub __mbstate8: [::std::os::raw::c_char; 128usize],
pub _mbstateL: ::std::os::raw::c_longlong,
}
#[test]
fn bindgen_test_layout___mbstate_t() {
const UNINIT: ::std::mem::MaybeUninit<__mbstate_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__mbstate_t>(),
128usize,
concat!("Size of: ", stringify!(__mbstate_t))
);
assert_eq!(
::std::mem::align_of::<__mbstate_t>(),
8usize,
concat!("Alignment of ", stringify!(__mbstate_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__mbstate8) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__mbstate_t),
"::",
stringify!(__mbstate8)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr)._mbstateL) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__mbstate_t),
"::",
stringify!(_mbstateL)
)
);
}
pub type __darwin_mbstate_t = __mbstate_t;
pub type __darwin_ptrdiff_t = ::std::os::raw::c_long;
pub type __darwin_size_t = ::std::os::raw::c_ulong;
pub type __darwin_va_list = __builtin_va_list;
pub type __darwin_wchar_t = ::std::os::raw::c_int;
pub type __darwin_rune_t = __darwin_wchar_t;
pub type __darwin_wint_t = ::std::os::raw::c_int;
pub type __darwin_clock_t = ::std::os::raw::c_ulong;
pub type __darwin_socklen_t = __uint32_t;
pub type __darwin_ssize_t = ::std::os::raw::c_long;
pub type __darwin_time_t = ::std::os::raw::c_long;
pub type __darwin_blkcnt_t = __int64_t;
pub type __darwin_blksize_t = __int32_t;
pub type __darwin_dev_t = __int32_t;
pub type __darwin_fsblkcnt_t = ::std::os::raw::c_uint;
pub type __darwin_fsfilcnt_t = ::std::os::raw::c_uint;
pub type __darwin_gid_t = __uint32_t;
pub type __darwin_id_t = __uint32_t;
pub type __darwin_ino64_t = __uint64_t;
pub type __darwin_ino_t = __darwin_ino64_t;
pub type __darwin_mach_port_name_t = __darwin_natural_t;
pub type __darwin_mach_port_t = __darwin_mach_port_name_t;
pub type __darwin_mode_t = __uint16_t;
pub type __darwin_off_t = __int64_t;
pub type __darwin_pid_t = __int32_t;
pub type __darwin_sigset_t = __uint32_t;
pub type __darwin_suseconds_t = __int32_t;
pub type __darwin_uid_t = __uint32_t;
pub type __darwin_useconds_t = __uint32_t;
pub type __darwin_uuid_t = [::std::os::raw::c_uchar; 16usize];
pub type __darwin_uuid_string_t = [::std::os::raw::c_char; 37usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __darwin_pthread_handler_rec {
pub __routine: ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>,
pub __arg: *mut ::std::os::raw::c_void,
pub __next: *mut __darwin_pthread_handler_rec,
}
#[test]
fn bindgen_test_layout___darwin_pthread_handler_rec() {
const UNINIT: ::std::mem::MaybeUninit<__darwin_pthread_handler_rec> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__darwin_pthread_handler_rec>(),
24usize,
concat!("Size of: ", stringify!(__darwin_pthread_handler_rec))
);
assert_eq!(
::std::mem::align_of::<__darwin_pthread_handler_rec>(),
8usize,
concat!("Alignment of ", stringify!(__darwin_pthread_handler_rec))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__routine) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__darwin_pthread_handler_rec),
"::",
stringify!(__routine)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__arg) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__darwin_pthread_handler_rec),
"::",
stringify!(__arg)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__next) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__darwin_pthread_handler_rec),
"::",
stringify!(__next)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_attr_t {
pub __sig: ::std::os::raw::c_long,
pub __opaque: [::std::os::raw::c_char; 56usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_attr_t() {
const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_attr_t> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_opaque_pthread_attr_t>(),
64usize,
concat!("Size of: ", stringify!(_opaque_pthread_attr_t))
);
assert_eq!(
::std::mem::align_of::<_opaque_pthread_attr_t>(),
8usize,
concat!("Alignment of ", stringify!(_opaque_pthread_attr_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_attr_t),
"::",
stringify!(__sig)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_attr_t),
"::",
stringify!(__opaque)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_cond_t {
pub __sig: ::std::os::raw::c_long,
pub __opaque: [::std::os::raw::c_char; 40usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_cond_t() {
const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_cond_t> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_opaque_pthread_cond_t>(),
48usize,
concat!("Size of: ", stringify!(_opaque_pthread_cond_t))
);
assert_eq!(
::std::mem::align_of::<_opaque_pthread_cond_t>(),
8usize,
concat!("Alignment of ", stringify!(_opaque_pthread_cond_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_cond_t),
"::",
stringify!(__sig)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_cond_t),
"::",
stringify!(__opaque)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_condattr_t {
pub __sig: ::std::os::raw::c_long,
pub __opaque: [::std::os::raw::c_char; 8usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_condattr_t() {
const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_condattr_t> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_opaque_pthread_condattr_t>(),
16usize,
concat!("Size of: ", stringify!(_opaque_pthread_condattr_t))
);
assert_eq!(
::std::mem::align_of::<_opaque_pthread_condattr_t>(),
8usize,
concat!("Alignment of ", stringify!(_opaque_pthread_condattr_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_condattr_t),
"::",
stringify!(__sig)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_condattr_t),
"::",
stringify!(__opaque)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_mutex_t {
pub __sig: ::std::os::raw::c_long,
pub __opaque: [::std::os::raw::c_char; 56usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_mutex_t() {
const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_mutex_t> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_opaque_pthread_mutex_t>(),
64usize,
concat!("Size of: ", stringify!(_opaque_pthread_mutex_t))
);
assert_eq!(
::std::mem::align_of::<_opaque_pthread_mutex_t>(),
8usize,
concat!("Alignment of ", stringify!(_opaque_pthread_mutex_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_mutex_t),
"::",
stringify!(__sig)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_mutex_t),
"::",
stringify!(__opaque)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_mutexattr_t {
pub __sig: ::std::os::raw::c_long,
pub __opaque: [::std::os::raw::c_char; 8usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_mutexattr_t() {
const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_mutexattr_t> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_opaque_pthread_mutexattr_t>(),
16usize,
concat!("Size of: ", stringify!(_opaque_pthread_mutexattr_t))
);
assert_eq!(
::std::mem::align_of::<_opaque_pthread_mutexattr_t>(),
8usize,
concat!("Alignment of ", stringify!(_opaque_pthread_mutexattr_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_mutexattr_t),
"::",
stringify!(__sig)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_mutexattr_t),
"::",
stringify!(__opaque)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_once_t {
pub __sig: ::std::os::raw::c_long,
pub __opaque: [::std::os::raw::c_char; 8usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_once_t() {
const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_once_t> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_opaque_pthread_once_t>(),
16usize,
concat!("Size of: ", stringify!(_opaque_pthread_once_t))
);
assert_eq!(
::std::mem::align_of::<_opaque_pthread_once_t>(),
8usize,
concat!("Alignment of ", stringify!(_opaque_pthread_once_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_once_t),
"::",
stringify!(__sig)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_once_t),
"::",
stringify!(__opaque)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_rwlock_t {
pub __sig: ::std::os::raw::c_long,
pub __opaque: [::std::os::raw::c_char; 192usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_rwlock_t() {
const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_rwlock_t> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_opaque_pthread_rwlock_t>(),
200usize,
concat!("Size of: ", stringify!(_opaque_pthread_rwlock_t))
);
assert_eq!(
::std::mem::align_of::<_opaque_pthread_rwlock_t>(),
8usize,
concat!("Alignment of ", stringify!(_opaque_pthread_rwlock_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_rwlock_t),
"::",
stringify!(__sig)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_rwlock_t),
"::",
stringify!(__opaque)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_rwlockattr_t {
pub __sig: ::std::os::raw::c_long,
pub __opaque: [::std::os::raw::c_char; 16usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_rwlockattr_t() {
const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_rwlockattr_t> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_opaque_pthread_rwlockattr_t>(),
24usize,
concat!("Size of: ", stringify!(_opaque_pthread_rwlockattr_t))
);
assert_eq!(
::std::mem::align_of::<_opaque_pthread_rwlockattr_t>(),
8usize,
concat!("Alignment of ", stringify!(_opaque_pthread_rwlockattr_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_rwlockattr_t),
"::",
stringify!(__sig)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_rwlockattr_t),
"::",
stringify!(__opaque)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _opaque_pthread_t {
pub __sig: ::std::os::raw::c_long,
pub __cleanup_stack: *mut __darwin_pthread_handler_rec,
pub __opaque: [::std::os::raw::c_char; 8176usize],
}
#[test]
fn bindgen_test_layout__opaque_pthread_t() {
const UNINIT: ::std::mem::MaybeUninit<_opaque_pthread_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_opaque_pthread_t>(),
8192usize,
concat!("Size of: ", stringify!(_opaque_pthread_t))
);
assert_eq!(
::std::mem::align_of::<_opaque_pthread_t>(),
8usize,
concat!("Alignment of ", stringify!(_opaque_pthread_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__sig) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_t),
"::",
stringify!(__sig)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__cleanup_stack) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_t),
"::",
stringify!(__cleanup_stack)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__opaque) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(_opaque_pthread_t),
"::",
stringify!(__opaque)
)
);
}
pub type __darwin_pthread_attr_t = _opaque_pthread_attr_t;
pub type __darwin_pthread_cond_t = _opaque_pthread_cond_t;
pub type __darwin_pthread_condattr_t = _opaque_pthread_condattr_t;
pub type __darwin_pthread_key_t = ::std::os::raw::c_ulong;
pub type __darwin_pthread_mutex_t = _opaque_pthread_mutex_t;
pub type __darwin_pthread_mutexattr_t = _opaque_pthread_mutexattr_t;
pub type __darwin_pthread_once_t = _opaque_pthread_once_t;
pub type __darwin_pthread_rwlock_t = _opaque_pthread_rwlock_t;
pub type __darwin_pthread_rwlockattr_t = _opaque_pthread_rwlockattr_t;
pub type __darwin_pthread_t = *mut _opaque_pthread_t;
pub type __darwin_nl_item = ::std::os::raw::c_int;
pub type __darwin_wctrans_t = ::std::os::raw::c_int;
pub type __darwin_wctype_t = __uint32_t;
pub const idtype_t_P_ALL: idtype_t = 0;
pub const idtype_t_P_PID: idtype_t = 1;
pub const idtype_t_P_PGID: idtype_t = 2;
pub type idtype_t = ::std::os::raw::c_uint;
pub type pid_t = __darwin_pid_t;
pub type id_t = __darwin_id_t;
pub type sig_atomic_t = ::std::os::raw::c_int;
pub type u_int8_t = ::std::os::raw::c_uchar;
pub type u_int16_t = ::std::os::raw::c_ushort;
pub type u_int32_t = ::std::os::raw::c_uint;
pub type u_int64_t = ::std::os::raw::c_ulonglong;
pub type register_t = i64;
pub type user_addr_t = u_int64_t;
pub type user_size_t = u_int64_t;
pub type user_ssize_t = i64;
pub type user_long_t = i64;
pub type user_ulong_t = u_int64_t;
pub type user_time_t = i64;
pub type user_off_t = i64;
pub type syscall_arg_t = u_int64_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __darwin_arm_exception_state {
pub __exception: __uint32_t,
pub __fsr: __uint32_t,
pub __far: __uint32_t,
}
#[test]
fn bindgen_test_layout___darwin_arm_exception_state() {
const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_exception_state> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__darwin_arm_exception_state>(),
12usize,
concat!("Size of: ", stringify!(__darwin_arm_exception_state))
);
assert_eq!(
::std::mem::align_of::<__darwin_arm_exception_state>(),
4usize,
concat!("Alignment of ", stringify!(__darwin_arm_exception_state))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__exception) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_exception_state),
"::",
stringify!(__exception)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__fsr) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_exception_state),
"::",
stringify!(__fsr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__far) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_exception_state),
"::",
stringify!(__far)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __darwin_arm_exception_state64 {
pub __far: __uint64_t,
pub __esr: __uint32_t,
pub __exception: __uint32_t,
}
#[test]
fn bindgen_test_layout___darwin_arm_exception_state64() {
const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_exception_state64> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__darwin_arm_exception_state64>(),
16usize,
concat!("Size of: ", stringify!(__darwin_arm_exception_state64))
);
assert_eq!(
::std::mem::align_of::<__darwin_arm_exception_state64>(),
8usize,
concat!("Alignment of ", stringify!(__darwin_arm_exception_state64))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__far) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_exception_state64),
"::",
stringify!(__far)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__esr) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_exception_state64),
"::",
stringify!(__esr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__exception) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_exception_state64),
"::",
stringify!(__exception)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __darwin_arm_thread_state {
pub __r: [__uint32_t; 13usize],
pub __sp: __uint32_t,
pub __lr: __uint32_t,
pub __pc: __uint32_t,
pub __cpsr: __uint32_t,
}
#[test]
fn bindgen_test_layout___darwin_arm_thread_state() {
const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_thread_state> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__darwin_arm_thread_state>(),
68usize,
concat!("Size of: ", stringify!(__darwin_arm_thread_state))
);
assert_eq!(
::std::mem::align_of::<__darwin_arm_thread_state>(),
4usize,
concat!("Alignment of ", stringify!(__darwin_arm_thread_state))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__r) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_thread_state),
"::",
stringify!(__r)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__sp) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_thread_state),
"::",
stringify!(__sp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__lr) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_thread_state),
"::",
stringify!(__lr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__pc) as usize - ptr as usize },
60usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_thread_state),
"::",
stringify!(__pc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__cpsr) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_thread_state),
"::",
stringify!(__cpsr)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __darwin_arm_thread_state64 {
pub __x: [__uint64_t; 29usize],
pub __fp: __uint64_t,
pub __lr: __uint64_t,
pub __sp: __uint64_t,
pub __pc: __uint64_t,
pub __cpsr: __uint32_t,
pub __pad: __uint32_t,
}
#[test]
fn bindgen_test_layout___darwin_arm_thread_state64() {
const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_thread_state64> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__darwin_arm_thread_state64>(),
272usize,
concat!("Size of: ", stringify!(__darwin_arm_thread_state64))
);
assert_eq!(
::std::mem::align_of::<__darwin_arm_thread_state64>(),
8usize,
concat!("Alignment of ", stringify!(__darwin_arm_thread_state64))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__x) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_thread_state64),
"::",
stringify!(__x)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__fp) as usize - ptr as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_thread_state64),
"::",
stringify!(__fp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__lr) as usize - ptr as usize },
240usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_thread_state64),
"::",
stringify!(__lr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__sp) as usize - ptr as usize },
248usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_thread_state64),
"::",
stringify!(__sp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__pc) as usize - ptr as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_thread_state64),
"::",
stringify!(__pc)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__cpsr) as usize - ptr as usize },
264usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_thread_state64),
"::",
stringify!(__cpsr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__pad) as usize - ptr as usize },
268usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_thread_state64),
"::",
stringify!(__pad)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __darwin_arm_vfp_state {
pub __r: [__uint32_t; 64usize],
pub __fpscr: __uint32_t,
}
#[test]
fn bindgen_test_layout___darwin_arm_vfp_state() {
const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_vfp_state> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__darwin_arm_vfp_state>(),
260usize,
concat!("Size of: ", stringify!(__darwin_arm_vfp_state))
);
assert_eq!(
::std::mem::align_of::<__darwin_arm_vfp_state>(),
4usize,
concat!("Alignment of ", stringify!(__darwin_arm_vfp_state))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__r) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_vfp_state),
"::",
stringify!(__r)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__fpscr) as usize - ptr as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_vfp_state),
"::",
stringify!(__fpscr)
)
);
}
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct __darwin_arm_neon_state64 {
pub __v: [__uint128_t; 32usize],
pub __fpsr: __uint32_t,
pub __fpcr: __uint32_t,
}
#[test]
fn bindgen_test_layout___darwin_arm_neon_state64() {
const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_neon_state64> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__darwin_arm_neon_state64>(),
528usize,
concat!("Size of: ", stringify!(__darwin_arm_neon_state64))
);
assert_eq!(
::std::mem::align_of::<__darwin_arm_neon_state64>(),
16usize,
concat!("Alignment of ", stringify!(__darwin_arm_neon_state64))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__v) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_neon_state64),
"::",
stringify!(__v)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__fpsr) as usize - ptr as usize },
512usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_neon_state64),
"::",
stringify!(__fpsr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__fpcr) as usize - ptr as usize },
516usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_neon_state64),
"::",
stringify!(__fpcr)
)
);
}
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct __darwin_arm_neon_state {
pub __v: [__uint128_t; 16usize],
pub __fpsr: __uint32_t,
pub __fpcr: __uint32_t,
}
#[test]
fn bindgen_test_layout___darwin_arm_neon_state() {
const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_neon_state> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__darwin_arm_neon_state>(),
272usize,
concat!("Size of: ", stringify!(__darwin_arm_neon_state))
);
assert_eq!(
::std::mem::align_of::<__darwin_arm_neon_state>(),
16usize,
concat!("Alignment of ", stringify!(__darwin_arm_neon_state))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__v) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_neon_state),
"::",
stringify!(__v)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__fpsr) as usize - ptr as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_neon_state),
"::",
stringify!(__fpsr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__fpcr) as usize - ptr as usize },
260usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_neon_state),
"::",
stringify!(__fpcr)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __arm_pagein_state {
pub __pagein_error: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout___arm_pagein_state() {
const UNINIT: ::std::mem::MaybeUninit<__arm_pagein_state> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__arm_pagein_state>(),
4usize,
concat!("Size of: ", stringify!(__arm_pagein_state))
);
assert_eq!(
::std::mem::align_of::<__arm_pagein_state>(),
4usize,
concat!("Alignment of ", stringify!(__arm_pagein_state))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__pagein_error) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__arm_pagein_state),
"::",
stringify!(__pagein_error)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __arm_legacy_debug_state {
pub __bvr: [__uint32_t; 16usize],
pub __bcr: [__uint32_t; 16usize],
pub __wvr: [__uint32_t; 16usize],
pub __wcr: [__uint32_t; 16usize],
}
#[test]
fn bindgen_test_layout___arm_legacy_debug_state() {
const UNINIT: ::std::mem::MaybeUninit<__arm_legacy_debug_state> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__arm_legacy_debug_state>(),
256usize,
concat!("Size of: ", stringify!(__arm_legacy_debug_state))
);
assert_eq!(
::std::mem::align_of::<__arm_legacy_debug_state>(),
4usize,
concat!("Alignment of ", stringify!(__arm_legacy_debug_state))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__bvr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__arm_legacy_debug_state),
"::",
stringify!(__bvr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__bcr) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(__arm_legacy_debug_state),
"::",
stringify!(__bcr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__wvr) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(__arm_legacy_debug_state),
"::",
stringify!(__wvr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__wcr) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(__arm_legacy_debug_state),
"::",
stringify!(__wcr)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __darwin_arm_debug_state32 {
pub __bvr: [__uint32_t; 16usize],
pub __bcr: [__uint32_t; 16usize],
pub __wvr: [__uint32_t; 16usize],
pub __wcr: [__uint32_t; 16usize],
pub __mdscr_el1: __uint64_t,
}
#[test]
fn bindgen_test_layout___darwin_arm_debug_state32() {
const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_debug_state32> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__darwin_arm_debug_state32>(),
264usize,
concat!("Size of: ", stringify!(__darwin_arm_debug_state32))
);
assert_eq!(
::std::mem::align_of::<__darwin_arm_debug_state32>(),
8usize,
concat!("Alignment of ", stringify!(__darwin_arm_debug_state32))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__bvr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_debug_state32),
"::",
stringify!(__bvr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__bcr) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_debug_state32),
"::",
stringify!(__bcr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__wvr) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_debug_state32),
"::",
stringify!(__wvr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__wcr) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_debug_state32),
"::",
stringify!(__wcr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__mdscr_el1) as usize - ptr as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_debug_state32),
"::",
stringify!(__mdscr_el1)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __darwin_arm_debug_state64 {
pub __bvr: [__uint64_t; 16usize],
pub __bcr: [__uint64_t; 16usize],
pub __wvr: [__uint64_t; 16usize],
pub __wcr: [__uint64_t; 16usize],
pub __mdscr_el1: __uint64_t,
}
#[test]
fn bindgen_test_layout___darwin_arm_debug_state64() {
const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_debug_state64> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__darwin_arm_debug_state64>(),
520usize,
concat!("Size of: ", stringify!(__darwin_arm_debug_state64))
);
assert_eq!(
::std::mem::align_of::<__darwin_arm_debug_state64>(),
8usize,
concat!("Alignment of ", stringify!(__darwin_arm_debug_state64))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__bvr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_debug_state64),
"::",
stringify!(__bvr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__bcr) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_debug_state64),
"::",
stringify!(__bcr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__wvr) as usize - ptr as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_debug_state64),
"::",
stringify!(__wvr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__wcr) as usize - ptr as usize },
384usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_debug_state64),
"::",
stringify!(__wcr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__mdscr_el1) as usize - ptr as usize },
512usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_debug_state64),
"::",
stringify!(__mdscr_el1)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __darwin_arm_cpmu_state64 {
pub __ctrs: [__uint64_t; 16usize],
}
#[test]
fn bindgen_test_layout___darwin_arm_cpmu_state64() {
const UNINIT: ::std::mem::MaybeUninit<__darwin_arm_cpmu_state64> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__darwin_arm_cpmu_state64>(),
128usize,
concat!("Size of: ", stringify!(__darwin_arm_cpmu_state64))
);
assert_eq!(
::std::mem::align_of::<__darwin_arm_cpmu_state64>(),
8usize,
concat!("Alignment of ", stringify!(__darwin_arm_cpmu_state64))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__ctrs) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__darwin_arm_cpmu_state64),
"::",
stringify!(__ctrs)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __darwin_mcontext32 {
pub __es: __darwin_arm_exception_state,
pub __ss: __darwin_arm_thread_state,
pub __fs: __darwin_arm_vfp_state,
}
#[test]
fn bindgen_test_layout___darwin_mcontext32() {
const UNINIT: ::std::mem::MaybeUninit<__darwin_mcontext32> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__darwin_mcontext32>(),
340usize,
concat!("Size of: ", stringify!(__darwin_mcontext32))
);
assert_eq!(
::std::mem::align_of::<__darwin_mcontext32>(),
4usize,
concat!("Alignment of ", stringify!(__darwin_mcontext32))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__es) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__darwin_mcontext32),
"::",
stringify!(__es)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__ss) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(__darwin_mcontext32),
"::",
stringify!(__ss)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__fs) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(__darwin_mcontext32),
"::",
stringify!(__fs)
)
);
}
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Copy, Clone)]
pub struct __darwin_mcontext64 {
pub __es: __darwin_arm_exception_state64,
pub __ss: __darwin_arm_thread_state64,
pub __ns: __darwin_arm_neon_state64,
}
#[test]
fn bindgen_test_layout___darwin_mcontext64() {
const UNINIT: ::std::mem::MaybeUninit<__darwin_mcontext64> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__darwin_mcontext64>(),
816usize,
concat!("Size of: ", stringify!(__darwin_mcontext64))
);
assert_eq!(
::std::mem::align_of::<__darwin_mcontext64>(),
16usize,
concat!("Alignment of ", stringify!(__darwin_mcontext64))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__es) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__darwin_mcontext64),
"::",
stringify!(__es)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__ss) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__darwin_mcontext64),
"::",
stringify!(__ss)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__ns) as usize - ptr as usize },
288usize,
concat!(
"Offset of field: ",
stringify!(__darwin_mcontext64),
"::",
stringify!(__ns)
)
);
}
pub type mcontext_t = *mut __darwin_mcontext64;
pub type pthread_attr_t = __darwin_pthread_attr_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __darwin_sigaltstack {
pub ss_sp: *mut ::std::os::raw::c_void,
pub ss_size: __darwin_size_t,
pub ss_flags: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout___darwin_sigaltstack() {
const UNINIT: ::std::mem::MaybeUninit<__darwin_sigaltstack> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__darwin_sigaltstack>(),
24usize,
concat!("Size of: ", stringify!(__darwin_sigaltstack))
);
assert_eq!(
::std::mem::align_of::<__darwin_sigaltstack>(),
8usize,
concat!("Alignment of ", stringify!(__darwin_sigaltstack))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ss_sp) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__darwin_sigaltstack),
"::",
stringify!(ss_sp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ss_size) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__darwin_sigaltstack),
"::",
stringify!(ss_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ss_flags) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__darwin_sigaltstack),
"::",
stringify!(ss_flags)
)
);
}
pub type stack_t = __darwin_sigaltstack;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __darwin_ucontext {
pub uc_onstack: ::std::os::raw::c_int,
pub uc_sigmask: __darwin_sigset_t,
pub uc_stack: __darwin_sigaltstack,
pub uc_link: *mut __darwin_ucontext,
pub uc_mcsize: __darwin_size_t,
pub uc_mcontext: *mut __darwin_mcontext64,
}
#[test]
fn bindgen_test_layout___darwin_ucontext() {
const UNINIT: ::std::mem::MaybeUninit<__darwin_ucontext> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__darwin_ucontext>(),
56usize,
concat!("Size of: ", stringify!(__darwin_ucontext))
);
assert_eq!(
::std::mem::align_of::<__darwin_ucontext>(),
8usize,
concat!("Alignment of ", stringify!(__darwin_ucontext))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).uc_onstack) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__darwin_ucontext),
"::",
stringify!(uc_onstack)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).uc_sigmask) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__darwin_ucontext),
"::",
stringify!(uc_sigmask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).uc_stack) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__darwin_ucontext),
"::",
stringify!(uc_stack)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).uc_link) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(__darwin_ucontext),
"::",
stringify!(uc_link)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).uc_mcsize) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(__darwin_ucontext),
"::",
stringify!(uc_mcsize)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).uc_mcontext) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(__darwin_ucontext),
"::",
stringify!(uc_mcontext)
)
);
}
pub type ucontext_t = __darwin_ucontext;
pub type sigset_t = __darwin_sigset_t;
pub type uid_t = __darwin_uid_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub union sigval {
pub sival_int: ::std::os::raw::c_int,
pub sival_ptr: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_sigval() {
const UNINIT: ::std::mem::MaybeUninit<sigval> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<sigval>(),
8usize,
concat!("Size of: ", stringify!(sigval))
);
assert_eq!(
::std::mem::align_of::<sigval>(),
8usize,
concat!("Alignment of ", stringify!(sigval))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sival_int) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sigval),
"::",
stringify!(sival_int)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sival_ptr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sigval),
"::",
stringify!(sival_ptr)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct sigevent {
pub sigev_notify: ::std::os::raw::c_int,
pub sigev_signo: ::std::os::raw::c_int,
pub sigev_value: sigval,
pub sigev_notify_function: ::std::option::Option<unsafe extern "C" fn(arg1: sigval)>,
pub sigev_notify_attributes: *mut pthread_attr_t,
}
#[test]
fn bindgen_test_layout_sigevent() {
const UNINIT: ::std::mem::MaybeUninit<sigevent> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<sigevent>(),
32usize,
concat!("Size of: ", stringify!(sigevent))
);
assert_eq!(
::std::mem::align_of::<sigevent>(),
8usize,
concat!("Alignment of ", stringify!(sigevent))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sigevent),
"::",
stringify!(sigev_notify)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sigev_signo) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(sigevent),
"::",
stringify!(sigev_signo)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sigev_value) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(sigevent),
"::",
stringify!(sigev_value)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify_function) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(sigevent),
"::",
stringify!(sigev_notify_function)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sigev_notify_attributes) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(sigevent),
"::",
stringify!(sigev_notify_attributes)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __siginfo {
pub si_signo: ::std::os::raw::c_int,
pub si_errno: ::std::os::raw::c_int,
pub si_code: ::std::os::raw::c_int,
pub si_pid: pid_t,
pub si_uid: uid_t,
pub si_status: ::std::os::raw::c_int,
pub si_addr: *mut ::std::os::raw::c_void,
pub si_value: sigval,
pub si_band: ::std::os::raw::c_long,
pub __pad: [::std::os::raw::c_ulong; 7usize],
}
#[test]
fn bindgen_test_layout___siginfo() {
const UNINIT: ::std::mem::MaybeUninit<__siginfo> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__siginfo>(),
104usize,
concat!("Size of: ", stringify!(__siginfo))
);
assert_eq!(
::std::mem::align_of::<__siginfo>(),
8usize,
concat!("Alignment of ", stringify!(__siginfo))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).si_signo) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__siginfo),
"::",
stringify!(si_signo)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).si_errno) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(__siginfo),
"::",
stringify!(si_errno)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).si_code) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__siginfo),
"::",
stringify!(si_code)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).si_pid) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(__siginfo),
"::",
stringify!(si_pid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).si_uid) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__siginfo),
"::",
stringify!(si_uid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).si_status) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(__siginfo),
"::",
stringify!(si_status)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).si_addr) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(__siginfo),
"::",
stringify!(si_addr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).si_value) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(__siginfo),
"::",
stringify!(si_value)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).si_band) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(__siginfo),
"::",
stringify!(si_band)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__pad) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(__siginfo),
"::",
stringify!(__pad)
)
);
}
pub type siginfo_t = __siginfo;
#[repr(C)]
#[derive(Copy, Clone)]
pub union __sigaction_u {
pub __sa_handler: ::std::option::Option<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>,
pub __sa_sigaction: ::std::option::Option<
unsafe extern "C" fn(
arg1: ::std::os::raw::c_int,
arg2: *mut __siginfo,
arg3: *mut ::std::os::raw::c_void,
),
>,
}
#[test]
fn bindgen_test_layout___sigaction_u() {
const UNINIT: ::std::mem::MaybeUninit<__sigaction_u> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__sigaction_u>(),
8usize,
concat!("Size of: ", stringify!(__sigaction_u))
);
assert_eq!(
::std::mem::align_of::<__sigaction_u>(),
8usize,
concat!("Alignment of ", stringify!(__sigaction_u))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__sa_handler) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__sigaction_u),
"::",
stringify!(__sa_handler)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__sa_sigaction) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__sigaction_u),
"::",
stringify!(__sa_sigaction)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __sigaction {
pub __sigaction_u: __sigaction_u,
pub sa_tramp: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut ::std::os::raw::c_void,
arg2: ::std::os::raw::c_int,
arg3: ::std::os::raw::c_int,
arg4: *mut siginfo_t,
arg5: *mut ::std::os::raw::c_void,
),
>,
pub sa_mask: sigset_t,
pub sa_flags: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout___sigaction() {
const UNINIT: ::std::mem::MaybeUninit<__sigaction> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<__sigaction>(),
24usize,
concat!("Size of: ", stringify!(__sigaction))
);
assert_eq!(
::std::mem::align_of::<__sigaction>(),
8usize,
concat!("Alignment of ", stringify!(__sigaction))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__sigaction_u) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(__sigaction),
"::",
stringify!(__sigaction_u)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sa_tramp) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(__sigaction),
"::",
stringify!(sa_tramp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(__sigaction),
"::",
stringify!(sa_mask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(__sigaction),
"::",
stringify!(sa_flags)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct sigaction {
pub __sigaction_u: __sigaction_u,
pub sa_mask: sigset_t,
pub sa_flags: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_sigaction() {
const UNINIT: ::std::mem::MaybeUninit<sigaction> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<sigaction>(),
16usize,
concat!("Size of: ", stringify!(sigaction))
);
assert_eq!(
::std::mem::align_of::<sigaction>(),
8usize,
concat!("Alignment of ", stringify!(sigaction))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__sigaction_u) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sigaction),
"::",
stringify!(__sigaction_u)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sa_mask) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(sigaction),
"::",
stringify!(sa_mask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sa_flags) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(sigaction),
"::",
stringify!(sa_flags)
)
);
}
pub type sig_t = ::std::option::Option<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sigvec {
pub sv_handler: ::std::option::Option<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>,
pub sv_mask: ::std::os::raw::c_int,
pub sv_flags: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_sigvec() {
const UNINIT: ::std::mem::MaybeUninit<sigvec> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<sigvec>(),
16usize,
concat!("Size of: ", stringify!(sigvec))
);
assert_eq!(
::std::mem::align_of::<sigvec>(),
8usize,
concat!("Alignment of ", stringify!(sigvec))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sv_handler) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sigvec),
"::",
stringify!(sv_handler)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sv_mask) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(sigvec),
"::",
stringify!(sv_mask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sv_flags) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(sigvec),
"::",
stringify!(sv_flags)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sigstack {
pub ss_sp: *mut ::std::os::raw::c_char,
pub ss_onstack: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_sigstack() {
const UNINIT: ::std::mem::MaybeUninit<sigstack> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<sigstack>(),
16usize,
concat!("Size of: ", stringify!(sigstack))
);
assert_eq!(
::std::mem::align_of::<sigstack>(),
8usize,
concat!("Alignment of ", stringify!(sigstack))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ss_sp) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(sigstack),
"::",
stringify!(ss_sp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ss_onstack) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(sigstack),
"::",
stringify!(ss_onstack)
)
);
}
extern "C" {
pub fn signal(
arg1: ::std::os::raw::c_int,
arg2: ::std::option::Option<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>,
) -> ::std::option::Option<
unsafe extern "C" fn(
arg1: ::std::os::raw::c_int,
arg2: ::std::option::Option<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>,
),
>;
}
pub type int_least8_t = i8;
pub type int_least16_t = i16;
pub type int_least32_t = i32;
pub type int_least64_t = i64;
pub type uint_least8_t = u8;
pub type uint_least16_t = u16;
pub type uint_least32_t = u32;
pub type uint_least64_t = u64;
pub type int_fast8_t = i8;
pub type int_fast16_t = i16;
pub type int_fast32_t = i32;
pub type int_fast64_t = i64;
pub type uint_fast8_t = u8;
pub type uint_fast16_t = u16;
pub type uint_fast32_t = u32;
pub type uint_fast64_t = u64;
pub type intmax_t = ::std::os::raw::c_long;
pub type uintmax_t = ::std::os::raw::c_ulong;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct timeval {
pub tv_sec: __darwin_time_t,
pub tv_usec: __darwin_suseconds_t,
}
#[test]
fn bindgen_test_layout_timeval() {
const UNINIT: ::std::mem::MaybeUninit<timeval> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<timeval>(),
16usize,
concat!("Size of: ", stringify!(timeval))
);
assert_eq!(
::std::mem::align_of::<timeval>(),
8usize,
concat!("Alignment of ", stringify!(timeval))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(timeval),
"::",
stringify!(tv_sec)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(timeval),
"::",
stringify!(tv_usec)
)
);
}
pub type rlim_t = __uint64_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rusage {
pub ru_utime: timeval,
pub ru_stime: timeval,
pub ru_maxrss: ::std::os::raw::c_long,
pub ru_ixrss: ::std::os::raw::c_long,
pub ru_idrss: ::std::os::raw::c_long,
pub ru_isrss: ::std::os::raw::c_long,
pub ru_minflt: ::std::os::raw::c_long,
pub ru_majflt: ::std::os::raw::c_long,
pub ru_nswap: ::std::os::raw::c_long,
pub ru_inblock: ::std::os::raw::c_long,
pub ru_oublock: ::std::os::raw::c_long,
pub ru_msgsnd: ::std::os::raw::c_long,
pub ru_msgrcv: ::std::os::raw::c_long,
pub ru_nsignals: ::std::os::raw::c_long,
pub ru_nvcsw: ::std::os::raw::c_long,
pub ru_nivcsw: ::std::os::raw::c_long,
}
#[test]
fn bindgen_test_layout_rusage() {
const UNINIT: ::std::mem::MaybeUninit<rusage> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<rusage>(),
144usize,
concat!("Size of: ", stringify!(rusage))
);
assert_eq!(
::std::mem::align_of::<rusage>(),
8usize,
concat!("Alignment of ", stringify!(rusage))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ru_utime) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rusage),
"::",
stringify!(ru_utime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ru_stime) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(rusage),
"::",
stringify!(ru_stime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ru_maxrss) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(rusage),
"::",
stringify!(ru_maxrss)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ru_ixrss) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(rusage),
"::",
stringify!(ru_ixrss)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ru_idrss) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(rusage),
"::",
stringify!(ru_idrss)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ru_isrss) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(rusage),
"::",
stringify!(ru_isrss)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ru_minflt) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(rusage),
"::",
stringify!(ru_minflt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ru_majflt) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(rusage),
"::",
stringify!(ru_majflt)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ru_nswap) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(rusage),
"::",
stringify!(ru_nswap)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ru_inblock) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(rusage),
"::",
stringify!(ru_inblock)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ru_oublock) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(rusage),
"::",
stringify!(ru_oublock)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ru_msgsnd) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(rusage),
"::",
stringify!(ru_msgsnd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ru_msgrcv) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(rusage),
"::",
stringify!(ru_msgrcv)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ru_nsignals) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(rusage),
"::",
stringify!(ru_nsignals)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ru_nvcsw) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(rusage),
"::",
stringify!(ru_nvcsw)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ru_nivcsw) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(rusage),
"::",
stringify!(ru_nivcsw)
)
);
}
pub type rusage_info_t = *mut ::std::os::raw::c_void;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rusage_info_v0 {
pub ri_uuid: [u8; 16usize],
pub ri_user_time: u64,
pub ri_system_time: u64,
pub ri_pkg_idle_wkups: u64,
pub ri_interrupt_wkups: u64,
pub ri_pageins: u64,
pub ri_wired_size: u64,
pub ri_resident_size: u64,
pub ri_phys_footprint: u64,
pub ri_proc_start_abstime: u64,
pub ri_proc_exit_abstime: u64,
}
#[test]
fn bindgen_test_layout_rusage_info_v0() {
const UNINIT: ::std::mem::MaybeUninit<rusage_info_v0> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<rusage_info_v0>(),
96usize,
concat!("Size of: ", stringify!(rusage_info_v0))
);
assert_eq!(
::std::mem::align_of::<rusage_info_v0>(),
8usize,
concat!("Alignment of ", stringify!(rusage_info_v0))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v0),
"::",
stringify!(ri_uuid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v0),
"::",
stringify!(ri_user_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v0),
"::",
stringify!(ri_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v0),
"::",
stringify!(ri_pkg_idle_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v0),
"::",
stringify!(ri_interrupt_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v0),
"::",
stringify!(ri_pageins)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v0),
"::",
stringify!(ri_wired_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v0),
"::",
stringify!(ri_resident_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v0),
"::",
stringify!(ri_phys_footprint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v0),
"::",
stringify!(ri_proc_start_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v0),
"::",
stringify!(ri_proc_exit_abstime)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rusage_info_v1 {
pub ri_uuid: [u8; 16usize],
pub ri_user_time: u64,
pub ri_system_time: u64,
pub ri_pkg_idle_wkups: u64,
pub ri_interrupt_wkups: u64,
pub ri_pageins: u64,
pub ri_wired_size: u64,
pub ri_resident_size: u64,
pub ri_phys_footprint: u64,
pub ri_proc_start_abstime: u64,
pub ri_proc_exit_abstime: u64,
pub ri_child_user_time: u64,
pub ri_child_system_time: u64,
pub ri_child_pkg_idle_wkups: u64,
pub ri_child_interrupt_wkups: u64,
pub ri_child_pageins: u64,
pub ri_child_elapsed_abstime: u64,
}
#[test]
fn bindgen_test_layout_rusage_info_v1() {
const UNINIT: ::std::mem::MaybeUninit<rusage_info_v1> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<rusage_info_v1>(),
144usize,
concat!("Size of: ", stringify!(rusage_info_v1))
);
assert_eq!(
::std::mem::align_of::<rusage_info_v1>(),
8usize,
concat!("Alignment of ", stringify!(rusage_info_v1))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_uuid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_user_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_pkg_idle_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_interrupt_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_pageins)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_wired_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_resident_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_phys_footprint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_proc_start_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_proc_exit_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_child_user_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_child_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_child_pkg_idle_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_child_interrupt_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_child_pageins)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v1),
"::",
stringify!(ri_child_elapsed_abstime)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rusage_info_v2 {
pub ri_uuid: [u8; 16usize],
pub ri_user_time: u64,
pub ri_system_time: u64,
pub ri_pkg_idle_wkups: u64,
pub ri_interrupt_wkups: u64,
pub ri_pageins: u64,
pub ri_wired_size: u64,
pub ri_resident_size: u64,
pub ri_phys_footprint: u64,
pub ri_proc_start_abstime: u64,
pub ri_proc_exit_abstime: u64,
pub ri_child_user_time: u64,
pub ri_child_system_time: u64,
pub ri_child_pkg_idle_wkups: u64,
pub ri_child_interrupt_wkups: u64,
pub ri_child_pageins: u64,
pub ri_child_elapsed_abstime: u64,
pub ri_diskio_bytesread: u64,
pub ri_diskio_byteswritten: u64,
}
#[test]
fn bindgen_test_layout_rusage_info_v2() {
const UNINIT: ::std::mem::MaybeUninit<rusage_info_v2> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<rusage_info_v2>(),
160usize,
concat!("Size of: ", stringify!(rusage_info_v2))
);
assert_eq!(
::std::mem::align_of::<rusage_info_v2>(),
8usize,
concat!("Alignment of ", stringify!(rusage_info_v2))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_uuid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_user_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_pkg_idle_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_interrupt_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_pageins)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_wired_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_resident_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_phys_footprint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_proc_start_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_proc_exit_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_child_user_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_child_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_child_pkg_idle_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_child_interrupt_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_child_pageins)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_child_elapsed_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_bytesread) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_diskio_bytesread)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_byteswritten) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v2),
"::",
stringify!(ri_diskio_byteswritten)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rusage_info_v3 {
pub ri_uuid: [u8; 16usize],
pub ri_user_time: u64,
pub ri_system_time: u64,
pub ri_pkg_idle_wkups: u64,
pub ri_interrupt_wkups: u64,
pub ri_pageins: u64,
pub ri_wired_size: u64,
pub ri_resident_size: u64,
pub ri_phys_footprint: u64,
pub ri_proc_start_abstime: u64,
pub ri_proc_exit_abstime: u64,
pub ri_child_user_time: u64,
pub ri_child_system_time: u64,
pub ri_child_pkg_idle_wkups: u64,
pub ri_child_interrupt_wkups: u64,
pub ri_child_pageins: u64,
pub ri_child_elapsed_abstime: u64,
pub ri_diskio_bytesread: u64,
pub ri_diskio_byteswritten: u64,
pub ri_cpu_time_qos_default: u64,
pub ri_cpu_time_qos_maintenance: u64,
pub ri_cpu_time_qos_background: u64,
pub ri_cpu_time_qos_utility: u64,
pub ri_cpu_time_qos_legacy: u64,
pub ri_cpu_time_qos_user_initiated: u64,
pub ri_cpu_time_qos_user_interactive: u64,
pub ri_billed_system_time: u64,
pub ri_serviced_system_time: u64,
}
#[test]
fn bindgen_test_layout_rusage_info_v3() {
const UNINIT: ::std::mem::MaybeUninit<rusage_info_v3> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<rusage_info_v3>(),
232usize,
concat!("Size of: ", stringify!(rusage_info_v3))
);
assert_eq!(
::std::mem::align_of::<rusage_info_v3>(),
8usize,
concat!("Alignment of ", stringify!(rusage_info_v3))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_uuid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_user_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_pkg_idle_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_interrupt_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_pageins)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_wired_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_resident_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_phys_footprint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_proc_start_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_proc_exit_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_child_user_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_child_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_child_pkg_idle_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_child_interrupt_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_child_pageins)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_child_elapsed_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_bytesread) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_diskio_bytesread)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_byteswritten) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_diskio_byteswritten)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_default) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_cpu_time_qos_default)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_maintenance) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_cpu_time_qos_maintenance)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_background) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_cpu_time_qos_background)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_utility) as usize - ptr as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_cpu_time_qos_utility)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_legacy) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_cpu_time_qos_legacy)
)
);
assert_eq!(
unsafe {
::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_initiated) as usize - ptr as usize
},
200usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_cpu_time_qos_user_initiated)
)
);
assert_eq!(
unsafe {
::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_interactive) as usize - ptr as usize
},
208usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_cpu_time_qos_user_interactive)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_system_time) as usize - ptr as usize },
216usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_billed_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_system_time) as usize - ptr as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v3),
"::",
stringify!(ri_serviced_system_time)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rusage_info_v4 {
pub ri_uuid: [u8; 16usize],
pub ri_user_time: u64,
pub ri_system_time: u64,
pub ri_pkg_idle_wkups: u64,
pub ri_interrupt_wkups: u64,
pub ri_pageins: u64,
pub ri_wired_size: u64,
pub ri_resident_size: u64,
pub ri_phys_footprint: u64,
pub ri_proc_start_abstime: u64,
pub ri_proc_exit_abstime: u64,
pub ri_child_user_time: u64,
pub ri_child_system_time: u64,
pub ri_child_pkg_idle_wkups: u64,
pub ri_child_interrupt_wkups: u64,
pub ri_child_pageins: u64,
pub ri_child_elapsed_abstime: u64,
pub ri_diskio_bytesread: u64,
pub ri_diskio_byteswritten: u64,
pub ri_cpu_time_qos_default: u64,
pub ri_cpu_time_qos_maintenance: u64,
pub ri_cpu_time_qos_background: u64,
pub ri_cpu_time_qos_utility: u64,
pub ri_cpu_time_qos_legacy: u64,
pub ri_cpu_time_qos_user_initiated: u64,
pub ri_cpu_time_qos_user_interactive: u64,
pub ri_billed_system_time: u64,
pub ri_serviced_system_time: u64,
pub ri_logical_writes: u64,
pub ri_lifetime_max_phys_footprint: u64,
pub ri_instructions: u64,
pub ri_cycles: u64,
pub ri_billed_energy: u64,
pub ri_serviced_energy: u64,
pub ri_interval_max_phys_footprint: u64,
pub ri_runnable_time: u64,
}
#[test]
fn bindgen_test_layout_rusage_info_v4() {
const UNINIT: ::std::mem::MaybeUninit<rusage_info_v4> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<rusage_info_v4>(),
296usize,
concat!("Size of: ", stringify!(rusage_info_v4))
);
assert_eq!(
::std::mem::align_of::<rusage_info_v4>(),
8usize,
concat!("Alignment of ", stringify!(rusage_info_v4))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_uuid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_user_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_pkg_idle_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_interrupt_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_pageins)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_wired_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_resident_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_phys_footprint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_proc_start_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_proc_exit_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_child_user_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_child_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_child_pkg_idle_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_child_interrupt_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_child_pageins)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_child_elapsed_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_bytesread) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_diskio_bytesread)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_byteswritten) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_diskio_byteswritten)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_default) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_cpu_time_qos_default)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_maintenance) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_cpu_time_qos_maintenance)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_background) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_cpu_time_qos_background)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_utility) as usize - ptr as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_cpu_time_qos_utility)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_legacy) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_cpu_time_qos_legacy)
)
);
assert_eq!(
unsafe {
::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_initiated) as usize - ptr as usize
},
200usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_cpu_time_qos_user_initiated)
)
);
assert_eq!(
unsafe {
::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_interactive) as usize - ptr as usize
},
208usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_cpu_time_qos_user_interactive)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_system_time) as usize - ptr as usize },
216usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_billed_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_system_time) as usize - ptr as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_serviced_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_logical_writes) as usize - ptr as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_logical_writes)
)
);
assert_eq!(
unsafe {
::std::ptr::addr_of!((*ptr).ri_lifetime_max_phys_footprint) as usize - ptr as usize
},
240usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_lifetime_max_phys_footprint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_instructions) as usize - ptr as usize },
248usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_instructions)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cycles) as usize - ptr as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_cycles)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_energy) as usize - ptr as usize },
264usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_billed_energy)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_energy) as usize - ptr as usize },
272usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_serviced_energy)
)
);
assert_eq!(
unsafe {
::std::ptr::addr_of!((*ptr).ri_interval_max_phys_footprint) as usize - ptr as usize
},
280usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_interval_max_phys_footprint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_runnable_time) as usize - ptr as usize },
288usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v4),
"::",
stringify!(ri_runnable_time)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rusage_info_v5 {
pub ri_uuid: [u8; 16usize],
pub ri_user_time: u64,
pub ri_system_time: u64,
pub ri_pkg_idle_wkups: u64,
pub ri_interrupt_wkups: u64,
pub ri_pageins: u64,
pub ri_wired_size: u64,
pub ri_resident_size: u64,
pub ri_phys_footprint: u64,
pub ri_proc_start_abstime: u64,
pub ri_proc_exit_abstime: u64,
pub ri_child_user_time: u64,
pub ri_child_system_time: u64,
pub ri_child_pkg_idle_wkups: u64,
pub ri_child_interrupt_wkups: u64,
pub ri_child_pageins: u64,
pub ri_child_elapsed_abstime: u64,
pub ri_diskio_bytesread: u64,
pub ri_diskio_byteswritten: u64,
pub ri_cpu_time_qos_default: u64,
pub ri_cpu_time_qos_maintenance: u64,
pub ri_cpu_time_qos_background: u64,
pub ri_cpu_time_qos_utility: u64,
pub ri_cpu_time_qos_legacy: u64,
pub ri_cpu_time_qos_user_initiated: u64,
pub ri_cpu_time_qos_user_interactive: u64,
pub ri_billed_system_time: u64,
pub ri_serviced_system_time: u64,
pub ri_logical_writes: u64,
pub ri_lifetime_max_phys_footprint: u64,
pub ri_instructions: u64,
pub ri_cycles: u64,
pub ri_billed_energy: u64,
pub ri_serviced_energy: u64,
pub ri_interval_max_phys_footprint: u64,
pub ri_runnable_time: u64,
pub ri_flags: u64,
}
#[test]
fn bindgen_test_layout_rusage_info_v5() {
const UNINIT: ::std::mem::MaybeUninit<rusage_info_v5> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<rusage_info_v5>(),
304usize,
concat!("Size of: ", stringify!(rusage_info_v5))
);
assert_eq!(
::std::mem::align_of::<rusage_info_v5>(),
8usize,
concat!("Alignment of ", stringify!(rusage_info_v5))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_uuid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_user_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_pkg_idle_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_interrupt_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_pageins)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_wired_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_resident_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_phys_footprint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_proc_start_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_proc_exit_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_child_user_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_child_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_child_pkg_idle_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_child_interrupt_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_child_pageins)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_child_elapsed_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_bytesread) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_diskio_bytesread)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_byteswritten) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_diskio_byteswritten)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_default) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_cpu_time_qos_default)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_maintenance) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_cpu_time_qos_maintenance)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_background) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_cpu_time_qos_background)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_utility) as usize - ptr as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_cpu_time_qos_utility)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_legacy) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_cpu_time_qos_legacy)
)
);
assert_eq!(
unsafe {
::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_initiated) as usize - ptr as usize
},
200usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_cpu_time_qos_user_initiated)
)
);
assert_eq!(
unsafe {
::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_interactive) as usize - ptr as usize
},
208usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_cpu_time_qos_user_interactive)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_system_time) as usize - ptr as usize },
216usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_billed_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_system_time) as usize - ptr as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_serviced_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_logical_writes) as usize - ptr as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_logical_writes)
)
);
assert_eq!(
unsafe {
::std::ptr::addr_of!((*ptr).ri_lifetime_max_phys_footprint) as usize - ptr as usize
},
240usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_lifetime_max_phys_footprint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_instructions) as usize - ptr as usize },
248usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_instructions)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cycles) as usize - ptr as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_cycles)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_energy) as usize - ptr as usize },
264usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_billed_energy)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_energy) as usize - ptr as usize },
272usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_serviced_energy)
)
);
assert_eq!(
unsafe {
::std::ptr::addr_of!((*ptr).ri_interval_max_phys_footprint) as usize - ptr as usize
},
280usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_interval_max_phys_footprint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_runnable_time) as usize - ptr as usize },
288usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_runnable_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_flags) as usize - ptr as usize },
296usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v5),
"::",
stringify!(ri_flags)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rusage_info_v6 {
pub ri_uuid: [u8; 16usize],
pub ri_user_time: u64,
pub ri_system_time: u64,
pub ri_pkg_idle_wkups: u64,
pub ri_interrupt_wkups: u64,
pub ri_pageins: u64,
pub ri_wired_size: u64,
pub ri_resident_size: u64,
pub ri_phys_footprint: u64,
pub ri_proc_start_abstime: u64,
pub ri_proc_exit_abstime: u64,
pub ri_child_user_time: u64,
pub ri_child_system_time: u64,
pub ri_child_pkg_idle_wkups: u64,
pub ri_child_interrupt_wkups: u64,
pub ri_child_pageins: u64,
pub ri_child_elapsed_abstime: u64,
pub ri_diskio_bytesread: u64,
pub ri_diskio_byteswritten: u64,
pub ri_cpu_time_qos_default: u64,
pub ri_cpu_time_qos_maintenance: u64,
pub ri_cpu_time_qos_background: u64,
pub ri_cpu_time_qos_utility: u64,
pub ri_cpu_time_qos_legacy: u64,
pub ri_cpu_time_qos_user_initiated: u64,
pub ri_cpu_time_qos_user_interactive: u64,
pub ri_billed_system_time: u64,
pub ri_serviced_system_time: u64,
pub ri_logical_writes: u64,
pub ri_lifetime_max_phys_footprint: u64,
pub ri_instructions: u64,
pub ri_cycles: u64,
pub ri_billed_energy: u64,
pub ri_serviced_energy: u64,
pub ri_interval_max_phys_footprint: u64,
pub ri_runnable_time: u64,
pub ri_flags: u64,
pub ri_user_ptime: u64,
pub ri_system_ptime: u64,
pub ri_pinstructions: u64,
pub ri_pcycles: u64,
pub ri_energy_nj: u64,
pub ri_penergy_nj: u64,
pub ri_reserved: [u64; 14usize],
}
#[test]
fn bindgen_test_layout_rusage_info_v6() {
const UNINIT: ::std::mem::MaybeUninit<rusage_info_v6> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<rusage_info_v6>(),
464usize,
concat!("Size of: ", stringify!(rusage_info_v6))
);
assert_eq!(
::std::mem::align_of::<rusage_info_v6>(),
8usize,
concat!("Alignment of ", stringify!(rusage_info_v6))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_uuid) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_uuid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_user_time) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_user_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_system_time) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_pkg_idle_wkups) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_pkg_idle_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_interrupt_wkups) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_interrupt_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_pageins) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_pageins)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_wired_size) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_wired_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_resident_size) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_resident_size)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_phys_footprint) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_phys_footprint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_start_abstime) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_proc_start_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_proc_exit_abstime) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_proc_exit_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_user_time) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_child_user_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_system_time) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_child_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pkg_idle_wkups) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_child_pkg_idle_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_interrupt_wkups) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_child_interrupt_wkups)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_pageins) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_child_pageins)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_child_elapsed_abstime) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_child_elapsed_abstime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_bytesread) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_diskio_bytesread)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_diskio_byteswritten) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_diskio_byteswritten)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_default) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_cpu_time_qos_default)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_maintenance) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_cpu_time_qos_maintenance)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_background) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_cpu_time_qos_background)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_utility) as usize - ptr as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_cpu_time_qos_utility)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_legacy) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_cpu_time_qos_legacy)
)
);
assert_eq!(
unsafe {
::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_initiated) as usize - ptr as usize
},
200usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_cpu_time_qos_user_initiated)
)
);
assert_eq!(
unsafe {
::std::ptr::addr_of!((*ptr).ri_cpu_time_qos_user_interactive) as usize - ptr as usize
},
208usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_cpu_time_qos_user_interactive)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_system_time) as usize - ptr as usize },
216usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_billed_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_system_time) as usize - ptr as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_serviced_system_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_logical_writes) as usize - ptr as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_logical_writes)
)
);
assert_eq!(
unsafe {
::std::ptr::addr_of!((*ptr).ri_lifetime_max_phys_footprint) as usize - ptr as usize
},
240usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_lifetime_max_phys_footprint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_instructions) as usize - ptr as usize },
248usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_instructions)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_cycles) as usize - ptr as usize },
256usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_cycles)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_billed_energy) as usize - ptr as usize },
264usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_billed_energy)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_serviced_energy) as usize - ptr as usize },
272usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_serviced_energy)
)
);
assert_eq!(
unsafe {
::std::ptr::addr_of!((*ptr).ri_interval_max_phys_footprint) as usize - ptr as usize
},
280usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_interval_max_phys_footprint)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_runnable_time) as usize - ptr as usize },
288usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_runnable_time)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_flags) as usize - ptr as usize },
296usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_user_ptime) as usize - ptr as usize },
304usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_user_ptime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_system_ptime) as usize - ptr as usize },
312usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_system_ptime)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_pinstructions) as usize - ptr as usize },
320usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_pinstructions)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_pcycles) as usize - ptr as usize },
328usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_pcycles)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_energy_nj) as usize - ptr as usize },
336usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_energy_nj)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_penergy_nj) as usize - ptr as usize },
344usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_penergy_nj)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ri_reserved) as usize - ptr as usize },
352usize,
concat!(
"Offset of field: ",
stringify!(rusage_info_v6),
"::",
stringify!(ri_reserved)
)
);
}
pub type rusage_info_current = rusage_info_v6;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rlimit {
pub rlim_cur: rlim_t,
pub rlim_max: rlim_t,
}
#[test]
fn bindgen_test_layout_rlimit() {
const UNINIT: ::std::mem::MaybeUninit<rlimit> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<rlimit>(),
16usize,
concat!("Size of: ", stringify!(rlimit))
);
assert_eq!(
::std::mem::align_of::<rlimit>(),
8usize,
concat!("Alignment of ", stringify!(rlimit))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rlim_cur) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rlimit),
"::",
stringify!(rlim_cur)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rlim_max) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(rlimit),
"::",
stringify!(rlim_max)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct proc_rlimit_control_wakeupmon {
pub wm_flags: u32,
pub wm_rate: i32,
}
#[test]
fn bindgen_test_layout_proc_rlimit_control_wakeupmon() {
const UNINIT: ::std::mem::MaybeUninit<proc_rlimit_control_wakeupmon> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<proc_rlimit_control_wakeupmon>(),
8usize,
concat!("Size of: ", stringify!(proc_rlimit_control_wakeupmon))
);
assert_eq!(
::std::mem::align_of::<proc_rlimit_control_wakeupmon>(),
4usize,
concat!("Alignment of ", stringify!(proc_rlimit_control_wakeupmon))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).wm_flags) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(proc_rlimit_control_wakeupmon),
"::",
stringify!(wm_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).wm_rate) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(proc_rlimit_control_wakeupmon),
"::",
stringify!(wm_rate)
)
);
}
extern "C" {
pub fn getpriority(arg1: ::std::os::raw::c_int, arg2: id_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn getiopolicy_np(
arg1: ::std::os::raw::c_int,
arg2: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn getrlimit(arg1: ::std::os::raw::c_int, arg2: *mut rlimit) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn getrusage(arg1: ::std::os::raw::c_int, arg2: *mut rusage) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn setpriority(
arg1: ::std::os::raw::c_int,
arg2: id_t,
arg3: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn setiopolicy_np(
arg1: ::std::os::raw::c_int,
arg2: ::std::os::raw::c_int,
arg3: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn setrlimit(arg1: ::std::os::raw::c_int, arg2: *const rlimit) -> ::std::os::raw::c_int;
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _OSUnalignedU16 {
pub __val: u16,
}
#[test]
fn bindgen_test_layout__OSUnalignedU16() {
const UNINIT: ::std::mem::MaybeUninit<_OSUnalignedU16> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_OSUnalignedU16>(),
2usize,
concat!("Size of: ", stringify!(_OSUnalignedU16))
);
assert_eq!(
::std::mem::align_of::<_OSUnalignedU16>(),
1usize,
concat!("Alignment of ", stringify!(_OSUnalignedU16))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_OSUnalignedU16),
"::",
stringify!(__val)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _OSUnalignedU32 {
pub __val: u32,
}
#[test]
fn bindgen_test_layout__OSUnalignedU32() {
const UNINIT: ::std::mem::MaybeUninit<_OSUnalignedU32> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_OSUnalignedU32>(),
4usize,
concat!("Size of: ", stringify!(_OSUnalignedU32))
);
assert_eq!(
::std::mem::align_of::<_OSUnalignedU32>(),
1usize,
concat!("Alignment of ", stringify!(_OSUnalignedU32))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_OSUnalignedU32),
"::",
stringify!(__val)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct _OSUnalignedU64 {
pub __val: u64,
}
#[test]
fn bindgen_test_layout__OSUnalignedU64() {
const UNINIT: ::std::mem::MaybeUninit<_OSUnalignedU64> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<_OSUnalignedU64>(),
8usize,
concat!("Size of: ", stringify!(_OSUnalignedU64))
);
assert_eq!(
::std::mem::align_of::<_OSUnalignedU64>(),
1usize,
concat!("Alignment of ", stringify!(_OSUnalignedU64))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(_OSUnalignedU64),
"::",
stringify!(__val)
)
);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union wait {
pub w_status: ::std::os::raw::c_int,
pub w_T: wait__bindgen_ty_1,
pub w_S: wait__bindgen_ty_2,
}
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Copy, Clone)]
pub struct wait__bindgen_ty_1 {
pub _bitfield_align_1: [u16; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
}
#[test]
fn bindgen_test_layout_wait__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<wait__bindgen_ty_1>(),
4usize,
concat!("Size of: ", stringify!(wait__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<wait__bindgen_ty_1>(),
4usize,
concat!("Alignment of ", stringify!(wait__bindgen_ty_1))
);
}
impl wait__bindgen_ty_1 {
#[inline]
pub fn w_Termsig(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 7u8) as u32) }
}
#[inline]
pub fn set_w_Termsig(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 7u8, val as u64)
}
}
#[inline]
pub fn w_Coredump(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
}
#[inline]
pub fn set_w_Coredump(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(7usize, 1u8, val as u64)
}
}
#[inline]
pub fn w_Retcode(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) }
}
#[inline]
pub fn set_w_Retcode(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(8usize, 8u8, val as u64)
}
}
#[inline]
pub fn w_Filler(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) }
}
#[inline]
pub fn set_w_Filler(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(16usize, 16u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
w_Termsig: ::std::os::raw::c_uint,
w_Coredump: ::std::os::raw::c_uint,
w_Retcode: ::std::os::raw::c_uint,
w_Filler: ::std::os::raw::c_uint,
) -> __BindgenBitfieldUnit<[u8; 4usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 7u8, {
let w_Termsig: u32 = unsafe { ::std::mem::transmute(w_Termsig) };
w_Termsig as u64
});
__bindgen_bitfield_unit.set(7usize, 1u8, {
let w_Coredump: u32 = unsafe { ::std::mem::transmute(w_Coredump) };
w_Coredump as u64
});
__bindgen_bitfield_unit.set(8usize, 8u8, {
let w_Retcode: u32 = unsafe { ::std::mem::transmute(w_Retcode) };
w_Retcode as u64
});
__bindgen_bitfield_unit.set(16usize, 16u8, {
let w_Filler: u32 = unsafe { ::std::mem::transmute(w_Filler) };
w_Filler as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Copy, Clone)]
pub struct wait__bindgen_ty_2 {
pub _bitfield_align_1: [u16; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
}
#[test]
fn bindgen_test_layout_wait__bindgen_ty_2() {
assert_eq!(
::std::mem::size_of::<wait__bindgen_ty_2>(),
4usize,
concat!("Size of: ", stringify!(wait__bindgen_ty_2))
);
assert_eq!(
::std::mem::align_of::<wait__bindgen_ty_2>(),
4usize,
concat!("Alignment of ", stringify!(wait__bindgen_ty_2))
);
}
impl wait__bindgen_ty_2 {
#[inline]
pub fn w_Stopval(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) }
}
#[inline]
pub fn set_w_Stopval(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 8u8, val as u64)
}
}
#[inline]
pub fn w_Stopsig(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) }
}
#[inline]
pub fn set_w_Stopsig(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(8usize, 8u8, val as u64)
}
}
#[inline]
pub fn w_Filler(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) }
}
#[inline]
pub fn set_w_Filler(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(16usize, 16u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
w_Stopval: ::std::os::raw::c_uint,
w_Stopsig: ::std::os::raw::c_uint,
w_Filler: ::std::os::raw::c_uint,
) -> __BindgenBitfieldUnit<[u8; 4usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 8u8, {
let w_Stopval: u32 = unsafe { ::std::mem::transmute(w_Stopval) };
w_Stopval as u64
});
__bindgen_bitfield_unit.set(8usize, 8u8, {
let w_Stopsig: u32 = unsafe { ::std::mem::transmute(w_Stopsig) };
w_Stopsig as u64
});
__bindgen_bitfield_unit.set(16usize, 16u8, {
let w_Filler: u32 = unsafe { ::std::mem::transmute(w_Filler) };
w_Filler as u64
});
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_wait() {
const UNINIT: ::std::mem::MaybeUninit<wait> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<wait>(),
4usize,
concat!("Size of: ", stringify!(wait))
);
assert_eq!(
::std::mem::align_of::<wait>(),
4usize,
concat!("Alignment of ", stringify!(wait))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).w_status) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(wait),
"::",
stringify!(w_status)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).w_T) as usize - ptr as usize },
0usize,
concat!("Offset of field: ", stringify!(wait), "::", stringify!(w_T))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).w_S) as usize - ptr as usize },
0usize,
concat!("Offset of field: ", stringify!(wait), "::", stringify!(w_S))
);
}
extern "C" {
pub fn wait(arg1: *mut ::std::os::raw::c_int) -> pid_t;
}
extern "C" {
pub fn waitpid(
arg1: pid_t,
arg2: *mut ::std::os::raw::c_int,
arg3: ::std::os::raw::c_int,
) -> pid_t;
}
extern "C" {
pub fn waitid(
arg1: idtype_t,
arg2: id_t,
arg3: *mut siginfo_t,
arg4: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn wait3(
arg1: *mut ::std::os::raw::c_int,
arg2: ::std::os::raw::c_int,
arg3: *mut rusage,
) -> pid_t;
}
extern "C" {
pub fn wait4(
arg1: pid_t,
arg2: *mut ::std::os::raw::c_int,
arg3: ::std::os::raw::c_int,
arg4: *mut rusage,
) -> pid_t;
}
extern "C" {
pub fn alloca(arg1: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
}
pub type ct_rune_t = __darwin_ct_rune_t;
pub type rune_t = __darwin_rune_t;
pub type wchar_t = __darwin_wchar_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct div_t {
pub quot: ::std::os::raw::c_int,
pub rem: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_div_t() {
const UNINIT: ::std::mem::MaybeUninit<div_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<div_t>(),
8usize,
concat!("Size of: ", stringify!(div_t))
);
assert_eq!(
::std::mem::align_of::<div_t>(),
4usize,
concat!("Alignment of ", stringify!(div_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(div_t),
"::",
stringify!(quot)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(div_t),
"::",
stringify!(rem)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ldiv_t {
pub quot: ::std::os::raw::c_long,
pub rem: ::std::os::raw::c_long,
}
#[test]
fn bindgen_test_layout_ldiv_t() {
const UNINIT: ::std::mem::MaybeUninit<ldiv_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<ldiv_t>(),
16usize,
concat!("Size of: ", stringify!(ldiv_t))
);
assert_eq!(
::std::mem::align_of::<ldiv_t>(),
8usize,
concat!("Alignment of ", stringify!(ldiv_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(ldiv_t),
"::",
stringify!(quot)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(ldiv_t),
"::",
stringify!(rem)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lldiv_t {
pub quot: ::std::os::raw::c_longlong,
pub rem: ::std::os::raw::c_longlong,
}
#[test]
fn bindgen_test_layout_lldiv_t() {
const UNINIT: ::std::mem::MaybeUninit<lldiv_t> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<lldiv_t>(),
16usize,
concat!("Size of: ", stringify!(lldiv_t))
);
assert_eq!(
::std::mem::align_of::<lldiv_t>(),
8usize,
concat!("Alignment of ", stringify!(lldiv_t))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(lldiv_t),
"::",
stringify!(quot)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(lldiv_t),
"::",
stringify!(rem)
)
);
}
extern "C" {
pub static mut __mb_cur_max: ::std::os::raw::c_int;
}
extern "C" {
pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn calloc(
__count: ::std::os::raw::c_ulong,
__size: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn free(arg1: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn realloc(
__ptr: *mut ::std::os::raw::c_void,
__size: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn valloc(arg1: usize) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn aligned_alloc(
__alignment: ::std::os::raw::c_ulong,
__size: ::std::os::raw::c_ulong,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn posix_memalign(
__memptr: *mut *mut ::std::os::raw::c_void,
__alignment: usize,
__size: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn abort() -> !;
}
extern "C" {
pub fn abs(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn atexit(arg1: ::std::option::Option<unsafe extern "C" fn()>) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn atof(arg1: *const ::std::os::raw::c_char) -> f64;
}
extern "C" {
pub fn atoi(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn atol(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
}
extern "C" {
pub fn atoll(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong;
}
extern "C" {
pub fn bsearch(
__key: *const ::std::os::raw::c_void,
__base: *const ::std::os::raw::c_void,
__nel: usize,
__width: usize,
__compar: ::std::option::Option<
unsafe extern "C" fn(
arg1: *const ::std::os::raw::c_void,
arg2: *const ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn div(arg1: ::std::os::raw::c_int, arg2: ::std::os::raw::c_int) -> div_t;
}
extern "C" {
pub fn exit(arg1: ::std::os::raw::c_int) -> !;
}
extern "C" {
pub fn getenv(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn labs(arg1: ::std::os::raw::c_long) -> ::std::os::raw::c_long;
}
extern "C" {
pub fn ldiv(arg1: ::std::os::raw::c_long, arg2: ::std::os::raw::c_long) -> ldiv_t;
}
extern "C" {
pub fn llabs(arg1: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong;
}
extern "C" {
pub fn lldiv(arg1: ::std::os::raw::c_longlong, arg2: ::std::os::raw::c_longlong) -> lldiv_t;
}
extern "C" {
pub fn mblen(__s: *const ::std::os::raw::c_char, __n: usize) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mbstowcs(arg1: *mut wchar_t, arg2: *const ::std::os::raw::c_char, arg3: usize) -> usize;
}
extern "C" {
pub fn mbtowc(
arg1: *mut wchar_t,
arg2: *const ::std::os::raw::c_char,
arg3: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn qsort(
__base: *mut ::std::os::raw::c_void,
__nel: usize,
__width: usize,
__compar: ::std::option::Option<
unsafe extern "C" fn(
arg1: *const ::std::os::raw::c_void,
arg2: *const ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>,
);
}
extern "C" {
pub fn rand() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn srand(arg1: ::std::os::raw::c_uint);
}
extern "C" {
pub fn strtod(
arg1: *const ::std::os::raw::c_char,
arg2: *mut *mut ::std::os::raw::c_char,
) -> f64;
}
extern "C" {
pub fn strtof(
arg1: *const ::std::os::raw::c_char,
arg2: *mut *mut ::std::os::raw::c_char,
) -> f32;
}
extern "C" {
pub fn strtol(
__str: *const ::std::os::raw::c_char,
__endptr: *mut *mut ::std::os::raw::c_char,
__base: ::std::os::raw::c_int,
) -> ::std::os::raw::c_long;
}
extern "C" {
pub fn strtold(
arg1: *const ::std::os::raw::c_char,
arg2: *mut *mut ::std::os::raw::c_char,
) -> f64;
}
extern "C" {
pub fn strtoll(
__str: *const ::std::os::raw::c_char,
__endptr: *mut *mut ::std::os::raw::c_char,
__base: ::std::os::raw::c_int,
) -> ::std::os::raw::c_longlong;
}
extern "C" {
pub fn strtoul(
__str: *const ::std::os::raw::c_char,
__endptr: *mut *mut ::std::os::raw::c_char,
__base: ::std::os::raw::c_int,
) -> ::std::os::raw::c_ulong;
}
extern "C" {
pub fn strtoull(
__str: *const ::std::os::raw::c_char,
__endptr: *mut *mut ::std::os::raw::c_char,
__base: ::std::os::raw::c_int,
) -> ::std::os::raw::c_ulonglong;
}
extern "C" {
pub fn system(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn wcstombs(arg1: *mut ::std::os::raw::c_char, arg2: *const wchar_t, arg3: usize) -> usize;
}
extern "C" {
pub fn wctomb(arg1: *mut ::std::os::raw::c_char, arg2: wchar_t) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn _Exit(arg1: ::std::os::raw::c_int) -> !;
}
extern "C" {
pub fn a64l(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
}
extern "C" {
pub fn drand48() -> f64;
}
extern "C" {
pub fn ecvt(
arg1: f64,
arg2: ::std::os::raw::c_int,
arg3: *mut ::std::os::raw::c_int,
arg4: *mut ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn erand48(arg1: *mut ::std::os::raw::c_ushort) -> f64;
}
extern "C" {
pub fn fcvt(
arg1: f64,
arg2: ::std::os::raw::c_int,
arg3: *mut ::std::os::raw::c_int,
arg4: *mut ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn gcvt(
arg1: f64,
arg2: ::std::os::raw::c_int,
arg3: *mut ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn getsubopt(
arg1: *mut *mut ::std::os::raw::c_char,
arg2: *const *mut ::std::os::raw::c_char,
arg3: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn grantpt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn initstate(
arg1: ::std::os::raw::c_uint,
arg2: *mut ::std::os::raw::c_char,
arg3: usize,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn jrand48(arg1: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
}
extern "C" {
pub fn l64a(arg1: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn lcong48(arg1: *mut ::std::os::raw::c_ushort);
}
extern "C" {
pub fn lrand48() -> ::std::os::raw::c_long;
}
extern "C" {
pub fn mktemp(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn mkstemp(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mrand48() -> ::std::os::raw::c_long;
}
extern "C" {
pub fn nrand48(arg1: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
}
extern "C" {
pub fn posix_openpt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn ptsname(arg1: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn ptsname_r(
fildes: ::std::os::raw::c_int,
buffer: *mut ::std::os::raw::c_char,
buflen: usize,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn putenv(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn random() -> ::std::os::raw::c_long;
}
extern "C" {
pub fn rand_r(arg1: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int;
}
extern "C" {
#[link_name = "\u{1}_realpath$DARWIN_EXTSN"]
pub fn realpath(
arg1: *const ::std::os::raw::c_char,
arg2: *mut ::std::os::raw::c_char,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn seed48(arg1: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort;
}
extern "C" {
pub fn setenv(
__name: *const ::std::os::raw::c_char,
__value: *const ::std::os::raw::c_char,
__overwrite: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn setkey(arg1: *const ::std::os::raw::c_char);
}
extern "C" {
pub fn setstate(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn srand48(arg1: ::std::os::raw::c_long);
}
extern "C" {
pub fn srandom(arg1: ::std::os::raw::c_uint);
}
extern "C" {
pub fn unlockpt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn unsetenv(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
pub type dev_t = __darwin_dev_t;
pub type mode_t = __darwin_mode_t;
extern "C" {
pub fn arc4random() -> u32;
}
extern "C" {
pub fn arc4random_addrandom(arg1: *mut ::std::os::raw::c_uchar, arg2: ::std::os::raw::c_int);
}
extern "C" {
pub fn arc4random_buf(__buf: *mut ::std::os::raw::c_void, __nbytes: usize);
}
extern "C" {
pub fn arc4random_stir();
}
extern "C" {
pub fn arc4random_uniform(__upper_bound: u32) -> u32;
}
extern "C" {
pub fn atexit_b(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn bsearch_b(
__key: *const ::std::os::raw::c_void,
__base: *const ::std::os::raw::c_void,
__nel: usize,
__width: usize,
__compar: *mut ::std::os::raw::c_void,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn cgetcap(
arg1: *mut ::std::os::raw::c_char,
arg2: *const ::std::os::raw::c_char,
arg3: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn cgetclose() -> ::std::os::raw::c_int;
}
extern "C" {
pub fn cgetent(
arg1: *mut *mut ::std::os::raw::c_char,
arg2: *mut *mut ::std::os::raw::c_char,
arg3: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn cgetfirst(
arg1: *mut *mut ::std::os::raw::c_char,
arg2: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn cgetmatch(
arg1: *const ::std::os::raw::c_char,
arg2: *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn cgetnext(
arg1: *mut *mut ::std::os::raw::c_char,
arg2: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn cgetnum(
arg1: *mut ::std::os::raw::c_char,
arg2: *const ::std::os::raw::c_char,
arg3: *mut ::std::os::raw::c_long,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn cgetset(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn cgetstr(
arg1: *mut ::std::os::raw::c_char,
arg2: *const ::std::os::raw::c_char,
arg3: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn cgetustr(
arg1: *mut ::std::os::raw::c_char,
arg2: *const ::std::os::raw::c_char,
arg3: *mut *mut ::std::os::raw::c_char,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn daemon(
arg1: ::std::os::raw::c_int,
arg2: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn devname(arg1: dev_t, arg2: mode_t) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn devname_r(
arg1: dev_t,
arg2: mode_t,
buf: *mut ::std::os::raw::c_char,
len: ::std::os::raw::c_int,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn getbsize(
arg1: *mut ::std::os::raw::c_int,
arg2: *mut ::std::os::raw::c_long,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
pub fn getloadavg(arg1: *mut f64, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn getprogname() -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn setprogname(arg1: *const ::std::os::raw::c_char);
}
extern "C" {
pub fn heapsort(
__base: *mut ::std::os::raw::c_void,
__nel: usize,
__width: usize,
__compar: ::std::option::Option<
unsafe extern "C" fn(
arg1: *const ::std::os::raw::c_void,
arg2: *const ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn heapsort_b(
__base: *mut ::std::os::raw::c_void,
__nel: usize,
__width: usize,
__compar: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mergesort(
__base: *mut ::std::os::raw::c_void,
__nel: usize,
__width: usize,
__compar: ::std::option::Option<
unsafe extern "C" fn(
arg1: *const ::std::os::raw::c_void,
arg2: *const ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn mergesort_b(
__base: *mut ::std::os::raw::c_void,
__nel: usize,
__width: usize,
__compar: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn psort(
__base: *mut ::std::os::raw::c_void,
__nel: usize,
__width: usize,
__compar: ::std::option::Option<
unsafe extern "C" fn(
arg1: *const ::std::os::raw::c_void,
arg2: *const ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>,
);
}
extern "C" {
pub fn psort_b(
__base: *mut ::std::os::raw::c_void,
__nel: usize,
__width: usize,
__compar: *mut ::std::os::raw::c_void,
);
}
extern "C" {
pub fn psort_r(
__base: *mut ::std::os::raw::c_void,
__nel: usize,
__width: usize,
arg1: *mut ::std::os::raw::c_void,
__compar: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut ::std::os::raw::c_void,
arg2: *const ::std::os::raw::c_void,
arg3: *const ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>,
);
}
extern "C" {
pub fn qsort_b(
__base: *mut ::std::os::raw::c_void,
__nel: usize,
__width: usize,
__compar: *mut ::std::os::raw::c_void,
);
}
extern "C" {
pub fn qsort_r(
__base: *mut ::std::os::raw::c_void,
__nel: usize,
__width: usize,
arg1: *mut ::std::os::raw::c_void,
__compar: ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut ::std::os::raw::c_void,
arg2: *const ::std::os::raw::c_void,
arg3: *const ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>,
);
}
extern "C" {
pub fn radixsort(
__base: *mut *const ::std::os::raw::c_uchar,
__nel: ::std::os::raw::c_int,
__table: *const ::std::os::raw::c_uchar,
__endbyte: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rpmatch(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sradixsort(
__base: *mut *const ::std::os::raw::c_uchar,
__nel: ::std::os::raw::c_int,
__table: *const ::std::os::raw::c_uchar,
__endbyte: ::std::os::raw::c_uint,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn sranddev();
}
extern "C" {
pub fn srandomdev();
}
extern "C" {
pub fn reallocf(
__ptr: *mut ::std::os::raw::c_void,
__size: usize,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
pub fn strtonum(
__numstr: *const ::std::os::raw::c_char,
__minval: ::std::os::raw::c_longlong,
__maxval: ::std::os::raw::c_longlong,
__errstrp: *mut *const ::std::os::raw::c_char,
) -> ::std::os::raw::c_longlong;
}
extern "C" {
pub fn strtoq(
__str: *const ::std::os::raw::c_char,
__endptr: *mut *mut ::std::os::raw::c_char,
__base: ::std::os::raw::c_int,
) -> ::std::os::raw::c_longlong;
}
extern "C" {
pub fn strtouq(
__str: *const ::std::os::raw::c_char,
__endptr: *mut *mut ::std::os::raw::c_char,
__base: ::std::os::raw::c_int,
) -> ::std::os::raw::c_ulonglong;
}
extern "C" {
pub static mut suboptarg: *mut ::std::os::raw::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hs_database {
_unused: [u8; 0],
}
#[doc = " A Hyperscan pattern database.\n\n Generated by one of the Hyperscan compiler functions:\n - @ref hs_compile()\n - @ref hs_compile_multi()\n - @ref hs_compile_ext_multi()"]
pub type hs_database_t = hs_database;
#[doc = " A type for errors returned by Hyperscan functions."]
pub type hs_error_t = ::std::os::raw::c_int;
extern "C" {
#[doc = " Free a compiled pattern database.\n\n The free callback set by @ref hs_set_database_allocator() (or @ref\n hs_set_allocator()) will be used by this function.\n\n @param db\n A compiled pattern database. NULL may also be safely provided, in which\n case the function does nothing.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_free_database(db: *mut hs_database_t) -> hs_error_t;
}
extern "C" {
#[doc = " Serialize a pattern database to a stream of bytes.\n\n The allocator callback set by @ref hs_set_misc_allocator() (or @ref\n hs_set_allocator()) will be used by this function.\n\n @param db\n A compiled pattern database.\n\n @param bytes\n On success, a pointer to an array of bytes will be returned here.\n These bytes can be subsequently relocated or written to disk. The\n caller is responsible for freeing this block.\n\n @param length\n On success, the number of bytes in the generated byte array will be\n returned here.\n\n @return\n @ref HS_SUCCESS on success, @ref HS_NOMEM if the byte array cannot be\n allocated, other values may be returned if errors are detected."]
pub fn hs_serialize_database(
db: *const hs_database_t,
bytes: *mut *mut ::std::os::raw::c_char,
length: *mut usize,
) -> hs_error_t;
}
extern "C" {
#[doc = " Reconstruct a pattern database from a stream of bytes previously generated\n by @ref hs_serialize_database().\n\n This function will allocate sufficient space for the database using the\n allocator set with @ref hs_set_database_allocator() (or @ref\n hs_set_allocator()); to use a pre-allocated region of memory, use the @ref\n hs_deserialize_database_at() function.\n\n @param bytes\n A byte array generated by @ref hs_serialize_database() representing a\n compiled pattern database.\n\n @param length\n The length of the byte array generated by @ref hs_serialize_database().\n This should be the same value as that returned by @ref\n hs_serialize_database().\n\n @param db\n On success, a pointer to a newly allocated @ref hs_database_t will be\n returned here. This database can then be used for scanning, and\n eventually freed by the caller using @ref hs_free_database().\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_deserialize_database(
bytes: *const ::std::os::raw::c_char,
length: usize,
db: *mut *mut hs_database_t,
) -> hs_error_t;
}
extern "C" {
#[doc = " Reconstruct a pattern database from a stream of bytes previously generated\n by @ref hs_serialize_database() at a given memory location.\n\n This function (unlike @ref hs_deserialize_database()) will write the\n reconstructed database to the memory location given in the @p db parameter.\n The amount of space required at this location can be determined with the\n @ref hs_serialized_database_size() function.\n\n @param bytes\n A byte array generated by @ref hs_serialize_database() representing a\n compiled pattern database.\n\n @param length\n The length of the byte array generated by @ref hs_serialize_database().\n This should be the same value as that returned by @ref\n hs_serialize_database().\n\n @param db\n Pointer to an 8-byte aligned block of memory of sufficient size to hold\n the deserialized database. On success, the reconstructed database will\n be written to this location. This database can then be used for pattern\n matching. The user is responsible for freeing this memory; the @ref\n hs_free_database() call should not be used.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_deserialize_database_at(
bytes: *const ::std::os::raw::c_char,
length: usize,
db: *mut hs_database_t,
) -> hs_error_t;
}
extern "C" {
#[doc = " Provides the size of the stream state allocated by a single stream opened\n against the given database.\n\n @param database\n Pointer to a compiled (streaming mode) pattern database.\n\n @param stream_size\n On success, the size in bytes of an individual stream opened against the\n given database is placed in this parameter.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_stream_size(database: *const hs_database_t, stream_size: *mut usize) -> hs_error_t;
}
extern "C" {
#[doc = " Provides the size of the given database in bytes.\n\n @param database\n Pointer to compiled pattern database.\n\n @param database_size\n On success, the size of the compiled database in bytes is placed in this\n parameter.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_database_size(
database: *const hs_database_t,
database_size: *mut usize,
) -> hs_error_t;
}
extern "C" {
#[doc = " Utility function for reporting the size that would be required by a\n database if it were deserialized.\n\n This can be used to allocate a shared memory region or other \"special\"\n allocation prior to deserializing with the @ref hs_deserialize_database_at()\n function.\n\n @param bytes\n Pointer to a byte array generated by @ref hs_serialize_database()\n representing a compiled pattern database.\n\n @param length\n The length of the byte array generated by @ref hs_serialize_database().\n This should be the same value as that returned by @ref\n hs_serialize_database().\n\n @param deserialized_size\n On success, the size of the compiled database that would be generated\n by @ref hs_deserialize_database_at() is returned here.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_serialized_database_size(
bytes: *const ::std::os::raw::c_char,
length: usize,
deserialized_size: *mut usize,
) -> hs_error_t;
}
extern "C" {
#[doc = " Utility function providing information about a database.\n\n @param database\n Pointer to a compiled database.\n\n @param info\n On success, a string containing the version and platform information for\n the supplied database is placed in the parameter. The string is\n allocated using the allocator supplied in @ref hs_set_misc_allocator()\n (or malloc() if no allocator was set) and should be freed by the caller.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_database_info(
database: *const hs_database_t,
info: *mut *mut ::std::os::raw::c_char,
) -> hs_error_t;
}
extern "C" {
#[doc = " Utility function providing information about a serialized database.\n\n @param bytes\n Pointer to a serialized database.\n\n @param length\n Length in bytes of the serialized database.\n\n @param info\n On success, a string containing the version and platform information\n for the supplied serialized database is placed in the parameter. The\n string is allocated using the allocator supplied in @ref\n hs_set_misc_allocator() (or malloc() if no allocator was set) and\n should be freed by the caller.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_serialized_database_info(
bytes: *const ::std::os::raw::c_char,
length: usize,
info: *mut *mut ::std::os::raw::c_char,
) -> hs_error_t;
}
#[doc = " The type of the callback function that will be used by Hyperscan to allocate\n more memory at runtime as required, for example in @ref hs_open_stream() to\n allocate stream state.\n\n If Hyperscan is to be used in a multi-threaded, or similarly concurrent\n environment, the allocation function will need to be re-entrant, or\n similarly safe for concurrent use.\n\n @param size\n The number of bytes to allocate.\n @return\n A pointer to the region of memory allocated, or NULL on error."]
pub type hs_alloc_t =
::std::option::Option<unsafe extern "C" fn(size: usize) -> *mut ::std::os::raw::c_void>;
#[doc = " The type of the callback function that will be used by Hyperscan to free\n memory regions previously allocated using the @ref hs_alloc_t function.\n\n @param ptr\n The region of memory to be freed."]
pub type hs_free_t = ::std::option::Option<unsafe extern "C" fn(ptr: *mut ::std::os::raw::c_void)>;
extern "C" {
#[doc = " Set the allocate and free functions used by Hyperscan for allocating\n memory at runtime for stream state, scratch space, database bytecode,\n and various other data structure returned by the Hyperscan API.\n\n The function is equivalent to calling @ref hs_set_stream_allocator(),\n @ref hs_set_scratch_allocator(), @ref hs_set_database_allocator() and\n @ref hs_set_misc_allocator() with the provided parameters.\n\n This call will override any previous allocators that have been set.\n\n Note: there is no way to change the allocator used for temporary objects\n created during the various compile calls (@ref hs_compile(), @ref\n hs_compile_multi(), @ref hs_compile_ext_multi()).\n\n @param alloc_func\n A callback function pointer that allocates memory. This function must\n return memory suitably aligned for the largest representable data type\n on this platform.\n\n @param free_func\n A callback function pointer that frees allocated memory.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_set_allocator(alloc_func: hs_alloc_t, free_func: hs_free_t) -> hs_error_t;
}
extern "C" {
#[doc = " Set the allocate and free functions used by Hyperscan for allocating memory\n for database bytecode produced by the compile calls (@ref hs_compile(), @ref\n hs_compile_multi(), @ref hs_compile_ext_multi()) and by database\n deserialization (@ref hs_deserialize_database()).\n\n If no database allocation functions are set, or if NULL is used in place of\n both parameters, then memory allocation will default to standard methods\n (such as the system malloc() and free() calls).\n\n This call will override any previous database allocators that have been set.\n\n Note: the database allocator may also be set by calling @ref\n hs_set_allocator().\n\n Note: there is no way to change how temporary objects created during the\n various compile calls (@ref hs_compile(), @ref hs_compile_multi(), @ref\n hs_compile_ext_multi()) are allocated.\n\n @param alloc_func\n A callback function pointer that allocates memory. This function must\n return memory suitably aligned for the largest representable data type\n on this platform.\n\n @param free_func\n A callback function pointer that frees allocated memory.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_set_database_allocator(alloc_func: hs_alloc_t, free_func: hs_free_t) -> hs_error_t;
}
extern "C" {
#[doc = " Set the allocate and free functions used by Hyperscan for allocating memory\n for items returned by the Hyperscan API such as @ref hs_compile_error_t, @ref\n hs_expr_info_t and serialized databases.\n\n If no misc allocation functions are set, or if NULL is used in place of both\n parameters, then memory allocation will default to standard methods (such as\n the system malloc() and free() calls).\n\n This call will override any previous misc allocators that have been set.\n\n Note: the misc allocator may also be set by calling @ref hs_set_allocator().\n\n @param alloc_func\n A callback function pointer that allocates memory. This function must\n return memory suitably aligned for the largest representable data type\n on this platform.\n\n @param free_func\n A callback function pointer that frees allocated memory.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_set_misc_allocator(alloc_func: hs_alloc_t, free_func: hs_free_t) -> hs_error_t;
}
extern "C" {
#[doc = " Set the allocate and free functions used by Hyperscan for allocating memory\n for scratch space by @ref hs_alloc_scratch() and @ref hs_clone_scratch().\n\n If no scratch allocation functions are set, or if NULL is used in place of\n both parameters, then memory allocation will default to standard methods\n (such as the system malloc() and free() calls).\n\n This call will override any previous scratch allocators that have been set.\n\n Note: the scratch allocator may also be set by calling @ref\n hs_set_allocator().\n\n @param alloc_func\n A callback function pointer that allocates memory. This function must\n return memory suitably aligned for the largest representable data type\n on this platform.\n\n @param free_func\n A callback function pointer that frees allocated memory.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_set_scratch_allocator(alloc_func: hs_alloc_t, free_func: hs_free_t) -> hs_error_t;
}
extern "C" {
#[doc = " Set the allocate and free functions used by Hyperscan for allocating memory\n for stream state by @ref hs_open_stream().\n\n If no stream allocation functions are set, or if NULL is used in place of\n both parameters, then memory allocation will default to standard methods\n (such as the system malloc() and free() calls).\n\n This call will override any previous stream allocators that have been set.\n\n Note: the stream allocator may also be set by calling @ref\n hs_set_allocator().\n\n @param alloc_func\n A callback function pointer that allocates memory. This function must\n return memory suitably aligned for the largest representable data type\n on this platform.\n\n @param free_func\n A callback function pointer that frees allocated memory.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_set_stream_allocator(alloc_func: hs_alloc_t, free_func: hs_free_t) -> hs_error_t;
}
extern "C" {
#[doc = " Utility function for identifying this release version.\n\n @return\n A string containing the version number of this release build and the\n date of the build. It is allocated statically, so it does not need to\n be freed by the caller."]
pub fn hs_version() -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " Utility function to test the current system architecture.\n\n Hyperscan requires the Supplemental Streaming SIMD Extensions 3 instruction\n set. This function can be called on any x86 platform to determine if the\n system provides the required instruction set.\n\n This function does not test for more advanced features if Hyperscan has\n been built for a more specific architecture, for example the AVX2\n instruction set.\n\n @return\n @ref HS_SUCCESS on success, @ref HS_ARCH_ERROR if system does not\n support Hyperscan."]
pub fn hs_valid_platform() -> hs_error_t;
}
#[doc = " A type containing error details that is returned by the compile calls (@ref\n hs_compile(), @ref hs_compile_multi() and @ref hs_compile_ext_multi()) on\n failure. The caller may inspect the values returned in this type to\n determine the cause of failure.\n\n Common errors generated during the compile process include:\n\n - *Invalid parameter*\n\n An invalid argument was specified in the compile call.\n\n - *Unrecognised flag*\n\n An unrecognised value was passed in the flags argument.\n\n - *Pattern matches empty buffer*\n\n By default, Hyperscan only supports patterns that will *always*\n consume at least one byte of input. Patterns that do not have this\n property (such as `/(abc)?/`) will produce this error unless\n the @ref HS_FLAG_ALLOWEMPTY flag is supplied. Note that such\n patterns will produce a match for *every* byte when scanned.\n\n - *Embedded anchors not supported*\n\n Hyperscan only supports the use of anchor meta-characters (such as\n `^` and `$`) in patterns where they could *only* match\n at the start or end of a buffer. A pattern containing an embedded\n anchor, such as `/abc^def/`, can never match, as there is no\n way for `abc` to precede the start of the data stream.\n\n - *Bounded repeat is too large*\n\n The pattern contains a repeated construct with very large finite\n bounds.\n\n - *Unsupported component type*\n\n An unsupported PCRE construct was used in the pattern.\n\n - *Unable to generate bytecode*\n\n This error indicates that Hyperscan was unable to compile a pattern\n that is syntactically valid. The most common cause is a pattern that is\n very long and complex or contains a large repeated subpattern.\n\n - *Unable to allocate memory*\n\n The library was unable to allocate temporary storage used during\n compilation time.\n\n - *Allocator returned misaligned memory*\n\n The memory allocator (either malloc() or the allocator set with @ref\n hs_set_allocator()) did not correctly return memory suitably aligned\n for the largest representable data type on this platform.\n\n - *Internal error*\n\n An unexpected error occurred: if this error is reported, please contact\n the Hyperscan team with a description of the situation."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hs_compile_error {
#[doc = " A human-readable error message describing the error."]
pub message: *mut ::std::os::raw::c_char,
#[doc = " The zero-based number of the expression that caused the error (if this\n can be determined). If the error is not specific to an expression, then\n this value will be less than zero."]
pub expression: ::std::os::raw::c_int,
}
#[test]
fn bindgen_test_layout_hs_compile_error() {
const UNINIT: ::std::mem::MaybeUninit<hs_compile_error> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hs_compile_error>(),
16usize,
concat!("Size of: ", stringify!(hs_compile_error))
);
assert_eq!(
::std::mem::align_of::<hs_compile_error>(),
8usize,
concat!("Alignment of ", stringify!(hs_compile_error))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).message) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hs_compile_error),
"::",
stringify!(message)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).expression) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(hs_compile_error),
"::",
stringify!(expression)
)
);
}
#[doc = " A type containing error details that is returned by the compile calls (@ref\n hs_compile(), @ref hs_compile_multi() and @ref hs_compile_ext_multi()) on\n failure. The caller may inspect the values returned in this type to\n determine the cause of failure.\n\n Common errors generated during the compile process include:\n\n - *Invalid parameter*\n\n An invalid argument was specified in the compile call.\n\n - *Unrecognised flag*\n\n An unrecognised value was passed in the flags argument.\n\n - *Pattern matches empty buffer*\n\n By default, Hyperscan only supports patterns that will *always*\n consume at least one byte of input. Patterns that do not have this\n property (such as `/(abc)?/`) will produce this error unless\n the @ref HS_FLAG_ALLOWEMPTY flag is supplied. Note that such\n patterns will produce a match for *every* byte when scanned.\n\n - *Embedded anchors not supported*\n\n Hyperscan only supports the use of anchor meta-characters (such as\n `^` and `$`) in patterns where they could *only* match\n at the start or end of a buffer. A pattern containing an embedded\n anchor, such as `/abc^def/`, can never match, as there is no\n way for `abc` to precede the start of the data stream.\n\n - *Bounded repeat is too large*\n\n The pattern contains a repeated construct with very large finite\n bounds.\n\n - *Unsupported component type*\n\n An unsupported PCRE construct was used in the pattern.\n\n - *Unable to generate bytecode*\n\n This error indicates that Hyperscan was unable to compile a pattern\n that is syntactically valid. The most common cause is a pattern that is\n very long and complex or contains a large repeated subpattern.\n\n - *Unable to allocate memory*\n\n The library was unable to allocate temporary storage used during\n compilation time.\n\n - *Allocator returned misaligned memory*\n\n The memory allocator (either malloc() or the allocator set with @ref\n hs_set_allocator()) did not correctly return memory suitably aligned\n for the largest representable data type on this platform.\n\n - *Internal error*\n\n An unexpected error occurred: if this error is reported, please contact\n the Hyperscan team with a description of the situation."]
pub type hs_compile_error_t = hs_compile_error;
#[doc = " A type containing information on the target platform which may optionally be\n provided to the compile calls (@ref hs_compile(), @ref hs_compile_multi(),\n @ref hs_compile_ext_multi()).\n\n A hs_platform_info structure may be populated for the current platform by\n using the @ref hs_populate_platform() call."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hs_platform_info {
#[doc = " Information about the target platform which may be used to guide the\n optimisation process of the compile.\n\n Use of this field does not limit the processors that the resulting\n database can run on, but may impact the performance of the resulting\n database."]
pub tune: ::std::os::raw::c_uint,
#[doc = " Relevant CPU features available on the target platform\n\n This value may be produced by combining HS_CPU_FEATURE_* flags (such as\n @ref HS_CPU_FEATURES_AVX2). Multiple CPU features may be or'ed together\n to produce the value."]
pub cpu_features: ::std::os::raw::c_ulonglong,
#[doc = " Reserved for future use."]
pub reserved1: ::std::os::raw::c_ulonglong,
#[doc = " Reserved for future use."]
pub reserved2: ::std::os::raw::c_ulonglong,
}
#[test]
fn bindgen_test_layout_hs_platform_info() {
const UNINIT: ::std::mem::MaybeUninit<hs_platform_info> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hs_platform_info>(),
32usize,
concat!("Size of: ", stringify!(hs_platform_info))
);
assert_eq!(
::std::mem::align_of::<hs_platform_info>(),
8usize,
concat!("Alignment of ", stringify!(hs_platform_info))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tune) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hs_platform_info),
"::",
stringify!(tune)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cpu_features) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(hs_platform_info),
"::",
stringify!(cpu_features)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(hs_platform_info),
"::",
stringify!(reserved1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(hs_platform_info),
"::",
stringify!(reserved2)
)
);
}
#[doc = " A type containing information on the target platform which may optionally be\n provided to the compile calls (@ref hs_compile(), @ref hs_compile_multi(),\n @ref hs_compile_ext_multi()).\n\n A hs_platform_info structure may be populated for the current platform by\n using the @ref hs_populate_platform() call."]
pub type hs_platform_info_t = hs_platform_info;
#[doc = " A type containing information related to an expression that is returned by\n @ref hs_expression_info() or @ref hs_expression_ext_info."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hs_expr_info {
#[doc = " The minimum length in bytes of a match for the pattern.\n\n Note: in some cases when using advanced features to suppress matches\n (such as extended parameters or the @ref HS_FLAG_SINGLEMATCH flag) this\n may represent a conservative lower bound for the true minimum length of\n a match."]
pub min_width: ::std::os::raw::c_uint,
#[doc = " The maximum length in bytes of a match for the pattern. If the pattern\n has an unbounded maximum length, this will be set to the maximum value\n of an unsigned int (UINT_MAX).\n\n Note: in some cases when using advanced features to suppress matches\n (such as extended parameters or the @ref HS_FLAG_SINGLEMATCH flag) this\n may represent a conservative upper bound for the true maximum length of\n a match."]
pub max_width: ::std::os::raw::c_uint,
#[doc = " Whether this expression can produce matches that are not returned in\n order, such as those produced by assertions. Zero if false, non-zero if\n true."]
pub unordered_matches: ::std::os::raw::c_char,
#[doc = " Whether this expression can produce matches at end of data (EOD). In\n streaming mode, EOD matches are raised during @ref hs_close_stream(),\n since it is only when @ref hs_close_stream() is called that the EOD\n location is known. Zero if false, non-zero if true.\n\n Note: trailing `\\b` word boundary assertions may also result in EOD\n matches as end-of-data can act as a word boundary."]
pub matches_at_eod: ::std::os::raw::c_char,
#[doc = " Whether this expression can *only* produce matches at end of data (EOD).\n In streaming mode, all matches for this expression are raised during\n @ref hs_close_stream(). Zero if false, non-zero if true."]
pub matches_only_at_eod: ::std::os::raw::c_char,
}
#[test]
fn bindgen_test_layout_hs_expr_info() {
const UNINIT: ::std::mem::MaybeUninit<hs_expr_info> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hs_expr_info>(),
12usize,
concat!("Size of: ", stringify!(hs_expr_info))
);
assert_eq!(
::std::mem::align_of::<hs_expr_info>(),
4usize,
concat!("Alignment of ", stringify!(hs_expr_info))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).min_width) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hs_expr_info),
"::",
stringify!(min_width)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).max_width) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(hs_expr_info),
"::",
stringify!(max_width)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).unordered_matches) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(hs_expr_info),
"::",
stringify!(unordered_matches)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).matches_at_eod) as usize - ptr as usize },
9usize,
concat!(
"Offset of field: ",
stringify!(hs_expr_info),
"::",
stringify!(matches_at_eod)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).matches_only_at_eod) as usize - ptr as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(hs_expr_info),
"::",
stringify!(matches_only_at_eod)
)
);
}
#[doc = " A type containing information related to an expression that is returned by\n @ref hs_expression_info() or @ref hs_expression_ext_info."]
pub type hs_expr_info_t = hs_expr_info;
#[doc = " A structure containing additional parameters related to an expression,\n passed in at build time to @ref hs_compile_ext_multi() or @ref\n hs_expression_ext_info.\n\n These parameters allow the set of matches produced by a pattern to be\n constrained at compile time, rather than relying on the application to\n process unwanted matches at runtime."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hs_expr_ext {
#[doc = " Flags governing which parts of this structure are to be used by the\n compiler. See @ref HS_EXT_FLAG."]
pub flags: ::std::os::raw::c_ulonglong,
#[doc = " The minimum end offset in the data stream at which this expression\n should match successfully. To use this parameter, set the\n @ref HS_EXT_FLAG_MIN_OFFSET flag in the hs_expr_ext::flags field."]
pub min_offset: ::std::os::raw::c_ulonglong,
#[doc = " The maximum end offset in the data stream at which this expression\n should match successfully. To use this parameter, set the\n @ref HS_EXT_FLAG_MAX_OFFSET flag in the hs_expr_ext::flags field."]
pub max_offset: ::std::os::raw::c_ulonglong,
#[doc = " The minimum match length (from start to end) required to successfully\n match this expression. To use this parameter, set the\n @ref HS_EXT_FLAG_MIN_LENGTH flag in the hs_expr_ext::flags field."]
pub min_length: ::std::os::raw::c_ulonglong,
#[doc = " Allow patterns to approximately match within this edit distance. To use\n this parameter, set the @ref HS_EXT_FLAG_EDIT_DISTANCE flag in the\n hs_expr_ext::flags field."]
pub edit_distance: ::std::os::raw::c_uint,
#[doc = " Allow patterns to approximately match within this Hamming distance. To\n use this parameter, set the @ref HS_EXT_FLAG_HAMMING_DISTANCE flag in the\n hs_expr_ext::flags field."]
pub hamming_distance: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_hs_expr_ext() {
const UNINIT: ::std::mem::MaybeUninit<hs_expr_ext> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hs_expr_ext>(),
40usize,
concat!("Size of: ", stringify!(hs_expr_ext))
);
assert_eq!(
::std::mem::align_of::<hs_expr_ext>(),
8usize,
concat!("Alignment of ", stringify!(hs_expr_ext))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hs_expr_ext),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).min_offset) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(hs_expr_ext),
"::",
stringify!(min_offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).max_offset) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(hs_expr_ext),
"::",
stringify!(max_offset)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).min_length) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(hs_expr_ext),
"::",
stringify!(min_length)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).edit_distance) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(hs_expr_ext),
"::",
stringify!(edit_distance)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).hamming_distance) as usize - ptr as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(hs_expr_ext),
"::",
stringify!(hamming_distance)
)
);
}
#[doc = " A structure containing additional parameters related to an expression,\n passed in at build time to @ref hs_compile_ext_multi() or @ref\n hs_expression_ext_info.\n\n These parameters allow the set of matches produced by a pattern to be\n constrained at compile time, rather than relying on the application to\n process unwanted matches at runtime."]
pub type hs_expr_ext_t = hs_expr_ext;
extern "C" {
#[doc = " The basic regular expression compiler.\n\n This is the function call with which an expression is compiled into a\n Hyperscan database which can be passed to the runtime functions (such as\n @ref hs_scan(), @ref hs_open_stream(), etc.)\n\n @param expression\n The NULL-terminated expression to parse. Note that this string must\n represent ONLY the pattern to be matched, with no delimiters or flags;\n any global flags should be specified with the @p flags argument. For\n example, the expression `/abc?def/i` should be compiled by providing\n `abc?def` as the @p expression, and @ref HS_FLAG_CASELESS as the @a\n flags.\n\n @param flags\n Flags which modify the behaviour of the expression. Multiple flags may\n be used by ORing them together. Valid values are:\n - HS_FLAG_CASELESS - Matching will be performed case-insensitively.\n - HS_FLAG_DOTALL - Matching a `.` will not exclude newlines.\n - HS_FLAG_MULTILINE - `^` and `$` anchors match any newlines in data.\n - HS_FLAG_SINGLEMATCH - Only one match will be generated for the\n expression per stream.\n - HS_FLAG_ALLOWEMPTY - Allow expressions which can match against an\n empty string, such as `.*`.\n - HS_FLAG_UTF8 - Treat this pattern as a sequence of UTF-8 characters.\n - HS_FLAG_UCP - Use Unicode properties for character classes.\n - HS_FLAG_PREFILTER - Compile pattern in prefiltering mode.\n - HS_FLAG_SOM_LEFTMOST - Report the leftmost start of match offset\n when a match is found.\n - HS_FLAG_COMBINATION - Parse the expression in logical combination\n syntax.\n - HS_FLAG_QUIET - Ignore match reporting for this expression. Used for\n the sub-expressions in logical combinations.\n\n @param mode\n Compiler mode flags that affect the database as a whole. One of @ref\n HS_MODE_STREAM or @ref HS_MODE_BLOCK or @ref HS_MODE_VECTORED must be\n supplied, to select between the generation of a streaming, block or\n vectored database. In addition, other flags (beginning with HS_MODE_)\n may be supplied to enable specific features. See @ref HS_MODE_FLAG for\n more details.\n\n @param platform\n If not NULL, the platform structure is used to determine the target\n platform for the database. If NULL, a database suitable for running\n on the current host platform is produced.\n\n @param db\n On success, a pointer to the generated database will be returned in\n this parameter, or NULL on failure. The caller is responsible for\n deallocating the buffer using the @ref hs_free_database() function.\n\n @param error\n If the compile fails, a pointer to a @ref hs_compile_error_t will be\n returned, providing details of the error condition. The caller is\n responsible for deallocating the buffer using the @ref\n hs_free_compile_error() function.\n\n @return\n @ref HS_SUCCESS is returned on successful compilation; @ref\n HS_COMPILER_ERROR on failure, with details provided in the error\n parameter."]
pub fn hs_compile(
expression: *const ::std::os::raw::c_char,
flags: ::std::os::raw::c_uint,
mode: ::std::os::raw::c_uint,
platform: *const hs_platform_info_t,
db: *mut *mut hs_database_t,
error: *mut *mut hs_compile_error_t,
) -> hs_error_t;
}
extern "C" {
#[doc = " The multiple regular expression compiler.\n\n This is the function call with which a set of expressions is compiled into a\n database which can be passed to the runtime functions (such as @ref\n hs_scan(), @ref hs_open_stream(), etc.) Each expression can be labelled with\n a unique integer which is passed into the match callback to identify the\n pattern that has matched.\n\n @param expressions\n Array of NULL-terminated expressions to compile. Note that (as for @ref\n hs_compile()) these strings must contain only the pattern to be\n matched, with no delimiters or flags. For example, the expression\n `/abc?def/i` should be compiled by providing `abc?def` as the first\n string in the @p expressions array, and @ref HS_FLAG_CASELESS as the\n first value in the @p flags array.\n\n @param flags\n Array of flags which modify the behaviour of each expression. Multiple\n flags may be used by ORing them together. Specifying the NULL pointer\n in place of an array will set the flags value for all patterns to zero.\n Valid values are:\n - HS_FLAG_CASELESS - Matching will be performed case-insensitively.\n - HS_FLAG_DOTALL - Matching a `.` will not exclude newlines.\n - HS_FLAG_MULTILINE - `^` and `$` anchors match any newlines in data.\n - HS_FLAG_SINGLEMATCH - Only one match will be generated by patterns\n with this match id per stream.\n - HS_FLAG_ALLOWEMPTY - Allow expressions which can match against an\n empty string, such as `.*`.\n - HS_FLAG_UTF8 - Treat this pattern as a sequence of UTF-8 characters.\n - HS_FLAG_UCP - Use Unicode properties for character classes.\n - HS_FLAG_PREFILTER - Compile pattern in prefiltering mode.\n - HS_FLAG_SOM_LEFTMOST - Report the leftmost start of match offset\n when a match is found.\n - HS_FLAG_COMBINATION - Parse the expression in logical combination\n syntax.\n - HS_FLAG_QUIET - Ignore match reporting for this expression. Used for\n the sub-expressions in logical combinations.\n\n @param ids\n An array of integers specifying the ID number to be associated with the\n corresponding pattern in the expressions array. Specifying the NULL\n pointer in place of an array will set the ID value for all patterns to\n zero.\n\n @param elements\n The number of elements in the input arrays.\n\n @param mode\n Compiler mode flags that affect the database as a whole. One of @ref\n HS_MODE_STREAM or @ref HS_MODE_BLOCK or @ref HS_MODE_VECTORED must be\n supplied, to select between the generation of a streaming, block or\n vectored database. In addition, other flags (beginning with HS_MODE_)\n may be supplied to enable specific features. See @ref HS_MODE_FLAG for\n more details.\n\n @param platform\n If not NULL, the platform structure is used to determine the target\n platform for the database. If NULL, a database suitable for running\n on the current host platform is produced.\n\n @param db\n On success, a pointer to the generated database will be returned in\n this parameter, or NULL on failure. The caller is responsible for\n deallocating the buffer using the @ref hs_free_database() function.\n\n @param error\n If the compile fails, a pointer to a @ref hs_compile_error_t will be\n returned, providing details of the error condition. The caller is\n responsible for deallocating the buffer using the @ref\n hs_free_compile_error() function.\n\n @return\n @ref HS_SUCCESS is returned on successful compilation; @ref\n HS_COMPILER_ERROR on failure, with details provided in the @p error\n parameter.\n"]
pub fn hs_compile_multi(
expressions: *const *const ::std::os::raw::c_char,
flags: *const ::std::os::raw::c_uint,
ids: *const ::std::os::raw::c_uint,
elements: ::std::os::raw::c_uint,
mode: ::std::os::raw::c_uint,
platform: *const hs_platform_info_t,
db: *mut *mut hs_database_t,
error: *mut *mut hs_compile_error_t,
) -> hs_error_t;
}
extern "C" {
#[doc = " The multiple regular expression compiler with extended parameter support.\n\n This function call compiles a group of expressions into a database in the\n same way as @ref hs_compile_multi(), but allows additional parameters to be\n specified via an @ref hs_expr_ext_t structure per expression.\n\n @param expressions\n Array of NULL-terminated expressions to compile. Note that (as for @ref\n hs_compile()) these strings must contain only the pattern to be\n matched, with no delimiters or flags. For example, the expression\n `/abc?def/i` should be compiled by providing `abc?def` as the first\n string in the @p expressions array, and @ref HS_FLAG_CASELESS as the\n first value in the @p flags array.\n\n @param flags\n Array of flags which modify the behaviour of each expression. Multiple\n flags may be used by ORing them together. Specifying the NULL pointer\n in place of an array will set the flags value for all patterns to zero.\n Valid values are:\n - HS_FLAG_CASELESS - Matching will be performed case-insensitively.\n - HS_FLAG_DOTALL - Matching a `.` will not exclude newlines.\n - HS_FLAG_MULTILINE - `^` and `$` anchors match any newlines in data.\n - HS_FLAG_SINGLEMATCH - Only one match will be generated by patterns\n with this match id per stream.\n - HS_FLAG_ALLOWEMPTY - Allow expressions which can match against an\n empty string, such as `.*`.\n - HS_FLAG_UTF8 - Treat this pattern as a sequence of UTF-8 characters.\n - HS_FLAG_UCP - Use Unicode properties for character classes.\n - HS_FLAG_PREFILTER - Compile pattern in prefiltering mode.\n - HS_FLAG_SOM_LEFTMOST - Report the leftmost start of match offset\n when a match is found.\n - HS_FLAG_COMBINATION - Parse the expression in logical combination\n syntax.\n - HS_FLAG_QUIET - Ignore match reporting for this expression. Used for\n the sub-expressions in logical combinations.\n\n @param ids\n An array of integers specifying the ID number to be associated with the\n corresponding pattern in the expressions array. Specifying the NULL\n pointer in place of an array will set the ID value for all patterns to\n zero.\n\n @param ext\n An array of pointers to filled @ref hs_expr_ext_t structures that\n define extended behaviour for each pattern. NULL may be specified if no\n extended behaviour is needed for an individual pattern, or in place of\n the whole array if it is not needed for any expressions. Memory used by\n these structures must be both allocated and freed by the caller.\n\n @param elements\n The number of elements in the input arrays.\n\n @param mode\n Compiler mode flags that affect the database as a whole. One of @ref\n HS_MODE_STREAM, @ref HS_MODE_BLOCK or @ref HS_MODE_VECTORED must be\n supplied, to select between the generation of a streaming, block or\n vectored database. In addition, other flags (beginning with HS_MODE_)\n may be supplied to enable specific features. See @ref HS_MODE_FLAG for\n more details.\n\n @param platform\n If not NULL, the platform structure is used to determine the target\n platform for the database. If NULL, a database suitable for running\n on the current host platform is produced.\n\n @param db\n On success, a pointer to the generated database will be returned in\n this parameter, or NULL on failure. The caller is responsible for\n deallocating the buffer using the @ref hs_free_database() function.\n\n @param error\n If the compile fails, a pointer to a @ref hs_compile_error_t will be\n returned, providing details of the error condition. The caller is\n responsible for deallocating the buffer using the @ref\n hs_free_compile_error() function.\n\n @return\n @ref HS_SUCCESS is returned on successful compilation; @ref\n HS_COMPILER_ERROR on failure, with details provided in the @p error\n parameter.\n"]
pub fn hs_compile_ext_multi(
expressions: *const *const ::std::os::raw::c_char,
flags: *const ::std::os::raw::c_uint,
ids: *const ::std::os::raw::c_uint,
ext: *const *const hs_expr_ext_t,
elements: ::std::os::raw::c_uint,
mode: ::std::os::raw::c_uint,
platform: *const hs_platform_info_t,
db: *mut *mut hs_database_t,
error: *mut *mut hs_compile_error_t,
) -> hs_error_t;
}
extern "C" {
#[doc = " The basic pure literal expression compiler.\n\n This is the function call with which a pure literal expression (not a\n common regular expression) is compiled into a Hyperscan database which\n can be passed to the runtime functions (such as @ref hs_scan(),\n @ref hs_open_stream(), etc.)\n\n @param expression\n The NULL-terminated expression to parse. Note that this string must\n represent ONLY the pattern to be matched, with no delimiters or flags;\n any global flags should be specified with the @p flags argument. For\n example, the expression `/abc?def/i` should be compiled by providing\n `abc?def` as the @p expression, and @ref HS_FLAG_CASELESS as the @a\n flags. Meanwhile, the string content shall be fully parsed in a literal\n sense without any regular grammars. For example, the @p expression\n `abc?` simply means a char sequence of `a`, `b`, `c`, and `?`. The `?`\n here doesn't mean 0 or 1 quantifier under regular semantics.\n\n @param flags\n Flags which modify the behaviour of the expression. Multiple flags may\n be used by ORing them together. Compared to @ref hs_compile(), fewer\n valid values are provided:\n - HS_FLAG_CASELESS - Matching will be performed case-insensitively.\n - HS_FLAG_SINGLEMATCH - Only one match will be generated for the\n expression per stream.\n - HS_FLAG_SOM_LEFTMOST - Report the leftmost start of match offset\n when a match is found.\n\n @param len\n The length of the text content of the pure literal expression. As the\n text content indicated by @p expression is treated as single character\n one by one, the special terminating character `\\0` should be allowed\n to appear in expression, and not treated as a terminator for a string.\n Thus, the end of a pure literal expression cannot be indicated by\n identifying `\\0`, but by counting to the expression length.\n\n @param mode\n Compiler mode flags that affect the database as a whole. One of @ref\n HS_MODE_STREAM or @ref HS_MODE_BLOCK or @ref HS_MODE_VECTORED must be\n supplied, to select between the generation of a streaming, block or\n vectored database. In addition, other flags (beginning with HS_MODE_)\n may be supplied to enable specific features. See @ref HS_MODE_FLAG for\n more details.\n\n @param platform\n If not NULL, the platform structure is used to determine the target\n platform for the database. If NULL, a database suitable for running\n on the current host platform is produced.\n\n @param db\n On success, a pointer to the generated database will be returned in\n this parameter, or NULL on failure. The caller is responsible for\n deallocating the buffer using the @ref hs_free_database() function.\n\n @param error\n If the compile fails, a pointer to a @ref hs_compile_error_t will be\n returned, providing details of the error condition. The caller is\n responsible for deallocating the buffer using the @ref\n hs_free_compile_error() function.\n\n @return\n @ref HS_SUCCESS is returned on successful compilation; @ref\n HS_COMPILER_ERROR on failure, with details provided in the error\n parameter."]
pub fn hs_compile_lit(
expression: *const ::std::os::raw::c_char,
flags: ::std::os::raw::c_uint,
len: usize,
mode: ::std::os::raw::c_uint,
platform: *const hs_platform_info_t,
db: *mut *mut hs_database_t,
error: *mut *mut hs_compile_error_t,
) -> hs_error_t;
}
extern "C" {
#[doc = " The multiple pure literal expression compiler.\n\n This is the function call with which a set of pure literal expressions is\n compiled into a database which can be passed to the runtime functions (such\n as @ref hs_scan(), @ref hs_open_stream(), etc.) Each expression can be\n labelled with a unique integer which is passed into the match callback to\n identify the pattern that has matched.\n\n @param expressions\n The NULL-terminated expression to parse. Note that this string must\n represent ONLY the pattern to be matched, with no delimiters or flags;\n any global flags should be specified with the @p flags argument. For\n example, the expression `/abc?def/i` should be compiled by providing\n `abc?def` as the @p expression, and @ref HS_FLAG_CASELESS as the @a\n flags. Meanwhile, the string content shall be fully parsed in a literal\n sense without any regular grammars. For example, the @p expression\n `abc?` simply means a char sequence of `a`, `b`, `c`, and `?`. The `?`\n here doesn't mean 0 or 1 quantifier under regular semantics.\n\n @param flags\n Array of flags which modify the behaviour of each expression. Multiple\n flags may be used by ORing them together. Specifying the NULL pointer\n in place of an array will set the flags value for all patterns to zero.\n Compared to @ref hs_compile_multi(), fewer valid values are provided:\n - HS_FLAG_CASELESS - Matching will be performed case-insensitively.\n - HS_FLAG_SINGLEMATCH - Only one match will be generated for the\n expression per stream.\n - HS_FLAG_SOM_LEFTMOST - Report the leftmost start of match offset\n when a match is found.\n\n @param ids\n An array of integers specifying the ID number to be associated with the\n corresponding pattern in the expressions array. Specifying the NULL\n pointer in place of an array will set the ID value for all patterns to\n zero.\n\n @param lens\n Array of lengths of the text content of each pure literal expression.\n As the text content indicated by @p expression is treated as single\n character one by one, the special terminating character `\\0` should be\n allowed to appear in expression, and not treated as a terminator for a\n string. Thus, the end of a pure literal expression cannot be indicated\n by identifying `\\0`, but by counting to the expression length.\n\n @param elements\n The number of elements in the input arrays.\n\n @param mode\n Compiler mode flags that affect the database as a whole. One of @ref\n HS_MODE_STREAM or @ref HS_MODE_BLOCK or @ref HS_MODE_VECTORED must be\n supplied, to select between the generation of a streaming, block or\n vectored database. In addition, other flags (beginning with HS_MODE_)\n may be supplied to enable specific features. See @ref HS_MODE_FLAG for\n more details.\n\n @param platform\n If not NULL, the platform structure is used to determine the target\n platform for the database. If NULL, a database suitable for running\n on the current host platform is produced.\n\n @param db\n On success, a pointer to the generated database will be returned in\n this parameter, or NULL on failure. The caller is responsible for\n deallocating the buffer using the @ref hs_free_database() function.\n\n @param error\n If the compile fails, a pointer to a @ref hs_compile_error_t will be\n returned, providing details of the error condition. The caller is\n responsible for deallocating the buffer using the @ref\n hs_free_compile_error() function.\n\n @return\n @ref HS_SUCCESS is returned on successful compilation; @ref\n HS_COMPILER_ERROR on failure, with details provided in the error\n parameter."]
pub fn hs_compile_lit_multi(
expressions: *const *const ::std::os::raw::c_char,
flags: *const ::std::os::raw::c_uint,
ids: *const ::std::os::raw::c_uint,
lens: *const usize,
elements: ::std::os::raw::c_uint,
mode: ::std::os::raw::c_uint,
platform: *const hs_platform_info_t,
db: *mut *mut hs_database_t,
error: *mut *mut hs_compile_error_t,
) -> hs_error_t;
}
extern "C" {
#[doc = " Free an error structure generated by @ref hs_compile(), @ref\n hs_compile_multi() or @ref hs_compile_ext_multi().\n\n @param error\n The @ref hs_compile_error_t to be freed. NULL may also be safely\n provided.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_free_compile_error(error: *mut hs_compile_error_t) -> hs_error_t;
}
extern "C" {
#[doc = " Utility function providing information about a regular expression. The\n information provided in @ref hs_expr_info_t includes the minimum and maximum\n width of a pattern match.\n\n Note: successful analysis of an expression with this function does not imply\n that compilation of the same expression (via @ref hs_compile(), @ref\n hs_compile_multi() or @ref hs_compile_ext_multi()) would succeed. This\n function may return @ref HS_SUCCESS for regular expressions that Hyperscan\n cannot compile.\n\n Note: some per-pattern flags (such as @ref HS_FLAG_ALLOWEMPTY, @ref\n HS_FLAG_SOM_LEFTMOST) are accepted by this call, but as they do not affect\n the properties returned in the @ref hs_expr_info_t structure, they will not\n affect the outcome of this function.\n\n @param expression\n The NULL-terminated expression to parse. Note that this string must\n represent ONLY the pattern to be matched, with no delimiters or flags;\n any global flags should be specified with the @p flags argument. For\n example, the expression `/abc?def/i` should be compiled by providing\n `abc?def` as the @p expression, and @ref HS_FLAG_CASELESS as the @a\n flags.\n\n @param flags\n Flags which modify the behaviour of the expression. Multiple flags may\n be used by ORing them together. Valid values are:\n - HS_FLAG_CASELESS - Matching will be performed case-insensitively.\n - HS_FLAG_DOTALL - Matching a `.` will not exclude newlines.\n - HS_FLAG_MULTILINE - `^` and `$` anchors match any newlines in data.\n - HS_FLAG_SINGLEMATCH - Only one match will be generated by the\n expression per stream.\n - HS_FLAG_ALLOWEMPTY - Allow expressions which can match against an\n empty string, such as `.*`.\n - HS_FLAG_UTF8 - Treat this pattern as a sequence of UTF-8 characters.\n - HS_FLAG_UCP - Use Unicode properties for character classes.\n - HS_FLAG_PREFILTER - Compile pattern in prefiltering mode.\n - HS_FLAG_SOM_LEFTMOST - Report the leftmost start of match offset\n when a match is found.\n - HS_FLAG_QUIET - This flag will be ignored.\n\n @param info\n On success, a pointer to the pattern information will be returned in\n this parameter, or NULL on failure. This structure is allocated using\n the allocator supplied in @ref hs_set_allocator() (or malloc() if no\n allocator was set) and should be freed by the caller.\n\n @param error\n If the call fails, a pointer to a @ref hs_compile_error_t will be\n returned, providing details of the error condition. The caller is\n responsible for deallocating the buffer using the @ref\n hs_free_compile_error() function.\n\n @return\n @ref HS_SUCCESS is returned on successful compilation; @ref\n HS_COMPILER_ERROR on failure, with details provided in the error\n parameter."]
pub fn hs_expression_info(
expression: *const ::std::os::raw::c_char,
flags: ::std::os::raw::c_uint,
info: *mut *mut hs_expr_info_t,
error: *mut *mut hs_compile_error_t,
) -> hs_error_t;
}
extern "C" {
#[doc = " Utility function providing information about a regular expression, with\n extended parameter support. The information provided in @ref hs_expr_info_t\n includes the minimum and maximum width of a pattern match.\n\n Note: successful analysis of an expression with this function does not imply\n that compilation of the same expression (via @ref hs_compile(), @ref\n hs_compile_multi() or @ref hs_compile_ext_multi()) would succeed. This\n function may return @ref HS_SUCCESS for regular expressions that Hyperscan\n cannot compile.\n\n Note: some per-pattern flags (such as @ref HS_FLAG_ALLOWEMPTY, @ref\n HS_FLAG_SOM_LEFTMOST) are accepted by this call, but as they do not affect\n the properties returned in the @ref hs_expr_info_t structure, they will not\n affect the outcome of this function.\n\n @param expression\n The NULL-terminated expression to parse. Note that this string must\n represent ONLY the pattern to be matched, with no delimiters or flags;\n any global flags should be specified with the @p flags argument. For\n example, the expression `/abc?def/i` should be compiled by providing\n `abc?def` as the @p expression, and @ref HS_FLAG_CASELESS as the @a\n flags.\n\n @param flags\n Flags which modify the behaviour of the expression. Multiple flags may\n be used by ORing them together. Valid values are:\n - HS_FLAG_CASELESS - Matching will be performed case-insensitively.\n - HS_FLAG_DOTALL - Matching a `.` will not exclude newlines.\n - HS_FLAG_MULTILINE - `^` and `$` anchors match any newlines in data.\n - HS_FLAG_SINGLEMATCH - Only one match will be generated by the\n expression per stream.\n - HS_FLAG_ALLOWEMPTY - Allow expressions which can match against an\n empty string, such as `.*`.\n - HS_FLAG_UTF8 - Treat this pattern as a sequence of UTF-8 characters.\n - HS_FLAG_UCP - Use Unicode properties for character classes.\n - HS_FLAG_PREFILTER - Compile pattern in prefiltering mode.\n - HS_FLAG_SOM_LEFTMOST - Report the leftmost start of match offset\n when a match is found.\n - HS_FLAG_QUIET - This flag will be ignored.\n\n @param ext\n A pointer to a filled @ref hs_expr_ext_t structure that defines\n extended behaviour for this pattern. NULL may be specified if no\n extended parameters are needed.\n\n @param info\n On success, a pointer to the pattern information will be returned in\n this parameter, or NULL on failure. This structure is allocated using\n the allocator supplied in @ref hs_set_allocator() (or malloc() if no\n allocator was set) and should be freed by the caller.\n\n @param error\n If the call fails, a pointer to a @ref hs_compile_error_t will be\n returned, providing details of the error condition. The caller is\n responsible for deallocating the buffer using the @ref\n hs_free_compile_error() function.\n\n @return\n @ref HS_SUCCESS is returned on successful compilation; @ref\n HS_COMPILER_ERROR on failure, with details provided in the error\n parameter."]
pub fn hs_expression_ext_info(
expression: *const ::std::os::raw::c_char,
flags: ::std::os::raw::c_uint,
ext: *const hs_expr_ext_t,
info: *mut *mut hs_expr_info_t,
error: *mut *mut hs_compile_error_t,
) -> hs_error_t;
}
extern "C" {
#[doc = " Populates the platform information based on the current host.\n\n @param platform\n On success, the pointed to structure is populated based on the current\n host.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_populate_platform(platform: *mut hs_platform_info_t) -> hs_error_t;
}
#[doc = " Definition of the stream identifier type."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hs_stream {
_unused: [u8; 0],
}
#[doc = " The stream identifier returned by @ref hs_open_stream()."]
pub type hs_stream_t = hs_stream;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct hs_scratch {
_unused: [u8; 0],
}
#[doc = " A Hyperscan scratch space."]
pub type hs_scratch_t = hs_scratch;
#[doc = " Definition of the match event callback function type.\n\n A callback function matching the defined type must be provided by the\n application calling the @ref hs_scan(), @ref hs_scan_vector() or @ref\n hs_scan_stream() functions (or other streaming calls which can produce\n matches).\n\n This callback function will be invoked whenever a match is located in the\n target data during the execution of a scan. The details of the match are\n passed in as parameters to the callback function, and the callback function\n should return a value indicating whether or not matching should continue on\n the target data. If no callbacks are desired from a scan call, NULL may be\n provided in order to suppress match production.\n\n This callback function should not attempt to call Hyperscan API functions on\n the same stream nor should it attempt to reuse the scratch space allocated\n for the API calls that caused it to be triggered. Making another call to the\n Hyperscan library with completely independent parameters should work (for\n example, scanning a different database in a new stream and with new scratch\n space), but reusing data structures like stream state and/or scratch space\n will produce undefined behavior.\n\n @param id\n The ID number of the expression that matched. If the expression was a\n single expression compiled with @ref hs_compile(), this value will be\n zero.\n\n @param from\n - If a start of match flag is enabled for the current pattern, this\n argument will be set to the start of match for the pattern assuming\n that that start of match value lies within the current 'start of match\n horizon' chosen by one of the SOM_HORIZON mode flags.\n\n - If the start of match value lies outside this horizon (possible only\n when the SOM_HORIZON value is not @ref HS_MODE_SOM_HORIZON_LARGE),\n the @p from value will be set to @ref HS_OFFSET_PAST_HORIZON.\n\n - This argument will be set to zero if the Start of Match flag is not\n enabled for the given pattern.\n\n @param to\n The offset after the last byte that matches the expression.\n\n @param flags\n This is provided for future use and is unused at present.\n\n @param context\n The pointer supplied by the user to the @ref hs_scan(), @ref\n hs_scan_vector() or @ref hs_scan_stream() function.\n\n @return\n Non-zero if the matching should cease, else zero. If scanning is\n performed in streaming mode and a non-zero value is returned, any\n subsequent calls to @ref hs_scan_stream() for that stream will\n immediately return with @ref HS_SCAN_TERMINATED."]
pub type match_event_handler = ::std::option::Option<
unsafe extern "C" fn(
id: ::std::os::raw::c_uint,
from: ::std::os::raw::c_ulonglong,
to: ::std::os::raw::c_ulonglong,
flags: ::std::os::raw::c_uint,
context: *mut ::std::os::raw::c_void,
) -> ::std::os::raw::c_int,
>;
extern "C" {
#[doc = " Open and initialise a stream.\n\n @param db\n A compiled pattern database.\n\n @param flags\n Flags modifying the behaviour of the stream. This parameter is provided\n for future use and is unused at present.\n\n @param stream\n On success, a pointer to the generated @ref hs_stream_t will be\n returned; NULL on failure.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_open_stream(
db: *const hs_database_t,
flags: ::std::os::raw::c_uint,
stream: *mut *mut hs_stream_t,
) -> hs_error_t;
}
extern "C" {
#[doc = " Write data to be scanned to the opened stream.\n\n This is the function call in which the actual pattern matching takes place\n as data is written to the stream. Matches will be returned via the @ref\n match_event_handler callback supplied.\n\n @param id\n The stream ID (returned by @ref hs_open_stream()) to which the data\n will be written.\n\n @param data\n Pointer to the data to be scanned.\n\n @param length\n The number of bytes to scan.\n\n @param flags\n Flags modifying the behaviour of the stream. This parameter is provided\n for future use and is unused at present.\n\n @param scratch\n A per-thread scratch space allocated by @ref hs_alloc_scratch().\n\n @param onEvent\n Pointer to a match event callback function. If a NULL pointer is given,\n no matches will be returned.\n\n @param ctxt\n The user defined pointer which will be passed to the callback function\n when a match occurs.\n\n @return\n Returns @ref HS_SUCCESS on success; @ref HS_SCAN_TERMINATED if the\n match callback indicated that scanning should stop; other values on\n error."]
pub fn hs_scan_stream(
id: *mut hs_stream_t,
data: *const ::std::os::raw::c_char,
length: ::std::os::raw::c_uint,
flags: ::std::os::raw::c_uint,
scratch: *mut hs_scratch_t,
onEvent: match_event_handler,
ctxt: *mut ::std::os::raw::c_void,
) -> hs_error_t;
}
extern "C" {
#[doc = " Close a stream.\n\n This function completes matching on the given stream and frees the memory\n associated with the stream state. After this call, the stream pointed to by\n @p id is invalid and can no longer be used. To reuse the stream state after\n completion, rather than closing it, the @ref hs_reset_stream function can be\n used.\n\n This function must be called for any stream created with @ref\n hs_open_stream(), even if scanning has been terminated by a non-zero return\n from the match callback function.\n\n Note: This operation may result in matches being returned (via calls to the\n match event callback) for expressions anchored to the end of the data stream\n (for example, via the use of the `$` meta-character). If these matches are\n not desired, NULL may be provided as the @ref match_event_handler callback.\n\n If NULL is provided as the @ref match_event_handler callback, it is\n permissible to provide a NULL scratch.\n\n @param id\n The stream ID returned by @ref hs_open_stream().\n\n @param scratch\n A per-thread scratch space allocated by @ref hs_alloc_scratch(). This is\n allowed to be NULL only if the @p onEvent callback is also NULL.\n\n @param onEvent\n Pointer to a match event callback function. If a NULL pointer is given,\n no matches will be returned.\n\n @param ctxt\n The user defined pointer which will be passed to the callback function\n when a match occurs.\n\n @return\n Returns @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_close_stream(
id: *mut hs_stream_t,
scratch: *mut hs_scratch_t,
onEvent: match_event_handler,
ctxt: *mut ::std::os::raw::c_void,
) -> hs_error_t;
}
extern "C" {
#[doc = " Reset a stream to an initial state.\n\n Conceptually, this is equivalent to performing @ref hs_close_stream() on the\n given stream, followed by a @ref hs_open_stream(). This new stream replaces\n the original stream in memory, avoiding the overhead of freeing the old\n stream and allocating the new one.\n\n Note: This operation may result in matches being returned (via calls to the\n match event callback) for expressions anchored to the end of the original\n data stream (for example, via the use of the `$` meta-character). If these\n matches are not desired, NULL may be provided as the @ref match_event_handler\n callback.\n\n Note: the stream will also be tied to the same database.\n\n @param id\n The stream (as created by @ref hs_open_stream()) to be replaced.\n\n @param flags\n Flags modifying the behaviour of the stream. This parameter is provided\n for future use and is unused at present.\n\n @param scratch\n A per-thread scratch space allocated by @ref hs_alloc_scratch(). This is\n allowed to be NULL only if the @p onEvent callback is also NULL.\n\n @param onEvent\n Pointer to a match event callback function. If a NULL pointer is given,\n no matches will be returned.\n\n @param context\n The user defined pointer which will be passed to the callback function\n when a match occurs.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_reset_stream(
id: *mut hs_stream_t,
flags: ::std::os::raw::c_uint,
scratch: *mut hs_scratch_t,
onEvent: match_event_handler,
context: *mut ::std::os::raw::c_void,
) -> hs_error_t;
}
extern "C" {
#[doc = " Duplicate the given stream. The new stream will have the same state as the\n original including the current stream offset.\n\n @param to_id\n On success, a pointer to the new, copied @ref hs_stream_t will be\n returned; NULL on failure.\n\n @param from_id\n The stream (as created by @ref hs_open_stream()) to be copied.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_copy_stream(to_id: *mut *mut hs_stream_t, from_id: *const hs_stream_t) -> hs_error_t;
}
extern "C" {
#[doc = " Duplicate the given 'from' stream state onto the 'to' stream. The 'to' stream\n will first be reset (reporting any EOD matches if a non-NULL @p onEvent\n callback handler is provided).\n\n Note: the 'to' stream and the 'from' stream must be open against the same\n database.\n\n @param to_id\n On success, a pointer to the new, copied @ref hs_stream_t will be\n returned; NULL on failure.\n\n @param from_id\n The stream (as created by @ref hs_open_stream()) to be copied.\n\n @param scratch\n A per-thread scratch space allocated by @ref hs_alloc_scratch(). This is\n allowed to be NULL only if the @p onEvent callback is also NULL.\n\n @param onEvent\n Pointer to a match event callback function. If a NULL pointer is given,\n no matches will be returned.\n\n @param context\n The user defined pointer which will be passed to the callback function\n when a match occurs.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_reset_and_copy_stream(
to_id: *mut hs_stream_t,
from_id: *const hs_stream_t,
scratch: *mut hs_scratch_t,
onEvent: match_event_handler,
context: *mut ::std::os::raw::c_void,
) -> hs_error_t;
}
extern "C" {
#[doc = " Creates a compressed representation of the provided stream in the buffer\n provided. This compressed representation can be converted back into a stream\n state by using @ref hs_expand_stream() or @ref hs_reset_and_expand_stream().\n The size of the compressed representation will be placed into @p used_space.\n\n If there is not sufficient space in the buffer to hold the compressed\n representation, @ref HS_INSUFFICIENT_SPACE will be returned and @p used_space\n will be populated with the amount of space required.\n\n Note: this function does not close the provided stream, you may continue to\n use the stream or to free it with @ref hs_close_stream().\n\n @param stream\n The stream (as created by @ref hs_open_stream()) to be compressed.\n\n @param buf\n Buffer to write the compressed representation into. Note: if the call is\n just being used to determine the amount of space required, it is allowed\n to pass NULL here and @p buf_space as 0.\n\n @param buf_space\n The number of bytes in @p buf. If buf_space is too small, the call will\n fail with @ref HS_INSUFFICIENT_SPACE.\n\n @param used_space\n Pointer to where the amount of used space will be written to. The used\n buffer space is always less than or equal to @p buf_space. If the call\n fails with @ref HS_INSUFFICIENT_SPACE, this pointer will be used to\n write out the amount of buffer space required.\n\n @return\n @ref HS_SUCCESS on success, @ref HS_INSUFFICIENT_SPACE if the provided\n buffer is too small."]
pub fn hs_compress_stream(
stream: *const hs_stream_t,
buf: *mut ::std::os::raw::c_char,
buf_space: usize,
used_space: *mut usize,
) -> hs_error_t;
}
extern "C" {
#[doc = " Decompresses a compressed representation created by @ref hs_compress_stream()\n into a new stream.\n\n Note: @p buf must correspond to a complete compressed representation created\n by @ref hs_compress_stream() of a stream that was opened against @p db. It is\n not always possible to detect misuse of this API and behaviour is undefined\n if these properties are not satisfied.\n\n @param db\n The compiled pattern database that the compressed stream was opened\n against.\n\n @param stream\n On success, a pointer to the expanded @ref hs_stream_t will be\n returned; NULL on failure.\n\n @param buf\n A compressed representation of a stream. These compressed forms are\n created by @ref hs_compress_stream().\n\n @param buf_size\n The size in bytes of the compressed representation.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_expand_stream(
db: *const hs_database_t,
stream: *mut *mut hs_stream_t,
buf: *const ::std::os::raw::c_char,
buf_size: usize,
) -> hs_error_t;
}
extern "C" {
#[doc = " Decompresses a compressed representation created by @ref hs_compress_stream()\n on top of the 'to' stream. The 'to' stream will first be reset (reporting\n any EOD matches if a non-NULL @p onEvent callback handler is provided).\n\n Note: the 'to' stream must be opened against the same database as the\n compressed stream.\n\n Note: @p buf must correspond to a complete compressed representation created\n by @ref hs_compress_stream() of a stream that was opened against @p db. It is\n not always possible to detect misuse of this API and behaviour is undefined\n if these properties are not satisfied.\n\n @param to_stream\n A pointer to a valid stream state. A pointer to the expanded @ref\n hs_stream_t will be returned; NULL on failure.\n\n @param buf\n A compressed representation of a stream. These compressed forms are\n created by @ref hs_compress_stream().\n\n @param buf_size\n The size in bytes of the compressed representation.\n\n @param scratch\n A per-thread scratch space allocated by @ref hs_alloc_scratch(). This is\n allowed to be NULL only if the @p onEvent callback is also NULL.\n\n @param onEvent\n Pointer to a match event callback function. If a NULL pointer is given,\n no matches will be returned.\n\n @param context\n The user defined pointer which will be passed to the callback function\n when a match occurs.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_reset_and_expand_stream(
to_stream: *mut hs_stream_t,
buf: *const ::std::os::raw::c_char,
buf_size: usize,
scratch: *mut hs_scratch_t,
onEvent: match_event_handler,
context: *mut ::std::os::raw::c_void,
) -> hs_error_t;
}
extern "C" {
#[doc = " The block (non-streaming) regular expression scanner.\n\n This is the function call in which the actual pattern matching takes place\n for block-mode pattern databases.\n\n @param db\n A compiled pattern database.\n\n @param data\n Pointer to the data to be scanned.\n\n @param length\n The number of bytes to scan.\n\n @param flags\n Flags modifying the behaviour of this function. This parameter is\n provided for future use and is unused at present.\n\n @param scratch\n A per-thread scratch space allocated by @ref hs_alloc_scratch() for this\n database.\n\n @param onEvent\n Pointer to a match event callback function. If a NULL pointer is given,\n no matches will be returned.\n\n @param context\n The user defined pointer which will be passed to the callback function.\n\n @return\n Returns @ref HS_SUCCESS on success; @ref HS_SCAN_TERMINATED if the\n match callback indicated that scanning should stop; other values on\n error."]
pub fn hs_scan(
db: *const hs_database_t,
data: *const ::std::os::raw::c_char,
length: ::std::os::raw::c_uint,
flags: ::std::os::raw::c_uint,
scratch: *mut hs_scratch_t,
onEvent: match_event_handler,
context: *mut ::std::os::raw::c_void,
) -> hs_error_t;
}
extern "C" {
#[doc = " The vectored regular expression scanner.\n\n This is the function call in which the actual pattern matching takes place\n for vectoring-mode pattern databases.\n\n @param db\n A compiled pattern database.\n\n @param data\n An array of pointers to the data blocks to be scanned.\n\n @param length\n An array of lengths (in bytes) of each data block to scan.\n\n @param count\n Number of data blocks to scan. This should correspond to the size of\n of the @p data and @p length arrays.\n\n @param flags\n Flags modifying the behaviour of this function. This parameter is\n provided for future use and is unused at present.\n\n @param scratch\n A per-thread scratch space allocated by @ref hs_alloc_scratch() for\n this database.\n\n @param onEvent\n Pointer to a match event callback function. If a NULL pointer is given,\n no matches will be returned.\n\n @param context\n The user defined pointer which will be passed to the callback function.\n\n @return\n Returns @ref HS_SUCCESS on success; @ref HS_SCAN_TERMINATED if the match\n callback indicated that scanning should stop; other values on error."]
pub fn hs_scan_vector(
db: *const hs_database_t,
data: *const *const ::std::os::raw::c_char,
length: *const ::std::os::raw::c_uint,
count: ::std::os::raw::c_uint,
flags: ::std::os::raw::c_uint,
scratch: *mut hs_scratch_t,
onEvent: match_event_handler,
context: *mut ::std::os::raw::c_void,
) -> hs_error_t;
}
extern "C" {
#[doc = " Allocate a \"scratch\" space for use by Hyperscan.\n\n This is required for runtime use, and one scratch space per thread, or\n concurrent caller, is required. Any allocator callback set by @ref\n hs_set_scratch_allocator() or @ref hs_set_allocator() will be used by this\n function.\n\n @param db\n The database, as produced by @ref hs_compile().\n\n @param scratch\n On first allocation, a pointer to NULL should be provided so a new\n scratch can be allocated. If a scratch block has been previously\n allocated, then a pointer to it should be passed back in to see if it\n is valid for this database block. If a new scratch block is required,\n the original will be freed and the new one returned, otherwise the\n previous scratch block will be returned. On success, the scratch block\n will be suitable for use with the provided database in addition to any\n databases that original scratch space was suitable for.\n\n @return\n @ref HS_SUCCESS on successful allocation; @ref HS_NOMEM if the\n allocation fails. Other errors may be returned if invalid parameters\n are specified."]
pub fn hs_alloc_scratch(
db: *const hs_database_t,
scratch: *mut *mut hs_scratch_t,
) -> hs_error_t;
}
extern "C" {
#[doc = " Allocate a scratch space that is a clone of an existing scratch space.\n\n This is useful when multiple concurrent threads will be using the same set\n of compiled databases, and another scratch space is required. Any allocator\n callback set by @ref hs_set_scratch_allocator() or @ref hs_set_allocator()\n will be used by this function.\n\n @param src\n The existing @ref hs_scratch_t to be cloned.\n\n @param dest\n A pointer to the new scratch space will be returned here.\n\n @return\n @ref HS_SUCCESS on success; @ref HS_NOMEM if the allocation fails.\n Other errors may be returned if invalid parameters are specified."]
pub fn hs_clone_scratch(src: *const hs_scratch_t, dest: *mut *mut hs_scratch_t) -> hs_error_t;
}
extern "C" {
#[doc = " Provides the size of the given scratch space.\n\n @param scratch\n A per-thread scratch space allocated by @ref hs_alloc_scratch() or @ref\n hs_clone_scratch().\n\n @param scratch_size\n On success, the size of the scratch space in bytes is placed in this\n parameter.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_scratch_size(scratch: *const hs_scratch_t, scratch_size: *mut usize) -> hs_error_t;
}
extern "C" {
#[doc = " Free a scratch block previously allocated by @ref hs_alloc_scratch() or @ref\n hs_clone_scratch().\n\n The free callback set by @ref hs_set_scratch_allocator() or @ref\n hs_set_allocator() will be used by this function.\n\n @param scratch\n The scratch block to be freed. NULL may also be safely provided.\n\n @return\n @ref HS_SUCCESS on success, other values on failure."]
pub fn hs_free_scratch(scratch: *mut hs_scratch_t) -> hs_error_t;
}
pub type __builtin_va_list = *mut ::std::os::raw::c_char;
pub type __uint128_t = u128;