/* automatically generated by rust-bindgen 0.64.0 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct __BindgenBitfieldUnit { storage: Storage, } impl __BindgenBitfieldUnit { #[inline] pub const fn new(storage: Storage) -> Self { Self { storage } } } impl __BindgenBitfieldUnit 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 DUCKDB_API_0_3_1: u32 = 1; pub const DUCKDB_API_0_3_2: u32 = 2; pub const DUCKDB_API_LATEST: u32 = 2; pub const DUCKDB_API_VERSION: u32 = 2; pub const true_: u32 = 1; pub const false_: u32 = 0; pub const __bool_true_false_are_defined: u32 = 1; pub const __WORDSIZE: u32 = 64; 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; 14usize] = 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 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 __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_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 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 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 __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, 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 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; pub type intmax_t = ::std::os::raw::c_long; pub type uintmax_t = ::std::os::raw::c_ulong; 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; #[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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(sigval)) ); assert_eq!( ::std::mem::align_of::(), 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, pub sigev_notify_attributes: *mut pthread_attr_t, } #[test] fn bindgen_test_layout_sigevent() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 32usize, concat!("Size of: ", stringify!(sigevent)) ); assert_eq!( ::std::mem::align_of::(), 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, 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(sigaction)) ); assert_eq!( ::std::mem::align_of::(), 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; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sigvec { pub sv_handler: ::std::option::Option, 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(sigvec)) ); assert_eq!( ::std::mem::align_of::(), 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(sigstack)) ); assert_eq!( ::std::mem::align_of::(), 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, ) -> ::std::option::Option< unsafe extern "C" fn( arg1: ::std::os::raw::c_int, arg2: ::std::option::Option, ), >; } #[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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(timeval)) ); assert_eq!( ::std::mem::align_of::(), 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 144usize, concat!("Size of: ", stringify!(rusage)) ); assert_eq!( ::std::mem::align_of::(), 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 96usize, concat!("Size of: ", stringify!(rusage_info_v0)) ); assert_eq!( ::std::mem::align_of::(), 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 144usize, concat!("Size of: ", stringify!(rusage_info_v1)) ); assert_eq!( ::std::mem::align_of::(), 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 160usize, concat!("Size of: ", stringify!(rusage_info_v2)) ); assert_eq!( ::std::mem::align_of::(), 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 232usize, concat!("Size of: ", stringify!(rusage_info_v3)) ); assert_eq!( ::std::mem::align_of::(), 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 296usize, concat!("Size of: ", stringify!(rusage_info_v4)) ); assert_eq!( ::std::mem::align_of::(), 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 304usize, concat!("Size of: ", stringify!(rusage_info_v5)) ); assert_eq!( ::std::mem::align_of::(), 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 464usize, concat!("Size of: ", stringify!(rusage_info_v6)) ); assert_eq!( ::std::mem::align_of::(), 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(rlimit)) ); assert_eq!( ::std::mem::align_of::(), 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(proc_rlimit_control_wakeupmon)) ); assert_eq!( ::std::mem::align_of::(), 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::(), 4usize, concat!("Size of: ", stringify!(wait__bindgen_ty_1)) ); assert_eq!( ::std::mem::align_of::(), 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::(), 4usize, concat!("Size of: ", stringify!(wait__bindgen_ty_2)) ); assert_eq!( ::std::mem::align_of::(), 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(wait)) ); assert_eq!( ::std::mem::align_of::(), 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(div_t)) ); assert_eq!( ::std::mem::align_of::(), 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(ldiv_t)) ); assert_eq!( ::std::mem::align_of::(), 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 = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(lldiv_t)) ); assert_eq!( ::std::mem::align_of::(), 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) -> ::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" { 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; } pub type idx_t = u64; pub const DUCKDB_TYPE_DUCKDB_TYPE_INVALID: DUCKDB_TYPE = 0; pub const DUCKDB_TYPE_DUCKDB_TYPE_BOOLEAN: DUCKDB_TYPE = 1; pub const DUCKDB_TYPE_DUCKDB_TYPE_TINYINT: DUCKDB_TYPE = 2; pub const DUCKDB_TYPE_DUCKDB_TYPE_SMALLINT: DUCKDB_TYPE = 3; pub const DUCKDB_TYPE_DUCKDB_TYPE_INTEGER: DUCKDB_TYPE = 4; pub const DUCKDB_TYPE_DUCKDB_TYPE_BIGINT: DUCKDB_TYPE = 5; pub const DUCKDB_TYPE_DUCKDB_TYPE_UTINYINT: DUCKDB_TYPE = 6; pub const DUCKDB_TYPE_DUCKDB_TYPE_USMALLINT: DUCKDB_TYPE = 7; pub const DUCKDB_TYPE_DUCKDB_TYPE_UINTEGER: DUCKDB_TYPE = 8; pub const DUCKDB_TYPE_DUCKDB_TYPE_UBIGINT: DUCKDB_TYPE = 9; pub const DUCKDB_TYPE_DUCKDB_TYPE_FLOAT: DUCKDB_TYPE = 10; pub const DUCKDB_TYPE_DUCKDB_TYPE_DOUBLE: DUCKDB_TYPE = 11; pub const DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP: DUCKDB_TYPE = 12; pub const DUCKDB_TYPE_DUCKDB_TYPE_DATE: DUCKDB_TYPE = 13; pub const DUCKDB_TYPE_DUCKDB_TYPE_TIME: DUCKDB_TYPE = 14; pub const DUCKDB_TYPE_DUCKDB_TYPE_INTERVAL: DUCKDB_TYPE = 15; pub const DUCKDB_TYPE_DUCKDB_TYPE_HUGEINT: DUCKDB_TYPE = 16; pub const DUCKDB_TYPE_DUCKDB_TYPE_VARCHAR: DUCKDB_TYPE = 17; pub const DUCKDB_TYPE_DUCKDB_TYPE_BLOB: DUCKDB_TYPE = 18; pub const DUCKDB_TYPE_DUCKDB_TYPE_DECIMAL: DUCKDB_TYPE = 19; pub const DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP_S: DUCKDB_TYPE = 20; pub const DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP_MS: DUCKDB_TYPE = 21; pub const DUCKDB_TYPE_DUCKDB_TYPE_TIMESTAMP_NS: DUCKDB_TYPE = 22; pub const DUCKDB_TYPE_DUCKDB_TYPE_ENUM: DUCKDB_TYPE = 23; pub const DUCKDB_TYPE_DUCKDB_TYPE_LIST: DUCKDB_TYPE = 24; pub const DUCKDB_TYPE_DUCKDB_TYPE_STRUCT: DUCKDB_TYPE = 25; pub const DUCKDB_TYPE_DUCKDB_TYPE_MAP: DUCKDB_TYPE = 26; pub const DUCKDB_TYPE_DUCKDB_TYPE_UUID: DUCKDB_TYPE = 27; pub const DUCKDB_TYPE_DUCKDB_TYPE_UNION: DUCKDB_TYPE = 28; pub const DUCKDB_TYPE_DUCKDB_TYPE_BIT: DUCKDB_TYPE = 29; pub type DUCKDB_TYPE = ::std::os::raw::c_uint; pub use self::DUCKDB_TYPE as duckdb_type; #[doc = "! Days are stored as days since 1970-01-01\n! Use the duckdb_from_date/duckdb_to_date function to extract individual information"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct duckdb_date { pub days: i32, } #[test] fn bindgen_test_layout_duckdb_date() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 4usize, concat!("Size of: ", stringify!(duckdb_date)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(duckdb_date)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).days) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(duckdb_date), "::", stringify!(days)) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct duckdb_date_struct { pub year: i32, pub month: i8, pub day: i8, } #[test] fn bindgen_test_layout_duckdb_date_struct() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(duckdb_date_struct)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(duckdb_date_struct)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).year) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(duckdb_date_struct), "::", stringify!(year) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).month) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(duckdb_date_struct), "::", stringify!(month) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).day) as usize - ptr as usize }, 5usize, concat!( "Offset of field: ", stringify!(duckdb_date_struct), "::", stringify!(day) ) ); } #[doc = "! Time is stored as microseconds since 00:00:00\n! Use the duckdb_from_time/duckdb_to_time function to extract individual information"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct duckdb_time { pub micros: i64, } #[test] fn bindgen_test_layout_duckdb_time() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(duckdb_time)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(duckdb_time)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).micros) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(duckdb_time), "::", stringify!(micros)) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct duckdb_time_struct { pub hour: i8, pub min: i8, pub sec: i8, pub micros: i32, } #[test] fn bindgen_test_layout_duckdb_time_struct() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(duckdb_time_struct)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(duckdb_time_struct)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).hour) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(duckdb_time_struct), "::", stringify!(hour) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).min) as usize - ptr as usize }, 1usize, concat!( "Offset of field: ", stringify!(duckdb_time_struct), "::", stringify!(min) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).sec) as usize - ptr as usize }, 2usize, concat!( "Offset of field: ", stringify!(duckdb_time_struct), "::", stringify!(sec) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).micros) as usize - ptr as usize }, 4usize, concat!( "Offset of field: ", stringify!(duckdb_time_struct), "::", stringify!(micros) ) ); } #[doc = "! Timestamps are stored as microseconds since 1970-01-01\n! Use the duckdb_from_timestamp/duckdb_to_timestamp function to extract individual information"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct duckdb_timestamp { pub micros: i64, } #[test] fn bindgen_test_layout_duckdb_timestamp() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 8usize, concat!("Size of: ", stringify!(duckdb_timestamp)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(duckdb_timestamp)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).micros) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(duckdb_timestamp), "::", stringify!(micros) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct duckdb_timestamp_struct { pub date: duckdb_date_struct, pub time: duckdb_time_struct, } #[test] fn bindgen_test_layout_duckdb_timestamp_struct() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(duckdb_timestamp_struct)) ); assert_eq!( ::std::mem::align_of::(), 4usize, concat!("Alignment of ", stringify!(duckdb_timestamp_struct)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).date) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(duckdb_timestamp_struct), "::", stringify!(date) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(duckdb_timestamp_struct), "::", stringify!(time) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct duckdb_interval { pub months: i32, pub days: i32, pub micros: i64, } #[test] fn bindgen_test_layout_duckdb_interval() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(duckdb_interval)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(duckdb_interval)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).months) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(duckdb_interval), "::", stringify!(months) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).days) as usize - ptr as usize }, 4usize, concat!("Offset of field: ", stringify!(duckdb_interval), "::", stringify!(days)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).micros) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(duckdb_interval), "::", stringify!(micros) ) ); } #[doc = "! Hugeints are composed in a (lower, upper) component\n! The value of the hugeint is upper * 2^64 + lower\n! For easy usage, the functions duckdb_hugeint_to_double/duckdb_double_to_hugeint are recommended"] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct duckdb_hugeint { pub lower: u64, pub upper: i64, } #[test] fn bindgen_test_layout_duckdb_hugeint() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(duckdb_hugeint)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(duckdb_hugeint)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).lower) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(duckdb_hugeint), "::", stringify!(lower)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).upper) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(duckdb_hugeint), "::", stringify!(upper)) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct duckdb_decimal { pub width: u8, pub scale: u8, pub value: duckdb_hugeint, } #[test] fn bindgen_test_layout_duckdb_decimal() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 24usize, concat!("Size of: ", stringify!(duckdb_decimal)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(duckdb_decimal)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).width) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(duckdb_decimal), "::", stringify!(width)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).scale) as usize - ptr as usize }, 1usize, concat!("Offset of field: ", stringify!(duckdb_decimal), "::", stringify!(scale)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(duckdb_decimal), "::", stringify!(value)) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct duckdb_string { pub data: *mut ::std::os::raw::c_char, pub size: idx_t, } #[test] fn bindgen_test_layout_duckdb_string() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(duckdb_string)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(duckdb_string)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(duckdb_string), "::", stringify!(data)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(duckdb_string), "::", stringify!(size)) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct duckdb_blob { pub data: *mut ::std::os::raw::c_void, pub size: idx_t, } #[test] fn bindgen_test_layout_duckdb_blob() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(duckdb_blob)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(duckdb_blob)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(duckdb_blob), "::", stringify!(data)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, 8usize, concat!("Offset of field: ", stringify!(duckdb_blob), "::", stringify!(size)) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct duckdb_list_entry { pub offset: u64, pub length: u64, } #[test] fn bindgen_test_layout_duckdb_list_entry() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 16usize, concat!("Size of: ", stringify!(duckdb_list_entry)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(duckdb_list_entry)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(duckdb_list_entry), "::", stringify!(offset) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(duckdb_list_entry), "::", stringify!(length) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct duckdb_column { pub __deprecated_data: *mut ::std::os::raw::c_void, pub __deprecated_nullmask: *mut bool, pub __deprecated_type: duckdb_type, pub __deprecated_name: *mut ::std::os::raw::c_char, pub internal_data: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_duckdb_column() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 40usize, concat!("Size of: ", stringify!(duckdb_column)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(duckdb_column)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__deprecated_data) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(duckdb_column), "::", stringify!(__deprecated_data) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__deprecated_nullmask) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(duckdb_column), "::", stringify!(__deprecated_nullmask) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__deprecated_type) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(duckdb_column), "::", stringify!(__deprecated_type) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__deprecated_name) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(duckdb_column), "::", stringify!(__deprecated_name) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).internal_data) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(duckdb_column), "::", stringify!(internal_data) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct duckdb_result { pub __deprecated_column_count: idx_t, pub __deprecated_row_count: idx_t, pub __deprecated_rows_changed: idx_t, pub __deprecated_columns: *mut duckdb_column, pub __deprecated_error_message: *mut ::std::os::raw::c_char, pub internal_data: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout_duckdb_result() { const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::(), 48usize, concat!("Size of: ", stringify!(duckdb_result)) ); assert_eq!( ::std::mem::align_of::(), 8usize, concat!("Alignment of ", stringify!(duckdb_result)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__deprecated_column_count) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(duckdb_result), "::", stringify!(__deprecated_column_count) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__deprecated_row_count) as usize - ptr as usize }, 8usize, concat!( "Offset of field: ", stringify!(duckdb_result), "::", stringify!(__deprecated_row_count) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__deprecated_rows_changed) as usize - ptr as usize }, 16usize, concat!( "Offset of field: ", stringify!(duckdb_result), "::", stringify!(__deprecated_rows_changed) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__deprecated_columns) as usize - ptr as usize }, 24usize, concat!( "Offset of field: ", stringify!(duckdb_result), "::", stringify!(__deprecated_columns) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__deprecated_error_message) as usize - ptr as usize }, 32usize, concat!( "Offset of field: ", stringify!(duckdb_result), "::", stringify!(__deprecated_error_message) ) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).internal_data) as usize - ptr as usize }, 40usize, concat!( "Offset of field: ", stringify!(duckdb_result), "::", stringify!(internal_data) ) ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _duckdb_database { pub __db: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__duckdb_database() { const UNINIT: ::std::mem::MaybeUninit<_duckdb_database> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_duckdb_database>(), 8usize, concat!("Size of: ", stringify!(_duckdb_database)) ); assert_eq!( ::std::mem::align_of::<_duckdb_database>(), 8usize, concat!("Alignment of ", stringify!(_duckdb_database)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__db) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_duckdb_database), "::", stringify!(__db) ) ); } pub type duckdb_database = *mut _duckdb_database; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _duckdb_connection { pub __conn: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__duckdb_connection() { const UNINIT: ::std::mem::MaybeUninit<_duckdb_connection> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_duckdb_connection>(), 8usize, concat!("Size of: ", stringify!(_duckdb_connection)) ); assert_eq!( ::std::mem::align_of::<_duckdb_connection>(), 8usize, concat!("Alignment of ", stringify!(_duckdb_connection)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__conn) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_duckdb_connection), "::", stringify!(__conn) ) ); } pub type duckdb_connection = *mut _duckdb_connection; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _duckdb_prepared_statement { pub __prep: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__duckdb_prepared_statement() { const UNINIT: ::std::mem::MaybeUninit<_duckdb_prepared_statement> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_duckdb_prepared_statement>(), 8usize, concat!("Size of: ", stringify!(_duckdb_prepared_statement)) ); assert_eq!( ::std::mem::align_of::<_duckdb_prepared_statement>(), 8usize, concat!("Alignment of ", stringify!(_duckdb_prepared_statement)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__prep) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_duckdb_prepared_statement), "::", stringify!(__prep) ) ); } pub type duckdb_prepared_statement = *mut _duckdb_prepared_statement; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _duckdb_extracted_statements { pub __extrac: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__duckdb_extracted_statements() { const UNINIT: ::std::mem::MaybeUninit<_duckdb_extracted_statements> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_duckdb_extracted_statements>(), 8usize, concat!("Size of: ", stringify!(_duckdb_extracted_statements)) ); assert_eq!( ::std::mem::align_of::<_duckdb_extracted_statements>(), 8usize, concat!("Alignment of ", stringify!(_duckdb_extracted_statements)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__extrac) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_duckdb_extracted_statements), "::", stringify!(__extrac) ) ); } pub type duckdb_extracted_statements = *mut _duckdb_extracted_statements; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _duckdb_pending_result { pub __pend: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__duckdb_pending_result() { const UNINIT: ::std::mem::MaybeUninit<_duckdb_pending_result> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_duckdb_pending_result>(), 8usize, concat!("Size of: ", stringify!(_duckdb_pending_result)) ); assert_eq!( ::std::mem::align_of::<_duckdb_pending_result>(), 8usize, concat!("Alignment of ", stringify!(_duckdb_pending_result)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__pend) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_duckdb_pending_result), "::", stringify!(__pend) ) ); } pub type duckdb_pending_result = *mut _duckdb_pending_result; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _duckdb_appender { pub __appn: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__duckdb_appender() { const UNINIT: ::std::mem::MaybeUninit<_duckdb_appender> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_duckdb_appender>(), 8usize, concat!("Size of: ", stringify!(_duckdb_appender)) ); assert_eq!( ::std::mem::align_of::<_duckdb_appender>(), 8usize, concat!("Alignment of ", stringify!(_duckdb_appender)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__appn) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_duckdb_appender), "::", stringify!(__appn) ) ); } pub type duckdb_appender = *mut _duckdb_appender; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _duckdb_arrow { pub __arrw: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__duckdb_arrow() { const UNINIT: ::std::mem::MaybeUninit<_duckdb_arrow> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_duckdb_arrow>(), 8usize, concat!("Size of: ", stringify!(_duckdb_arrow)) ); assert_eq!( ::std::mem::align_of::<_duckdb_arrow>(), 8usize, concat!("Alignment of ", stringify!(_duckdb_arrow)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__arrw) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(_duckdb_arrow), "::", stringify!(__arrw)) ); } pub type duckdb_arrow = *mut _duckdb_arrow; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _duckdb_config { pub __cnfg: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__duckdb_config() { const UNINIT: ::std::mem::MaybeUninit<_duckdb_config> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_duckdb_config>(), 8usize, concat!("Size of: ", stringify!(_duckdb_config)) ); assert_eq!( ::std::mem::align_of::<_duckdb_config>(), 8usize, concat!("Alignment of ", stringify!(_duckdb_config)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__cnfg) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_duckdb_config), "::", stringify!(__cnfg) ) ); } pub type duckdb_config = *mut _duckdb_config; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _duckdb_arrow_schema { pub __arrs: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__duckdb_arrow_schema() { const UNINIT: ::std::mem::MaybeUninit<_duckdb_arrow_schema> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_duckdb_arrow_schema>(), 8usize, concat!("Size of: ", stringify!(_duckdb_arrow_schema)) ); assert_eq!( ::std::mem::align_of::<_duckdb_arrow_schema>(), 8usize, concat!("Alignment of ", stringify!(_duckdb_arrow_schema)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__arrs) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_duckdb_arrow_schema), "::", stringify!(__arrs) ) ); } pub type duckdb_arrow_schema = *mut _duckdb_arrow_schema; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _duckdb_arrow_array { pub __arra: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__duckdb_arrow_array() { const UNINIT: ::std::mem::MaybeUninit<_duckdb_arrow_array> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_duckdb_arrow_array>(), 8usize, concat!("Size of: ", stringify!(_duckdb_arrow_array)) ); assert_eq!( ::std::mem::align_of::<_duckdb_arrow_array>(), 8usize, concat!("Alignment of ", stringify!(_duckdb_arrow_array)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__arra) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_duckdb_arrow_array), "::", stringify!(__arra) ) ); } pub type duckdb_arrow_array = *mut _duckdb_arrow_array; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _duckdb_logical_type { pub __lglt: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__duckdb_logical_type() { const UNINIT: ::std::mem::MaybeUninit<_duckdb_logical_type> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_duckdb_logical_type>(), 8usize, concat!("Size of: ", stringify!(_duckdb_logical_type)) ); assert_eq!( ::std::mem::align_of::<_duckdb_logical_type>(), 8usize, concat!("Alignment of ", stringify!(_duckdb_logical_type)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__lglt) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_duckdb_logical_type), "::", stringify!(__lglt) ) ); } pub type duckdb_logical_type = *mut _duckdb_logical_type; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _duckdb_data_chunk { pub __dtck: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__duckdb_data_chunk() { const UNINIT: ::std::mem::MaybeUninit<_duckdb_data_chunk> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_duckdb_data_chunk>(), 8usize, concat!("Size of: ", stringify!(_duckdb_data_chunk)) ); assert_eq!( ::std::mem::align_of::<_duckdb_data_chunk>(), 8usize, concat!("Alignment of ", stringify!(_duckdb_data_chunk)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__dtck) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_duckdb_data_chunk), "::", stringify!(__dtck) ) ); } pub type duckdb_data_chunk = *mut _duckdb_data_chunk; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _duckdb_vector { pub __vctr: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__duckdb_vector() { const UNINIT: ::std::mem::MaybeUninit<_duckdb_vector> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_duckdb_vector>(), 8usize, concat!("Size of: ", stringify!(_duckdb_vector)) ); assert_eq!( ::std::mem::align_of::<_duckdb_vector>(), 8usize, concat!("Alignment of ", stringify!(_duckdb_vector)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__vctr) as usize - ptr as usize }, 0usize, concat!( "Offset of field: ", stringify!(_duckdb_vector), "::", stringify!(__vctr) ) ); } pub type duckdb_vector = *mut _duckdb_vector; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _duckdb_value { pub __val: *mut ::std::os::raw::c_void, } #[test] fn bindgen_test_layout__duckdb_value() { const UNINIT: ::std::mem::MaybeUninit<_duckdb_value> = ::std::mem::MaybeUninit::uninit(); let ptr = UNINIT.as_ptr(); assert_eq!( ::std::mem::size_of::<_duckdb_value>(), 8usize, concat!("Size of: ", stringify!(_duckdb_value)) ); assert_eq!( ::std::mem::align_of::<_duckdb_value>(), 8usize, concat!("Alignment of ", stringify!(_duckdb_value)) ); assert_eq!( unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize }, 0usize, concat!("Offset of field: ", stringify!(_duckdb_value), "::", stringify!(__val)) ); } pub type duckdb_value = *mut _duckdb_value; pub const duckdb_state_DuckDBSuccess: duckdb_state = 0; pub const duckdb_state_DuckDBError: duckdb_state = 1; pub type duckdb_state = ::std::os::raw::c_uint; pub const duckdb_pending_state_DUCKDB_PENDING_RESULT_READY: duckdb_pending_state = 0; pub const duckdb_pending_state_DUCKDB_PENDING_RESULT_NOT_READY: duckdb_pending_state = 1; pub const duckdb_pending_state_DUCKDB_PENDING_ERROR: duckdb_pending_state = 2; pub type duckdb_pending_state = ::std::os::raw::c_uint; extern "C" { #[doc = "Creates a new database or opens an existing database file stored at the the given path.\nIf no path is given a new in-memory database is created instead.\n\n path: Path to the database file on disk, or `nullptr` or `:memory:` to open an in-memory database.\n out_database: The result database object.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_open(path: *const ::std::os::raw::c_char, out_database: *mut duckdb_database) -> duckdb_state; } extern "C" { #[doc = "Extended version of duckdb_open. Creates a new database or opens an existing database file stored at the the given path.\n\n path: Path to the database file on disk, or `nullptr` or `:memory:` to open an in-memory database.\n out_database: The result database object.\n config: (Optional) configuration used to start up the database system.\n out_error: If set and the function returns DuckDBError, this will contain the reason why the start-up failed.\nNote that the error must be freed using `duckdb_free`.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_open_ext( path: *const ::std::os::raw::c_char, out_database: *mut duckdb_database, config: duckdb_config, out_error: *mut *mut ::std::os::raw::c_char, ) -> duckdb_state; } extern "C" { #[doc = "Closes the specified database and de-allocates all memory allocated for that database.\nThis should be called after you are done with any database allocated through `duckdb_open`.\nNote that failing to call `duckdb_close` (in case of e.g. a program crash) will not cause data corruption.\nStill it is recommended to always correctly close a database object after you are done with it.\n\n database: The database object to shut down."] pub fn duckdb_close(database: *mut duckdb_database); } extern "C" { #[doc = "Opens a connection to a database. Connections are required to query the database, and store transactional state\nassociated with the connection.\n\n database: The database file to connect to.\n out_connection: The result connection object.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_connect(database: duckdb_database, out_connection: *mut duckdb_connection) -> duckdb_state; } extern "C" { #[doc = "Closes the specified connection and de-allocates all memory allocated for that connection.\n\n connection: The connection to close."] pub fn duckdb_disconnect(connection: *mut duckdb_connection); } extern "C" { #[doc = "Returns the version of the linked DuckDB, with a version postfix for dev versions\n\nUsually used for developing C extensions that must return this for a compatibility check."] pub fn duckdb_library_version() -> *const ::std::os::raw::c_char; } extern "C" { #[doc = "Initializes an empty configuration object that can be used to provide start-up options for the DuckDB instance\nthrough `duckdb_open_ext`.\n\nThis will always succeed unless there is a malloc failure.\n\n out_config: The result configuration object.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_create_config(out_config: *mut duckdb_config) -> duckdb_state; } extern "C" { #[doc = "This returns the total amount of configuration options available for usage with `duckdb_get_config_flag`.\n\nThis should not be called in a loop as it internally loops over all the options.\n\n returns: The amount of config options available."] pub fn duckdb_config_count() -> usize; } extern "C" { #[doc = "Obtains a human-readable name and description of a specific configuration option. This can be used to e.g.\ndisplay configuration options. This will succeed unless `index` is out of range (i.e. `>= duckdb_config_count`).\n\nThe result name or description MUST NOT be freed.\n\n index: The index of the configuration option (between 0 and `duckdb_config_count`)\n out_name: A name of the configuration flag.\n out_description: A description of the configuration flag.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_get_config_flag( index: usize, out_name: *mut *const ::std::os::raw::c_char, out_description: *mut *const ::std::os::raw::c_char, ) -> duckdb_state; } extern "C" { #[doc = "Sets the specified option for the specified configuration. The configuration option is indicated by name.\nTo obtain a list of config options, see `duckdb_get_config_flag`.\n\nIn the source code, configuration options are defined in `config.cpp`.\n\nThis can fail if either the name is invalid, or if the value provided for the option is invalid.\n\n duckdb_config: The configuration object to set the option on.\n name: The name of the configuration flag to set.\n option: The value to set the configuration flag to.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_set_config( config: duckdb_config, name: *const ::std::os::raw::c_char, option: *const ::std::os::raw::c_char, ) -> duckdb_state; } extern "C" { #[doc = "Destroys the specified configuration option and de-allocates all memory allocated for the object.\n\n config: The configuration object to destroy."] pub fn duckdb_destroy_config(config: *mut duckdb_config); } extern "C" { #[doc = "Executes a SQL query within a connection and stores the full (materialized) result in the out_result pointer.\nIf the query fails to execute, DuckDBError is returned and the error message can be retrieved by calling\n`duckdb_result_error`.\n\nNote that after running `duckdb_query`, `duckdb_destroy_result` must be called on the result object even if the\nquery fails, otherwise the error stored within the result will not be freed correctly.\n\n connection: The connection to perform the query in.\n query: The SQL query to run.\n out_result: The query result.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_query( connection: duckdb_connection, query: *const ::std::os::raw::c_char, out_result: *mut duckdb_result, ) -> duckdb_state; } extern "C" { #[doc = "Closes the result and de-allocates all memory allocated for that connection.\n\n result: The result to destroy."] pub fn duckdb_destroy_result(result: *mut duckdb_result); } extern "C" { #[doc = "Returns the column name of the specified column. The result should not need be freed; the column names will\nautomatically be destroyed when the result is destroyed.\n\nReturns `NULL` if the column is out of range.\n\n result: The result object to fetch the column name from.\n col: The column index.\n returns: The column name of the specified column."] pub fn duckdb_column_name(result: *mut duckdb_result, col: idx_t) -> *const ::std::os::raw::c_char; } extern "C" { #[doc = "Returns the column type of the specified column.\n\nReturns `DUCKDB_TYPE_INVALID` if the column is out of range.\n\n result: The result object to fetch the column type from.\n col: The column index.\n returns: The column type of the specified column."] pub fn duckdb_column_type(result: *mut duckdb_result, col: idx_t) -> duckdb_type; } extern "C" { #[doc = "Returns the logical column type of the specified column.\n\nThe return type of this call should be destroyed with `duckdb_destroy_logical_type`.\n\nReturns `NULL` if the column is out of range.\n\n result: The result object to fetch the column type from.\n col: The column index.\n returns: The logical column type of the specified column."] pub fn duckdb_column_logical_type(result: *mut duckdb_result, col: idx_t) -> duckdb_logical_type; } extern "C" { #[doc = "Returns the number of columns present in a the result object.\n\n result: The result object.\n returns: The number of columns present in the result object."] pub fn duckdb_column_count(result: *mut duckdb_result) -> idx_t; } extern "C" { #[doc = "Returns the number of rows present in a the result object.\n\n result: The result object.\n returns: The number of rows present in the result object."] pub fn duckdb_row_count(result: *mut duckdb_result) -> idx_t; } extern "C" { #[doc = "Returns the number of rows changed by the query stored in the result. This is relevant only for INSERT/UPDATE/DELETE\nqueries. For other queries the rows_changed will be 0.\n\n result: The result object.\n returns: The number of rows changed."] pub fn duckdb_rows_changed(result: *mut duckdb_result) -> idx_t; } extern "C" { #[doc = "DEPRECATED**: Prefer using `duckdb_result_get_chunk` instead.\n\nReturns the data of a specific column of a result in columnar format.\n\nThe function returns a dense array which contains the result data. The exact type stored in the array depends on the\ncorresponding duckdb_type (as provided by `duckdb_column_type`). For the exact type by which the data should be\naccessed, see the comments in [the types section](types) or the `DUCKDB_TYPE` enum.\n\nFor example, for a column of type `DUCKDB_TYPE_INTEGER`, rows can be accessed in the following manner:\n```c\nint32_t *data = (int32_t *) duckdb_column_data(&result, 0);\nprintf(\"Data for row %d: %d\\n\", row, data[row]);\n```\n\n result: The result object to fetch the column data from.\n col: The column index.\n returns: The column data of the specified column."] pub fn duckdb_column_data(result: *mut duckdb_result, col: idx_t) -> *mut ::std::os::raw::c_void; } extern "C" { #[doc = "DEPRECATED**: Prefer using `duckdb_result_get_chunk` instead.\n\nReturns the nullmask of a specific column of a result in columnar format. The nullmask indicates for every row\nwhether or not the corresponding row is `NULL`. If a row is `NULL`, the values present in the array provided\nby `duckdb_column_data` are undefined.\n\n```c\nint32_t *data = (int32_t *) duckdb_column_data(&result, 0);\nbool *nullmask = duckdb_nullmask_data(&result, 0);\nif (nullmask[row]) {\nprintf(\"Data for row %d: NULL\\n\", row);\n} else {\nprintf(\"Data for row %d: %d\\n\", row, data[row]);\n}\n```\n\n result: The result object to fetch the nullmask from.\n col: The column index.\n returns: The nullmask of the specified column."] pub fn duckdb_nullmask_data(result: *mut duckdb_result, col: idx_t) -> *mut bool; } extern "C" { #[doc = "Returns the error message contained within the result. The error is only set if `duckdb_query` returns `DuckDBError`.\n\nThe result of this function must not be freed. It will be cleaned up when `duckdb_destroy_result` is called.\n\n result: The result object to fetch the error from.\n returns: The error of the result."] pub fn duckdb_result_error(result: *mut duckdb_result) -> *const ::std::os::raw::c_char; } extern "C" { #[doc = "Fetches a data chunk from the duckdb_result. This function should be called repeatedly until the result is exhausted.\n\nThe result must be destroyed with `duckdb_destroy_data_chunk`.\n\nThis function supersedes all `duckdb_value` functions, as well as the `duckdb_column_data` and `duckdb_nullmask_data`\nfunctions. It results in significantly better performance, and should be preferred in newer code-bases.\n\nIf this function is used, none of the other result functions can be used and vice versa (i.e. this function cannot be\nmixed with the legacy result functions).\n\nUse `duckdb_result_chunk_count` to figure out how many chunks there are in the result.\n\n result: The result object to fetch the data chunk from.\n chunk_index: The chunk index to fetch from.\n returns: The resulting data chunk. Returns `NULL` if the chunk index is out of bounds."] pub fn duckdb_result_get_chunk(result: duckdb_result, chunk_index: idx_t) -> duckdb_data_chunk; } extern "C" { #[doc = "Returns the number of data chunks present in the result.\n\n result: The result object\n returns: The resulting data chunk. Returns `NULL` if the chunk index is out of bounds."] pub fn duckdb_result_chunk_count(result: duckdb_result) -> idx_t; } extern "C" { #[doc = " returns: The boolean value at the specified location, or false if the value cannot be converted."] pub fn duckdb_value_boolean(result: *mut duckdb_result, col: idx_t, row: idx_t) -> bool; } extern "C" { #[doc = " returns: The int8_t value at the specified location, or 0 if the value cannot be converted."] pub fn duckdb_value_int8(result: *mut duckdb_result, col: idx_t, row: idx_t) -> i8; } extern "C" { #[doc = " returns: The int16_t value at the specified location, or 0 if the value cannot be converted."] pub fn duckdb_value_int16(result: *mut duckdb_result, col: idx_t, row: idx_t) -> i16; } extern "C" { #[doc = " returns: The int32_t value at the specified location, or 0 if the value cannot be converted."] pub fn duckdb_value_int32(result: *mut duckdb_result, col: idx_t, row: idx_t) -> i32; } extern "C" { #[doc = " returns: The int64_t value at the specified location, or 0 if the value cannot be converted."] pub fn duckdb_value_int64(result: *mut duckdb_result, col: idx_t, row: idx_t) -> i64; } extern "C" { #[doc = " returns: The duckdb_hugeint value at the specified location, or 0 if the value cannot be converted."] pub fn duckdb_value_hugeint(result: *mut duckdb_result, col: idx_t, row: idx_t) -> duckdb_hugeint; } extern "C" { #[doc = " returns: The duckdb_decimal value at the specified location, or 0 if the value cannot be converted."] pub fn duckdb_value_decimal(result: *mut duckdb_result, col: idx_t, row: idx_t) -> duckdb_decimal; } extern "C" { #[doc = " returns: The uint8_t value at the specified location, or 0 if the value cannot be converted."] pub fn duckdb_value_uint8(result: *mut duckdb_result, col: idx_t, row: idx_t) -> u8; } extern "C" { #[doc = " returns: The uint16_t value at the specified location, or 0 if the value cannot be converted."] pub fn duckdb_value_uint16(result: *mut duckdb_result, col: idx_t, row: idx_t) -> u16; } extern "C" { #[doc = " returns: The uint32_t value at the specified location, or 0 if the value cannot be converted."] pub fn duckdb_value_uint32(result: *mut duckdb_result, col: idx_t, row: idx_t) -> u32; } extern "C" { #[doc = " returns: The uint64_t value at the specified location, or 0 if the value cannot be converted."] pub fn duckdb_value_uint64(result: *mut duckdb_result, col: idx_t, row: idx_t) -> u64; } extern "C" { #[doc = " returns: The float value at the specified location, or 0 if the value cannot be converted."] pub fn duckdb_value_float(result: *mut duckdb_result, col: idx_t, row: idx_t) -> f32; } extern "C" { #[doc = " returns: The double value at the specified location, or 0 if the value cannot be converted."] pub fn duckdb_value_double(result: *mut duckdb_result, col: idx_t, row: idx_t) -> f64; } extern "C" { #[doc = " returns: The duckdb_date value at the specified location, or 0 if the value cannot be converted."] pub fn duckdb_value_date(result: *mut duckdb_result, col: idx_t, row: idx_t) -> duckdb_date; } extern "C" { #[doc = " returns: The duckdb_time value at the specified location, or 0 if the value cannot be converted."] pub fn duckdb_value_time(result: *mut duckdb_result, col: idx_t, row: idx_t) -> duckdb_time; } extern "C" { #[doc = " returns: The duckdb_timestamp value at the specified location, or 0 if the value cannot be converted."] pub fn duckdb_value_timestamp(result: *mut duckdb_result, col: idx_t, row: idx_t) -> duckdb_timestamp; } extern "C" { #[doc = " returns: The duckdb_interval value at the specified location, or 0 if the value cannot be converted."] pub fn duckdb_value_interval(result: *mut duckdb_result, col: idx_t, row: idx_t) -> duckdb_interval; } extern "C" { #[doc = " DEPRECATED: use duckdb_value_string instead. This function does not work correctly if the string contains null bytes.\n returns: The text value at the specified location as a null-terminated string, or nullptr if the value cannot be\nconverted. The result must be freed with `duckdb_free`."] pub fn duckdb_value_varchar(result: *mut duckdb_result, col: idx_t, row: idx_t) -> *mut ::std::os::raw::c_char; } extern "C" { #[doc = "s\n returns: The string value at the specified location.\nThe result must be freed with `duckdb_free`."] pub fn duckdb_value_string(result: *mut duckdb_result, col: idx_t, row: idx_t) -> duckdb_string; } extern "C" { #[doc = " DEPRECATED: use duckdb_value_string_internal instead. This function does not work correctly if the string contains\nnull bytes.\n returns: The char* value at the specified location. ONLY works on VARCHAR columns and does not auto-cast.\nIf the column is NOT a VARCHAR column this function will return NULL.\n\nThe result must NOT be freed."] pub fn duckdb_value_varchar_internal( result: *mut duckdb_result, col: idx_t, row: idx_t, ) -> *mut ::std::os::raw::c_char; } extern "C" { #[doc = " DEPRECATED: use duckdb_value_string_internal instead. This function does not work correctly if the string contains\nnull bytes.\n returns: The char* value at the specified location. ONLY works on VARCHAR columns and does not auto-cast.\nIf the column is NOT a VARCHAR column this function will return NULL.\n\nThe result must NOT be freed."] pub fn duckdb_value_string_internal(result: *mut duckdb_result, col: idx_t, row: idx_t) -> duckdb_string; } extern "C" { #[doc = " returns: The duckdb_blob value at the specified location. Returns a blob with blob.data set to nullptr if the\nvalue cannot be converted. The resulting \"blob.data\" must be freed with `duckdb_free.`"] pub fn duckdb_value_blob(result: *mut duckdb_result, col: idx_t, row: idx_t) -> duckdb_blob; } extern "C" { #[doc = " returns: Returns true if the value at the specified index is NULL, and false otherwise."] pub fn duckdb_value_is_null(result: *mut duckdb_result, col: idx_t, row: idx_t) -> bool; } extern "C" { #[doc = "Allocate `size` bytes of memory using the duckdb internal malloc function. Any memory allocated in this manner\nshould be freed using `duckdb_free`.\n\n size: The number of bytes to allocate.\n returns: A pointer to the allocated memory region."] pub fn duckdb_malloc(size: usize) -> *mut ::std::os::raw::c_void; } extern "C" { #[doc = "Free a value returned from `duckdb_malloc`, `duckdb_value_varchar` or `duckdb_value_blob`.\n\n ptr: The memory region to de-allocate."] pub fn duckdb_free(ptr: *mut ::std::os::raw::c_void); } extern "C" { #[doc = "The internal vector size used by DuckDB.\nThis is the amount of tuples that will fit into a data chunk created by `duckdb_create_data_chunk`.\n\n returns: The vector size."] pub fn duckdb_vector_size() -> idx_t; } extern "C" { #[doc = "Decompose a `duckdb_date` object into year, month and date (stored as `duckdb_date_struct`).\n\n date: The date object, as obtained from a `DUCKDB_TYPE_DATE` column.\n returns: The `duckdb_date_struct` with the decomposed elements."] pub fn duckdb_from_date(date: duckdb_date) -> duckdb_date_struct; } extern "C" { #[doc = "Re-compose a `duckdb_date` from year, month and date (`duckdb_date_struct`).\n\n date: The year, month and date stored in a `duckdb_date_struct`.\n returns: The `duckdb_date` element."] pub fn duckdb_to_date(date: duckdb_date_struct) -> duckdb_date; } extern "C" { #[doc = "Decompose a `duckdb_time` object into hour, minute, second and microsecond (stored as `duckdb_time_struct`).\n\n time: The time object, as obtained from a `DUCKDB_TYPE_TIME` column.\n returns: The `duckdb_time_struct` with the decomposed elements."] pub fn duckdb_from_time(time: duckdb_time) -> duckdb_time_struct; } extern "C" { #[doc = "Re-compose a `duckdb_time` from hour, minute, second and microsecond (`duckdb_time_struct`).\n\n time: The hour, minute, second and microsecond in a `duckdb_time_struct`.\n returns: The `duckdb_time` element."] pub fn duckdb_to_time(time: duckdb_time_struct) -> duckdb_time; } extern "C" { #[doc = "Decompose a `duckdb_timestamp` object into a `duckdb_timestamp_struct`.\n\n ts: The ts object, as obtained from a `DUCKDB_TYPE_TIMESTAMP` column.\n returns: The `duckdb_timestamp_struct` with the decomposed elements."] pub fn duckdb_from_timestamp(ts: duckdb_timestamp) -> duckdb_timestamp_struct; } extern "C" { #[doc = "Re-compose a `duckdb_timestamp` from a duckdb_timestamp_struct.\n\n ts: The de-composed elements in a `duckdb_timestamp_struct`.\n returns: The `duckdb_timestamp` element."] pub fn duckdb_to_timestamp(ts: duckdb_timestamp_struct) -> duckdb_timestamp; } extern "C" { #[doc = "Converts a duckdb_hugeint object (as obtained from a `DUCKDB_TYPE_HUGEINT` column) into a double.\n\n val: The hugeint value.\n returns: The converted `double` element."] pub fn duckdb_hugeint_to_double(val: duckdb_hugeint) -> f64; } extern "C" { #[doc = "Converts a double value to a duckdb_hugeint object.\n\nIf the conversion fails because the double value is too big the result will be 0.\n\n val: The double value.\n returns: The converted `duckdb_hugeint` element."] pub fn duckdb_double_to_hugeint(val: f64) -> duckdb_hugeint; } extern "C" { #[doc = "Converts a double value to a duckdb_decimal object.\n\nIf the conversion fails because the double value is too big, or the width/scale are invalid the result will be 0.\n\n val: The double value.\n returns: The converted `duckdb_decimal` element."] pub fn duckdb_double_to_decimal(val: f64, width: u8, scale: u8) -> duckdb_decimal; } extern "C" { #[doc = "Converts a duckdb_decimal object (as obtained from a `DUCKDB_TYPE_DECIMAL` column) into a double.\n\n val: The decimal value.\n returns: The converted `double` element."] pub fn duckdb_decimal_to_double(val: duckdb_decimal) -> f64; } extern "C" { #[doc = "Create a prepared statement object from a query.\n\nNote that after calling `duckdb_prepare`, the prepared statement should always be destroyed using\n`duckdb_destroy_prepare`, even if the prepare fails.\n\nIf the prepare fails, `duckdb_prepare_error` can be called to obtain the reason why the prepare failed.\n\n connection: The connection object\n query: The SQL query to prepare\n out_prepared_statement: The resulting prepared statement object\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_prepare( connection: duckdb_connection, query: *const ::std::os::raw::c_char, out_prepared_statement: *mut duckdb_prepared_statement, ) -> duckdb_state; } extern "C" { #[doc = "Closes the prepared statement and de-allocates all memory allocated for the statement.\n\n prepared_statement: The prepared statement to destroy."] pub fn duckdb_destroy_prepare(prepared_statement: *mut duckdb_prepared_statement); } extern "C" { #[doc = "Returns the error message associated with the given prepared statement.\nIf the prepared statement has no error message, this returns `nullptr` instead.\n\nThe error message should not be freed. It will be de-allocated when `duckdb_destroy_prepare` is called.\n\n prepared_statement: The prepared statement to obtain the error from.\n returns: The error message, or `nullptr` if there is none."] pub fn duckdb_prepare_error(prepared_statement: duckdb_prepared_statement) -> *const ::std::os::raw::c_char; } extern "C" { #[doc = "Returns the number of parameters that can be provided to the given prepared statement.\n\nReturns 0 if the query was not successfully prepared.\n\n prepared_statement: The prepared statement to obtain the number of parameters for."] pub fn duckdb_nparams(prepared_statement: duckdb_prepared_statement) -> idx_t; } extern "C" { #[doc = "Returns the parameter type for the parameter at the given index.\n\nReturns `DUCKDB_TYPE_INVALID` if the parameter index is out of range or the statement was not successfully prepared.\n\n prepared_statement: The prepared statement.\n param_idx: The parameter index.\n returns: The parameter type"] pub fn duckdb_param_type(prepared_statement: duckdb_prepared_statement, param_idx: idx_t) -> duckdb_type; } extern "C" { #[doc = "Clear the params bind to the prepared statement."] pub fn duckdb_clear_bindings(prepared_statement: duckdb_prepared_statement) -> duckdb_state; } extern "C" { #[doc = "Binds a bool value to the prepared statement at the specified index."] pub fn duckdb_bind_boolean( prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: bool, ) -> duckdb_state; } extern "C" { #[doc = "Binds an int8_t value to the prepared statement at the specified index."] pub fn duckdb_bind_int8(prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: i8) -> duckdb_state; } extern "C" { #[doc = "Binds an int16_t value to the prepared statement at the specified index."] pub fn duckdb_bind_int16(prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: i16) -> duckdb_state; } extern "C" { #[doc = "Binds an int32_t value to the prepared statement at the specified index."] pub fn duckdb_bind_int32(prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: i32) -> duckdb_state; } extern "C" { #[doc = "Binds an int64_t value to the prepared statement at the specified index."] pub fn duckdb_bind_int64(prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: i64) -> duckdb_state; } extern "C" { #[doc = "Binds an duckdb_hugeint value to the prepared statement at the specified index."] pub fn duckdb_bind_hugeint( prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: duckdb_hugeint, ) -> duckdb_state; } extern "C" { #[doc = "Binds a duckdb_decimal value to the prepared statement at the specified index."] pub fn duckdb_bind_decimal( prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: duckdb_decimal, ) -> duckdb_state; } extern "C" { #[doc = "Binds an uint8_t value to the prepared statement at the specified index."] pub fn duckdb_bind_uint8(prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: u8) -> duckdb_state; } extern "C" { #[doc = "Binds an uint16_t value to the prepared statement at the specified index."] pub fn duckdb_bind_uint16( prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: u16, ) -> duckdb_state; } extern "C" { #[doc = "Binds an uint32_t value to the prepared statement at the specified index."] pub fn duckdb_bind_uint32( prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: u32, ) -> duckdb_state; } extern "C" { #[doc = "Binds an uint64_t value to the prepared statement at the specified index."] pub fn duckdb_bind_uint64( prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: u64, ) -> duckdb_state; } extern "C" { #[doc = "Binds an float value to the prepared statement at the specified index."] pub fn duckdb_bind_float(prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: f32) -> duckdb_state; } extern "C" { #[doc = "Binds an double value to the prepared statement at the specified index."] pub fn duckdb_bind_double( prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: f64, ) -> duckdb_state; } extern "C" { #[doc = "Binds a duckdb_date value to the prepared statement at the specified index."] pub fn duckdb_bind_date( prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: duckdb_date, ) -> duckdb_state; } extern "C" { #[doc = "Binds a duckdb_time value to the prepared statement at the specified index."] pub fn duckdb_bind_time( prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: duckdb_time, ) -> duckdb_state; } extern "C" { #[doc = "Binds a duckdb_timestamp value to the prepared statement at the specified index."] pub fn duckdb_bind_timestamp( prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: duckdb_timestamp, ) -> duckdb_state; } extern "C" { #[doc = "Binds a duckdb_interval value to the prepared statement at the specified index."] pub fn duckdb_bind_interval( prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: duckdb_interval, ) -> duckdb_state; } extern "C" { #[doc = "Binds a null-terminated varchar value to the prepared statement at the specified index."] pub fn duckdb_bind_varchar( prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: *const ::std::os::raw::c_char, ) -> duckdb_state; } extern "C" { #[doc = "Binds a varchar value to the prepared statement at the specified index."] pub fn duckdb_bind_varchar_length( prepared_statement: duckdb_prepared_statement, param_idx: idx_t, val: *const ::std::os::raw::c_char, length: idx_t, ) -> duckdb_state; } extern "C" { #[doc = "Binds a blob value to the prepared statement at the specified index."] pub fn duckdb_bind_blob( prepared_statement: duckdb_prepared_statement, param_idx: idx_t, data: *const ::std::os::raw::c_void, length: idx_t, ) -> duckdb_state; } extern "C" { #[doc = "Binds a NULL value to the prepared statement at the specified index."] pub fn duckdb_bind_null(prepared_statement: duckdb_prepared_statement, param_idx: idx_t) -> duckdb_state; } extern "C" { #[doc = "Executes the prepared statement with the given bound parameters, and returns a materialized query result.\n\nThis method can be called multiple times for each prepared statement, and the parameters can be modified\nbetween calls to this function.\n\n prepared_statement: The prepared statement to execute.\n out_result: The query result.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_execute_prepared( prepared_statement: duckdb_prepared_statement, out_result: *mut duckdb_result, ) -> duckdb_state; } extern "C" { #[doc = "Executes the prepared statement with the given bound parameters, and returns an arrow query result.\n\n prepared_statement: The prepared statement to execute.\n out_result: The query result.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_execute_prepared_arrow( prepared_statement: duckdb_prepared_statement, out_result: *mut duckdb_arrow, ) -> duckdb_state; } extern "C" { #[doc = "Extract all statements from a query.\nNote that after calling `duckdb_extract_statements`, the extracted statements should always be destroyed using\n`duckdb_destroy_extracted`, even if no statements were extracted.\nIf the extract fails, `duckdb_extract_statements_error` can be called to obtain the reason why the extract failed.\n connection: The connection object\n query: The SQL query to extract\n out_extracted_statements: The resulting extracted statements object\n returns: The number of extracted statements or 0 on failure."] pub fn duckdb_extract_statements( connection: duckdb_connection, query: *const ::std::os::raw::c_char, out_extracted_statements: *mut duckdb_extracted_statements, ) -> idx_t; } extern "C" { #[doc = "Prepare an extracted statement.\nNote that after calling `duckdb_prepare_extracted_statement`, the prepared statement should always be destroyed using\n`duckdb_destroy_prepare`, even if the prepare fails.\nIf the prepare fails, `duckdb_prepare_error` can be called to obtain the reason why the prepare failed.\n connection: The connection object\n extracted_statements: The extracted statements object\n index: The index of the extracted statement to prepare\n out_prepared_statement: The resulting prepared statement object\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_prepare_extracted_statement( connection: duckdb_connection, extracted_statements: duckdb_extracted_statements, index: idx_t, out_prepared_statement: *mut duckdb_prepared_statement, ) -> duckdb_state; } extern "C" { #[doc = "Returns the error message contained within the extracted statements.\nThe result of this function must not be freed. It will be cleaned up when `duckdb_destroy_extracted` is called.\n result: The extracted statements to fetch the error from.\n returns: The error of the extracted statements."] pub fn duckdb_extract_statements_error( extracted_statements: duckdb_extracted_statements, ) -> *const ::std::os::raw::c_char; } extern "C" { #[doc = "De-allocates all memory allocated for the extracted statements.\n extracted_statements: The extracted statements to destroy."] pub fn duckdb_destroy_extracted(extracted_statements: *mut duckdb_extracted_statements); } extern "C" { #[doc = "Executes the prepared statement with the given bound parameters, and returns a pending result.\nThe pending result represents an intermediate structure for a query that is not yet fully executed.\nThe pending result can be used to incrementally execute a query, returning control to the client between tasks.\n\nNote that after calling `duckdb_pending_prepared`, the pending result should always be destroyed using\n`duckdb_destroy_pending`, even if this function returns DuckDBError.\n\n prepared_statement: The prepared statement to execute.\n out_result: The pending query result.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_pending_prepared( prepared_statement: duckdb_prepared_statement, out_result: *mut duckdb_pending_result, ) -> duckdb_state; } extern "C" { #[doc = "Closes the pending result and de-allocates all memory allocated for the result.\n\n pending_result: The pending result to destroy."] pub fn duckdb_destroy_pending(pending_result: *mut duckdb_pending_result); } extern "C" { #[doc = "Returns the error message contained within the pending result.\n\nThe result of this function must not be freed. It will be cleaned up when `duckdb_destroy_pending` is called.\n\n result: The pending result to fetch the error from.\n returns: The error of the pending result."] pub fn duckdb_pending_error(pending_result: duckdb_pending_result) -> *const ::std::os::raw::c_char; } extern "C" { #[doc = "Executes a single task within the query, returning whether or not the query is ready.\n\nIf this returns DUCKDB_PENDING_RESULT_READY, the duckdb_execute_pending function can be called to obtain the result.\nIf this returns DUCKDB_PENDING_RESULT_NOT_READY, the duckdb_pending_execute_task function should be called again.\nIf this returns DUCKDB_PENDING_ERROR, an error occurred during execution.\n\nThe error message can be obtained by calling duckdb_pending_error on the pending_result.\n\n pending_result: The pending result to execute a task within..\n returns: The state of the pending result after the execution."] pub fn duckdb_pending_execute_task(pending_result: duckdb_pending_result) -> duckdb_pending_state; } extern "C" { #[doc = "Fully execute a pending query result, returning the final query result.\n\nIf duckdb_pending_execute_task has been called until DUCKDB_PENDING_RESULT_READY was returned, this will return fast.\nOtherwise, all remaining tasks must be executed first.\n\n pending_result: The pending result to execute.\n out_result: The result object.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_execute_pending( pending_result: duckdb_pending_result, out_result: *mut duckdb_result, ) -> duckdb_state; } extern "C" { #[doc = "Destroys the value and de-allocates all memory allocated for that type.\n\n value: The value to destroy."] pub fn duckdb_destroy_value(value: *mut duckdb_value); } extern "C" { #[doc = "Creates a value from a null-terminated string\n\n value: The null-terminated string\n returns: The value. This must be destroyed with `duckdb_destroy_value`."] pub fn duckdb_create_varchar(text: *const ::std::os::raw::c_char) -> duckdb_value; } extern "C" { #[doc = "Creates a value from a string\n\n value: The text\n length: The length of the text\n returns: The value. This must be destroyed with `duckdb_destroy_value`."] pub fn duckdb_create_varchar_length(text: *const ::std::os::raw::c_char, length: idx_t) -> duckdb_value; } extern "C" { #[doc = "Creates a value from an int64\n\n value: The bigint value\n returns: The value. This must be destroyed with `duckdb_destroy_value`."] pub fn duckdb_create_int64(val: i64) -> duckdb_value; } extern "C" { #[doc = "Obtains a string representation of the given value.\nThe result must be destroyed with `duckdb_free`.\n\n value: The value\n returns: The string value. This must be destroyed with `duckdb_free`."] pub fn duckdb_get_varchar(value: duckdb_value) -> *mut ::std::os::raw::c_char; } extern "C" { #[doc = "Obtains an int64 of the given value.\n\n value: The value\n returns: The int64 value, or 0 if no conversion is possible"] pub fn duckdb_get_int64(value: duckdb_value) -> i64; } extern "C" { #[doc = "Creates a `duckdb_logical_type` from a standard primitive type.\nThe resulting type should be destroyed with `duckdb_destroy_logical_type`.\n\nThis should not be used with `DUCKDB_TYPE_DECIMAL`.\n\n type: The primitive type to create.\n returns: The logical type."] pub fn duckdb_create_logical_type(type_: duckdb_type) -> duckdb_logical_type; } extern "C" { #[doc = "Creates a list type from its child type.\nThe resulting type should be destroyed with `duckdb_destroy_logical_type`.\n\n type: The child type of list type to create.\n returns: The logical type."] pub fn duckdb_create_list_type(type_: duckdb_logical_type) -> duckdb_logical_type; } extern "C" { #[doc = "Creates a map type from its key type and value type.\nThe resulting type should be destroyed with `duckdb_destroy_logical_type`.\n\n type: The key type and value type of map type to create.\n returns: The logical type."] pub fn duckdb_create_map_type( key_type: duckdb_logical_type, value_type: duckdb_logical_type, ) -> duckdb_logical_type; } extern "C" { #[doc = "Creates a UNION type from the passed types array\nThe resulting type should be destroyed with `duckdb_destroy_logical_type`.\n\n types: The array of types that the union should consist of.\n type_amount: The size of the types array.\n returns: The logical type."] pub fn duckdb_create_union_type( member_types: duckdb_logical_type, member_names: *mut *const ::std::os::raw::c_char, member_count: idx_t, ) -> duckdb_logical_type; } extern "C" { #[doc = "Creates a `duckdb_logical_type` of type decimal with the specified width and scale\nThe resulting type should be destroyed with `duckdb_destroy_logical_type`.\n\n width: The width of the decimal type\n scale: The scale of the decimal type\n returns: The logical type."] pub fn duckdb_create_decimal_type(width: u8, scale: u8) -> duckdb_logical_type; } extern "C" { #[doc = "Retrieves the type class of a `duckdb_logical_type`.\n\n type: The logical type object\n returns: The type id"] pub fn duckdb_get_type_id(type_: duckdb_logical_type) -> duckdb_type; } extern "C" { #[doc = "Retrieves the width of a decimal type.\n\n type: The logical type object\n returns: The width of the decimal type"] pub fn duckdb_decimal_width(type_: duckdb_logical_type) -> u8; } extern "C" { #[doc = "Retrieves the scale of a decimal type.\n\n type: The logical type object\n returns: The scale of the decimal type"] pub fn duckdb_decimal_scale(type_: duckdb_logical_type) -> u8; } extern "C" { #[doc = "Retrieves the internal storage type of a decimal type.\n\n type: The logical type object\n returns: The internal type of the decimal type"] pub fn duckdb_decimal_internal_type(type_: duckdb_logical_type) -> duckdb_type; } extern "C" { #[doc = "Retrieves the internal storage type of an enum type.\n\n type: The logical type object\n returns: The internal type of the enum type"] pub fn duckdb_enum_internal_type(type_: duckdb_logical_type) -> duckdb_type; } extern "C" { #[doc = "Retrieves the dictionary size of the enum type\n\n type: The logical type object\n returns: The dictionary size of the enum type"] pub fn duckdb_enum_dictionary_size(type_: duckdb_logical_type) -> u32; } extern "C" { #[doc = "Retrieves the dictionary value at the specified position from the enum.\n\nThe result must be freed with `duckdb_free`\n\n type: The logical type object\n index: The index in the dictionary\n returns: The string value of the enum type. Must be freed with `duckdb_free`."] pub fn duckdb_enum_dictionary_value(type_: duckdb_logical_type, index: idx_t) -> *mut ::std::os::raw::c_char; } extern "C" { #[doc = "Retrieves the child type of the given list type.\n\nThe result must be freed with `duckdb_destroy_logical_type`\n\n type: The logical type object\n returns: The child type of the list type. Must be destroyed with `duckdb_destroy_logical_type`."] pub fn duckdb_list_type_child_type(type_: duckdb_logical_type) -> duckdb_logical_type; } extern "C" { #[doc = "Retrieves the key type of the given map type.\n\nThe result must be freed with `duckdb_destroy_logical_type`\n\n type: The logical type object\n returns: The key type of the map type. Must be destroyed with `duckdb_destroy_logical_type`."] pub fn duckdb_map_type_key_type(type_: duckdb_logical_type) -> duckdb_logical_type; } extern "C" { #[doc = "Retrieves the value type of the given map type.\n\nThe result must be freed with `duckdb_destroy_logical_type`\n\n type: The logical type object\n returns: The value type of the map type. Must be destroyed with `duckdb_destroy_logical_type`."] pub fn duckdb_map_type_value_type(type_: duckdb_logical_type) -> duckdb_logical_type; } extern "C" { #[doc = "Returns the number of children of a struct type.\n\n type: The logical type object\n returns: The number of children of a struct type."] pub fn duckdb_struct_type_child_count(type_: duckdb_logical_type) -> idx_t; } extern "C" { #[doc = "Retrieves the name of the struct child.\n\nThe result must be freed with `duckdb_free`\n\n type: The logical type object\n index: The child index\n returns: The name of the struct type. Must be freed with `duckdb_free`."] pub fn duckdb_struct_type_child_name(type_: duckdb_logical_type, index: idx_t) -> *mut ::std::os::raw::c_char; } extern "C" { #[doc = "Retrieves the child type of the given struct type at the specified index.\n\nThe result must be freed with `duckdb_destroy_logical_type`\n\n type: The logical type object\n index: The child index\n returns: The child type of the struct type. Must be destroyed with `duckdb_destroy_logical_type`."] pub fn duckdb_struct_type_child_type(type_: duckdb_logical_type, index: idx_t) -> duckdb_logical_type; } extern "C" { #[doc = "Returns the number of members that the union type has.\n\n type: The logical type (union) object\n returns: The number of members of a union type."] pub fn duckdb_union_type_member_count(type_: duckdb_logical_type) -> idx_t; } extern "C" { #[doc = "Retrieves the name of the union member.\n\nThe result must be freed with `duckdb_free`\n\n type: The logical type object\n index: The child index\n returns: The name of the union member. Must be freed with `duckdb_free`."] pub fn duckdb_union_type_member_name(type_: duckdb_logical_type, index: idx_t) -> *mut ::std::os::raw::c_char; } extern "C" { #[doc = "Retrieves the child type of the given union member at the specified index.\n\nThe result must be freed with `duckdb_destroy_logical_type`\n\n type: The logical type object\n index: The child index\n returns: The child type of the union member. Must be destroyed with `duckdb_destroy_logical_type`."] pub fn duckdb_union_type_member_type(type_: duckdb_logical_type, index: idx_t) -> duckdb_logical_type; } extern "C" { #[doc = "Destroys the logical type and de-allocates all memory allocated for that type.\n\n type: The logical type to destroy."] pub fn duckdb_destroy_logical_type(type_: *mut duckdb_logical_type); } extern "C" { #[doc = "Creates an empty DataChunk with the specified set of types.\n\n types: An array of types of the data chunk.\n column_count: The number of columns.\n returns: The data chunk."] pub fn duckdb_create_data_chunk(types: *mut duckdb_logical_type, column_count: idx_t) -> duckdb_data_chunk; } extern "C" { #[doc = "Destroys the data chunk and de-allocates all memory allocated for that chunk.\n\n chunk: The data chunk to destroy."] pub fn duckdb_destroy_data_chunk(chunk: *mut duckdb_data_chunk); } extern "C" { #[doc = "Resets a data chunk, clearing the validity masks and setting the cardinality of the data chunk to 0.\n\n chunk: The data chunk to reset."] pub fn duckdb_data_chunk_reset(chunk: duckdb_data_chunk); } extern "C" { #[doc = "Retrieves the number of columns in a data chunk.\n\n chunk: The data chunk to get the data from\n returns: The number of columns in the data chunk"] pub fn duckdb_data_chunk_get_column_count(chunk: duckdb_data_chunk) -> idx_t; } extern "C" { #[doc = "Retrieves the vector at the specified column index in the data chunk.\n\nThe pointer to the vector is valid for as long as the chunk is alive.\nIt does NOT need to be destroyed.\n\n chunk: The data chunk to get the data from\n returns: The vector"] pub fn duckdb_data_chunk_get_vector(chunk: duckdb_data_chunk, col_idx: idx_t) -> duckdb_vector; } extern "C" { #[doc = "Retrieves the current number of tuples in a data chunk.\n\n chunk: The data chunk to get the data from\n returns: The number of tuples in the data chunk"] pub fn duckdb_data_chunk_get_size(chunk: duckdb_data_chunk) -> idx_t; } extern "C" { #[doc = "Sets the current number of tuples in a data chunk.\n\n chunk: The data chunk to set the size in\n size: The number of tuples in the data chunk"] pub fn duckdb_data_chunk_set_size(chunk: duckdb_data_chunk, size: idx_t); } extern "C" { #[doc = "Retrieves the column type of the specified vector.\n\nThe result must be destroyed with `duckdb_destroy_logical_type`.\n\n vector: The vector get the data from\n returns: The type of the vector"] pub fn duckdb_vector_get_column_type(vector: duckdb_vector) -> duckdb_logical_type; } extern "C" { #[doc = "Retrieves the data pointer of the vector.\n\nThe data pointer can be used to read or write values from the vector.\nHow to read or write values depends on the type of the vector.\n\n vector: The vector to get the data from\n returns: The data pointer"] pub fn duckdb_vector_get_data(vector: duckdb_vector) -> *mut ::std::os::raw::c_void; } extern "C" { #[doc = "Retrieves the validity mask pointer of the specified vector.\n\nIf all values are valid, this function MIGHT return NULL!\n\nThe validity mask is a bitset that signifies null-ness within the data chunk.\nIt is a series of uint64_t values, where each uint64_t value contains validity for 64 tuples.\nThe bit is set to 1 if the value is valid (i.e. not NULL) or 0 if the value is invalid (i.e. NULL).\n\nValidity of a specific value can be obtained like this:\n\nidx_t entry_idx = row_idx / 64;\nidx_t idx_in_entry = row_idx % 64;\nbool is_valid = validity_mask[entry_idx] & (1 << idx_in_entry);\n\nAlternatively, the (slower) duckdb_validity_row_is_valid function can be used.\n\n vector: The vector to get the data from\n returns: The pointer to the validity mask, or NULL if no validity mask is present"] pub fn duckdb_vector_get_validity(vector: duckdb_vector) -> *mut u64; } extern "C" { #[doc = "Ensures the validity mask is writable by allocating it.\n\nAfter this function is called, `duckdb_vector_get_validity` will ALWAYS return non-NULL.\nThis allows null values to be written to the vector, regardless of whether a validity mask was present before.\n\n vector: The vector to alter"] pub fn duckdb_vector_ensure_validity_writable(vector: duckdb_vector); } extern "C" { #[doc = "Assigns a string element in the vector at the specified location.\n\n vector: The vector to alter\n index: The row position in the vector to assign the string to\n str: The null-terminated string"] pub fn duckdb_vector_assign_string_element( vector: duckdb_vector, index: idx_t, str_: *const ::std::os::raw::c_char, ); } extern "C" { #[doc = "Assigns a string element in the vector at the specified location.\n\n vector: The vector to alter\n index: The row position in the vector to assign the string to\n str: The string\n str_len: The length of the string (in bytes)"] pub fn duckdb_vector_assign_string_element_len( vector: duckdb_vector, index: idx_t, str_: *const ::std::os::raw::c_char, str_len: idx_t, ); } extern "C" { #[doc = "Retrieves the child vector of a list vector.\n\nThe resulting vector is valid as long as the parent vector is valid.\n\n vector: The vector\n returns: The child vector"] pub fn duckdb_list_vector_get_child(vector: duckdb_vector) -> duckdb_vector; } extern "C" { #[doc = "Returns the size of the child vector of the list\n\n vector: The vector\n returns: The size of the child list"] pub fn duckdb_list_vector_get_size(vector: duckdb_vector) -> idx_t; } extern "C" { #[doc = "Sets the total size of the underlying child-vector of a list vector.\n\n vector: The list vector.\n size: The size of the child list.\n returns: The duckdb state. Returns DuckDBError if the vector is nullptr."] pub fn duckdb_list_vector_set_size(vector: duckdb_vector, size: idx_t) -> duckdb_state; } extern "C" { #[doc = "Sets the total capacity of the underlying child-vector of a list.\n\n vector: The list vector.\n required_capacity: the total capacity to reserve.\n return: The duckdb state. Returns DuckDBError if the vector is nullptr."] pub fn duckdb_list_vector_reserve(vector: duckdb_vector, required_capacity: idx_t) -> duckdb_state; } extern "C" { #[doc = "Retrieves the child vector of a struct vector.\n\nThe resulting vector is valid as long as the parent vector is valid.\n\n vector: The vector\n index: The child index\n returns: The child vector"] pub fn duckdb_struct_vector_get_child(vector: duckdb_vector, index: idx_t) -> duckdb_vector; } extern "C" { #[doc = "Returns whether or not a row is valid (i.e. not NULL) in the given validity mask.\n\n validity: The validity mask, as obtained through `duckdb_data_chunk_get_validity`\n row: The row index\n returns: true if the row is valid, false otherwise"] pub fn duckdb_validity_row_is_valid(validity: *mut u64, row: idx_t) -> bool; } extern "C" { #[doc = "In a validity mask, sets a specific row to either valid or invalid.\n\nNote that `duckdb_data_chunk_ensure_validity_writable` should be called before calling `duckdb_data_chunk_get_validity`,\nto ensure that there is a validity mask to write to.\n\n validity: The validity mask, as obtained through `duckdb_data_chunk_get_validity`.\n row: The row index\n valid: Whether or not to set the row to valid, or invalid"] pub fn duckdb_validity_set_row_validity(validity: *mut u64, row: idx_t, valid: bool); } extern "C" { #[doc = "In a validity mask, sets a specific row to invalid.\n\nEquivalent to `duckdb_validity_set_row_validity` with valid set to false.\n\n validity: The validity mask\n row: The row index"] pub fn duckdb_validity_set_row_invalid(validity: *mut u64, row: idx_t); } extern "C" { #[doc = "In a validity mask, sets a specific row to valid.\n\nEquivalent to `duckdb_validity_set_row_validity` with valid set to true.\n\n validity: The validity mask\n row: The row index"] pub fn duckdb_validity_set_row_valid(validity: *mut u64, row: idx_t); } pub type duckdb_table_function = *mut ::std::os::raw::c_void; pub type duckdb_bind_info = *mut ::std::os::raw::c_void; pub type duckdb_init_info = *mut ::std::os::raw::c_void; pub type duckdb_function_info = *mut ::std::os::raw::c_void; pub type duckdb_table_function_bind_t = ::std::option::Option; pub type duckdb_table_function_init_t = ::std::option::Option; pub type duckdb_table_function_t = ::std::option::Option; pub type duckdb_delete_callback_t = ::std::option::Option; extern "C" { #[doc = "Creates a new empty table function.\n\nThe return value should be destroyed with `duckdb_destroy_table_function`.\n\n returns: The table function object."] pub fn duckdb_create_table_function() -> duckdb_table_function; } extern "C" { #[doc = "Destroys the given table function object.\n\n table_function: The table function to destroy"] pub fn duckdb_destroy_table_function(table_function: *mut duckdb_table_function); } extern "C" { #[doc = "Sets the name of the given table function.\n\n table_function: The table function\n name: The name of the table function"] pub fn duckdb_table_function_set_name(table_function: duckdb_table_function, name: *const ::std::os::raw::c_char); } extern "C" { #[doc = "Adds a parameter to the table function.\n\n table_function: The table function\n type: The type of the parameter to add."] pub fn duckdb_table_function_add_parameter(table_function: duckdb_table_function, type_: duckdb_logical_type); } extern "C" { #[doc = "Assigns extra information to the table function that can be fetched during binding, etc.\n\n table_function: The table function\n extra_info: The extra information\n destroy: The callback that will be called to destroy the bind data (if any)"] pub fn duckdb_table_function_set_extra_info( table_function: duckdb_table_function, extra_info: *mut ::std::os::raw::c_void, destroy: duckdb_delete_callback_t, ); } extern "C" { #[doc = "Sets the bind function of the table function\n\n table_function: The table function\n bind: The bind function"] pub fn duckdb_table_function_set_bind(table_function: duckdb_table_function, bind: duckdb_table_function_bind_t); } extern "C" { #[doc = "Sets the init function of the table function\n\n table_function: The table function\n init: The init function"] pub fn duckdb_table_function_set_init(table_function: duckdb_table_function, init: duckdb_table_function_init_t); } extern "C" { #[doc = "Sets the thread-local init function of the table function\n\n table_function: The table function\n init: The init function"] pub fn duckdb_table_function_set_local_init( table_function: duckdb_table_function, init: duckdb_table_function_init_t, ); } extern "C" { #[doc = "Sets the main function of the table function\n\n table_function: The table function\n function: The function"] pub fn duckdb_table_function_set_function(table_function: duckdb_table_function, function: duckdb_table_function_t); } extern "C" { #[doc = "Sets whether or not the given table function supports projection pushdown.\n\nIf this is set to true, the system will provide a list of all required columns in the `init` stage through\nthe `duckdb_init_get_column_count` and `duckdb_init_get_column_index` functions.\nIf this is set to false (the default), the system will expect all columns to be projected.\n\n table_function: The table function\n pushdown: True if the table function supports projection pushdown, false otherwise."] pub fn duckdb_table_function_supports_projection_pushdown(table_function: duckdb_table_function, pushdown: bool); } extern "C" { #[doc = "Register the table function object within the given connection.\n\nThe function requires at least a name, a bind function, an init function and a main function.\n\nIf the function is incomplete or a function with this name already exists DuckDBError is returned.\n\n con: The connection to register it in.\n function: The function pointer\n returns: Whether or not the registration was successful."] pub fn duckdb_register_table_function(con: duckdb_connection, function: duckdb_table_function) -> duckdb_state; } extern "C" { #[doc = "Retrieves the extra info of the function as set in `duckdb_table_function_set_extra_info`\n\n info: The info object\n returns: The extra info"] pub fn duckdb_bind_get_extra_info(info: duckdb_bind_info) -> *mut ::std::os::raw::c_void; } extern "C" { #[doc = "Adds a result column to the output of the table function.\n\n info: The info object\n name: The name of the column\n type: The logical type of the column"] pub fn duckdb_bind_add_result_column( info: duckdb_bind_info, name: *const ::std::os::raw::c_char, type_: duckdb_logical_type, ); } extern "C" { #[doc = "Retrieves the number of regular (non-named) parameters to the function.\n\n info: The info object\n returns: The number of parameters"] pub fn duckdb_bind_get_parameter_count(info: duckdb_bind_info) -> idx_t; } extern "C" { #[doc = "Retrieves the parameter at the given index.\n\nThe result must be destroyed with `duckdb_destroy_value`.\n\n info: The info object\n index: The index of the parameter to get\n returns: The value of the parameter. Must be destroyed with `duckdb_destroy_value`."] pub fn duckdb_bind_get_parameter(info: duckdb_bind_info, index: idx_t) -> duckdb_value; } extern "C" { #[doc = "Sets the user-provided bind data in the bind object. This object can be retrieved again during execution.\n\n info: The info object\n extra_data: The bind data object.\n destroy: The callback that will be called to destroy the bind data (if any)"] pub fn duckdb_bind_set_bind_data( info: duckdb_bind_info, bind_data: *mut ::std::os::raw::c_void, destroy: duckdb_delete_callback_t, ); } extern "C" { #[doc = "Sets the cardinality estimate for the table function, used for optimization.\n\n info: The bind data object.\n is_exact: Whether or not the cardinality estimate is exact, or an approximation"] pub fn duckdb_bind_set_cardinality(info: duckdb_bind_info, cardinality: idx_t, is_exact: bool); } extern "C" { #[doc = "Report that an error has occurred while calling bind.\n\n info: The info object\n error: The error message"] pub fn duckdb_bind_set_error(info: duckdb_bind_info, error: *const ::std::os::raw::c_char); } extern "C" { #[doc = "Retrieves the extra info of the function as set in `duckdb_table_function_set_extra_info`\n\n info: The info object\n returns: The extra info"] pub fn duckdb_init_get_extra_info(info: duckdb_init_info) -> *mut ::std::os::raw::c_void; } extern "C" { #[doc = "Gets the bind data set by `duckdb_bind_set_bind_data` during the bind.\n\nNote that the bind data should be considered as read-only.\nFor tracking state, use the init data instead.\n\n info: The info object\n returns: The bind data object"] pub fn duckdb_init_get_bind_data(info: duckdb_init_info) -> *mut ::std::os::raw::c_void; } extern "C" { #[doc = "Sets the user-provided init data in the init object. This object can be retrieved again during execution.\n\n info: The info object\n extra_data: The init data object.\n destroy: The callback that will be called to destroy the init data (if any)"] pub fn duckdb_init_set_init_data( info: duckdb_init_info, init_data: *mut ::std::os::raw::c_void, destroy: duckdb_delete_callback_t, ); } extern "C" { #[doc = "Returns the number of projected columns.\n\nThis function must be used if projection pushdown is enabled to figure out which columns to emit.\n\n info: The info object\n returns: The number of projected columns."] pub fn duckdb_init_get_column_count(info: duckdb_init_info) -> idx_t; } extern "C" { #[doc = "Returns the column index of the projected column at the specified position.\n\nThis function must be used if projection pushdown is enabled to figure out which columns to emit.\n\n info: The info object\n column_index: The index at which to get the projected column index, from 0..duckdb_init_get_column_count(info)\n returns: The column index of the projected column."] pub fn duckdb_init_get_column_index(info: duckdb_init_info, column_index: idx_t) -> idx_t; } extern "C" { #[doc = "Sets how many threads can process this table function in parallel (default: 1)\n\n info: The info object\n max_threads: The maximum amount of threads that can process this table function"] pub fn duckdb_init_set_max_threads(info: duckdb_init_info, max_threads: idx_t); } extern "C" { #[doc = "Report that an error has occurred while calling init.\n\n info: The info object\n error: The error message"] pub fn duckdb_init_set_error(info: duckdb_init_info, error: *const ::std::os::raw::c_char); } extern "C" { #[doc = "Retrieves the extra info of the function as set in `duckdb_table_function_set_extra_info`\n\n info: The info object\n returns: The extra info"] pub fn duckdb_function_get_extra_info(info: duckdb_function_info) -> *mut ::std::os::raw::c_void; } extern "C" { #[doc = "Gets the bind data set by `duckdb_bind_set_bind_data` during the bind.\n\nNote that the bind data should be considered as read-only.\nFor tracking state, use the init data instead.\n\n info: The info object\n returns: The bind data object"] pub fn duckdb_function_get_bind_data(info: duckdb_function_info) -> *mut ::std::os::raw::c_void; } extern "C" { #[doc = "Gets the init data set by `duckdb_init_set_init_data` during the init.\n\n info: The info object\n returns: The init data object"] pub fn duckdb_function_get_init_data(info: duckdb_function_info) -> *mut ::std::os::raw::c_void; } extern "C" { #[doc = "Gets the thread-local init data set by `duckdb_init_set_init_data` during the local_init.\n\n info: The info object\n returns: The init data object"] pub fn duckdb_function_get_local_init_data(info: duckdb_function_info) -> *mut ::std::os::raw::c_void; } extern "C" { #[doc = "Report that an error has occurred while executing the function.\n\n info: The info object\n error: The error message"] pub fn duckdb_function_set_error(info: duckdb_function_info, error: *const ::std::os::raw::c_char); } pub type duckdb_replacement_scan_info = *mut ::std::os::raw::c_void; pub type duckdb_replacement_callback_t = ::std::option::Option< unsafe extern "C" fn( info: duckdb_replacement_scan_info, table_name: *const ::std::os::raw::c_char, data: *mut ::std::os::raw::c_void, ), >; extern "C" { #[doc = "Add a replacement scan definition to the specified database\n\n db: The database object to add the replacement scan to\n replacement: The replacement scan callback\n extra_data: Extra data that is passed back into the specified callback\n delete_callback: The delete callback to call on the extra data, if any"] pub fn duckdb_add_replacement_scan( db: duckdb_database, replacement: duckdb_replacement_callback_t, extra_data: *mut ::std::os::raw::c_void, delete_callback: duckdb_delete_callback_t, ); } extern "C" { #[doc = "Sets the replacement function name to use. If this function is called in the replacement callback,\nthe replacement scan is performed. If it is not called, the replacement callback is not performed.\n\n info: The info object\n function_name: The function name to substitute."] pub fn duckdb_replacement_scan_set_function_name( info: duckdb_replacement_scan_info, function_name: *const ::std::os::raw::c_char, ); } extern "C" { #[doc = "Adds a parameter to the replacement scan function.\n\n info: The info object\n parameter: The parameter to add."] pub fn duckdb_replacement_scan_add_parameter(info: duckdb_replacement_scan_info, parameter: duckdb_value); } extern "C" { #[doc = "Report that an error has occurred while executing the replacement scan.\n\n info: The info object\n error: The error message"] pub fn duckdb_replacement_scan_set_error(info: duckdb_replacement_scan_info, error: *const ::std::os::raw::c_char); } extern "C" { #[doc = "Creates an appender object.\n\n connection: The connection context to create the appender in.\n schema: The schema of the table to append to, or `nullptr` for the default schema.\n table: The table name to append to.\n out_appender: The resulting appender object.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_appender_create( connection: duckdb_connection, schema: *const ::std::os::raw::c_char, table: *const ::std::os::raw::c_char, out_appender: *mut duckdb_appender, ) -> duckdb_state; } extern "C" { #[doc = "Returns the error message associated with the given appender.\nIf the appender has no error message, this returns `nullptr` instead.\n\nThe error message should not be freed. It will be de-allocated when `duckdb_appender_destroy` is called.\n\n appender: The appender to get the error from.\n returns: The error message, or `nullptr` if there is none."] pub fn duckdb_appender_error(appender: duckdb_appender) -> *const ::std::os::raw::c_char; } extern "C" { #[doc = "Flush the appender to the table, forcing the cache of the appender to be cleared and the data to be appended to the\nbase table.\n\nThis should generally not be used unless you know what you are doing. Instead, call `duckdb_appender_destroy` when you\nare done with the appender.\n\n appender: The appender to flush.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_appender_flush(appender: duckdb_appender) -> duckdb_state; } extern "C" { #[doc = "Close the appender, flushing all intermediate state in the appender to the table and closing it for further appends.\n\nThis is generally not necessary. Call `duckdb_appender_destroy` instead.\n\n appender: The appender to flush and close.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_appender_close(appender: duckdb_appender) -> duckdb_state; } extern "C" { #[doc = "Close the appender and destroy it. Flushing all intermediate state in the appender to the table, and de-allocating\nall memory associated with the appender.\n\n appender: The appender to flush, close and destroy.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_appender_destroy(appender: *mut duckdb_appender) -> duckdb_state; } extern "C" { #[doc = "A nop function, provided for backwards compatibility reasons. Does nothing. Only `duckdb_appender_end_row` is required."] pub fn duckdb_appender_begin_row(appender: duckdb_appender) -> duckdb_state; } extern "C" { #[doc = "Finish the current row of appends. After end_row is called, the next row can be appended.\n\n appender: The appender.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_appender_end_row(appender: duckdb_appender) -> duckdb_state; } extern "C" { #[doc = "Append a bool value to the appender."] pub fn duckdb_append_bool(appender: duckdb_appender, value: bool) -> duckdb_state; } extern "C" { #[doc = "Append an int8_t value to the appender."] pub fn duckdb_append_int8(appender: duckdb_appender, value: i8) -> duckdb_state; } extern "C" { #[doc = "Append an int16_t value to the appender."] pub fn duckdb_append_int16(appender: duckdb_appender, value: i16) -> duckdb_state; } extern "C" { #[doc = "Append an int32_t value to the appender."] pub fn duckdb_append_int32(appender: duckdb_appender, value: i32) -> duckdb_state; } extern "C" { #[doc = "Append an int64_t value to the appender."] pub fn duckdb_append_int64(appender: duckdb_appender, value: i64) -> duckdb_state; } extern "C" { #[doc = "Append a duckdb_hugeint value to the appender."] pub fn duckdb_append_hugeint(appender: duckdb_appender, value: duckdb_hugeint) -> duckdb_state; } extern "C" { #[doc = "Append a uint8_t value to the appender."] pub fn duckdb_append_uint8(appender: duckdb_appender, value: u8) -> duckdb_state; } extern "C" { #[doc = "Append a uint16_t value to the appender."] pub fn duckdb_append_uint16(appender: duckdb_appender, value: u16) -> duckdb_state; } extern "C" { #[doc = "Append a uint32_t value to the appender."] pub fn duckdb_append_uint32(appender: duckdb_appender, value: u32) -> duckdb_state; } extern "C" { #[doc = "Append a uint64_t value to the appender."] pub fn duckdb_append_uint64(appender: duckdb_appender, value: u64) -> duckdb_state; } extern "C" { #[doc = "Append a float value to the appender."] pub fn duckdb_append_float(appender: duckdb_appender, value: f32) -> duckdb_state; } extern "C" { #[doc = "Append a double value to the appender."] pub fn duckdb_append_double(appender: duckdb_appender, value: f64) -> duckdb_state; } extern "C" { #[doc = "Append a duckdb_date value to the appender."] pub fn duckdb_append_date(appender: duckdb_appender, value: duckdb_date) -> duckdb_state; } extern "C" { #[doc = "Append a duckdb_time value to the appender."] pub fn duckdb_append_time(appender: duckdb_appender, value: duckdb_time) -> duckdb_state; } extern "C" { #[doc = "Append a duckdb_timestamp value to the appender."] pub fn duckdb_append_timestamp(appender: duckdb_appender, value: duckdb_timestamp) -> duckdb_state; } extern "C" { #[doc = "Append a duckdb_interval value to the appender."] pub fn duckdb_append_interval(appender: duckdb_appender, value: duckdb_interval) -> duckdb_state; } extern "C" { #[doc = "Append a varchar value to the appender."] pub fn duckdb_append_varchar(appender: duckdb_appender, val: *const ::std::os::raw::c_char) -> duckdb_state; } extern "C" { #[doc = "Append a varchar value to the appender."] pub fn duckdb_append_varchar_length( appender: duckdb_appender, val: *const ::std::os::raw::c_char, length: idx_t, ) -> duckdb_state; } extern "C" { #[doc = "Append a blob value to the appender."] pub fn duckdb_append_blob( appender: duckdb_appender, data: *const ::std::os::raw::c_void, length: idx_t, ) -> duckdb_state; } extern "C" { #[doc = "Append a NULL value to the appender (of any type)."] pub fn duckdb_append_null(appender: duckdb_appender) -> duckdb_state; } extern "C" { #[doc = "Appends a pre-filled data chunk to the specified appender.\n\nThe types of the data chunk must exactly match the types of the table, no casting is performed.\nIf the types do not match or the appender is in an invalid state, DuckDBError is returned.\nIf the append is successful, DuckDBSuccess is returned.\n\n appender: The appender to append to.\n chunk: The data chunk to append.\n returns: The return state."] pub fn duckdb_append_data_chunk(appender: duckdb_appender, chunk: duckdb_data_chunk) -> duckdb_state; } extern "C" { #[doc = "Executes a SQL query within a connection and stores the full (materialized) result in an arrow structure.\nIf the query fails to execute, DuckDBError is returned and the error message can be retrieved by calling\n`duckdb_query_arrow_error`.\n\nNote that after running `duckdb_query_arrow`, `duckdb_destroy_arrow` must be called on the result object even if the\nquery fails, otherwise the error stored within the result will not be freed correctly.\n\n connection: The connection to perform the query in.\n query: The SQL query to run.\n out_result: The query result.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_query_arrow( connection: duckdb_connection, query: *const ::std::os::raw::c_char, out_result: *mut duckdb_arrow, ) -> duckdb_state; } extern "C" { #[doc = "Fetch the internal arrow schema from the arrow result.\n\n result: The result to fetch the schema from.\n out_schema: The output schema.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_query_arrow_schema(result: duckdb_arrow, out_schema: *mut duckdb_arrow_schema) -> duckdb_state; } extern "C" { #[doc = "Fetch an internal arrow array from the arrow result.\n\nThis function can be called multiple time to get next chunks, which will free the previous out_array.\nSo consume the out_array before calling this function again.\n\n result: The result to fetch the array from.\n out_array: The output array.\n returns: `DuckDBSuccess` on success or `DuckDBError` on failure."] pub fn duckdb_query_arrow_array(result: duckdb_arrow, out_array: *mut duckdb_arrow_array) -> duckdb_state; } extern "C" { #[doc = "Returns the number of columns present in a the arrow result object.\n\n result: The result object.\n returns: The number of columns present in the result object."] pub fn duckdb_arrow_column_count(result: duckdb_arrow) -> idx_t; } extern "C" { #[doc = "Returns the number of rows present in a the arrow result object.\n\n result: The result object.\n returns: The number of rows present in the result object."] pub fn duckdb_arrow_row_count(result: duckdb_arrow) -> idx_t; } extern "C" { #[doc = "Returns the number of rows changed by the query stored in the arrow result. This is relevant only for\nINSERT/UPDATE/DELETE queries. For other queries the rows_changed will be 0.\n\n result: The result object.\n returns: The number of rows changed."] pub fn duckdb_arrow_rows_changed(result: duckdb_arrow) -> idx_t; } extern "C" { #[doc = "Returns the error message contained within the result. The error is only set if `duckdb_query_arrow` returns\n`DuckDBError`.\n\nThe error message should not be freed. It will be de-allocated when `duckdb_destroy_arrow` is called.\n\n result: The result object to fetch the nullmask from.\n returns: The error of the result."] pub fn duckdb_query_arrow_error(result: duckdb_arrow) -> *const ::std::os::raw::c_char; } extern "C" { #[doc = "Closes the result and de-allocates all memory allocated for the arrow result.\n\n result: The result to destroy."] pub fn duckdb_destroy_arrow(result: *mut duckdb_arrow); } pub type duckdb_task_state = *mut ::std::os::raw::c_void; extern "C" { #[doc = "Execute DuckDB tasks on this thread.\n\nWill return after `max_tasks` have been executed, or if there are no more tasks present.\n\n database: The database object to execute tasks for\n max_tasks: The maximum amount of tasks to execute"] pub fn duckdb_execute_tasks(database: duckdb_database, max_tasks: idx_t); } extern "C" { #[doc = "Creates a task state that can be used with duckdb_execute_tasks_state to execute tasks until\nduckdb_finish_execution is called on the state.\n\nduckdb_destroy_state should be called on the result in order to free memory.\n\n database: The database object to create the task state for\n returns: The task state that can be used with duckdb_execute_tasks_state."] pub fn duckdb_create_task_state(database: duckdb_database) -> duckdb_task_state; } extern "C" { #[doc = "Execute DuckDB tasks on this thread.\n\nThe thread will keep on executing tasks forever, until duckdb_finish_execution is called on the state.\nMultiple threads can share the same duckdb_task_state.\n\n state: The task state of the executor"] pub fn duckdb_execute_tasks_state(state: duckdb_task_state); } extern "C" { #[doc = "Execute DuckDB tasks on this thread.\n\nThe thread will keep on executing tasks until either duckdb_finish_execution is called on the state,\nmax_tasks tasks have been executed or there are no more tasks to be executed.\n\nMultiple threads can share the same duckdb_task_state.\n\n state: The task state of the executor\n max_tasks: The maximum amount of tasks to execute\n returns: The amount of tasks that have actually been executed"] pub fn duckdb_execute_n_tasks_state(state: duckdb_task_state, max_tasks: idx_t) -> idx_t; } extern "C" { #[doc = "Finish execution on a specific task.\n\n state: The task state to finish execution"] pub fn duckdb_finish_execution(state: duckdb_task_state); } extern "C" { #[doc = "Check if the provided duckdb_task_state has finished execution\n\n state: The task state to inspect\n returns: Whether or not duckdb_finish_execution has been called on the task state"] pub fn duckdb_task_state_is_finished(state: duckdb_task_state) -> bool; } extern "C" { #[doc = "Destroys the task state returned from duckdb_create_task_state.\n\nNote that this should not be called while there is an active duckdb_execute_tasks_state running\non the task state.\n\n state: The task state to clean up"] pub fn duckdb_destroy_task_state(state: duckdb_task_state); } extern "C" { #[doc = "Returns true if execution of the current query is finished.\n\n con: The connection on which to check"] pub fn duckdb_execution_is_finished(con: duckdb_connection) -> bool; } pub type __builtin_va_list = *mut ::std::os::raw::c_char; pub type __uint128_t = u128;