1pub const _LIBC_LIMITS_H_: u32 = 1;
4pub const _FEATURES_H: u32 = 1;
5pub const _DEFAULT_SOURCE: u32 = 1;
6pub const __GLIBC_USE_ISOC2X: u32 = 0;
7pub const __USE_ISOC11: u32 = 1;
8pub const __USE_ISOC99: u32 = 1;
9pub const __USE_ISOC95: u32 = 1;
10pub const __USE_POSIX_IMPLICITLY: u32 = 1;
11pub const _POSIX_SOURCE: u32 = 1;
12pub const _POSIX_C_SOURCE: u32 = 200809;
13pub const __USE_POSIX: u32 = 1;
14pub const __USE_POSIX2: u32 = 1;
15pub const __USE_POSIX199309: u32 = 1;
16pub const __USE_POSIX199506: u32 = 1;
17pub const __USE_XOPEN2K: u32 = 1;
18pub const __USE_XOPEN2K8: u32 = 1;
19pub const _ATFILE_SOURCE: u32 = 1;
20pub const __WORDSIZE: u32 = 64;
21pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
22pub const __SYSCALL_WORDSIZE: u32 = 64;
23pub const __TIMESIZE: u32 = 64;
24pub const __USE_MISC: u32 = 1;
25pub const __USE_ATFILE: u32 = 1;
26pub const __USE_FORTIFY_LEVEL: u32 = 0;
27pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
28pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
29pub const _STDC_PREDEF_H: u32 = 1;
30pub const __STDC_IEC_559__: u32 = 1;
31pub const __STDC_IEC_60559_BFP__: u32 = 201404;
32pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
33pub const __STDC_IEC_60559_COMPLEX__: u32 = 201404;
34pub const __STDC_ISO_10646__: u32 = 201706;
35pub const __GNU_LIBRARY__: u32 = 6;
36pub const __GLIBC__: u32 = 2;
37pub const __GLIBC_MINOR__: u32 = 35;
38pub const _SYS_CDEFS_H: u32 = 1;
39pub const __glibc_c99_flexarr_available: u32 = 1;
40pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
41pub const __HAVE_GENERIC_SELECTION: u32 = 1;
42pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
43pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
44pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
45pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
46pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
47pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
48pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
49pub const MB_LEN_MAX: u32 = 16;
50pub const _BITS_POSIX1_LIM_H: u32 = 1;
51pub const _POSIX_AIO_LISTIO_MAX: u32 = 2;
52pub const _POSIX_AIO_MAX: u32 = 1;
53pub const _POSIX_ARG_MAX: u32 = 4096;
54pub const _POSIX_CHILD_MAX: u32 = 25;
55pub const _POSIX_DELAYTIMER_MAX: u32 = 32;
56pub const _POSIX_HOST_NAME_MAX: u32 = 255;
57pub const _POSIX_LINK_MAX: u32 = 8;
58pub const _POSIX_LOGIN_NAME_MAX: u32 = 9;
59pub const _POSIX_MAX_CANON: u32 = 255;
60pub const _POSIX_MAX_INPUT: u32 = 255;
61pub const _POSIX_MQ_OPEN_MAX: u32 = 8;
62pub const _POSIX_MQ_PRIO_MAX: u32 = 32;
63pub const _POSIX_NAME_MAX: u32 = 14;
64pub const _POSIX_NGROUPS_MAX: u32 = 8;
65pub const _POSIX_OPEN_MAX: u32 = 20;
66pub const _POSIX_PATH_MAX: u32 = 256;
67pub const _POSIX_PIPE_BUF: u32 = 512;
68pub const _POSIX_RE_DUP_MAX: u32 = 255;
69pub const _POSIX_RTSIG_MAX: u32 = 8;
70pub const _POSIX_SEM_NSEMS_MAX: u32 = 256;
71pub const _POSIX_SEM_VALUE_MAX: u32 = 32767;
72pub const _POSIX_SIGQUEUE_MAX: u32 = 32;
73pub const _POSIX_SSIZE_MAX: u32 = 32767;
74pub const _POSIX_STREAM_MAX: u32 = 8;
75pub const _POSIX_SYMLINK_MAX: u32 = 255;
76pub const _POSIX_SYMLOOP_MAX: u32 = 8;
77pub const _POSIX_TIMER_MAX: u32 = 32;
78pub const _POSIX_TTY_NAME_MAX: u32 = 9;
79pub const _POSIX_TZNAME_MAX: u32 = 6;
80pub const _POSIX_CLOCKRES_MIN: u32 = 20000000;
81pub const NR_OPEN: u32 = 1024;
82pub const NGROUPS_MAX: u32 = 65536;
83pub const ARG_MAX: u32 = 131072;
84pub const LINK_MAX: u32 = 127;
85pub const MAX_CANON: u32 = 255;
86pub const MAX_INPUT: u32 = 255;
87pub const NAME_MAX: u32 = 255;
88pub const PATH_MAX: u32 = 4096;
89pub const PIPE_BUF: u32 = 4096;
90pub const XATTR_NAME_MAX: u32 = 255;
91pub const XATTR_SIZE_MAX: u32 = 65536;
92pub const XATTR_LIST_MAX: u32 = 65536;
93pub const RTSIG_MAX: u32 = 32;
94pub const _POSIX_THREAD_KEYS_MAX: u32 = 128;
95pub const PTHREAD_KEYS_MAX: u32 = 1024;
96pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: u32 = 4;
97pub const PTHREAD_DESTRUCTOR_ITERATIONS: u32 = 4;
98pub const _POSIX_THREAD_THREADS_MAX: u32 = 64;
99pub const AIO_PRIO_DELTA_MAX: u32 = 20;
100pub const PTHREAD_STACK_MIN: u32 = 16384;
101pub const DELAYTIMER_MAX: u32 = 2147483647;
102pub const TTY_NAME_MAX: u32 = 32;
103pub const LOGIN_NAME_MAX: u32 = 256;
104pub const HOST_NAME_MAX: u32 = 64;
105pub const MQ_PRIO_MAX: u32 = 32768;
106pub const SEM_VALUE_MAX: u32 = 2147483647;
107pub const _BITS_POSIX2_LIM_H: u32 = 1;
108pub const _POSIX2_BC_BASE_MAX: u32 = 99;
109pub const _POSIX2_BC_DIM_MAX: u32 = 2048;
110pub const _POSIX2_BC_SCALE_MAX: u32 = 99;
111pub const _POSIX2_BC_STRING_MAX: u32 = 1000;
112pub const _POSIX2_COLL_WEIGHTS_MAX: u32 = 2;
113pub const _POSIX2_EXPR_NEST_MAX: u32 = 32;
114pub const _POSIX2_LINE_MAX: u32 = 2048;
115pub const _POSIX2_RE_DUP_MAX: u32 = 255;
116pub const _POSIX2_CHARCLASS_NAME_MAX: u32 = 14;
117pub const BC_BASE_MAX: u32 = 99;
118pub const BC_DIM_MAX: u32 = 2048;
119pub const BC_SCALE_MAX: u32 = 99;
120pub const BC_STRING_MAX: u32 = 1000;
121pub const COLL_WEIGHTS_MAX: u32 = 255;
122pub const EXPR_NEST_MAX: u32 = 32;
123pub const LINE_MAX: u32 = 2048;
124pub const CHARCLASS_NAME_MAX: u32 = 2048;
125pub const RE_DUP_MAX: u32 = 32767;
126pub const _STDINT_H: u32 = 1;
127pub const _BITS_TYPES_H: u32 = 1;
128pub const _BITS_TYPESIZES_H: u32 = 1;
129pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
130pub const __INO_T_MATCHES_INO64_T: u32 = 1;
131pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
132pub const __STATFS_MATCHES_STATFS64: u32 = 1;
133pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
134pub const __FD_SETSIZE: u32 = 1024;
135pub const _BITS_TIME64_H: u32 = 1;
136pub const _BITS_WCHAR_H: u32 = 1;
137pub const _BITS_STDINT_INTN_H: u32 = 1;
138pub const _BITS_STDINT_UINTN_H: u32 = 1;
139pub const INT8_MIN: i32 = -128;
140pub const INT16_MIN: i32 = -32768;
141pub const INT32_MIN: i32 = -2147483648;
142pub const INT8_MAX: u32 = 127;
143pub const INT16_MAX: u32 = 32767;
144pub const INT32_MAX: u32 = 2147483647;
145pub const UINT8_MAX: u32 = 255;
146pub const UINT16_MAX: u32 = 65535;
147pub const UINT32_MAX: u32 = 4294967295;
148pub const INT_LEAST8_MIN: i32 = -128;
149pub const INT_LEAST16_MIN: i32 = -32768;
150pub const INT_LEAST32_MIN: i32 = -2147483648;
151pub const INT_LEAST8_MAX: u32 = 127;
152pub const INT_LEAST16_MAX: u32 = 32767;
153pub const INT_LEAST32_MAX: u32 = 2147483647;
154pub const UINT_LEAST8_MAX: u32 = 255;
155pub const UINT_LEAST16_MAX: u32 = 65535;
156pub const UINT_LEAST32_MAX: u32 = 4294967295;
157pub const INT_FAST8_MIN: i32 = -128;
158pub const INT_FAST16_MIN: i64 = -9223372036854775808;
159pub const INT_FAST32_MIN: i64 = -9223372036854775808;
160pub const INT_FAST8_MAX: u32 = 127;
161pub const INT_FAST16_MAX: u64 = 9223372036854775807;
162pub const INT_FAST32_MAX: u64 = 9223372036854775807;
163pub const UINT_FAST8_MAX: u32 = 255;
164pub const UINT_FAST16_MAX: i32 = -1;
165pub const UINT_FAST32_MAX: i32 = -1;
166pub const INTPTR_MIN: i64 = -9223372036854775808;
167pub const INTPTR_MAX: u64 = 9223372036854775807;
168pub const UINTPTR_MAX: i32 = -1;
169pub const PTRDIFF_MIN: i64 = -9223372036854775808;
170pub const PTRDIFF_MAX: u64 = 9223372036854775807;
171pub const SIG_ATOMIC_MIN: i32 = -2147483648;
172pub const SIG_ATOMIC_MAX: u32 = 2147483647;
173pub const SIZE_MAX: i32 = -1;
174pub const WINT_MIN: u32 = 0;
175pub const WINT_MAX: u32 = 4294967295;
176pub const _STDLIB_H: u32 = 1;
177pub const WNOHANG: u32 = 1;
178pub const WUNTRACED: u32 = 2;
179pub const WSTOPPED: u32 = 2;
180pub const WEXITED: u32 = 4;
181pub const WCONTINUED: u32 = 8;
182pub const WNOWAIT: u32 = 16777216;
183pub const __WNOTHREAD: u32 = 536870912;
184pub const __WALL: u32 = 1073741824;
185pub const __WCLONE: u32 = 2147483648;
186pub const __W_CONTINUED: u32 = 65535;
187pub const __WCOREFLAG: u32 = 128;
188pub const __HAVE_FLOAT128: u32 = 0;
189pub const __HAVE_DISTINCT_FLOAT128: u32 = 0;
190pub const __HAVE_FLOAT64X: u32 = 1;
191pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1;
192pub const __HAVE_FLOAT16: u32 = 0;
193pub const __HAVE_FLOAT32: u32 = 1;
194pub const __HAVE_FLOAT64: u32 = 1;
195pub const __HAVE_FLOAT32X: u32 = 1;
196pub const __HAVE_FLOAT128X: u32 = 0;
197pub const __HAVE_DISTINCT_FLOAT16: u32 = 0;
198pub const __HAVE_DISTINCT_FLOAT32: u32 = 0;
199pub const __HAVE_DISTINCT_FLOAT64: u32 = 0;
200pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0;
201pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0;
202pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0;
203pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0;
204pub const __ldiv_t_defined: u32 = 1;
205pub const __lldiv_t_defined: u32 = 1;
206pub const RAND_MAX: u32 = 2147483647;
207pub const EXIT_FAILURE: u32 = 1;
208pub const EXIT_SUCCESS: u32 = 0;
209pub const _SYS_TYPES_H: u32 = 1;
210pub const __clock_t_defined: u32 = 1;
211pub const __clockid_t_defined: u32 = 1;
212pub const __time_t_defined: u32 = 1;
213pub const __timer_t_defined: u32 = 1;
214pub const __BIT_TYPES_DEFINED__: u32 = 1;
215pub const _ENDIAN_H: u32 = 1;
216pub const _BITS_ENDIAN_H: u32 = 1;
217pub const __LITTLE_ENDIAN: u32 = 1234;
218pub const __BIG_ENDIAN: u32 = 4321;
219pub const __PDP_ENDIAN: u32 = 3412;
220pub const _BITS_ENDIANNESS_H: u32 = 1;
221pub const __BYTE_ORDER: u32 = 1234;
222pub const __FLOAT_WORD_ORDER: u32 = 1234;
223pub const LITTLE_ENDIAN: u32 = 1234;
224pub const BIG_ENDIAN: u32 = 4321;
225pub const PDP_ENDIAN: u32 = 3412;
226pub const BYTE_ORDER: u32 = 1234;
227pub const _BITS_BYTESWAP_H: u32 = 1;
228pub const _BITS_UINTN_IDENTITY_H: u32 = 1;
229pub const _SYS_SELECT_H: u32 = 1;
230pub const __sigset_t_defined: u32 = 1;
231pub const __timeval_defined: u32 = 1;
232pub const _STRUCT_TIMESPEC: u32 = 1;
233pub const FD_SETSIZE: u32 = 1024;
234pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1;
235pub const _THREAD_SHARED_TYPES_H: u32 = 1;
236pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1;
237pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40;
238pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56;
239pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56;
240pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32;
241pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4;
242pub const __SIZEOF_PTHREAD_COND_T: u32 = 48;
243pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4;
244pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8;
245pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4;
246pub const _THREAD_MUTEX_INTERNAL_H: u32 = 1;
247pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1;
248pub const __have_pthread_attr_t: u32 = 1;
249pub const _ALLOCA_H: u32 = 1;
250pub const __bool_true_false_are_defined: u32 = 1;
251pub const true_: u32 = 1;
252pub const false_: u32 = 0;
253pub type __u_char = ::std::os::raw::c_uchar;
254pub type __u_short = ::std::os::raw::c_ushort;
255pub type __u_int = ::std::os::raw::c_uint;
256pub type __u_long = ::std::os::raw::c_ulong;
257pub type __int8_t = ::std::os::raw::c_schar;
258pub type __uint8_t = ::std::os::raw::c_uchar;
259pub type __int16_t = ::std::os::raw::c_short;
260pub type __uint16_t = ::std::os::raw::c_ushort;
261pub type __int32_t = ::std::os::raw::c_int;
262pub type __uint32_t = ::std::os::raw::c_uint;
263pub type __int64_t = ::std::os::raw::c_long;
264pub type __uint64_t = ::std::os::raw::c_ulong;
265pub type __int_least8_t = __int8_t;
266pub type __uint_least8_t = __uint8_t;
267pub type __int_least16_t = __int16_t;
268pub type __uint_least16_t = __uint16_t;
269pub type __int_least32_t = __int32_t;
270pub type __uint_least32_t = __uint32_t;
271pub type __int_least64_t = __int64_t;
272pub type __uint_least64_t = __uint64_t;
273pub type __quad_t = ::std::os::raw::c_long;
274pub type __u_quad_t = ::std::os::raw::c_ulong;
275pub type __intmax_t = ::std::os::raw::c_long;
276pub type __uintmax_t = ::std::os::raw::c_ulong;
277pub type __dev_t = ::std::os::raw::c_ulong;
278pub type __uid_t = ::std::os::raw::c_uint;
279pub type __gid_t = ::std::os::raw::c_uint;
280pub type __ino_t = ::std::os::raw::c_ulong;
281pub type __ino64_t = ::std::os::raw::c_ulong;
282pub type __mode_t = ::std::os::raw::c_uint;
283pub type __nlink_t = ::std::os::raw::c_ulong;
284pub type __off_t = ::std::os::raw::c_long;
285pub type __off64_t = ::std::os::raw::c_long;
286pub type __pid_t = ::std::os::raw::c_int;
287#[repr(C)]
288#[derive(Debug, Copy, Clone)]
289pub struct __fsid_t {
290 pub __val: [::std::os::raw::c_int; 2usize],
291}
292#[test]
293fn bindgen_test_layout___fsid_t() {
294 const UNINIT: ::std::mem::MaybeUninit<__fsid_t> = ::std::mem::MaybeUninit::uninit();
295 let ptr = UNINIT.as_ptr();
296 assert_eq!(
297 ::std::mem::size_of::<__fsid_t>(),
298 8usize,
299 concat!("Size of: ", stringify!(__fsid_t))
300 );
301 assert_eq!(
302 ::std::mem::align_of::<__fsid_t>(),
303 4usize,
304 concat!("Alignment of ", stringify!(__fsid_t))
305 );
306 assert_eq!(
307 unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize },
308 0usize,
309 concat!(
310 "Offset of field: ",
311 stringify!(__fsid_t),
312 "::",
313 stringify!(__val)
314 )
315 );
316}
317pub type __clock_t = ::std::os::raw::c_long;
318pub type __rlim_t = ::std::os::raw::c_ulong;
319pub type __rlim64_t = ::std::os::raw::c_ulong;
320pub type __id_t = ::std::os::raw::c_uint;
321pub type __time_t = ::std::os::raw::c_long;
322pub type __useconds_t = ::std::os::raw::c_uint;
323pub type __suseconds_t = ::std::os::raw::c_long;
324pub type __suseconds64_t = ::std::os::raw::c_long;
325pub type __daddr_t = ::std::os::raw::c_int;
326pub type __key_t = ::std::os::raw::c_int;
327pub type __clockid_t = ::std::os::raw::c_int;
328pub type __timer_t = *mut ::std::os::raw::c_void;
329pub type __blksize_t = ::std::os::raw::c_long;
330pub type __blkcnt_t = ::std::os::raw::c_long;
331pub type __blkcnt64_t = ::std::os::raw::c_long;
332pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
333pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
334pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
335pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
336pub type __fsword_t = ::std::os::raw::c_long;
337pub type __ssize_t = ::std::os::raw::c_long;
338pub type __syscall_slong_t = ::std::os::raw::c_long;
339pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
340pub type __loff_t = __off64_t;
341pub type __caddr_t = *mut ::std::os::raw::c_char;
342pub type __intptr_t = ::std::os::raw::c_long;
343pub type __socklen_t = ::std::os::raw::c_uint;
344pub type __sig_atomic_t = ::std::os::raw::c_int;
345pub type int_least8_t = __int_least8_t;
346pub type int_least16_t = __int_least16_t;
347pub type int_least32_t = __int_least32_t;
348pub type int_least64_t = __int_least64_t;
349pub type uint_least8_t = __uint_least8_t;
350pub type uint_least16_t = __uint_least16_t;
351pub type uint_least32_t = __uint_least32_t;
352pub type uint_least64_t = __uint_least64_t;
353pub type int_fast8_t = ::std::os::raw::c_schar;
354pub type int_fast16_t = ::std::os::raw::c_long;
355pub type int_fast32_t = ::std::os::raw::c_long;
356pub type int_fast64_t = ::std::os::raw::c_long;
357pub type uint_fast8_t = ::std::os::raw::c_uchar;
358pub type uint_fast16_t = ::std::os::raw::c_ulong;
359pub type uint_fast32_t = ::std::os::raw::c_ulong;
360pub type uint_fast64_t = ::std::os::raw::c_ulong;
361pub type intmax_t = __intmax_t;
362pub type uintmax_t = __uintmax_t;
363pub type wchar_t = ::std::os::raw::c_int;
364pub type _Float32 = f32;
365pub type _Float64 = f64;
366pub type _Float32x = f64;
367pub type _Float64x = u128;
368#[repr(C)]
369#[derive(Debug, Copy, Clone)]
370pub struct div_t {
371 pub quot: ::std::os::raw::c_int,
372 pub rem: ::std::os::raw::c_int,
373}
374#[test]
375fn bindgen_test_layout_div_t() {
376 const UNINIT: ::std::mem::MaybeUninit<div_t> = ::std::mem::MaybeUninit::uninit();
377 let ptr = UNINIT.as_ptr();
378 assert_eq!(
379 ::std::mem::size_of::<div_t>(),
380 8usize,
381 concat!("Size of: ", stringify!(div_t))
382 );
383 assert_eq!(
384 ::std::mem::align_of::<div_t>(),
385 4usize,
386 concat!("Alignment of ", stringify!(div_t))
387 );
388 assert_eq!(
389 unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize },
390 0usize,
391 concat!(
392 "Offset of field: ",
393 stringify!(div_t),
394 "::",
395 stringify!(quot)
396 )
397 );
398 assert_eq!(
399 unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize },
400 4usize,
401 concat!(
402 "Offset of field: ",
403 stringify!(div_t),
404 "::",
405 stringify!(rem)
406 )
407 );
408}
409#[repr(C)]
410#[derive(Debug, Copy, Clone)]
411pub struct ldiv_t {
412 pub quot: ::std::os::raw::c_long,
413 pub rem: ::std::os::raw::c_long,
414}
415#[test]
416fn bindgen_test_layout_ldiv_t() {
417 const UNINIT: ::std::mem::MaybeUninit<ldiv_t> = ::std::mem::MaybeUninit::uninit();
418 let ptr = UNINIT.as_ptr();
419 assert_eq!(
420 ::std::mem::size_of::<ldiv_t>(),
421 16usize,
422 concat!("Size of: ", stringify!(ldiv_t))
423 );
424 assert_eq!(
425 ::std::mem::align_of::<ldiv_t>(),
426 8usize,
427 concat!("Alignment of ", stringify!(ldiv_t))
428 );
429 assert_eq!(
430 unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize },
431 0usize,
432 concat!(
433 "Offset of field: ",
434 stringify!(ldiv_t),
435 "::",
436 stringify!(quot)
437 )
438 );
439 assert_eq!(
440 unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize },
441 8usize,
442 concat!(
443 "Offset of field: ",
444 stringify!(ldiv_t),
445 "::",
446 stringify!(rem)
447 )
448 );
449}
450#[repr(C)]
451#[derive(Debug, Copy, Clone)]
452pub struct lldiv_t {
453 pub quot: ::std::os::raw::c_longlong,
454 pub rem: ::std::os::raw::c_longlong,
455}
456#[test]
457fn bindgen_test_layout_lldiv_t() {
458 const UNINIT: ::std::mem::MaybeUninit<lldiv_t> = ::std::mem::MaybeUninit::uninit();
459 let ptr = UNINIT.as_ptr();
460 assert_eq!(
461 ::std::mem::size_of::<lldiv_t>(),
462 16usize,
463 concat!("Size of: ", stringify!(lldiv_t))
464 );
465 assert_eq!(
466 ::std::mem::align_of::<lldiv_t>(),
467 8usize,
468 concat!("Alignment of ", stringify!(lldiv_t))
469 );
470 assert_eq!(
471 unsafe { ::std::ptr::addr_of!((*ptr).quot) as usize - ptr as usize },
472 0usize,
473 concat!(
474 "Offset of field: ",
475 stringify!(lldiv_t),
476 "::",
477 stringify!(quot)
478 )
479 );
480 assert_eq!(
481 unsafe { ::std::ptr::addr_of!((*ptr).rem) as usize - ptr as usize },
482 8usize,
483 concat!(
484 "Offset of field: ",
485 stringify!(lldiv_t),
486 "::",
487 stringify!(rem)
488 )
489 );
490}
491extern "C" {
492 pub fn __ctype_get_mb_cur_max() -> usize;
493}
494extern "C" {
495 pub fn atof(__nptr: *const ::std::os::raw::c_char) -> f64;
496}
497extern "C" {
498 pub fn atoi(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
499}
500extern "C" {
501 pub fn atol(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
502}
503extern "C" {
504 pub fn atoll(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong;
505}
506extern "C" {
507 pub fn strtod(
508 __nptr: *const ::std::os::raw::c_char,
509 __endptr: *mut *mut ::std::os::raw::c_char,
510 ) -> f64;
511}
512extern "C" {
513 pub fn strtof(
514 __nptr: *const ::std::os::raw::c_char,
515 __endptr: *mut *mut ::std::os::raw::c_char,
516 ) -> f32;
517}
518extern "C" {
519 pub fn strtold(
520 __nptr: *const ::std::os::raw::c_char,
521 __endptr: *mut *mut ::std::os::raw::c_char,
522 ) -> u128;
523}
524extern "C" {
525 pub fn strtol(
526 __nptr: *const ::std::os::raw::c_char,
527 __endptr: *mut *mut ::std::os::raw::c_char,
528 __base: ::std::os::raw::c_int,
529 ) -> ::std::os::raw::c_long;
530}
531extern "C" {
532 pub fn strtoul(
533 __nptr: *const ::std::os::raw::c_char,
534 __endptr: *mut *mut ::std::os::raw::c_char,
535 __base: ::std::os::raw::c_int,
536 ) -> ::std::os::raw::c_ulong;
537}
538extern "C" {
539 pub fn strtoq(
540 __nptr: *const ::std::os::raw::c_char,
541 __endptr: *mut *mut ::std::os::raw::c_char,
542 __base: ::std::os::raw::c_int,
543 ) -> ::std::os::raw::c_longlong;
544}
545extern "C" {
546 pub fn strtouq(
547 __nptr: *const ::std::os::raw::c_char,
548 __endptr: *mut *mut ::std::os::raw::c_char,
549 __base: ::std::os::raw::c_int,
550 ) -> ::std::os::raw::c_ulonglong;
551}
552extern "C" {
553 pub fn strtoll(
554 __nptr: *const ::std::os::raw::c_char,
555 __endptr: *mut *mut ::std::os::raw::c_char,
556 __base: ::std::os::raw::c_int,
557 ) -> ::std::os::raw::c_longlong;
558}
559extern "C" {
560 pub fn strtoull(
561 __nptr: *const ::std::os::raw::c_char,
562 __endptr: *mut *mut ::std::os::raw::c_char,
563 __base: ::std::os::raw::c_int,
564 ) -> ::std::os::raw::c_ulonglong;
565}
566extern "C" {
567 pub fn l64a(__n: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char;
568}
569extern "C" {
570 pub fn a64l(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
571}
572pub type u_char = __u_char;
573pub type u_short = __u_short;
574pub type u_int = __u_int;
575pub type u_long = __u_long;
576pub type quad_t = __quad_t;
577pub type u_quad_t = __u_quad_t;
578pub type fsid_t = __fsid_t;
579pub type loff_t = __loff_t;
580pub type ino_t = __ino_t;
581pub type dev_t = __dev_t;
582pub type gid_t = __gid_t;
583pub type mode_t = __mode_t;
584pub type nlink_t = __nlink_t;
585pub type uid_t = __uid_t;
586pub type off_t = __off_t;
587pub type pid_t = __pid_t;
588pub type id_t = __id_t;
589pub type daddr_t = __daddr_t;
590pub type caddr_t = __caddr_t;
591pub type key_t = __key_t;
592pub type clock_t = __clock_t;
593pub type clockid_t = __clockid_t;
594pub type time_t = __time_t;
595pub type timer_t = __timer_t;
596pub type ulong = ::std::os::raw::c_ulong;
597pub type ushort = ::std::os::raw::c_ushort;
598pub type uint = ::std::os::raw::c_uint;
599pub type u_int8_t = __uint8_t;
600pub type u_int16_t = __uint16_t;
601pub type u_int32_t = __uint32_t;
602pub type u_int64_t = __uint64_t;
603pub type register_t = ::std::os::raw::c_long;
604#[repr(C)]
605#[derive(Debug, Copy, Clone)]
606pub struct __sigset_t {
607 pub __val: [::std::os::raw::c_ulong; 16usize],
608}
609#[test]
610fn bindgen_test_layout___sigset_t() {
611 const UNINIT: ::std::mem::MaybeUninit<__sigset_t> = ::std::mem::MaybeUninit::uninit();
612 let ptr = UNINIT.as_ptr();
613 assert_eq!(
614 ::std::mem::size_of::<__sigset_t>(),
615 128usize,
616 concat!("Size of: ", stringify!(__sigset_t))
617 );
618 assert_eq!(
619 ::std::mem::align_of::<__sigset_t>(),
620 8usize,
621 concat!("Alignment of ", stringify!(__sigset_t))
622 );
623 assert_eq!(
624 unsafe { ::std::ptr::addr_of!((*ptr).__val) as usize - ptr as usize },
625 0usize,
626 concat!(
627 "Offset of field: ",
628 stringify!(__sigset_t),
629 "::",
630 stringify!(__val)
631 )
632 );
633}
634pub type sigset_t = __sigset_t;
635#[repr(C)]
636#[derive(Debug, Copy, Clone)]
637pub struct timeval {
638 pub tv_sec: __time_t,
639 pub tv_usec: __suseconds_t,
640}
641#[test]
642fn bindgen_test_layout_timeval() {
643 const UNINIT: ::std::mem::MaybeUninit<timeval> = ::std::mem::MaybeUninit::uninit();
644 let ptr = UNINIT.as_ptr();
645 assert_eq!(
646 ::std::mem::size_of::<timeval>(),
647 16usize,
648 concat!("Size of: ", stringify!(timeval))
649 );
650 assert_eq!(
651 ::std::mem::align_of::<timeval>(),
652 8usize,
653 concat!("Alignment of ", stringify!(timeval))
654 );
655 assert_eq!(
656 unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize },
657 0usize,
658 concat!(
659 "Offset of field: ",
660 stringify!(timeval),
661 "::",
662 stringify!(tv_sec)
663 )
664 );
665 assert_eq!(
666 unsafe { ::std::ptr::addr_of!((*ptr).tv_usec) as usize - ptr as usize },
667 8usize,
668 concat!(
669 "Offset of field: ",
670 stringify!(timeval),
671 "::",
672 stringify!(tv_usec)
673 )
674 );
675}
676#[repr(C)]
677#[derive(Debug, Copy, Clone)]
678pub struct timespec {
679 pub tv_sec: __time_t,
680 pub tv_nsec: __syscall_slong_t,
681}
682#[test]
683fn bindgen_test_layout_timespec() {
684 const UNINIT: ::std::mem::MaybeUninit<timespec> = ::std::mem::MaybeUninit::uninit();
685 let ptr = UNINIT.as_ptr();
686 assert_eq!(
687 ::std::mem::size_of::<timespec>(),
688 16usize,
689 concat!("Size of: ", stringify!(timespec))
690 );
691 assert_eq!(
692 ::std::mem::align_of::<timespec>(),
693 8usize,
694 concat!("Alignment of ", stringify!(timespec))
695 );
696 assert_eq!(
697 unsafe { ::std::ptr::addr_of!((*ptr).tv_sec) as usize - ptr as usize },
698 0usize,
699 concat!(
700 "Offset of field: ",
701 stringify!(timespec),
702 "::",
703 stringify!(tv_sec)
704 )
705 );
706 assert_eq!(
707 unsafe { ::std::ptr::addr_of!((*ptr).tv_nsec) as usize - ptr as usize },
708 8usize,
709 concat!(
710 "Offset of field: ",
711 stringify!(timespec),
712 "::",
713 stringify!(tv_nsec)
714 )
715 );
716}
717pub type suseconds_t = __suseconds_t;
718pub type __fd_mask = ::std::os::raw::c_long;
719#[repr(C)]
720#[derive(Debug, Copy, Clone)]
721pub struct fd_set {
722 pub __fds_bits: [__fd_mask; 16usize],
723}
724#[test]
725fn bindgen_test_layout_fd_set() {
726 const UNINIT: ::std::mem::MaybeUninit<fd_set> = ::std::mem::MaybeUninit::uninit();
727 let ptr = UNINIT.as_ptr();
728 assert_eq!(
729 ::std::mem::size_of::<fd_set>(),
730 128usize,
731 concat!("Size of: ", stringify!(fd_set))
732 );
733 assert_eq!(
734 ::std::mem::align_of::<fd_set>(),
735 8usize,
736 concat!("Alignment of ", stringify!(fd_set))
737 );
738 assert_eq!(
739 unsafe { ::std::ptr::addr_of!((*ptr).__fds_bits) as usize - ptr as usize },
740 0usize,
741 concat!(
742 "Offset of field: ",
743 stringify!(fd_set),
744 "::",
745 stringify!(__fds_bits)
746 )
747 );
748}
749pub type fd_mask = __fd_mask;
750extern "C" {
751 pub fn select(
752 __nfds: ::std::os::raw::c_int,
753 __readfds: *mut fd_set,
754 __writefds: *mut fd_set,
755 __exceptfds: *mut fd_set,
756 __timeout: *mut timeval,
757 ) -> ::std::os::raw::c_int;
758}
759extern "C" {
760 pub fn pselect(
761 __nfds: ::std::os::raw::c_int,
762 __readfds: *mut fd_set,
763 __writefds: *mut fd_set,
764 __exceptfds: *mut fd_set,
765 __timeout: *const timespec,
766 __sigmask: *const __sigset_t,
767 ) -> ::std::os::raw::c_int;
768}
769pub type blksize_t = __blksize_t;
770pub type blkcnt_t = __blkcnt_t;
771pub type fsblkcnt_t = __fsblkcnt_t;
772pub type fsfilcnt_t = __fsfilcnt_t;
773#[repr(C)]
774#[derive(Copy, Clone)]
775pub union __atomic_wide_counter {
776 pub __value64: ::std::os::raw::c_ulonglong,
777 pub __value32: __atomic_wide_counter__bindgen_ty_1,
778}
779#[repr(C)]
780#[derive(Debug, Copy, Clone)]
781pub struct __atomic_wide_counter__bindgen_ty_1 {
782 pub __low: ::std::os::raw::c_uint,
783 pub __high: ::std::os::raw::c_uint,
784}
785#[test]
786fn bindgen_test_layout___atomic_wide_counter__bindgen_ty_1() {
787 const UNINIT: ::std::mem::MaybeUninit<__atomic_wide_counter__bindgen_ty_1> =
788 ::std::mem::MaybeUninit::uninit();
789 let ptr = UNINIT.as_ptr();
790 assert_eq!(
791 ::std::mem::size_of::<__atomic_wide_counter__bindgen_ty_1>(),
792 8usize,
793 concat!("Size of: ", stringify!(__atomic_wide_counter__bindgen_ty_1))
794 );
795 assert_eq!(
796 ::std::mem::align_of::<__atomic_wide_counter__bindgen_ty_1>(),
797 4usize,
798 concat!(
799 "Alignment of ",
800 stringify!(__atomic_wide_counter__bindgen_ty_1)
801 )
802 );
803 assert_eq!(
804 unsafe { ::std::ptr::addr_of!((*ptr).__low) as usize - ptr as usize },
805 0usize,
806 concat!(
807 "Offset of field: ",
808 stringify!(__atomic_wide_counter__bindgen_ty_1),
809 "::",
810 stringify!(__low)
811 )
812 );
813 assert_eq!(
814 unsafe { ::std::ptr::addr_of!((*ptr).__high) as usize - ptr as usize },
815 4usize,
816 concat!(
817 "Offset of field: ",
818 stringify!(__atomic_wide_counter__bindgen_ty_1),
819 "::",
820 stringify!(__high)
821 )
822 );
823}
824#[test]
825fn bindgen_test_layout___atomic_wide_counter() {
826 const UNINIT: ::std::mem::MaybeUninit<__atomic_wide_counter> =
827 ::std::mem::MaybeUninit::uninit();
828 let ptr = UNINIT.as_ptr();
829 assert_eq!(
830 ::std::mem::size_of::<__atomic_wide_counter>(),
831 8usize,
832 concat!("Size of: ", stringify!(__atomic_wide_counter))
833 );
834 assert_eq!(
835 ::std::mem::align_of::<__atomic_wide_counter>(),
836 8usize,
837 concat!("Alignment of ", stringify!(__atomic_wide_counter))
838 );
839 assert_eq!(
840 unsafe { ::std::ptr::addr_of!((*ptr).__value64) as usize - ptr as usize },
841 0usize,
842 concat!(
843 "Offset of field: ",
844 stringify!(__atomic_wide_counter),
845 "::",
846 stringify!(__value64)
847 )
848 );
849 assert_eq!(
850 unsafe { ::std::ptr::addr_of!((*ptr).__value32) as usize - ptr as usize },
851 0usize,
852 concat!(
853 "Offset of field: ",
854 stringify!(__atomic_wide_counter),
855 "::",
856 stringify!(__value32)
857 )
858 );
859}
860#[repr(C)]
861#[derive(Debug, Copy, Clone)]
862pub struct __pthread_internal_list {
863 pub __prev: *mut __pthread_internal_list,
864 pub __next: *mut __pthread_internal_list,
865}
866#[test]
867fn bindgen_test_layout___pthread_internal_list() {
868 const UNINIT: ::std::mem::MaybeUninit<__pthread_internal_list> =
869 ::std::mem::MaybeUninit::uninit();
870 let ptr = UNINIT.as_ptr();
871 assert_eq!(
872 ::std::mem::size_of::<__pthread_internal_list>(),
873 16usize,
874 concat!("Size of: ", stringify!(__pthread_internal_list))
875 );
876 assert_eq!(
877 ::std::mem::align_of::<__pthread_internal_list>(),
878 8usize,
879 concat!("Alignment of ", stringify!(__pthread_internal_list))
880 );
881 assert_eq!(
882 unsafe { ::std::ptr::addr_of!((*ptr).__prev) as usize - ptr as usize },
883 0usize,
884 concat!(
885 "Offset of field: ",
886 stringify!(__pthread_internal_list),
887 "::",
888 stringify!(__prev)
889 )
890 );
891 assert_eq!(
892 unsafe { ::std::ptr::addr_of!((*ptr).__next) as usize - ptr as usize },
893 8usize,
894 concat!(
895 "Offset of field: ",
896 stringify!(__pthread_internal_list),
897 "::",
898 stringify!(__next)
899 )
900 );
901}
902pub type __pthread_list_t = __pthread_internal_list;
903#[repr(C)]
904#[derive(Debug, Copy, Clone)]
905pub struct __pthread_internal_slist {
906 pub __next: *mut __pthread_internal_slist,
907}
908#[test]
909fn bindgen_test_layout___pthread_internal_slist() {
910 const UNINIT: ::std::mem::MaybeUninit<__pthread_internal_slist> =
911 ::std::mem::MaybeUninit::uninit();
912 let ptr = UNINIT.as_ptr();
913 assert_eq!(
914 ::std::mem::size_of::<__pthread_internal_slist>(),
915 8usize,
916 concat!("Size of: ", stringify!(__pthread_internal_slist))
917 );
918 assert_eq!(
919 ::std::mem::align_of::<__pthread_internal_slist>(),
920 8usize,
921 concat!("Alignment of ", stringify!(__pthread_internal_slist))
922 );
923 assert_eq!(
924 unsafe { ::std::ptr::addr_of!((*ptr).__next) as usize - ptr as usize },
925 0usize,
926 concat!(
927 "Offset of field: ",
928 stringify!(__pthread_internal_slist),
929 "::",
930 stringify!(__next)
931 )
932 );
933}
934pub type __pthread_slist_t = __pthread_internal_slist;
935#[repr(C)]
936#[derive(Debug, Copy, Clone)]
937pub struct __pthread_mutex_s {
938 pub __lock: ::std::os::raw::c_int,
939 pub __count: ::std::os::raw::c_uint,
940 pub __owner: ::std::os::raw::c_int,
941 pub __nusers: ::std::os::raw::c_uint,
942 pub __kind: ::std::os::raw::c_int,
943 pub __spins: ::std::os::raw::c_short,
944 pub __elision: ::std::os::raw::c_short,
945 pub __list: __pthread_list_t,
946}
947#[test]
948fn bindgen_test_layout___pthread_mutex_s() {
949 const UNINIT: ::std::mem::MaybeUninit<__pthread_mutex_s> = ::std::mem::MaybeUninit::uninit();
950 let ptr = UNINIT.as_ptr();
951 assert_eq!(
952 ::std::mem::size_of::<__pthread_mutex_s>(),
953 40usize,
954 concat!("Size of: ", stringify!(__pthread_mutex_s))
955 );
956 assert_eq!(
957 ::std::mem::align_of::<__pthread_mutex_s>(),
958 8usize,
959 concat!("Alignment of ", stringify!(__pthread_mutex_s))
960 );
961 assert_eq!(
962 unsafe { ::std::ptr::addr_of!((*ptr).__lock) as usize - ptr as usize },
963 0usize,
964 concat!(
965 "Offset of field: ",
966 stringify!(__pthread_mutex_s),
967 "::",
968 stringify!(__lock)
969 )
970 );
971 assert_eq!(
972 unsafe { ::std::ptr::addr_of!((*ptr).__count) as usize - ptr as usize },
973 4usize,
974 concat!(
975 "Offset of field: ",
976 stringify!(__pthread_mutex_s),
977 "::",
978 stringify!(__count)
979 )
980 );
981 assert_eq!(
982 unsafe { ::std::ptr::addr_of!((*ptr).__owner) as usize - ptr as usize },
983 8usize,
984 concat!(
985 "Offset of field: ",
986 stringify!(__pthread_mutex_s),
987 "::",
988 stringify!(__owner)
989 )
990 );
991 assert_eq!(
992 unsafe { ::std::ptr::addr_of!((*ptr).__nusers) as usize - ptr as usize },
993 12usize,
994 concat!(
995 "Offset of field: ",
996 stringify!(__pthread_mutex_s),
997 "::",
998 stringify!(__nusers)
999 )
1000 );
1001 assert_eq!(
1002 unsafe { ::std::ptr::addr_of!((*ptr).__kind) as usize - ptr as usize },
1003 16usize,
1004 concat!(
1005 "Offset of field: ",
1006 stringify!(__pthread_mutex_s),
1007 "::",
1008 stringify!(__kind)
1009 )
1010 );
1011 assert_eq!(
1012 unsafe { ::std::ptr::addr_of!((*ptr).__spins) as usize - ptr as usize },
1013 20usize,
1014 concat!(
1015 "Offset of field: ",
1016 stringify!(__pthread_mutex_s),
1017 "::",
1018 stringify!(__spins)
1019 )
1020 );
1021 assert_eq!(
1022 unsafe { ::std::ptr::addr_of!((*ptr).__elision) as usize - ptr as usize },
1023 22usize,
1024 concat!(
1025 "Offset of field: ",
1026 stringify!(__pthread_mutex_s),
1027 "::",
1028 stringify!(__elision)
1029 )
1030 );
1031 assert_eq!(
1032 unsafe { ::std::ptr::addr_of!((*ptr).__list) as usize - ptr as usize },
1033 24usize,
1034 concat!(
1035 "Offset of field: ",
1036 stringify!(__pthread_mutex_s),
1037 "::",
1038 stringify!(__list)
1039 )
1040 );
1041}
1042#[repr(C)]
1043#[derive(Debug, Copy, Clone)]
1044pub struct __pthread_rwlock_arch_t {
1045 pub __readers: ::std::os::raw::c_uint,
1046 pub __writers: ::std::os::raw::c_uint,
1047 pub __wrphase_futex: ::std::os::raw::c_uint,
1048 pub __writers_futex: ::std::os::raw::c_uint,
1049 pub __pad3: ::std::os::raw::c_uint,
1050 pub __pad4: ::std::os::raw::c_uint,
1051 pub __cur_writer: ::std::os::raw::c_int,
1052 pub __shared: ::std::os::raw::c_int,
1053 pub __rwelision: ::std::os::raw::c_schar,
1054 pub __pad1: [::std::os::raw::c_uchar; 7usize],
1055 pub __pad2: ::std::os::raw::c_ulong,
1056 pub __flags: ::std::os::raw::c_uint,
1057}
1058#[test]
1059fn bindgen_test_layout___pthread_rwlock_arch_t() {
1060 const UNINIT: ::std::mem::MaybeUninit<__pthread_rwlock_arch_t> =
1061 ::std::mem::MaybeUninit::uninit();
1062 let ptr = UNINIT.as_ptr();
1063 assert_eq!(
1064 ::std::mem::size_of::<__pthread_rwlock_arch_t>(),
1065 56usize,
1066 concat!("Size of: ", stringify!(__pthread_rwlock_arch_t))
1067 );
1068 assert_eq!(
1069 ::std::mem::align_of::<__pthread_rwlock_arch_t>(),
1070 8usize,
1071 concat!("Alignment of ", stringify!(__pthread_rwlock_arch_t))
1072 );
1073 assert_eq!(
1074 unsafe { ::std::ptr::addr_of!((*ptr).__readers) as usize - ptr as usize },
1075 0usize,
1076 concat!(
1077 "Offset of field: ",
1078 stringify!(__pthread_rwlock_arch_t),
1079 "::",
1080 stringify!(__readers)
1081 )
1082 );
1083 assert_eq!(
1084 unsafe { ::std::ptr::addr_of!((*ptr).__writers) as usize - ptr as usize },
1085 4usize,
1086 concat!(
1087 "Offset of field: ",
1088 stringify!(__pthread_rwlock_arch_t),
1089 "::",
1090 stringify!(__writers)
1091 )
1092 );
1093 assert_eq!(
1094 unsafe { ::std::ptr::addr_of!((*ptr).__wrphase_futex) as usize - ptr as usize },
1095 8usize,
1096 concat!(
1097 "Offset of field: ",
1098 stringify!(__pthread_rwlock_arch_t),
1099 "::",
1100 stringify!(__wrphase_futex)
1101 )
1102 );
1103 assert_eq!(
1104 unsafe { ::std::ptr::addr_of!((*ptr).__writers_futex) as usize - ptr as usize },
1105 12usize,
1106 concat!(
1107 "Offset of field: ",
1108 stringify!(__pthread_rwlock_arch_t),
1109 "::",
1110 stringify!(__writers_futex)
1111 )
1112 );
1113 assert_eq!(
1114 unsafe { ::std::ptr::addr_of!((*ptr).__pad3) as usize - ptr as usize },
1115 16usize,
1116 concat!(
1117 "Offset of field: ",
1118 stringify!(__pthread_rwlock_arch_t),
1119 "::",
1120 stringify!(__pad3)
1121 )
1122 );
1123 assert_eq!(
1124 unsafe { ::std::ptr::addr_of!((*ptr).__pad4) as usize - ptr as usize },
1125 20usize,
1126 concat!(
1127 "Offset of field: ",
1128 stringify!(__pthread_rwlock_arch_t),
1129 "::",
1130 stringify!(__pad4)
1131 )
1132 );
1133 assert_eq!(
1134 unsafe { ::std::ptr::addr_of!((*ptr).__cur_writer) as usize - ptr as usize },
1135 24usize,
1136 concat!(
1137 "Offset of field: ",
1138 stringify!(__pthread_rwlock_arch_t),
1139 "::",
1140 stringify!(__cur_writer)
1141 )
1142 );
1143 assert_eq!(
1144 unsafe { ::std::ptr::addr_of!((*ptr).__shared) as usize - ptr as usize },
1145 28usize,
1146 concat!(
1147 "Offset of field: ",
1148 stringify!(__pthread_rwlock_arch_t),
1149 "::",
1150 stringify!(__shared)
1151 )
1152 );
1153 assert_eq!(
1154 unsafe { ::std::ptr::addr_of!((*ptr).__rwelision) as usize - ptr as usize },
1155 32usize,
1156 concat!(
1157 "Offset of field: ",
1158 stringify!(__pthread_rwlock_arch_t),
1159 "::",
1160 stringify!(__rwelision)
1161 )
1162 );
1163 assert_eq!(
1164 unsafe { ::std::ptr::addr_of!((*ptr).__pad1) as usize - ptr as usize },
1165 33usize,
1166 concat!(
1167 "Offset of field: ",
1168 stringify!(__pthread_rwlock_arch_t),
1169 "::",
1170 stringify!(__pad1)
1171 )
1172 );
1173 assert_eq!(
1174 unsafe { ::std::ptr::addr_of!((*ptr).__pad2) as usize - ptr as usize },
1175 40usize,
1176 concat!(
1177 "Offset of field: ",
1178 stringify!(__pthread_rwlock_arch_t),
1179 "::",
1180 stringify!(__pad2)
1181 )
1182 );
1183 assert_eq!(
1184 unsafe { ::std::ptr::addr_of!((*ptr).__flags) as usize - ptr as usize },
1185 48usize,
1186 concat!(
1187 "Offset of field: ",
1188 stringify!(__pthread_rwlock_arch_t),
1189 "::",
1190 stringify!(__flags)
1191 )
1192 );
1193}
1194#[repr(C)]
1195#[derive(Copy, Clone)]
1196pub struct __pthread_cond_s {
1197 pub __wseq: __atomic_wide_counter,
1198 pub __g1_start: __atomic_wide_counter,
1199 pub __g_refs: [::std::os::raw::c_uint; 2usize],
1200 pub __g_size: [::std::os::raw::c_uint; 2usize],
1201 pub __g1_orig_size: ::std::os::raw::c_uint,
1202 pub __wrefs: ::std::os::raw::c_uint,
1203 pub __g_signals: [::std::os::raw::c_uint; 2usize],
1204}
1205#[test]
1206fn bindgen_test_layout___pthread_cond_s() {
1207 const UNINIT: ::std::mem::MaybeUninit<__pthread_cond_s> = ::std::mem::MaybeUninit::uninit();
1208 let ptr = UNINIT.as_ptr();
1209 assert_eq!(
1210 ::std::mem::size_of::<__pthread_cond_s>(),
1211 48usize,
1212 concat!("Size of: ", stringify!(__pthread_cond_s))
1213 );
1214 assert_eq!(
1215 ::std::mem::align_of::<__pthread_cond_s>(),
1216 8usize,
1217 concat!("Alignment of ", stringify!(__pthread_cond_s))
1218 );
1219 assert_eq!(
1220 unsafe { ::std::ptr::addr_of!((*ptr).__wseq) as usize - ptr as usize },
1221 0usize,
1222 concat!(
1223 "Offset of field: ",
1224 stringify!(__pthread_cond_s),
1225 "::",
1226 stringify!(__wseq)
1227 )
1228 );
1229 assert_eq!(
1230 unsafe { ::std::ptr::addr_of!((*ptr).__g1_start) as usize - ptr as usize },
1231 8usize,
1232 concat!(
1233 "Offset of field: ",
1234 stringify!(__pthread_cond_s),
1235 "::",
1236 stringify!(__g1_start)
1237 )
1238 );
1239 assert_eq!(
1240 unsafe { ::std::ptr::addr_of!((*ptr).__g_refs) as usize - ptr as usize },
1241 16usize,
1242 concat!(
1243 "Offset of field: ",
1244 stringify!(__pthread_cond_s),
1245 "::",
1246 stringify!(__g_refs)
1247 )
1248 );
1249 assert_eq!(
1250 unsafe { ::std::ptr::addr_of!((*ptr).__g_size) as usize - ptr as usize },
1251 24usize,
1252 concat!(
1253 "Offset of field: ",
1254 stringify!(__pthread_cond_s),
1255 "::",
1256 stringify!(__g_size)
1257 )
1258 );
1259 assert_eq!(
1260 unsafe { ::std::ptr::addr_of!((*ptr).__g1_orig_size) as usize - ptr as usize },
1261 32usize,
1262 concat!(
1263 "Offset of field: ",
1264 stringify!(__pthread_cond_s),
1265 "::",
1266 stringify!(__g1_orig_size)
1267 )
1268 );
1269 assert_eq!(
1270 unsafe { ::std::ptr::addr_of!((*ptr).__wrefs) as usize - ptr as usize },
1271 36usize,
1272 concat!(
1273 "Offset of field: ",
1274 stringify!(__pthread_cond_s),
1275 "::",
1276 stringify!(__wrefs)
1277 )
1278 );
1279 assert_eq!(
1280 unsafe { ::std::ptr::addr_of!((*ptr).__g_signals) as usize - ptr as usize },
1281 40usize,
1282 concat!(
1283 "Offset of field: ",
1284 stringify!(__pthread_cond_s),
1285 "::",
1286 stringify!(__g_signals)
1287 )
1288 );
1289}
1290pub type __tss_t = ::std::os::raw::c_uint;
1291pub type __thrd_t = ::std::os::raw::c_ulong;
1292#[repr(C)]
1293#[derive(Debug, Copy, Clone)]
1294pub struct __once_flag {
1295 pub __data: ::std::os::raw::c_int,
1296}
1297#[test]
1298fn bindgen_test_layout___once_flag() {
1299 const UNINIT: ::std::mem::MaybeUninit<__once_flag> = ::std::mem::MaybeUninit::uninit();
1300 let ptr = UNINIT.as_ptr();
1301 assert_eq!(
1302 ::std::mem::size_of::<__once_flag>(),
1303 4usize,
1304 concat!("Size of: ", stringify!(__once_flag))
1305 );
1306 assert_eq!(
1307 ::std::mem::align_of::<__once_flag>(),
1308 4usize,
1309 concat!("Alignment of ", stringify!(__once_flag))
1310 );
1311 assert_eq!(
1312 unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize },
1313 0usize,
1314 concat!(
1315 "Offset of field: ",
1316 stringify!(__once_flag),
1317 "::",
1318 stringify!(__data)
1319 )
1320 );
1321}
1322pub type pthread_t = ::std::os::raw::c_ulong;
1323#[repr(C)]
1324#[derive(Copy, Clone)]
1325pub union pthread_mutexattr_t {
1326 pub __size: [::std::os::raw::c_char; 4usize],
1327 pub __align: ::std::os::raw::c_int,
1328}
1329#[test]
1330fn bindgen_test_layout_pthread_mutexattr_t() {
1331 const UNINIT: ::std::mem::MaybeUninit<pthread_mutexattr_t> = ::std::mem::MaybeUninit::uninit();
1332 let ptr = UNINIT.as_ptr();
1333 assert_eq!(
1334 ::std::mem::size_of::<pthread_mutexattr_t>(),
1335 4usize,
1336 concat!("Size of: ", stringify!(pthread_mutexattr_t))
1337 );
1338 assert_eq!(
1339 ::std::mem::align_of::<pthread_mutexattr_t>(),
1340 4usize,
1341 concat!("Alignment of ", stringify!(pthread_mutexattr_t))
1342 );
1343 assert_eq!(
1344 unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
1345 0usize,
1346 concat!(
1347 "Offset of field: ",
1348 stringify!(pthread_mutexattr_t),
1349 "::",
1350 stringify!(__size)
1351 )
1352 );
1353 assert_eq!(
1354 unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
1355 0usize,
1356 concat!(
1357 "Offset of field: ",
1358 stringify!(pthread_mutexattr_t),
1359 "::",
1360 stringify!(__align)
1361 )
1362 );
1363}
1364#[repr(C)]
1365#[derive(Copy, Clone)]
1366pub union pthread_condattr_t {
1367 pub __size: [::std::os::raw::c_char; 4usize],
1368 pub __align: ::std::os::raw::c_int,
1369}
1370#[test]
1371fn bindgen_test_layout_pthread_condattr_t() {
1372 const UNINIT: ::std::mem::MaybeUninit<pthread_condattr_t> = ::std::mem::MaybeUninit::uninit();
1373 let ptr = UNINIT.as_ptr();
1374 assert_eq!(
1375 ::std::mem::size_of::<pthread_condattr_t>(),
1376 4usize,
1377 concat!("Size of: ", stringify!(pthread_condattr_t))
1378 );
1379 assert_eq!(
1380 ::std::mem::align_of::<pthread_condattr_t>(),
1381 4usize,
1382 concat!("Alignment of ", stringify!(pthread_condattr_t))
1383 );
1384 assert_eq!(
1385 unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
1386 0usize,
1387 concat!(
1388 "Offset of field: ",
1389 stringify!(pthread_condattr_t),
1390 "::",
1391 stringify!(__size)
1392 )
1393 );
1394 assert_eq!(
1395 unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
1396 0usize,
1397 concat!(
1398 "Offset of field: ",
1399 stringify!(pthread_condattr_t),
1400 "::",
1401 stringify!(__align)
1402 )
1403 );
1404}
1405pub type pthread_key_t = ::std::os::raw::c_uint;
1406pub type pthread_once_t = ::std::os::raw::c_int;
1407#[repr(C)]
1408#[derive(Copy, Clone)]
1409pub union pthread_attr_t {
1410 pub __size: [::std::os::raw::c_char; 56usize],
1411 pub __align: ::std::os::raw::c_long,
1412}
1413#[test]
1414fn bindgen_test_layout_pthread_attr_t() {
1415 const UNINIT: ::std::mem::MaybeUninit<pthread_attr_t> = ::std::mem::MaybeUninit::uninit();
1416 let ptr = UNINIT.as_ptr();
1417 assert_eq!(
1418 ::std::mem::size_of::<pthread_attr_t>(),
1419 56usize,
1420 concat!("Size of: ", stringify!(pthread_attr_t))
1421 );
1422 assert_eq!(
1423 ::std::mem::align_of::<pthread_attr_t>(),
1424 8usize,
1425 concat!("Alignment of ", stringify!(pthread_attr_t))
1426 );
1427 assert_eq!(
1428 unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
1429 0usize,
1430 concat!(
1431 "Offset of field: ",
1432 stringify!(pthread_attr_t),
1433 "::",
1434 stringify!(__size)
1435 )
1436 );
1437 assert_eq!(
1438 unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
1439 0usize,
1440 concat!(
1441 "Offset of field: ",
1442 stringify!(pthread_attr_t),
1443 "::",
1444 stringify!(__align)
1445 )
1446 );
1447}
1448#[repr(C)]
1449#[derive(Copy, Clone)]
1450pub union pthread_mutex_t {
1451 pub __data: __pthread_mutex_s,
1452 pub __size: [::std::os::raw::c_char; 40usize],
1453 pub __align: ::std::os::raw::c_long,
1454}
1455#[test]
1456fn bindgen_test_layout_pthread_mutex_t() {
1457 const UNINIT: ::std::mem::MaybeUninit<pthread_mutex_t> = ::std::mem::MaybeUninit::uninit();
1458 let ptr = UNINIT.as_ptr();
1459 assert_eq!(
1460 ::std::mem::size_of::<pthread_mutex_t>(),
1461 40usize,
1462 concat!("Size of: ", stringify!(pthread_mutex_t))
1463 );
1464 assert_eq!(
1465 ::std::mem::align_of::<pthread_mutex_t>(),
1466 8usize,
1467 concat!("Alignment of ", stringify!(pthread_mutex_t))
1468 );
1469 assert_eq!(
1470 unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize },
1471 0usize,
1472 concat!(
1473 "Offset of field: ",
1474 stringify!(pthread_mutex_t),
1475 "::",
1476 stringify!(__data)
1477 )
1478 );
1479 assert_eq!(
1480 unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
1481 0usize,
1482 concat!(
1483 "Offset of field: ",
1484 stringify!(pthread_mutex_t),
1485 "::",
1486 stringify!(__size)
1487 )
1488 );
1489 assert_eq!(
1490 unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
1491 0usize,
1492 concat!(
1493 "Offset of field: ",
1494 stringify!(pthread_mutex_t),
1495 "::",
1496 stringify!(__align)
1497 )
1498 );
1499}
1500#[repr(C)]
1501#[derive(Copy, Clone)]
1502pub union pthread_cond_t {
1503 pub __data: __pthread_cond_s,
1504 pub __size: [::std::os::raw::c_char; 48usize],
1505 pub __align: ::std::os::raw::c_longlong,
1506}
1507#[test]
1508fn bindgen_test_layout_pthread_cond_t() {
1509 const UNINIT: ::std::mem::MaybeUninit<pthread_cond_t> = ::std::mem::MaybeUninit::uninit();
1510 let ptr = UNINIT.as_ptr();
1511 assert_eq!(
1512 ::std::mem::size_of::<pthread_cond_t>(),
1513 48usize,
1514 concat!("Size of: ", stringify!(pthread_cond_t))
1515 );
1516 assert_eq!(
1517 ::std::mem::align_of::<pthread_cond_t>(),
1518 8usize,
1519 concat!("Alignment of ", stringify!(pthread_cond_t))
1520 );
1521 assert_eq!(
1522 unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize },
1523 0usize,
1524 concat!(
1525 "Offset of field: ",
1526 stringify!(pthread_cond_t),
1527 "::",
1528 stringify!(__data)
1529 )
1530 );
1531 assert_eq!(
1532 unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
1533 0usize,
1534 concat!(
1535 "Offset of field: ",
1536 stringify!(pthread_cond_t),
1537 "::",
1538 stringify!(__size)
1539 )
1540 );
1541 assert_eq!(
1542 unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
1543 0usize,
1544 concat!(
1545 "Offset of field: ",
1546 stringify!(pthread_cond_t),
1547 "::",
1548 stringify!(__align)
1549 )
1550 );
1551}
1552#[repr(C)]
1553#[derive(Copy, Clone)]
1554pub union pthread_rwlock_t {
1555 pub __data: __pthread_rwlock_arch_t,
1556 pub __size: [::std::os::raw::c_char; 56usize],
1557 pub __align: ::std::os::raw::c_long,
1558}
1559#[test]
1560fn bindgen_test_layout_pthread_rwlock_t() {
1561 const UNINIT: ::std::mem::MaybeUninit<pthread_rwlock_t> = ::std::mem::MaybeUninit::uninit();
1562 let ptr = UNINIT.as_ptr();
1563 assert_eq!(
1564 ::std::mem::size_of::<pthread_rwlock_t>(),
1565 56usize,
1566 concat!("Size of: ", stringify!(pthread_rwlock_t))
1567 );
1568 assert_eq!(
1569 ::std::mem::align_of::<pthread_rwlock_t>(),
1570 8usize,
1571 concat!("Alignment of ", stringify!(pthread_rwlock_t))
1572 );
1573 assert_eq!(
1574 unsafe { ::std::ptr::addr_of!((*ptr).__data) as usize - ptr as usize },
1575 0usize,
1576 concat!(
1577 "Offset of field: ",
1578 stringify!(pthread_rwlock_t),
1579 "::",
1580 stringify!(__data)
1581 )
1582 );
1583 assert_eq!(
1584 unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
1585 0usize,
1586 concat!(
1587 "Offset of field: ",
1588 stringify!(pthread_rwlock_t),
1589 "::",
1590 stringify!(__size)
1591 )
1592 );
1593 assert_eq!(
1594 unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
1595 0usize,
1596 concat!(
1597 "Offset of field: ",
1598 stringify!(pthread_rwlock_t),
1599 "::",
1600 stringify!(__align)
1601 )
1602 );
1603}
1604#[repr(C)]
1605#[derive(Copy, Clone)]
1606pub union pthread_rwlockattr_t {
1607 pub __size: [::std::os::raw::c_char; 8usize],
1608 pub __align: ::std::os::raw::c_long,
1609}
1610#[test]
1611fn bindgen_test_layout_pthread_rwlockattr_t() {
1612 const UNINIT: ::std::mem::MaybeUninit<pthread_rwlockattr_t> = ::std::mem::MaybeUninit::uninit();
1613 let ptr = UNINIT.as_ptr();
1614 assert_eq!(
1615 ::std::mem::size_of::<pthread_rwlockattr_t>(),
1616 8usize,
1617 concat!("Size of: ", stringify!(pthread_rwlockattr_t))
1618 );
1619 assert_eq!(
1620 ::std::mem::align_of::<pthread_rwlockattr_t>(),
1621 8usize,
1622 concat!("Alignment of ", stringify!(pthread_rwlockattr_t))
1623 );
1624 assert_eq!(
1625 unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
1626 0usize,
1627 concat!(
1628 "Offset of field: ",
1629 stringify!(pthread_rwlockattr_t),
1630 "::",
1631 stringify!(__size)
1632 )
1633 );
1634 assert_eq!(
1635 unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
1636 0usize,
1637 concat!(
1638 "Offset of field: ",
1639 stringify!(pthread_rwlockattr_t),
1640 "::",
1641 stringify!(__align)
1642 )
1643 );
1644}
1645pub type pthread_spinlock_t = ::std::os::raw::c_int;
1646#[repr(C)]
1647#[derive(Copy, Clone)]
1648pub union pthread_barrier_t {
1649 pub __size: [::std::os::raw::c_char; 32usize],
1650 pub __align: ::std::os::raw::c_long,
1651}
1652#[test]
1653fn bindgen_test_layout_pthread_barrier_t() {
1654 const UNINIT: ::std::mem::MaybeUninit<pthread_barrier_t> = ::std::mem::MaybeUninit::uninit();
1655 let ptr = UNINIT.as_ptr();
1656 assert_eq!(
1657 ::std::mem::size_of::<pthread_barrier_t>(),
1658 32usize,
1659 concat!("Size of: ", stringify!(pthread_barrier_t))
1660 );
1661 assert_eq!(
1662 ::std::mem::align_of::<pthread_barrier_t>(),
1663 8usize,
1664 concat!("Alignment of ", stringify!(pthread_barrier_t))
1665 );
1666 assert_eq!(
1667 unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
1668 0usize,
1669 concat!(
1670 "Offset of field: ",
1671 stringify!(pthread_barrier_t),
1672 "::",
1673 stringify!(__size)
1674 )
1675 );
1676 assert_eq!(
1677 unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
1678 0usize,
1679 concat!(
1680 "Offset of field: ",
1681 stringify!(pthread_barrier_t),
1682 "::",
1683 stringify!(__align)
1684 )
1685 );
1686}
1687#[repr(C)]
1688#[derive(Copy, Clone)]
1689pub union pthread_barrierattr_t {
1690 pub __size: [::std::os::raw::c_char; 4usize],
1691 pub __align: ::std::os::raw::c_int,
1692}
1693#[test]
1694fn bindgen_test_layout_pthread_barrierattr_t() {
1695 const UNINIT: ::std::mem::MaybeUninit<pthread_barrierattr_t> =
1696 ::std::mem::MaybeUninit::uninit();
1697 let ptr = UNINIT.as_ptr();
1698 assert_eq!(
1699 ::std::mem::size_of::<pthread_barrierattr_t>(),
1700 4usize,
1701 concat!("Size of: ", stringify!(pthread_barrierattr_t))
1702 );
1703 assert_eq!(
1704 ::std::mem::align_of::<pthread_barrierattr_t>(),
1705 4usize,
1706 concat!("Alignment of ", stringify!(pthread_barrierattr_t))
1707 );
1708 assert_eq!(
1709 unsafe { ::std::ptr::addr_of!((*ptr).__size) as usize - ptr as usize },
1710 0usize,
1711 concat!(
1712 "Offset of field: ",
1713 stringify!(pthread_barrierattr_t),
1714 "::",
1715 stringify!(__size)
1716 )
1717 );
1718 assert_eq!(
1719 unsafe { ::std::ptr::addr_of!((*ptr).__align) as usize - ptr as usize },
1720 0usize,
1721 concat!(
1722 "Offset of field: ",
1723 stringify!(pthread_barrierattr_t),
1724 "::",
1725 stringify!(__align)
1726 )
1727 );
1728}
1729extern "C" {
1730 pub fn random() -> ::std::os::raw::c_long;
1731}
1732extern "C" {
1733 pub fn srandom(__seed: ::std::os::raw::c_uint);
1734}
1735extern "C" {
1736 pub fn initstate(
1737 __seed: ::std::os::raw::c_uint,
1738 __statebuf: *mut ::std::os::raw::c_char,
1739 __statelen: usize,
1740 ) -> *mut ::std::os::raw::c_char;
1741}
1742extern "C" {
1743 pub fn setstate(__statebuf: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
1744}
1745#[repr(C)]
1746#[derive(Debug, Copy, Clone)]
1747pub struct random_data {
1748 pub fptr: *mut i32,
1749 pub rptr: *mut i32,
1750 pub state: *mut i32,
1751 pub rand_type: ::std::os::raw::c_int,
1752 pub rand_deg: ::std::os::raw::c_int,
1753 pub rand_sep: ::std::os::raw::c_int,
1754 pub end_ptr: *mut i32,
1755}
1756#[test]
1757fn bindgen_test_layout_random_data() {
1758 const UNINIT: ::std::mem::MaybeUninit<random_data> = ::std::mem::MaybeUninit::uninit();
1759 let ptr = UNINIT.as_ptr();
1760 assert_eq!(
1761 ::std::mem::size_of::<random_data>(),
1762 48usize,
1763 concat!("Size of: ", stringify!(random_data))
1764 );
1765 assert_eq!(
1766 ::std::mem::align_of::<random_data>(),
1767 8usize,
1768 concat!("Alignment of ", stringify!(random_data))
1769 );
1770 assert_eq!(
1771 unsafe { ::std::ptr::addr_of!((*ptr).fptr) as usize - ptr as usize },
1772 0usize,
1773 concat!(
1774 "Offset of field: ",
1775 stringify!(random_data),
1776 "::",
1777 stringify!(fptr)
1778 )
1779 );
1780 assert_eq!(
1781 unsafe { ::std::ptr::addr_of!((*ptr).rptr) as usize - ptr as usize },
1782 8usize,
1783 concat!(
1784 "Offset of field: ",
1785 stringify!(random_data),
1786 "::",
1787 stringify!(rptr)
1788 )
1789 );
1790 assert_eq!(
1791 unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize },
1792 16usize,
1793 concat!(
1794 "Offset of field: ",
1795 stringify!(random_data),
1796 "::",
1797 stringify!(state)
1798 )
1799 );
1800 assert_eq!(
1801 unsafe { ::std::ptr::addr_of!((*ptr).rand_type) as usize - ptr as usize },
1802 24usize,
1803 concat!(
1804 "Offset of field: ",
1805 stringify!(random_data),
1806 "::",
1807 stringify!(rand_type)
1808 )
1809 );
1810 assert_eq!(
1811 unsafe { ::std::ptr::addr_of!((*ptr).rand_deg) as usize - ptr as usize },
1812 28usize,
1813 concat!(
1814 "Offset of field: ",
1815 stringify!(random_data),
1816 "::",
1817 stringify!(rand_deg)
1818 )
1819 );
1820 assert_eq!(
1821 unsafe { ::std::ptr::addr_of!((*ptr).rand_sep) as usize - ptr as usize },
1822 32usize,
1823 concat!(
1824 "Offset of field: ",
1825 stringify!(random_data),
1826 "::",
1827 stringify!(rand_sep)
1828 )
1829 );
1830 assert_eq!(
1831 unsafe { ::std::ptr::addr_of!((*ptr).end_ptr) as usize - ptr as usize },
1832 40usize,
1833 concat!(
1834 "Offset of field: ",
1835 stringify!(random_data),
1836 "::",
1837 stringify!(end_ptr)
1838 )
1839 );
1840}
1841extern "C" {
1842 pub fn random_r(__buf: *mut random_data, __result: *mut i32) -> ::std::os::raw::c_int;
1843}
1844extern "C" {
1845 pub fn srandom_r(
1846 __seed: ::std::os::raw::c_uint,
1847 __buf: *mut random_data,
1848 ) -> ::std::os::raw::c_int;
1849}
1850extern "C" {
1851 pub fn initstate_r(
1852 __seed: ::std::os::raw::c_uint,
1853 __statebuf: *mut ::std::os::raw::c_char,
1854 __statelen: usize,
1855 __buf: *mut random_data,
1856 ) -> ::std::os::raw::c_int;
1857}
1858extern "C" {
1859 pub fn setstate_r(
1860 __statebuf: *mut ::std::os::raw::c_char,
1861 __buf: *mut random_data,
1862 ) -> ::std::os::raw::c_int;
1863}
1864extern "C" {
1865 pub fn rand() -> ::std::os::raw::c_int;
1866}
1867extern "C" {
1868 pub fn srand(__seed: ::std::os::raw::c_uint);
1869}
1870extern "C" {
1871 pub fn rand_r(__seed: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int;
1872}
1873extern "C" {
1874 pub fn drand48() -> f64;
1875}
1876extern "C" {
1877 pub fn erand48(__xsubi: *mut ::std::os::raw::c_ushort) -> f64;
1878}
1879extern "C" {
1880 pub fn lrand48() -> ::std::os::raw::c_long;
1881}
1882extern "C" {
1883 pub fn nrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
1884}
1885extern "C" {
1886 pub fn mrand48() -> ::std::os::raw::c_long;
1887}
1888extern "C" {
1889 pub fn jrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
1890}
1891extern "C" {
1892 pub fn srand48(__seedval: ::std::os::raw::c_long);
1893}
1894extern "C" {
1895 pub fn seed48(__seed16v: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort;
1896}
1897extern "C" {
1898 pub fn lcong48(__param: *mut ::std::os::raw::c_ushort);
1899}
1900#[repr(C)]
1901#[derive(Debug, Copy, Clone)]
1902pub struct drand48_data {
1903 pub __x: [::std::os::raw::c_ushort; 3usize],
1904 pub __old_x: [::std::os::raw::c_ushort; 3usize],
1905 pub __c: ::std::os::raw::c_ushort,
1906 pub __init: ::std::os::raw::c_ushort,
1907 pub __a: ::std::os::raw::c_ulonglong,
1908}
1909#[test]
1910fn bindgen_test_layout_drand48_data() {
1911 const UNINIT: ::std::mem::MaybeUninit<drand48_data> = ::std::mem::MaybeUninit::uninit();
1912 let ptr = UNINIT.as_ptr();
1913 assert_eq!(
1914 ::std::mem::size_of::<drand48_data>(),
1915 24usize,
1916 concat!("Size of: ", stringify!(drand48_data))
1917 );
1918 assert_eq!(
1919 ::std::mem::align_of::<drand48_data>(),
1920 8usize,
1921 concat!("Alignment of ", stringify!(drand48_data))
1922 );
1923 assert_eq!(
1924 unsafe { ::std::ptr::addr_of!((*ptr).__x) as usize - ptr as usize },
1925 0usize,
1926 concat!(
1927 "Offset of field: ",
1928 stringify!(drand48_data),
1929 "::",
1930 stringify!(__x)
1931 )
1932 );
1933 assert_eq!(
1934 unsafe { ::std::ptr::addr_of!((*ptr).__old_x) as usize - ptr as usize },
1935 6usize,
1936 concat!(
1937 "Offset of field: ",
1938 stringify!(drand48_data),
1939 "::",
1940 stringify!(__old_x)
1941 )
1942 );
1943 assert_eq!(
1944 unsafe { ::std::ptr::addr_of!((*ptr).__c) as usize - ptr as usize },
1945 12usize,
1946 concat!(
1947 "Offset of field: ",
1948 stringify!(drand48_data),
1949 "::",
1950 stringify!(__c)
1951 )
1952 );
1953 assert_eq!(
1954 unsafe { ::std::ptr::addr_of!((*ptr).__init) as usize - ptr as usize },
1955 14usize,
1956 concat!(
1957 "Offset of field: ",
1958 stringify!(drand48_data),
1959 "::",
1960 stringify!(__init)
1961 )
1962 );
1963 assert_eq!(
1964 unsafe { ::std::ptr::addr_of!((*ptr).__a) as usize - ptr as usize },
1965 16usize,
1966 concat!(
1967 "Offset of field: ",
1968 stringify!(drand48_data),
1969 "::",
1970 stringify!(__a)
1971 )
1972 );
1973}
1974extern "C" {
1975 pub fn drand48_r(__buffer: *mut drand48_data, __result: *mut f64) -> ::std::os::raw::c_int;
1976}
1977extern "C" {
1978 pub fn erand48_r(
1979 __xsubi: *mut ::std::os::raw::c_ushort,
1980 __buffer: *mut drand48_data,
1981 __result: *mut f64,
1982 ) -> ::std::os::raw::c_int;
1983}
1984extern "C" {
1985 pub fn lrand48_r(
1986 __buffer: *mut drand48_data,
1987 __result: *mut ::std::os::raw::c_long,
1988 ) -> ::std::os::raw::c_int;
1989}
1990extern "C" {
1991 pub fn nrand48_r(
1992 __xsubi: *mut ::std::os::raw::c_ushort,
1993 __buffer: *mut drand48_data,
1994 __result: *mut ::std::os::raw::c_long,
1995 ) -> ::std::os::raw::c_int;
1996}
1997extern "C" {
1998 pub fn mrand48_r(
1999 __buffer: *mut drand48_data,
2000 __result: *mut ::std::os::raw::c_long,
2001 ) -> ::std::os::raw::c_int;
2002}
2003extern "C" {
2004 pub fn jrand48_r(
2005 __xsubi: *mut ::std::os::raw::c_ushort,
2006 __buffer: *mut drand48_data,
2007 __result: *mut ::std::os::raw::c_long,
2008 ) -> ::std::os::raw::c_int;
2009}
2010extern "C" {
2011 pub fn srand48_r(
2012 __seedval: ::std::os::raw::c_long,
2013 __buffer: *mut drand48_data,
2014 ) -> ::std::os::raw::c_int;
2015}
2016extern "C" {
2017 pub fn seed48_r(
2018 __seed16v: *mut ::std::os::raw::c_ushort,
2019 __buffer: *mut drand48_data,
2020 ) -> ::std::os::raw::c_int;
2021}
2022extern "C" {
2023 pub fn lcong48_r(
2024 __param: *mut ::std::os::raw::c_ushort,
2025 __buffer: *mut drand48_data,
2026 ) -> ::std::os::raw::c_int;
2027}
2028extern "C" {
2029 pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
2030}
2031extern "C" {
2032 pub fn calloc(
2033 __nmemb: ::std::os::raw::c_ulong,
2034 __size: ::std::os::raw::c_ulong,
2035 ) -> *mut ::std::os::raw::c_void;
2036}
2037extern "C" {
2038 pub fn realloc(
2039 __ptr: *mut ::std::os::raw::c_void,
2040 __size: ::std::os::raw::c_ulong,
2041 ) -> *mut ::std::os::raw::c_void;
2042}
2043extern "C" {
2044 pub fn free(__ptr: *mut ::std::os::raw::c_void);
2045}
2046extern "C" {
2047 pub fn reallocarray(
2048 __ptr: *mut ::std::os::raw::c_void,
2049 __nmemb: usize,
2050 __size: usize,
2051 ) -> *mut ::std::os::raw::c_void;
2052}
2053extern "C" {
2054 pub fn alloca(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
2055}
2056extern "C" {
2057 pub fn valloc(__size: usize) -> *mut ::std::os::raw::c_void;
2058}
2059extern "C" {
2060 pub fn posix_memalign(
2061 __memptr: *mut *mut ::std::os::raw::c_void,
2062 __alignment: usize,
2063 __size: usize,
2064 ) -> ::std::os::raw::c_int;
2065}
2066extern "C" {
2067 pub fn aligned_alloc(
2068 __alignment: ::std::os::raw::c_ulong,
2069 __size: ::std::os::raw::c_ulong,
2070 ) -> *mut ::std::os::raw::c_void;
2071}
2072extern "C" {
2073 pub fn abort() -> !;
2074}
2075extern "C" {
2076 pub fn atexit(__func: ::std::option::Option<unsafe extern "C" fn()>) -> ::std::os::raw::c_int;
2077}
2078extern "C" {
2079 pub fn at_quick_exit(
2080 __func: ::std::option::Option<unsafe extern "C" fn()>,
2081 ) -> ::std::os::raw::c_int;
2082}
2083extern "C" {
2084 pub fn on_exit(
2085 __func: ::std::option::Option<
2086 unsafe extern "C" fn(
2087 __status: ::std::os::raw::c_int,
2088 __arg: *mut ::std::os::raw::c_void,
2089 ),
2090 >,
2091 __arg: *mut ::std::os::raw::c_void,
2092 ) -> ::std::os::raw::c_int;
2093}
2094extern "C" {
2095 pub fn exit(__status: ::std::os::raw::c_int) -> !;
2096}
2097extern "C" {
2098 pub fn quick_exit(__status: ::std::os::raw::c_int) -> !;
2099}
2100extern "C" {
2101 pub fn _Exit(__status: ::std::os::raw::c_int) -> !;
2102}
2103extern "C" {
2104 pub fn getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
2105}
2106extern "C" {
2107 pub fn putenv(__string: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2108}
2109extern "C" {
2110 pub fn setenv(
2111 __name: *const ::std::os::raw::c_char,
2112 __value: *const ::std::os::raw::c_char,
2113 __replace: ::std::os::raw::c_int,
2114 ) -> ::std::os::raw::c_int;
2115}
2116extern "C" {
2117 pub fn unsetenv(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2118}
2119extern "C" {
2120 pub fn clearenv() -> ::std::os::raw::c_int;
2121}
2122extern "C" {
2123 pub fn mktemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
2124}
2125extern "C" {
2126 pub fn mkstemp(__template: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2127}
2128extern "C" {
2129 pub fn mkstemps(
2130 __template: *mut ::std::os::raw::c_char,
2131 __suffixlen: ::std::os::raw::c_int,
2132 ) -> ::std::os::raw::c_int;
2133}
2134extern "C" {
2135 pub fn mkdtemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
2136}
2137extern "C" {
2138 pub fn system(__command: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2139}
2140extern "C" {
2141 pub fn realpath(
2142 __name: *const ::std::os::raw::c_char,
2143 __resolved: *mut ::std::os::raw::c_char,
2144 ) -> *mut ::std::os::raw::c_char;
2145}
2146pub type __compar_fn_t = ::std::option::Option<
2147 unsafe extern "C" fn(
2148 arg1: *const ::std::os::raw::c_void,
2149 arg2: *const ::std::os::raw::c_void,
2150 ) -> ::std::os::raw::c_int,
2151>;
2152extern "C" {
2153 pub fn bsearch(
2154 __key: *const ::std::os::raw::c_void,
2155 __base: *const ::std::os::raw::c_void,
2156 __nmemb: usize,
2157 __size: usize,
2158 __compar: __compar_fn_t,
2159 ) -> *mut ::std::os::raw::c_void;
2160}
2161extern "C" {
2162 pub fn qsort(
2163 __base: *mut ::std::os::raw::c_void,
2164 __nmemb: usize,
2165 __size: usize,
2166 __compar: __compar_fn_t,
2167 );
2168}
2169extern "C" {
2170 pub fn abs(__x: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
2171}
2172extern "C" {
2173 pub fn labs(__x: ::std::os::raw::c_long) -> ::std::os::raw::c_long;
2174}
2175extern "C" {
2176 pub fn llabs(__x: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong;
2177}
2178extern "C" {
2179 pub fn div(__numer: ::std::os::raw::c_int, __denom: ::std::os::raw::c_int) -> div_t;
2180}
2181extern "C" {
2182 pub fn ldiv(__numer: ::std::os::raw::c_long, __denom: ::std::os::raw::c_long) -> ldiv_t;
2183}
2184extern "C" {
2185 pub fn lldiv(
2186 __numer: ::std::os::raw::c_longlong,
2187 __denom: ::std::os::raw::c_longlong,
2188 ) -> lldiv_t;
2189}
2190extern "C" {
2191 pub fn ecvt(
2192 __value: f64,
2193 __ndigit: ::std::os::raw::c_int,
2194 __decpt: *mut ::std::os::raw::c_int,
2195 __sign: *mut ::std::os::raw::c_int,
2196 ) -> *mut ::std::os::raw::c_char;
2197}
2198extern "C" {
2199 pub fn fcvt(
2200 __value: f64,
2201 __ndigit: ::std::os::raw::c_int,
2202 __decpt: *mut ::std::os::raw::c_int,
2203 __sign: *mut ::std::os::raw::c_int,
2204 ) -> *mut ::std::os::raw::c_char;
2205}
2206extern "C" {
2207 pub fn gcvt(
2208 __value: f64,
2209 __ndigit: ::std::os::raw::c_int,
2210 __buf: *mut ::std::os::raw::c_char,
2211 ) -> *mut ::std::os::raw::c_char;
2212}
2213extern "C" {
2214 pub fn qecvt(
2215 __value: u128,
2216 __ndigit: ::std::os::raw::c_int,
2217 __decpt: *mut ::std::os::raw::c_int,
2218 __sign: *mut ::std::os::raw::c_int,
2219 ) -> *mut ::std::os::raw::c_char;
2220}
2221extern "C" {
2222 pub fn qfcvt(
2223 __value: u128,
2224 __ndigit: ::std::os::raw::c_int,
2225 __decpt: *mut ::std::os::raw::c_int,
2226 __sign: *mut ::std::os::raw::c_int,
2227 ) -> *mut ::std::os::raw::c_char;
2228}
2229extern "C" {
2230 pub fn qgcvt(
2231 __value: u128,
2232 __ndigit: ::std::os::raw::c_int,
2233 __buf: *mut ::std::os::raw::c_char,
2234 ) -> *mut ::std::os::raw::c_char;
2235}
2236extern "C" {
2237 pub fn ecvt_r(
2238 __value: f64,
2239 __ndigit: ::std::os::raw::c_int,
2240 __decpt: *mut ::std::os::raw::c_int,
2241 __sign: *mut ::std::os::raw::c_int,
2242 __buf: *mut ::std::os::raw::c_char,
2243 __len: usize,
2244 ) -> ::std::os::raw::c_int;
2245}
2246extern "C" {
2247 pub fn fcvt_r(
2248 __value: f64,
2249 __ndigit: ::std::os::raw::c_int,
2250 __decpt: *mut ::std::os::raw::c_int,
2251 __sign: *mut ::std::os::raw::c_int,
2252 __buf: *mut ::std::os::raw::c_char,
2253 __len: usize,
2254 ) -> ::std::os::raw::c_int;
2255}
2256extern "C" {
2257 pub fn qecvt_r(
2258 __value: u128,
2259 __ndigit: ::std::os::raw::c_int,
2260 __decpt: *mut ::std::os::raw::c_int,
2261 __sign: *mut ::std::os::raw::c_int,
2262 __buf: *mut ::std::os::raw::c_char,
2263 __len: usize,
2264 ) -> ::std::os::raw::c_int;
2265}
2266extern "C" {
2267 pub fn qfcvt_r(
2268 __value: u128,
2269 __ndigit: ::std::os::raw::c_int,
2270 __decpt: *mut ::std::os::raw::c_int,
2271 __sign: *mut ::std::os::raw::c_int,
2272 __buf: *mut ::std::os::raw::c_char,
2273 __len: usize,
2274 ) -> ::std::os::raw::c_int;
2275}
2276extern "C" {
2277 pub fn mblen(__s: *const ::std::os::raw::c_char, __n: usize) -> ::std::os::raw::c_int;
2278}
2279extern "C" {
2280 pub fn mbtowc(
2281 __pwc: *mut wchar_t,
2282 __s: *const ::std::os::raw::c_char,
2283 __n: usize,
2284 ) -> ::std::os::raw::c_int;
2285}
2286extern "C" {
2287 pub fn wctomb(__s: *mut ::std::os::raw::c_char, __wchar: wchar_t) -> ::std::os::raw::c_int;
2288}
2289extern "C" {
2290 pub fn mbstowcs(__pwcs: *mut wchar_t, __s: *const ::std::os::raw::c_char, __n: usize) -> usize;
2291}
2292extern "C" {
2293 pub fn wcstombs(__s: *mut ::std::os::raw::c_char, __pwcs: *const wchar_t, __n: usize) -> usize;
2294}
2295extern "C" {
2296 pub fn rpmatch(__response: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
2297}
2298extern "C" {
2299 pub fn getsubopt(
2300 __optionp: *mut *mut ::std::os::raw::c_char,
2301 __tokens: *const *mut ::std::os::raw::c_char,
2302 __valuep: *mut *mut ::std::os::raw::c_char,
2303 ) -> ::std::os::raw::c_int;
2304}
2305extern "C" {
2306 pub fn getloadavg(__loadavg: *mut f64, __nelem: ::std::os::raw::c_int)
2307 -> ::std::os::raw::c_int;
2308}
2309#[repr(C)]
2310#[repr(align(16))]
2311#[derive(Debug, Copy, Clone)]
2312pub struct max_align_t {
2313 pub __clang_max_align_nonce1: ::std::os::raw::c_longlong,
2314 pub __bindgen_padding_0: u64,
2315 pub __clang_max_align_nonce2: u128,
2316}
2317#[test]
2318fn bindgen_test_layout_max_align_t() {
2319 const UNINIT: ::std::mem::MaybeUninit<max_align_t> = ::std::mem::MaybeUninit::uninit();
2320 let ptr = UNINIT.as_ptr();
2321 assert_eq!(
2322 ::std::mem::size_of::<max_align_t>(),
2323 32usize,
2324 concat!("Size of: ", stringify!(max_align_t))
2325 );
2326 assert_eq!(
2327 ::std::mem::align_of::<max_align_t>(),
2328 16usize,
2329 concat!("Alignment of ", stringify!(max_align_t))
2330 );
2331 assert_eq!(
2332 unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce1) as usize - ptr as usize },
2333 0usize,
2334 concat!(
2335 "Offset of field: ",
2336 stringify!(max_align_t),
2337 "::",
2338 stringify!(__clang_max_align_nonce1)
2339 )
2340 );
2341 assert_eq!(
2342 unsafe { ::std::ptr::addr_of!((*ptr).__clang_max_align_nonce2) as usize - ptr as usize },
2343 16usize,
2344 concat!(
2345 "Offset of field: ",
2346 stringify!(max_align_t),
2347 "::",
2348 stringify!(__clang_max_align_nonce2)
2349 )
2350 );
2351}
2352#[repr(C)]
2353#[derive(Debug, Copy, Clone)]
2354pub struct iio_context {
2355 _unused: [u8; 0],
2356}
2357#[repr(C)]
2358#[derive(Debug, Copy, Clone)]
2359pub struct iio_device {
2360 _unused: [u8; 0],
2361}
2362#[repr(C)]
2363#[derive(Debug, Copy, Clone)]
2364pub struct iio_channel {
2365 _unused: [u8; 0],
2366}
2367#[repr(C)]
2368#[derive(Debug, Copy, Clone)]
2369pub struct iio_buffer {
2370 _unused: [u8; 0],
2371}
2372#[repr(C)]
2373#[derive(Debug, Copy, Clone)]
2374pub struct iio_context_info {
2375 _unused: [u8; 0],
2376}
2377#[repr(C)]
2378#[derive(Debug, Copy, Clone)]
2379pub struct iio_scan_context {
2380 _unused: [u8; 0],
2381}
2382#[repr(C)]
2383#[derive(Debug, Copy, Clone)]
2384pub struct iio_scan_block {
2385 _unused: [u8; 0],
2386}
2387pub const iio_chan_type_IIO_VOLTAGE: iio_chan_type = 0;
2388pub const iio_chan_type_IIO_CURRENT: iio_chan_type = 1;
2389pub const iio_chan_type_IIO_POWER: iio_chan_type = 2;
2390pub const iio_chan_type_IIO_ACCEL: iio_chan_type = 3;
2391pub const iio_chan_type_IIO_ANGL_VEL: iio_chan_type = 4;
2392pub const iio_chan_type_IIO_MAGN: iio_chan_type = 5;
2393pub const iio_chan_type_IIO_LIGHT: iio_chan_type = 6;
2394pub const iio_chan_type_IIO_INTENSITY: iio_chan_type = 7;
2395pub const iio_chan_type_IIO_PROXIMITY: iio_chan_type = 8;
2396pub const iio_chan_type_IIO_TEMP: iio_chan_type = 9;
2397pub const iio_chan_type_IIO_INCLI: iio_chan_type = 10;
2398pub const iio_chan_type_IIO_ROT: iio_chan_type = 11;
2399pub const iio_chan_type_IIO_ANGL: iio_chan_type = 12;
2400pub const iio_chan_type_IIO_TIMESTAMP: iio_chan_type = 13;
2401pub const iio_chan_type_IIO_CAPACITANCE: iio_chan_type = 14;
2402pub const iio_chan_type_IIO_ALTVOLTAGE: iio_chan_type = 15;
2403pub const iio_chan_type_IIO_CCT: iio_chan_type = 16;
2404pub const iio_chan_type_IIO_PRESSURE: iio_chan_type = 17;
2405pub const iio_chan_type_IIO_HUMIDITYRELATIVE: iio_chan_type = 18;
2406pub const iio_chan_type_IIO_ACTIVITY: iio_chan_type = 19;
2407pub const iio_chan_type_IIO_STEPS: iio_chan_type = 20;
2408pub const iio_chan_type_IIO_ENERGY: iio_chan_type = 21;
2409pub const iio_chan_type_IIO_DISTANCE: iio_chan_type = 22;
2410pub const iio_chan_type_IIO_VELOCITY: iio_chan_type = 23;
2411pub const iio_chan_type_IIO_CONCENTRATION: iio_chan_type = 24;
2412pub const iio_chan_type_IIO_RESISTANCE: iio_chan_type = 25;
2413pub const iio_chan_type_IIO_PH: iio_chan_type = 26;
2414pub const iio_chan_type_IIO_UVINDEX: iio_chan_type = 27;
2415pub const iio_chan_type_IIO_ELECTRICALCONDUCTIVITY: iio_chan_type = 28;
2416pub const iio_chan_type_IIO_COUNT: iio_chan_type = 29;
2417pub const iio_chan_type_IIO_INDEX: iio_chan_type = 30;
2418pub const iio_chan_type_IIO_GRAVITY: iio_chan_type = 31;
2419pub const iio_chan_type_IIO_POSITIONRELATIVE: iio_chan_type = 32;
2420pub const iio_chan_type_IIO_PHASE: iio_chan_type = 33;
2421pub const iio_chan_type_IIO_MASSCONCENTRATION: iio_chan_type = 34;
2422pub const iio_chan_type_IIO_CHAN_TYPE_UNKNOWN: iio_chan_type = 2147483647;
2423#[doc = " @enum iio_chan_type\n @brief IIO channel type\n\n A IIO channel has a type specifying the type of data associated with the\n channel."]
2424pub type iio_chan_type = ::std::os::raw::c_uint;
2425pub const iio_modifier_IIO_NO_MOD: iio_modifier = 0;
2426pub const iio_modifier_IIO_MOD_X: iio_modifier = 1;
2427pub const iio_modifier_IIO_MOD_Y: iio_modifier = 2;
2428pub const iio_modifier_IIO_MOD_Z: iio_modifier = 3;
2429pub const iio_modifier_IIO_MOD_X_AND_Y: iio_modifier = 4;
2430pub const iio_modifier_IIO_MOD_X_AND_Z: iio_modifier = 5;
2431pub const iio_modifier_IIO_MOD_Y_AND_Z: iio_modifier = 6;
2432pub const iio_modifier_IIO_MOD_X_AND_Y_AND_Z: iio_modifier = 7;
2433pub const iio_modifier_IIO_MOD_X_OR_Y: iio_modifier = 8;
2434pub const iio_modifier_IIO_MOD_X_OR_Z: iio_modifier = 9;
2435pub const iio_modifier_IIO_MOD_Y_OR_Z: iio_modifier = 10;
2436pub const iio_modifier_IIO_MOD_X_OR_Y_OR_Z: iio_modifier = 11;
2437pub const iio_modifier_IIO_MOD_LIGHT_BOTH: iio_modifier = 12;
2438pub const iio_modifier_IIO_MOD_LIGHT_IR: iio_modifier = 13;
2439pub const iio_modifier_IIO_MOD_ROOT_SUM_SQUARED_X_Y: iio_modifier = 14;
2440pub const iio_modifier_IIO_MOD_SUM_SQUARED_X_Y_Z: iio_modifier = 15;
2441pub const iio_modifier_IIO_MOD_LIGHT_CLEAR: iio_modifier = 16;
2442pub const iio_modifier_IIO_MOD_LIGHT_RED: iio_modifier = 17;
2443pub const iio_modifier_IIO_MOD_LIGHT_GREEN: iio_modifier = 18;
2444pub const iio_modifier_IIO_MOD_LIGHT_BLUE: iio_modifier = 19;
2445pub const iio_modifier_IIO_MOD_QUATERNION: iio_modifier = 20;
2446pub const iio_modifier_IIO_MOD_TEMP_AMBIENT: iio_modifier = 21;
2447pub const iio_modifier_IIO_MOD_TEMP_OBJECT: iio_modifier = 22;
2448pub const iio_modifier_IIO_MOD_NORTH_MAGN: iio_modifier = 23;
2449pub const iio_modifier_IIO_MOD_NORTH_TRUE: iio_modifier = 24;
2450pub const iio_modifier_IIO_MOD_NORTH_MAGN_TILT_COMP: iio_modifier = 25;
2451pub const iio_modifier_IIO_MOD_NORTH_TRUE_TILT_COMP: iio_modifier = 26;
2452pub const iio_modifier_IIO_MOD_RUNNING: iio_modifier = 27;
2453pub const iio_modifier_IIO_MOD_JOGGING: iio_modifier = 28;
2454pub const iio_modifier_IIO_MOD_WALKING: iio_modifier = 29;
2455pub const iio_modifier_IIO_MOD_STILL: iio_modifier = 30;
2456pub const iio_modifier_IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z: iio_modifier = 31;
2457pub const iio_modifier_IIO_MOD_I: iio_modifier = 32;
2458pub const iio_modifier_IIO_MOD_Q: iio_modifier = 33;
2459pub const iio_modifier_IIO_MOD_CO2: iio_modifier = 34;
2460pub const iio_modifier_IIO_MOD_VOC: iio_modifier = 35;
2461pub const iio_modifier_IIO_MOD_LIGHT_UV: iio_modifier = 36;
2462pub const iio_modifier_IIO_MOD_LIGHT_DUV: iio_modifier = 37;
2463pub const iio_modifier_IIO_MOD_PM1: iio_modifier = 38;
2464pub const iio_modifier_IIO_MOD_PM2P5: iio_modifier = 39;
2465pub const iio_modifier_IIO_MOD_PM4: iio_modifier = 40;
2466pub const iio_modifier_IIO_MOD_PM10: iio_modifier = 41;
2467pub const iio_modifier_IIO_MOD_ETHANOL: iio_modifier = 42;
2468pub const iio_modifier_IIO_MOD_H2: iio_modifier = 43;
2469pub const iio_modifier_IIO_MOD_O2: iio_modifier = 44;
2470pub const iio_modifier_IIO_MOD_LINEAR_X: iio_modifier = 45;
2471pub const iio_modifier_IIO_MOD_LINEAR_Y: iio_modifier = 46;
2472pub const iio_modifier_IIO_MOD_LINEAR_Z: iio_modifier = 47;
2473pub const iio_modifier_IIO_MOD_PITCH: iio_modifier = 48;
2474pub const iio_modifier_IIO_MOD_YAW: iio_modifier = 49;
2475pub const iio_modifier_IIO_MOD_ROLL: iio_modifier = 50;
2476#[doc = " @enum iio_modifier\n @brief IIO channel modifier\n\n In a addition to a type a IIO channel can optionally have a channel modifier\n further specifying the data type of of the channel."]
2477pub type iio_modifier = ::std::os::raw::c_uint;
2478pub const iio_event_type_IIO_EV_TYPE_THRESH: iio_event_type = 0;
2479pub const iio_event_type_IIO_EV_TYPE_MAG: iio_event_type = 1;
2480pub const iio_event_type_IIO_EV_TYPE_ROC: iio_event_type = 2;
2481pub const iio_event_type_IIO_EV_TYPE_THRESH_ADAPTIVE: iio_event_type = 3;
2482pub const iio_event_type_IIO_EV_TYPE_MAG_ADAPTIVE: iio_event_type = 4;
2483pub const iio_event_type_IIO_EV_TYPE_CHANGE: iio_event_type = 5;
2484pub const iio_event_type_IIO_EV_TYPE_MAG_REFERENCED: iio_event_type = 6;
2485pub const iio_event_type_IIO_EV_TYPE_GESTURE: iio_event_type = 7;
2486#[doc = " @enum iio_event_type\n @brief IIO event type\n\n Some IIO devices can deliver events. The type of the event can be specified\n by one of the iio_event_type values."]
2487pub type iio_event_type = ::std::os::raw::c_uint;
2488pub const iio_event_direction_IIO_EV_DIR_EITHER: iio_event_direction = 0;
2489pub const iio_event_direction_IIO_EV_DIR_RISING: iio_event_direction = 1;
2490pub const iio_event_direction_IIO_EV_DIR_FALLING: iio_event_direction = 2;
2491pub const iio_event_direction_IIO_EV_DIR_NONE: iio_event_direction = 3;
2492pub const iio_event_direction_IIO_EV_DIR_SINGLETAP: iio_event_direction = 4;
2493pub const iio_event_direction_IIO_EV_DIR_DOUBLETAP: iio_event_direction = 5;
2494#[doc = " @enum iio_event_direction\n @brief IIO event direction\n\n When applicable, this enum specifies the direction of the iio_event_type."]
2495pub type iio_event_direction = ::std::os::raw::c_uint;
2496extern "C" {
2497 #[doc = " @brief Create a scan context\n @param backend A NULL-terminated string containing a comma-separated\n list of the backend(s) to use for scanning.\n @param flags Unused for now. Set to 0.\n @return on success, a pointer to a iio_scan_context structure\n @return On failure, NULL is returned and errno is set appropriately\n\n <b>NOTE:</b> Libiio version 0.20 and above can handle multiple\n strings, for instance \"local:usb:\", \"ip:usb:\", \"local:usb:ip:\", and\n require a colon as the delimiter.\n Libiio version 0.24 and above prefer a comma instead of colon as the\n delimiter, and handle specifying backend-specific information. For\n instance, \"local,usb=0456:*\" will scan the local backend and limit\n scans on USB to vendor ID 0x0456, and accept all product IDs. The\n \"usb=0456:b673\" string would limit the scan to the device with this\n particular VID/PID. Both IDs are expected in hexadecimal, no 0x\n prefix needed."]
2498 pub fn iio_create_scan_context(
2499 backend: *const ::std::os::raw::c_char,
2500 flags: ::std::os::raw::c_uint,
2501 ) -> *mut iio_scan_context;
2502}
2503extern "C" {
2504 #[doc = " @brief Destroy the given scan context\n @param ctx A pointer to an iio_scan_context structure\n\n <b>NOTE:</b> After that function, the iio_scan_context pointer shall be invalid."]
2505 pub fn iio_scan_context_destroy(ctx: *mut iio_scan_context);
2506}
2507extern "C" {
2508 #[doc = " @brief Enumerate available contexts\n @param ctx A pointer to an iio_scan_context structure\n @param info A pointer to a 'const struct iio_context_info **' typed variable.\n The pointed variable will be initialized on success.\n @returns On success, the number of contexts found.\n @returns On failure, a negative error number."]
2509 pub fn iio_scan_context_get_info_list(
2510 ctx: *mut iio_scan_context,
2511 info: *mut *mut *mut iio_context_info,
2512 ) -> isize;
2513}
2514extern "C" {
2515 #[doc = " @brief Free a context info list\n @param info A pointer to a 'const struct iio_context_info *' typed variable"]
2516 pub fn iio_context_info_list_free(info: *mut *mut iio_context_info);
2517}
2518extern "C" {
2519 #[doc = " @brief Get a description of a discovered context\n @param info A pointer to an iio_context_info structure\n @return A pointer to a static NULL-terminated string"]
2520 pub fn iio_context_info_get_description(
2521 info: *const iio_context_info,
2522 ) -> *const ::std::os::raw::c_char;
2523}
2524extern "C" {
2525 #[doc = " @brief Get the URI of a discovered context\n @param info A pointer to an iio_context_info structure\n @return A pointer to a static NULL-terminated string"]
2526 pub fn iio_context_info_get_uri(info: *const iio_context_info)
2527 -> *const ::std::os::raw::c_char;
2528}
2529extern "C" {
2530 #[doc = " @brief Create a scan block\n @param backend A NULL-terminated string containing the backend to use for\n scanning. If NULL, all the available backends are used.\n @param flags Unused for now. Set to 0.\n @return on success, a pointer to a iio_scan_block structure\n @return On failure, NULL is returned and errno is set appropriately\n\n Introduced in version 0.20."]
2531 pub fn iio_create_scan_block(
2532 backend: *const ::std::os::raw::c_char,
2533 flags: ::std::os::raw::c_uint,
2534 ) -> *mut iio_scan_block;
2535}
2536extern "C" {
2537 #[doc = " @brief Destroy the given scan block\n @param blk A pointer to an iio_scan_block structure\n\n <b>NOTE:</b> After that function, the iio_scan_block pointer shall be invalid.\n\n Introduced in version 0.20."]
2538 pub fn iio_scan_block_destroy(blk: *mut iio_scan_block);
2539}
2540extern "C" {
2541 #[doc = " @brief Enumerate available contexts via scan block\n @param blk A pointer to a iio_scan_block structure.\n @returns On success, the number of contexts found.\n @returns On failure, a negative error number.\n\n Introduced in version 0.20."]
2542 pub fn iio_scan_block_scan(blk: *mut iio_scan_block) -> isize;
2543}
2544extern "C" {
2545 #[doc = " @brief Get the iio_context_info for a particular context\n @param blk A pointer to an iio_scan_block structure\n @param index The index corresponding to the context.\n @return A pointer to the iio_context_info for the context\n @returns On success, a pointer to the specified iio_context_info\n @returns On failure, NULL is returned and errno is set appropriately\n\n Introduced in version 0.20."]
2546 pub fn iio_scan_block_get_info(
2547 blk: *mut iio_scan_block,
2548 index: ::std::os::raw::c_uint,
2549 ) -> *mut iio_context_info;
2550}
2551extern "C" {
2552 #[doc = " @brief Get the version of the libiio library\n @param major A pointer to an unsigned integer (NULL accepted)\n @param minor A pointer to an unsigned integer (NULL accepted)\n @param git_tag A pointer to a 8-characters buffer (NULL accepted)"]
2553 pub fn iio_library_get_version(
2554 major: *mut ::std::os::raw::c_uint,
2555 minor: *mut ::std::os::raw::c_uint,
2556 git_tag: *mut ::std::os::raw::c_char,
2557 );
2558}
2559extern "C" {
2560 #[doc = " @brief Get a string description of an error code\n @param err The error code\n @param dst A pointer to the memory area where the NULL-terminated string\n corresponding to the error message will be stored\n @param len The available length of the memory area, in bytes"]
2561 pub fn iio_strerror(err: ::std::os::raw::c_int, dst: *mut ::std::os::raw::c_char, len: usize);
2562}
2563extern "C" {
2564 #[doc = " @brief Check if the specified backend is available\n @param backend The name of the backend to query\n @return True if the backend is available, false otherwise\n\n Introduced in version 0.9."]
2565 pub fn iio_has_backend(backend: *const ::std::os::raw::c_char) -> bool;
2566}
2567extern "C" {
2568 #[doc = " @brief Get the number of available backends\n @return The number of available backends\n\n Introduced in version 0.9."]
2569 pub fn iio_get_backends_count() -> ::std::os::raw::c_uint;
2570}
2571extern "C" {
2572 #[doc = " @brief Retrieve the name of a given backend\n @param index The index corresponding to the attribute\n @return On success, a pointer to a static NULL-terminated string\n @return If the index is invalid, NULL is returned\n\n Introduced in version 0.9."]
2573 pub fn iio_get_backend(index: ::std::os::raw::c_uint) -> *const ::std::os::raw::c_char;
2574}
2575extern "C" {
2576 #[doc = " @brief Create a context from local or remote IIO devices\n @return On success, A pointer to an iio_context structure\n @return On failure, NULL is returned and errno is set appropriately\n\n <b>NOTE:</b> This function will create a context with the URI\n provided in the IIOD_REMOTE environment variable. If not set, a local\n context will be created instead."]
2577 pub fn iio_create_default_context() -> *mut iio_context;
2578}
2579extern "C" {
2580 #[doc = " @brief Create a context from local IIO devices (Linux only)\n @return On success, A pointer to an iio_context structure\n @return On failure, NULL is returned and errno is set appropriately"]
2581 pub fn iio_create_local_context() -> *mut iio_context;
2582}
2583extern "C" {
2584 #[doc = " @brief Create a context from a XML file\n @param xml_file Path to the XML file to open\n @return On success, A pointer to an iio_context structure\n @return On failure, NULL is returned and errno is set appropriately\n\n <b>NOTE:</b> The format of the XML must comply to the one returned by\n iio_context_get_xml."]
2585 pub fn iio_create_xml_context(xml_file: *const ::std::os::raw::c_char) -> *mut iio_context;
2586}
2587extern "C" {
2588 #[doc = " @brief Create a context from XML data in memory\n @param xml Pointer to the XML data in memory\n @param len Length of the XML string in memory (excluding the final \\0)\n @return On success, A pointer to an iio_context structure\n @return On failure, NULL is returned and errno is set appropriately\n\n <b>NOTE:</b> The format of the XML must comply to the one returned by\n iio_context_get_xml"]
2589 pub fn iio_create_xml_context_mem(
2590 xml: *const ::std::os::raw::c_char,
2591 len: usize,
2592 ) -> *mut iio_context;
2593}
2594extern "C" {
2595 #[doc = " @brief Create a context from the network\n @param host Hostname, IPv4 or IPv6 address where the IIO Daemon is running\n @return On success, a pointer to an iio_context structure\n @return On failure, NULL is returned and errno is set appropriately"]
2596 pub fn iio_create_network_context(host: *const ::std::os::raw::c_char) -> *mut iio_context;
2597}
2598extern "C" {
2599 #[doc = " @brief Create a context from a URI description\n @param uri A URI describing the context location\n @return On success, a pointer to a iio_context structure\n @return On failure, NULL is returned and errno is set appropriately\n\n <b>NOTE:</b> The following URIs are supported based on compile time backend\n support:\n - Local backend, \"local:\"\\n\n Does not have an address part. For example <i>\"local:\"</i>\n - XML backend, \"xml:\"\\n Requires a path to the XML file for the address part.\n For example <i>\"xml:/home/user/file.xml\"</i>\n - Network backend, \"ip:\"\\n Requires a hostname, IPv4, or IPv6 to connect to\n a specific running IIO Daemon or no address part for automatic discovery\n when library is compiled with ZeroConf support. For example\n <i>\"ip:192.168.2.1\"</i>, <b>or</b> <i>\"ip:localhost\"</i>, <b>or</b> <i>\"ip:\"</i>\n <b>or</b> <i>\"ip:plutosdr.local\"</i>. To support alternative port numbers the\n standard <i>ip:host:port</i> format is used. A special format is required as\n defined in RFC2732 for IPv6 literal hostnames, (adding '[]' around the host)\n to use a <i>ip:[x:x:x:x:x:x:x:x]:port</i> format.\n Valid examples would be:\n - ip: Any host on default port\n - ip::40000 Any host on port 40000\n - ip:analog.local Default port\n - ip:brain.local:40000 Port 40000\n - ip:192.168.1.119 Default Port\n - ip:192.168.1.119:40000 Port 40000\n - ip:2601:190:400:da:47b3:55ab:3914:bff1 Default Port\n - ip:[2601:190:400:da:9a90:96ff:feb5:acaa]:40000 Port 40000\n - ip:fe80::f14d:3728:501e:1f94%eth0 Link-local through eth0, default port\n - ip:[fe80::f14d:3728:501e:1f94%eth0]:40000 Link-local through eth0, port 40000\n - USB backend, \"usb:\"\\n When more than one usb device is attached, requires\n bus, address, and interface parts separated with a dot. For example\n <i>\"usb:3.32.5\"</i>. Where there is only one USB device attached, the shorthand\n <i>\"usb:\"</i> can be used.\n - Serial backend, \"serial:\"\\n Requires:\n - a port (/dev/ttyUSB0),\n - baud_rate (default <b>115200</b>)\n - serial port configuration\n - data bits (5 6 7 <b>8</b> 9)\n - parity ('<b>n</b>' none, 'o' odd, 'e' even, 'm' mark, 's' space)\n - stop bits (<b>1</b> 2)\n - flow control ('<b>\\0</b>' none, 'x' Xon Xoff, 'r' RTSCTS, 'd' DTRDSR)\n\n For example <i>\"serial:/dev/ttyUSB0,115200\"</i> <b>or</b> <i>\"serial:/dev/ttyUSB0,115200,8n1\"</i>"]
2600 pub fn iio_create_context_from_uri(uri: *const ::std::os::raw::c_char) -> *mut iio_context;
2601}
2602extern "C" {
2603 #[doc = " @brief Duplicate a pre-existing IIO context\n @param ctx A pointer to an iio_context structure\n @return On success, A pointer to an iio_context structure\n @return On failure, NULL is returned and errno is set appropriately\n\n <b>NOTE:</b> This function is not supported on 'usb:' contexts, since libusb\n can only claim the interface once. \"Function not implemented\" is the expected errno.\n Any context which is cloned, must be destroyed via calling iio_context_destroy()"]
2604 pub fn iio_context_clone(ctx: *const iio_context) -> *mut iio_context;
2605}
2606extern "C" {
2607 #[doc = " @brief Destroy the given context\n @param ctx A pointer to an iio_context structure\n\n <b>NOTE:</b> After that function, the iio_context pointer shall be invalid."]
2608 pub fn iio_context_destroy(ctx: *mut iio_context);
2609}
2610extern "C" {
2611 #[doc = " @brief Get the version of the backend in use\n @param ctx A pointer to an iio_context structure\n @param major A pointer to an unsigned integer (NULL accepted)\n @param minor A pointer to an unsigned integer (NULL accepted)\n @param git_tag A pointer to a 8-characters buffer (NULL accepted)\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2612 pub fn iio_context_get_version(
2613 ctx: *const iio_context,
2614 major: *mut ::std::os::raw::c_uint,
2615 minor: *mut ::std::os::raw::c_uint,
2616 git_tag: *mut ::std::os::raw::c_char,
2617 ) -> ::std::os::raw::c_int;
2618}
2619extern "C" {
2620 #[doc = " @brief Obtain a XML representation of the given context\n @param ctx A pointer to an iio_context structure\n @return A pointer to a static NULL-terminated string"]
2621 pub fn iio_context_get_xml(ctx: *const iio_context) -> *const ::std::os::raw::c_char;
2622}
2623extern "C" {
2624 #[doc = " @brief Get the name of the given context\n @param ctx A pointer to an iio_context structure\n @return A pointer to a static NULL-terminated string\n\n <b>NOTE:</b>The returned string will be <b><i>local</i></b>,\n <b><i>xml</i></b> or <b><i>network</i></b> when the context has been\n created with the local, xml and network backends respectively."]
2625 pub fn iio_context_get_name(ctx: *const iio_context) -> *const ::std::os::raw::c_char;
2626}
2627extern "C" {
2628 #[doc = " @brief Get a description of the given context\n @param ctx A pointer to an iio_context structure\n @return A pointer to a static NULL-terminated string\n\n <b>NOTE:</b>The returned string will contain human-readable information about\n the current context."]
2629 pub fn iio_context_get_description(ctx: *const iio_context) -> *const ::std::os::raw::c_char;
2630}
2631extern "C" {
2632 #[doc = " @brief Get the number of context-specific attributes\n @param ctx A pointer to an iio_context structure\n @return The number of context-specific attributes\n\n Introduced in version 0.9."]
2633 pub fn iio_context_get_attrs_count(ctx: *const iio_context) -> ::std::os::raw::c_uint;
2634}
2635extern "C" {
2636 #[doc = " @brief Retrieve the name and value of a context-specific attribute\n @param ctx A pointer to an iio_context structure\n @param index The index corresponding to the attribute\n @param name A pointer to a const char * pointer (NULL accepted)\n @param value A pointer to a const char * pointer (NULL accepted)\n @return On success, 0 is returned\n @return On error, a negative errno code is returned\n\n Introduced in version 0.9."]
2637 pub fn iio_context_get_attr(
2638 ctx: *const iio_context,
2639 index: ::std::os::raw::c_uint,
2640 name: *mut *const ::std::os::raw::c_char,
2641 value: *mut *const ::std::os::raw::c_char,
2642 ) -> ::std::os::raw::c_int;
2643}
2644extern "C" {
2645 #[doc = " @brief Retrieve the value of a context-specific attribute\n @param ctx A pointer to an iio_context structure\n @param name The name of the context attribute to read\n @return On success, a pointer to a static NULL-terminated string\n @return If the name does not correspond to any attribute, NULL is\n returned\n\n Introduced in version 0.9."]
2646 pub fn iio_context_get_attr_value(
2647 ctx: *const iio_context,
2648 name: *const ::std::os::raw::c_char,
2649 ) -> *const ::std::os::raw::c_char;
2650}
2651extern "C" {
2652 #[doc = " @brief Enumerate the devices found in the given context\n @param ctx A pointer to an iio_context structure\n @return The number of devices found"]
2653 pub fn iio_context_get_devices_count(ctx: *const iio_context) -> ::std::os::raw::c_uint;
2654}
2655extern "C" {
2656 #[doc = " @brief Get the device present at the given index\n @param ctx A pointer to an iio_context structure\n @param index The index corresponding to the device\n @return On success, a pointer to an iio_device structure\n @return If the index is invalid, NULL is returned"]
2657 pub fn iio_context_get_device(
2658 ctx: *const iio_context,
2659 index: ::std::os::raw::c_uint,
2660 ) -> *mut iio_device;
2661}
2662extern "C" {
2663 #[doc = " @brief Try to find a device structure by its ID, label or name\n @param ctx A pointer to an iio_context structure\n @param name A NULL-terminated string corresponding to the ID, label or name\n of the device to search for\n @return On success, a pointer to an iio_device structure\n @return If the parameter does not correspond to the ID, label or name of\n any known device, NULL is returned"]
2664 pub fn iio_context_find_device(
2665 ctx: *const iio_context,
2666 name: *const ::std::os::raw::c_char,
2667 ) -> *mut iio_device;
2668}
2669extern "C" {
2670 #[doc = " @brief Set a timeout for I/O operations\n @param ctx A pointer to an iio_context structure\n @param timeout_ms A positive integer representing the time in milliseconds\n after which a timeout occurs. A value of 0 is used to specify that no\n timeout should occur.\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2671 pub fn iio_context_set_timeout(
2672 ctx: *mut iio_context,
2673 timeout_ms: ::std::os::raw::c_uint,
2674 ) -> ::std::os::raw::c_int;
2675}
2676extern "C" {
2677 #[doc = " @brief Retrieve a pointer to the iio_context structure\n @param dev A pointer to an iio_device structure\n @return A pointer to an iio_context structure"]
2678 pub fn iio_device_get_context(dev: *const iio_device) -> *const iio_context;
2679}
2680extern "C" {
2681 #[doc = " @brief Retrieve the device ID (e.g. <b><i>iio:device0</i></b>)\n @param dev A pointer to an iio_device structure\n @return A pointer to a static NULL-terminated string"]
2682 pub fn iio_device_get_id(dev: *const iio_device) -> *const ::std::os::raw::c_char;
2683}
2684extern "C" {
2685 #[doc = " @brief Retrieve the device name (e.g. <b><i>xadc</i></b>)\n @param dev A pointer to an iio_device structure\n @return A pointer to a static NULL-terminated string\n\n <b>NOTE:</b> if the device has no name, NULL is returned."]
2686 pub fn iio_device_get_name(dev: *const iio_device) -> *const ::std::os::raw::c_char;
2687}
2688extern "C" {
2689 #[doc = " @brief Retrieve the device label (e.g. <b><i>lo_pll0_rx_adf4351</i></b>)\n @param dev A pointer to an iio_device structure\n @return A pointer to a static NULL-terminated string\n\n <b>NOTE:</b> if the device has no label, NULL is returned."]
2690 pub fn iio_device_get_label(dev: *const iio_device) -> *const ::std::os::raw::c_char;
2691}
2692extern "C" {
2693 #[doc = " @brief Enumerate the channels of the given device\n @param dev A pointer to an iio_device structure\n @return The number of channels found"]
2694 pub fn iio_device_get_channels_count(dev: *const iio_device) -> ::std::os::raw::c_uint;
2695}
2696extern "C" {
2697 #[doc = " @brief Enumerate the device-specific attributes of the given device\n @param dev A pointer to an iio_device structure\n @return The number of device-specific attributes found"]
2698 pub fn iio_device_get_attrs_count(dev: *const iio_device) -> ::std::os::raw::c_uint;
2699}
2700extern "C" {
2701 #[doc = " @brief Enumerate the buffer-specific attributes of the given device\n @param dev A pointer to an iio_device structure\n @return The number of buffer-specific attributes found"]
2702 pub fn iio_device_get_buffer_attrs_count(dev: *const iio_device) -> ::std::os::raw::c_uint;
2703}
2704extern "C" {
2705 #[doc = " @brief Get the channel present at the given index\n @param dev A pointer to an iio_device structure\n @param index The index corresponding to the channel\n @return On success, a pointer to an iio_channel structure\n @return If the index is invalid, NULL is returned"]
2706 pub fn iio_device_get_channel(
2707 dev: *const iio_device,
2708 index: ::std::os::raw::c_uint,
2709 ) -> *mut iio_channel;
2710}
2711extern "C" {
2712 #[doc = " @brief Get the device-specific attribute present at the given index\n @param dev A pointer to an iio_device structure\n @param index The index corresponding to the attribute\n @return On success, a pointer to a static NULL-terminated string\n @return If the index is invalid, NULL is returned"]
2713 pub fn iio_device_get_attr(
2714 dev: *const iio_device,
2715 index: ::std::os::raw::c_uint,
2716 ) -> *const ::std::os::raw::c_char;
2717}
2718extern "C" {
2719 #[doc = " @brief Get the buffer-specific attribute present at the given index\n @param dev A pointer to an iio_device structure\n @param index The index corresponding to the attribute\n @return On success, a pointer to a static NULL-terminated string\n @return If the index is invalid, NULL is returned"]
2720 pub fn iio_device_get_buffer_attr(
2721 dev: *const iio_device,
2722 index: ::std::os::raw::c_uint,
2723 ) -> *const ::std::os::raw::c_char;
2724}
2725extern "C" {
2726 #[doc = " @brief Try to find a channel structure by its name of ID\n @param dev A pointer to an iio_device structure\n @param name A NULL-terminated string corresponding to the name or the ID of\n the channel to search for\n @param output True if the searched channel is output, False otherwise\n @return On success, a pointer to an iio_channel structure\n @return If the name or ID does not correspond to any known channel of the\n given device, NULL is returned"]
2727 pub fn iio_device_find_channel(
2728 dev: *const iio_device,
2729 name: *const ::std::os::raw::c_char,
2730 output: bool,
2731 ) -> *mut iio_channel;
2732}
2733extern "C" {
2734 #[doc = " @brief Try to find a device-specific attribute by its name\n @param dev A pointer to an iio_device structure\n @param name A NULL-terminated string corresponding to the name of the\n attribute\n @return On success, a pointer to a static NULL-terminated string\n @return If the name does not correspond to any known attribute of the given\n device, NULL is returned\n\n <b>NOTE:</b> This function is useful to detect the presence of an attribute.\n It can also be used to retrieve the name of an attribute as a pointer to a\n static string from a dynamically allocated string."]
2735 pub fn iio_device_find_attr(
2736 dev: *const iio_device,
2737 name: *const ::std::os::raw::c_char,
2738 ) -> *const ::std::os::raw::c_char;
2739}
2740extern "C" {
2741 #[doc = " @brief Try to find a buffer-specific attribute by its name\n @param dev A pointer to an iio_device structure\n @param name A NULL-terminated string corresponding to the name of the\n attribute\n @return On success, a pointer to a static NULL-terminated string\n @return If the name does not correspond to any known attribute of the given\n device, NULL is returned\n\n <b>NOTE:</b> This function is useful to detect the presence of an attribute.\n It can also be used to retrieve the name of an attribute as a pointer to a\n static string from a dynamically allocated string."]
2742 pub fn iio_device_find_buffer_attr(
2743 dev: *const iio_device,
2744 name: *const ::std::os::raw::c_char,
2745 ) -> *const ::std::os::raw::c_char;
2746}
2747extern "C" {
2748 #[doc = " @brief Read the content of the given device-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param dst A pointer to the memory area where the NULL-terminated string\n corresponding to the value read will be stored\n @param len The available length of the memory area, in bytes\n @return On success, the number of bytes written to the buffer\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b>By passing NULL as the \"attr\" argument to iio_device_attr_read,\n it is now possible to read all of the attributes of a device.\n\n The buffer is filled with one block of data per attribute of the device,\n by the order they appear in the iio_device structure.\n\n The first four bytes of one block correspond to a 32-bit signed value in\n network order. If negative, it corresponds to the errno code that were\n returned when reading the attribute; if positive, it corresponds to the\n length of the data read. In that case, the rest of the block contains\n the data."]
2749 pub fn iio_device_attr_read(
2750 dev: *const iio_device,
2751 attr: *const ::std::os::raw::c_char,
2752 dst: *mut ::std::os::raw::c_char,
2753 len: usize,
2754 ) -> isize;
2755}
2756extern "C" {
2757 #[doc = " @brief Read the content of all device-specific attributes\n @param dev A pointer to an iio_device structure\n @param cb A pointer to a callback function\n @param data A pointer that will be passed to the callback function\n @return On success, 0 is returned\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b> This function is especially useful when used with the network\n backend, as all the device-specific attributes are read in one single\n command."]
2758 pub fn iio_device_attr_read_all(
2759 dev: *mut iio_device,
2760 cb: ::std::option::Option<
2761 unsafe extern "C" fn(
2762 dev: *mut iio_device,
2763 attr: *const ::std::os::raw::c_char,
2764 value: *const ::std::os::raw::c_char,
2765 len: usize,
2766 d: *mut ::std::os::raw::c_void,
2767 ) -> ::std::os::raw::c_int,
2768 >,
2769 data: *mut ::std::os::raw::c_void,
2770 ) -> ::std::os::raw::c_int;
2771}
2772extern "C" {
2773 #[doc = " @brief Read the content of the given device-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A pointer to a bool variable where the value should be stored\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2774 pub fn iio_device_attr_read_bool(
2775 dev: *const iio_device,
2776 attr: *const ::std::os::raw::c_char,
2777 val: *mut bool,
2778 ) -> ::std::os::raw::c_int;
2779}
2780extern "C" {
2781 #[doc = " @brief Read the content of the given device-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A pointer to a long long variable where the value should be stored\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2782 pub fn iio_device_attr_read_longlong(
2783 dev: *const iio_device,
2784 attr: *const ::std::os::raw::c_char,
2785 val: *mut ::std::os::raw::c_longlong,
2786 ) -> ::std::os::raw::c_int;
2787}
2788extern "C" {
2789 #[doc = " @brief Read the content of the given device-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A pointer to a double variable where the value should be stored\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2790 pub fn iio_device_attr_read_double(
2791 dev: *const iio_device,
2792 attr: *const ::std::os::raw::c_char,
2793 val: *mut f64,
2794 ) -> ::std::os::raw::c_int;
2795}
2796extern "C" {
2797 #[doc = " @brief Set the value of the given device-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param src A NULL-terminated string to set the attribute to\n @return On success, the number of bytes written\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b>By passing NULL as the \"attr\" argument to iio_device_attr_write,\n it is now possible to write all of the attributes of a device.\n\n The buffer must contain one block of data per attribute of the device,\n by the order they appear in the iio_device structure.\n\n The first four bytes of one block correspond to a 32-bit signed value in\n network order. If negative, the attribute is not written; if positive,\n it corresponds to the length of the data to write. In that case, the rest\n of the block must contain the data."]
2798 pub fn iio_device_attr_write(
2799 dev: *const iio_device,
2800 attr: *const ::std::os::raw::c_char,
2801 src: *const ::std::os::raw::c_char,
2802 ) -> isize;
2803}
2804extern "C" {
2805 #[doc = " @brief Set the value of the given device-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param src A pointer to the data to be written\n @param len The number of bytes that should be written\n @return On success, the number of bytes written\n @return On error, a negative errno code is returned"]
2806 pub fn iio_device_attr_write_raw(
2807 dev: *const iio_device,
2808 attr: *const ::std::os::raw::c_char,
2809 src: *const ::std::os::raw::c_void,
2810 len: usize,
2811 ) -> isize;
2812}
2813extern "C" {
2814 #[doc = " @brief Set the values of all device-specific attributes\n @param dev A pointer to an iio_device structure\n @param cb A pointer to a callback function\n @param data A pointer that will be passed to the callback function\n @return On success, 0 is returned\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b> This function is especially useful when used with the network\n backend, as all the device-specific attributes are written in one single\n command."]
2815 pub fn iio_device_attr_write_all(
2816 dev: *mut iio_device,
2817 cb: ::std::option::Option<
2818 unsafe extern "C" fn(
2819 dev: *mut iio_device,
2820 attr: *const ::std::os::raw::c_char,
2821 buf: *mut ::std::os::raw::c_void,
2822 len: usize,
2823 d: *mut ::std::os::raw::c_void,
2824 ) -> isize,
2825 >,
2826 data: *mut ::std::os::raw::c_void,
2827 ) -> ::std::os::raw::c_int;
2828}
2829extern "C" {
2830 #[doc = " @brief Set the value of the given device-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A bool value to set the attribute to\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2831 pub fn iio_device_attr_write_bool(
2832 dev: *const iio_device,
2833 attr: *const ::std::os::raw::c_char,
2834 val: bool,
2835 ) -> ::std::os::raw::c_int;
2836}
2837extern "C" {
2838 #[doc = " @brief Set the value of the given device-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A long long value to set the attribute to\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2839 pub fn iio_device_attr_write_longlong(
2840 dev: *const iio_device,
2841 attr: *const ::std::os::raw::c_char,
2842 val: ::std::os::raw::c_longlong,
2843 ) -> ::std::os::raw::c_int;
2844}
2845extern "C" {
2846 #[doc = " @brief Set the value of the given device-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A double value to set the attribute to\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2847 pub fn iio_device_attr_write_double(
2848 dev: *const iio_device,
2849 attr: *const ::std::os::raw::c_char,
2850 val: f64,
2851 ) -> ::std::os::raw::c_int;
2852}
2853extern "C" {
2854 #[doc = " @brief Read the content of the given buffer-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param dst A pointer to the memory area where the NULL-terminated string\n corresponding to the value read will be stored\n @param len The available length of the memory area, in bytes\n @return On success, the number of bytes written to the buffer\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b>By passing NULL as the \"attr\" argument to\n iio_device_buffer_attr_read, it is now possible to read all of the attributes\n of a device.\n\n The buffer is filled with one block of data per attribute of the buffer,\n by the order they appear in the iio_device structure.\n\n The first four bytes of one block correspond to a 32-bit signed value in\n network order. If negative, it corresponds to the errno code that were\n returned when reading the attribute; if positive, it corresponds to the\n length of the data read. In that case, the rest of the block contains\n the data."]
2855 pub fn iio_device_buffer_attr_read(
2856 dev: *const iio_device,
2857 attr: *const ::std::os::raw::c_char,
2858 dst: *mut ::std::os::raw::c_char,
2859 len: usize,
2860 ) -> isize;
2861}
2862extern "C" {
2863 #[doc = " @brief Read the content of all buffer-specific attributes\n @param dev A pointer to an iio_device structure\n @param cb A pointer to a callback function\n @param data A pointer that will be passed to the callback function\n @return On success, 0 is returned\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b> This function is especially useful when used with the network\n backend, as all the buffer-specific attributes are read in one single\n command."]
2864 pub fn iio_device_buffer_attr_read_all(
2865 dev: *mut iio_device,
2866 cb: ::std::option::Option<
2867 unsafe extern "C" fn(
2868 dev: *mut iio_device,
2869 attr: *const ::std::os::raw::c_char,
2870 value: *const ::std::os::raw::c_char,
2871 len: usize,
2872 d: *mut ::std::os::raw::c_void,
2873 ) -> ::std::os::raw::c_int,
2874 >,
2875 data: *mut ::std::os::raw::c_void,
2876 ) -> ::std::os::raw::c_int;
2877}
2878extern "C" {
2879 #[doc = " @brief Read the content of the given buffer-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A pointer to a bool variable where the value should be stored\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2880 pub fn iio_device_buffer_attr_read_bool(
2881 dev: *const iio_device,
2882 attr: *const ::std::os::raw::c_char,
2883 val: *mut bool,
2884 ) -> ::std::os::raw::c_int;
2885}
2886extern "C" {
2887 #[doc = " @brief Read the content of the given buffer-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A pointer to a long long variable where the value should be stored\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2888 pub fn iio_device_buffer_attr_read_longlong(
2889 dev: *const iio_device,
2890 attr: *const ::std::os::raw::c_char,
2891 val: *mut ::std::os::raw::c_longlong,
2892 ) -> ::std::os::raw::c_int;
2893}
2894extern "C" {
2895 #[doc = " @brief Read the content of the given buffer-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A pointer to a double variable where the value should be stored\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2896 pub fn iio_device_buffer_attr_read_double(
2897 dev: *const iio_device,
2898 attr: *const ::std::os::raw::c_char,
2899 val: *mut f64,
2900 ) -> ::std::os::raw::c_int;
2901}
2902extern "C" {
2903 #[doc = " @brief Set the value of the given buffer-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param src A NULL-terminated string to set the attribute to\n @return On success, the number of bytes written\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b>By passing NULL as the \"attr\" argument to\n iio_device_buffer_attr_write, it is now possible to write all of the\n attributes of a device.\n\n The buffer must contain one block of data per attribute of the buffer,\n by the order they appear in the iio_device structure.\n\n The first four bytes of one block correspond to a 32-bit signed value in\n network order. If negative, the attribute is not written; if positive,\n it corresponds to the length of the data to write. In that case, the rest\n of the block must contain the data."]
2904 pub fn iio_device_buffer_attr_write(
2905 dev: *const iio_device,
2906 attr: *const ::std::os::raw::c_char,
2907 src: *const ::std::os::raw::c_char,
2908 ) -> isize;
2909}
2910extern "C" {
2911 #[doc = " @brief Set the value of the given buffer-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param src A pointer to the data to be written\n @param len The number of bytes that should be written\n @return On success, the number of bytes written\n @return On error, a negative errno code is returned"]
2912 pub fn iio_device_buffer_attr_write_raw(
2913 dev: *const iio_device,
2914 attr: *const ::std::os::raw::c_char,
2915 src: *const ::std::os::raw::c_void,
2916 len: usize,
2917 ) -> isize;
2918}
2919extern "C" {
2920 #[doc = " @brief Set the values of all buffer-specific attributes\n @param dev A pointer to an iio_device structure\n @param cb A pointer to a callback function\n @param data A pointer that will be passed to the callback function\n @return On success, 0 is returned\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b> This function is especially useful when used with the network\n backend, as all the buffer-specific attributes are written in one single\n command."]
2921 pub fn iio_device_buffer_attr_write_all(
2922 dev: *mut iio_device,
2923 cb: ::std::option::Option<
2924 unsafe extern "C" fn(
2925 dev: *mut iio_device,
2926 attr: *const ::std::os::raw::c_char,
2927 buf: *mut ::std::os::raw::c_void,
2928 len: usize,
2929 d: *mut ::std::os::raw::c_void,
2930 ) -> isize,
2931 >,
2932 data: *mut ::std::os::raw::c_void,
2933 ) -> ::std::os::raw::c_int;
2934}
2935extern "C" {
2936 #[doc = " @brief Set the value of the given buffer-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A bool value to set the attribute to\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2937 pub fn iio_device_buffer_attr_write_bool(
2938 dev: *const iio_device,
2939 attr: *const ::std::os::raw::c_char,
2940 val: bool,
2941 ) -> ::std::os::raw::c_int;
2942}
2943extern "C" {
2944 #[doc = " @brief Set the value of the given buffer-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A long long value to set the attribute to\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2945 pub fn iio_device_buffer_attr_write_longlong(
2946 dev: *const iio_device,
2947 attr: *const ::std::os::raw::c_char,
2948 val: ::std::os::raw::c_longlong,
2949 ) -> ::std::os::raw::c_int;
2950}
2951extern "C" {
2952 #[doc = " @brief Set the value of the given buffer-specific attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A double value to set the attribute to\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2953 pub fn iio_device_buffer_attr_write_double(
2954 dev: *const iio_device,
2955 attr: *const ::std::os::raw::c_char,
2956 val: f64,
2957 ) -> ::std::os::raw::c_int;
2958}
2959extern "C" {
2960 #[doc = " @brief Associate a pointer to an iio_device structure\n @param dev A pointer to an iio_device structure\n @param data The pointer to be associated"]
2961 pub fn iio_device_set_data(dev: *mut iio_device, data: *mut ::std::os::raw::c_void);
2962}
2963extern "C" {
2964 #[doc = " @brief Retrieve a previously associated pointer of an iio_device structure\n @param dev A pointer to an iio_device structure\n @return The pointer previously associated if present, or NULL"]
2965 pub fn iio_device_get_data(dev: *const iio_device) -> *mut ::std::os::raw::c_void;
2966}
2967extern "C" {
2968 #[doc = " @brief Retrieve the trigger of a given device\n @param dev A pointer to an iio_device structure\n @param trigger a pointer to a pointer of an iio_device structure. The pointed\n pointer will be set to the address of the iio_device structure corresponding\n to the associated trigger device.\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2969 pub fn iio_device_get_trigger(
2970 dev: *const iio_device,
2971 trigger: *mut *const iio_device,
2972 ) -> ::std::os::raw::c_int;
2973}
2974extern "C" {
2975 #[doc = " @brief Associate a trigger to a given device\n @param dev A pointer to an iio_device structure\n @param trigger a pointer to the iio_device structure corresponding to the\n trigger that should be associated.\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2976 pub fn iio_device_set_trigger(
2977 dev: *const iio_device,
2978 trigger: *const iio_device,
2979 ) -> ::std::os::raw::c_int;
2980}
2981extern "C" {
2982 #[doc = " @brief Return True if the given device is a trigger\n @param dev A pointer to an iio_device structure\n @return True if the device is a trigger, False otherwise"]
2983 pub fn iio_device_is_trigger(dev: *const iio_device) -> bool;
2984}
2985extern "C" {
2986 #[doc = " @brief Configure the number of kernel buffers for a device\n\n This function allows to change the number of buffers on kernel side.\n @param dev A pointer to an iio_device structure\n @param nb_buffers The number of buffers\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
2987 pub fn iio_device_set_kernel_buffers_count(
2988 dev: *const iio_device,
2989 nb_buffers: ::std::os::raw::c_uint,
2990 ) -> ::std::os::raw::c_int;
2991}
2992extern "C" {
2993 #[doc = " @brief Retrieve a pointer to the iio_device structure\n @param chn A pointer to an iio_channel structure\n @return A pointer to an iio_device structure"]
2994 pub fn iio_channel_get_device(chn: *const iio_channel) -> *const iio_device;
2995}
2996extern "C" {
2997 #[doc = " @brief Retrieve the channel ID (e.g. <b><i>voltage0</i></b>)\n @param chn A pointer to an iio_channel structure\n @return A pointer to a static NULL-terminated string"]
2998 pub fn iio_channel_get_id(chn: *const iio_channel) -> *const ::std::os::raw::c_char;
2999}
3000extern "C" {
3001 #[doc = " @brief Retrieve the channel name (e.g. <b><i>vccint</i></b>)\n @param chn A pointer to an iio_channel structure\n @return A pointer to a static NULL-terminated string\n\n <b>NOTE:</b> if the channel has no name, NULL is returned."]
3002 pub fn iio_channel_get_name(chn: *const iio_channel) -> *const ::std::os::raw::c_char;
3003}
3004extern "C" {
3005 #[doc = " @brief Return True if the given channel is an output channel\n @param chn A pointer to an iio_channel structure\n @return True if the channel is an output channel, False otherwise"]
3006 pub fn iio_channel_is_output(chn: *const iio_channel) -> bool;
3007}
3008extern "C" {
3009 #[doc = " @brief Return True if the given channel is a scan element\n @param chn A pointer to an iio_channel structure\n @return True if the channel is a scan element, False otherwise\n\n <b>NOTE:</b> a channel that is a scan element is a channel that can\n generate samples (for an input channel) or receive samples (for an output\n channel) after being enabled."]
3010 pub fn iio_channel_is_scan_element(chn: *const iio_channel) -> bool;
3011}
3012extern "C" {
3013 #[doc = " @brief Enumerate the channel-specific attributes of the given channel\n @param chn A pointer to an iio_channel structure\n @return The number of channel-specific attributes found"]
3014 pub fn iio_channel_get_attrs_count(chn: *const iio_channel) -> ::std::os::raw::c_uint;
3015}
3016extern "C" {
3017 #[doc = " @brief Get the channel-specific attribute present at the given index\n @param chn A pointer to an iio_channel structure\n @param index The index corresponding to the attribute\n @return On success, a pointer to a static NULL-terminated string\n @return If the index is invalid, NULL is returned"]
3018 pub fn iio_channel_get_attr(
3019 chn: *const iio_channel,
3020 index: ::std::os::raw::c_uint,
3021 ) -> *const ::std::os::raw::c_char;
3022}
3023extern "C" {
3024 #[doc = " @brief Try to find a channel-specific attribute by its name\n @param chn A pointer to an iio_channel structure\n @param name A NULL-terminated string corresponding to the name of the\n attribute\n @return On success, a pointer to a static NULL-terminated string\n @return If the name does not correspond to any known attribute of the given\n channel, NULL is returned\n\n <b>NOTE:</b> This function is useful to detect the presence of an attribute.\n It can also be used to retrieve the name of an attribute as a pointer to a\n static string from a dynamically allocated string."]
3025 pub fn iio_channel_find_attr(
3026 chn: *const iio_channel,
3027 name: *const ::std::os::raw::c_char,
3028 ) -> *const ::std::os::raw::c_char;
3029}
3030extern "C" {
3031 #[doc = " @brief Retrieve the filename of an attribute\n @param chn A pointer to an iio_channel structure\n @param attr a NULL-terminated string corresponding to the name of the\n attribute\n @return On success, a pointer to a static NULL-terminated string\n @return If the attribute name is unknown, NULL is returned"]
3032 pub fn iio_channel_attr_get_filename(
3033 chn: *const iio_channel,
3034 attr: *const ::std::os::raw::c_char,
3035 ) -> *const ::std::os::raw::c_char;
3036}
3037extern "C" {
3038 #[doc = " @brief Read the content of the given channel-specific attribute\n @param chn A pointer to an iio_channel structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param dst A pointer to the memory area where the NULL-terminated string\n corresponding to the value read will be stored\n @param len The available length of the memory area, in bytes\n @return On success, the number of bytes written to the buffer\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b>By passing NULL as the \"attr\" argument to iio_channel_attr_read,\n it is now possible to read all of the attributes of a channel.\n\n The buffer is filled with one block of data per attribute of the channel,\n by the order they appear in the iio_channel structure.\n\n The first four bytes of one block correspond to a 32-bit signed value in\n network order. If negative, it corresponds to the errno code that were\n returned when reading the attribute; if positive, it corresponds to the\n length of the data read. In that case, the rest of the block contains\n the data."]
3039 pub fn iio_channel_attr_read(
3040 chn: *const iio_channel,
3041 attr: *const ::std::os::raw::c_char,
3042 dst: *mut ::std::os::raw::c_char,
3043 len: usize,
3044 ) -> isize;
3045}
3046extern "C" {
3047 #[doc = " @brief Read the content of all channel-specific attributes\n @param chn A pointer to an iio_channel structure\n @param cb A pointer to a callback function\n @param data A pointer that will be passed to the callback function\n @return On success, 0 is returned\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b> This function is especially useful when used with the network\n backend, as all the channel-specific attributes are read in one single\n command."]
3048 pub fn iio_channel_attr_read_all(
3049 chn: *mut iio_channel,
3050 cb: ::std::option::Option<
3051 unsafe extern "C" fn(
3052 chn: *mut iio_channel,
3053 attr: *const ::std::os::raw::c_char,
3054 val: *const ::std::os::raw::c_char,
3055 len: usize,
3056 d: *mut ::std::os::raw::c_void,
3057 ) -> ::std::os::raw::c_int,
3058 >,
3059 data: *mut ::std::os::raw::c_void,
3060 ) -> ::std::os::raw::c_int;
3061}
3062extern "C" {
3063 #[doc = " @brief Read the content of the given channel-specific attribute\n @param chn A pointer to an iio_channel structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A pointer to a bool variable where the value should be stored\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
3064 pub fn iio_channel_attr_read_bool(
3065 chn: *const iio_channel,
3066 attr: *const ::std::os::raw::c_char,
3067 val: *mut bool,
3068 ) -> ::std::os::raw::c_int;
3069}
3070extern "C" {
3071 #[doc = " @brief Read the content of the given channel-specific attribute\n @param chn A pointer to an iio_channel structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A pointer to a long long variable where the value should be stored\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
3072 pub fn iio_channel_attr_read_longlong(
3073 chn: *const iio_channel,
3074 attr: *const ::std::os::raw::c_char,
3075 val: *mut ::std::os::raw::c_longlong,
3076 ) -> ::std::os::raw::c_int;
3077}
3078extern "C" {
3079 #[doc = " @brief Read the content of the given channel-specific attribute\n @param chn A pointer to an iio_channel structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A pointer to a double variable where the value should be stored\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
3080 pub fn iio_channel_attr_read_double(
3081 chn: *const iio_channel,
3082 attr: *const ::std::os::raw::c_char,
3083 val: *mut f64,
3084 ) -> ::std::os::raw::c_int;
3085}
3086extern "C" {
3087 #[doc = " @brief Set the value of the given channel-specific attribute\n @param chn A pointer to an iio_channel structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param src A NULL-terminated string to set the attribute to\n @return On success, the number of bytes written\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b>By passing NULL as the \"attr\" argument to iio_channel_attr_write,\n it is now possible to write all of the attributes of a channel.\n\n The buffer must contain one block of data per attribute of the channel,\n by the order they appear in the iio_channel structure.\n\n The first four bytes of one block correspond to a 32-bit signed value in\n network order. If negative, the attribute is not written; if positive,\n it corresponds to the length of the data to write. In that case, the rest\n of the block must contain the data."]
3088 pub fn iio_channel_attr_write(
3089 chn: *const iio_channel,
3090 attr: *const ::std::os::raw::c_char,
3091 src: *const ::std::os::raw::c_char,
3092 ) -> isize;
3093}
3094extern "C" {
3095 #[doc = " @brief Set the value of the given channel-specific attribute\n @param chn A pointer to an iio_channel structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param src A pointer to the data to be written\n @param len The number of bytes that should be written\n @return On success, the number of bytes written\n @return On error, a negative errno code is returned"]
3096 pub fn iio_channel_attr_write_raw(
3097 chn: *const iio_channel,
3098 attr: *const ::std::os::raw::c_char,
3099 src: *const ::std::os::raw::c_void,
3100 len: usize,
3101 ) -> isize;
3102}
3103extern "C" {
3104 #[doc = " @brief Set the values of all channel-specific attributes\n @param chn A pointer to an iio_channel structure\n @param cb A pointer to a callback function\n @param data A pointer that will be passed to the callback function\n @return On success, 0 is returned\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b> This function is especially useful when used with the network\n backend, as all the channel-specific attributes are written in one single\n command."]
3105 pub fn iio_channel_attr_write_all(
3106 chn: *mut iio_channel,
3107 cb: ::std::option::Option<
3108 unsafe extern "C" fn(
3109 chn: *mut iio_channel,
3110 attr: *const ::std::os::raw::c_char,
3111 buf: *mut ::std::os::raw::c_void,
3112 len: usize,
3113 d: *mut ::std::os::raw::c_void,
3114 ) -> isize,
3115 >,
3116 data: *mut ::std::os::raw::c_void,
3117 ) -> ::std::os::raw::c_int;
3118}
3119extern "C" {
3120 #[doc = " @brief Set the value of the given channel-specific attribute\n @param chn A pointer to an iio_channel structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A bool value to set the attribute to\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
3121 pub fn iio_channel_attr_write_bool(
3122 chn: *const iio_channel,
3123 attr: *const ::std::os::raw::c_char,
3124 val: bool,
3125 ) -> ::std::os::raw::c_int;
3126}
3127extern "C" {
3128 #[doc = " @brief Set the value of the given channel-specific attribute\n @param chn A pointer to an iio_channel structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A long long value to set the attribute to\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
3129 pub fn iio_channel_attr_write_longlong(
3130 chn: *const iio_channel,
3131 attr: *const ::std::os::raw::c_char,
3132 val: ::std::os::raw::c_longlong,
3133 ) -> ::std::os::raw::c_int;
3134}
3135extern "C" {
3136 #[doc = " @brief Set the value of the given channel-specific attribute\n @param chn A pointer to an iio_channel structure\n @param attr A NULL-terminated string corresponding to the name of the\n attribute\n @param val A double value to set the attribute to\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
3137 pub fn iio_channel_attr_write_double(
3138 chn: *const iio_channel,
3139 attr: *const ::std::os::raw::c_char,
3140 val: f64,
3141 ) -> ::std::os::raw::c_int;
3142}
3143extern "C" {
3144 #[doc = " @brief Enable the given channel\n @param chn A pointer to an iio_channel structure\n\n <b>NOTE:</b>Before creating an iio_buffer structure with\n iio_device_create_buffer, it is required to enable at least one channel of\n the device to read from."]
3145 pub fn iio_channel_enable(chn: *mut iio_channel);
3146}
3147extern "C" {
3148 #[doc = " @brief Disable the given channel\n @param chn A pointer to an iio_channel structure"]
3149 pub fn iio_channel_disable(chn: *mut iio_channel);
3150}
3151extern "C" {
3152 #[doc = " @brief Returns True if the channel is enabled\n @param chn A pointer to an iio_channel structure\n @return True if the channel is enabled, False otherwise"]
3153 pub fn iio_channel_is_enabled(chn: *const iio_channel) -> bool;
3154}
3155extern "C" {
3156 #[doc = " @brief Demultiplex the samples of a given channel\n @param chn A pointer to an iio_channel structure\n @param buffer A pointer to an iio_buffer structure\n @param dst A pointer to the memory area where the demultiplexed data will be\n stored\n @param len The available length of the memory area, in bytes\n @return The size of the demultiplexed data, in bytes"]
3157 pub fn iio_channel_read_raw(
3158 chn: *const iio_channel,
3159 buffer: *mut iio_buffer,
3160 dst: *mut ::std::os::raw::c_void,
3161 len: usize,
3162 ) -> usize;
3163}
3164extern "C" {
3165 #[doc = " @brief Demultiplex and convert the samples of a given channel\n @param chn A pointer to an iio_channel structure\n @param buffer A pointer to an iio_buffer structure\n @param dst A pointer to the memory area where the converted data will be\n stored\n @param len The available length of the memory area, in bytes\n @return The size of the converted data, in bytes"]
3166 pub fn iio_channel_read(
3167 chn: *const iio_channel,
3168 buffer: *mut iio_buffer,
3169 dst: *mut ::std::os::raw::c_void,
3170 len: usize,
3171 ) -> usize;
3172}
3173extern "C" {
3174 #[doc = " @brief Multiplex the samples of a given channel\n @param chn A pointer to an iio_channel structure\n @param buffer A pointer to an iio_buffer structure\n @param src A pointer to the memory area where the sequential data will\n be read from\n @param len The length of the memory area, in bytes\n @return The number of bytes actually multiplexed"]
3175 pub fn iio_channel_write_raw(
3176 chn: *const iio_channel,
3177 buffer: *mut iio_buffer,
3178 src: *const ::std::os::raw::c_void,
3179 len: usize,
3180 ) -> usize;
3181}
3182extern "C" {
3183 #[doc = " @brief Convert and multiplex the samples of a given channel\n @param chn A pointer to an iio_channel structure\n @param buffer A pointer to an iio_buffer structure\n @param src A pointer to the memory area where the sequential data will\n be read from\n @param len The length of the memory area, in bytes\n @return The number of bytes actually converted and multiplexed"]
3184 pub fn iio_channel_write(
3185 chn: *const iio_channel,
3186 buffer: *mut iio_buffer,
3187 src: *const ::std::os::raw::c_void,
3188 len: usize,
3189 ) -> usize;
3190}
3191extern "C" {
3192 #[doc = " @brief Associate a pointer to an iio_channel structure\n @param chn A pointer to an iio_channel structure\n @param data The pointer to be associated"]
3193 pub fn iio_channel_set_data(chn: *mut iio_channel, data: *mut ::std::os::raw::c_void);
3194}
3195extern "C" {
3196 #[doc = " @brief Retrieve a previously associated pointer of an iio_channel structure\n @param chn A pointer to an iio_channel structure\n @return The pointer previously associated if present, or NULL"]
3197 pub fn iio_channel_get_data(chn: *const iio_channel) -> *mut ::std::os::raw::c_void;
3198}
3199extern "C" {
3200 #[doc = " @brief Get the type of the given channel\n @param chn A pointer to an iio_channel structure\n @return The type of the channel"]
3201 pub fn iio_channel_get_type(chn: *const iio_channel) -> iio_chan_type;
3202}
3203extern "C" {
3204 #[doc = " @brief Get the modifier type of the given channel\n @param chn A pointer to an iio_channel structure\n @return The modifier type of the channel"]
3205 pub fn iio_channel_get_modifier(chn: *const iio_channel) -> iio_modifier;
3206}
3207extern "C" {
3208 #[doc = " @brief Retrieve a pointer to the iio_device structure\n @param buf A pointer to an iio_buffer structure\n @return A pointer to an iio_device structure"]
3209 pub fn iio_buffer_get_device(buf: *const iio_buffer) -> *const iio_device;
3210}
3211extern "C" {
3212 #[doc = " @brief Create an input or output buffer associated to the given device\n @param dev A pointer to an iio_device structure\n @param samples_count The number of samples that the buffer should contain\n @param cyclic If True, enable cyclic mode\n @return On success, a pointer to an iio_buffer structure\n @return On error, NULL is returned, and errno is set to the error code\n\n <b>NOTE:</b> Channels that have to be written to / read from must be enabled\n before creating the buffer."]
3213 pub fn iio_device_create_buffer(
3214 dev: *const iio_device,
3215 samples_count: usize,
3216 cyclic: bool,
3217 ) -> *mut iio_buffer;
3218}
3219extern "C" {
3220 #[doc = " @brief Destroy the given buffer\n @param buf A pointer to an iio_buffer structure\n\n <b>NOTE:</b> After that function, the iio_buffer pointer shall be invalid."]
3221 pub fn iio_buffer_destroy(buf: *mut iio_buffer);
3222}
3223extern "C" {
3224 #[doc = " @brief Get a pollable file descriptor\n\n Can be used to know when iio_buffer_refill() or iio_buffer_push() can be\n called\n @param buf A pointer to an iio_buffer structure\n @return On success, valid file descriptor\n @return On error, a negative errno code is returned"]
3225 pub fn iio_buffer_get_poll_fd(buf: *mut iio_buffer) -> ::std::os::raw::c_int;
3226}
3227extern "C" {
3228 #[doc = " @brief Make iio_buffer_refill() and iio_buffer_push() blocking or not\n\n After this function has been called with blocking == false,\n iio_buffer_refill() and iio_buffer_push() will return -EAGAIN if no data is\n ready.\n A device is blocking by default.\n @param buf A pointer to an iio_buffer structure\n @param blocking true if the buffer API should be blocking, else false\n @return On success, 0\n @return On error, a negative errno code is returned"]
3229 pub fn iio_buffer_set_blocking_mode(
3230 buf: *mut iio_buffer,
3231 blocking: bool,
3232 ) -> ::std::os::raw::c_int;
3233}
3234extern "C" {
3235 #[doc = " @brief Fetch more samples from the hardware\n @param buf A pointer to an iio_buffer structure\n @return On success, the number of bytes read is returned\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b> Only valid for input buffers"]
3236 pub fn iio_buffer_refill(buf: *mut iio_buffer) -> isize;
3237}
3238extern "C" {
3239 #[doc = " @brief Send the samples to the hardware\n @param buf A pointer to an iio_buffer structure\n @return On success, the number of bytes written is returned\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b> Only valid for output buffers"]
3240 pub fn iio_buffer_push(buf: *mut iio_buffer) -> isize;
3241}
3242extern "C" {
3243 #[doc = " @brief Send a given number of samples to the hardware\n @param buf A pointer to an iio_buffer structure\n @param samples_count The number of samples to submit\n @return On success, the number of bytes written is returned\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b> Only valid for output buffers"]
3244 pub fn iio_buffer_push_partial(buf: *mut iio_buffer, samples_count: usize) -> isize;
3245}
3246extern "C" {
3247 #[doc = " @brief Cancel all buffer operations\n @param buf The buffer for which operations should be canceled\n\n This function cancels all outstanding buffer operations previously scheduled.\n This means any pending iio_buffer_push() or iio_buffer_refill() operation\n will abort and return immediately, any further invocations of these functions\n on the same buffer will return immediately with an error.\n\n Usually iio_buffer_push() and iio_buffer_refill() will block until either all\n data has been transferred or a timeout occurs. This can depending on the\n configuration take a significant amount of time. iio_buffer_cancel() is\n useful to bypass these conditions if the buffer operation is supposed to be\n stopped in response to an external event (e.g. user input).\n\n To be able to capture additional data after calling this function the buffer\n should be destroyed and then re-created.\n\n This function can be called multiple times for the same buffer, but all but\n the first invocation will be without additional effect.\n\n This function is thread-safe, but not signal-safe, i.e. it must not be called\n from a signal handler."]
3248 pub fn iio_buffer_cancel(buf: *mut iio_buffer);
3249}
3250extern "C" {
3251 #[doc = " @brief Get the start address of the buffer\n @param buf A pointer to an iio_buffer structure\n @return A pointer corresponding to the start address of the buffer"]
3252 pub fn iio_buffer_start(buf: *const iio_buffer) -> *mut ::std::os::raw::c_void;
3253}
3254extern "C" {
3255 #[doc = " @brief Find the first sample of a channel in a buffer\n @param buf A pointer to an iio_buffer structure\n @param chn A pointer to an iio_channel structure\n @return A pointer to the first sample found, or to the end of the buffer if\n no sample for the given channel is present in the buffer\n\n <b>NOTE:</b> This function, coupled with iio_buffer_step and iio_buffer_end,\n can be used to iterate on all the samples of a given channel present in the\n buffer, doing the following:\n\n @verbatim\nfor (void *ptr = iio_buffer_first(buffer, chn); ptr < iio_buffer_end(buffer); ptr += iio_buffer_step(buffer)) {\n....\n}\n@endverbatim"]
3256 pub fn iio_buffer_first(
3257 buf: *const iio_buffer,
3258 chn: *const iio_channel,
3259 ) -> *mut ::std::os::raw::c_void;
3260}
3261extern "C" {
3262 #[doc = " @brief Get the step size between two samples of one channel\n @param buf A pointer to an iio_buffer structure\n @return the difference between the addresses of two consecutive samples of\n one same channel"]
3263 pub fn iio_buffer_step(buf: *const iio_buffer) -> isize;
3264}
3265extern "C" {
3266 #[doc = " @brief Get the address that follows the last sample in a buffer\n @param buf A pointer to an iio_buffer structure\n @return A pointer corresponding to the address that follows the last sample\n present in the buffer"]
3267 pub fn iio_buffer_end(buf: *const iio_buffer) -> *mut ::std::os::raw::c_void;
3268}
3269extern "C" {
3270 #[doc = " @brief Call the supplied callback for each sample found in a buffer\n @param buf A pointer to an iio_buffer structure\n @param callback A pointer to a function to call for each sample found\n @param data A user-specified pointer that will be passed to the callback\n @return number of bytes processed.\n\n <b>NOTE:</b> The callback receives four arguments:\n * A pointer to the iio_channel structure corresponding to the sample,\n * A pointer to the sample itself,\n * The length of the sample in bytes,\n * The user-specified pointer passed to iio_buffer_foreach_sample."]
3271 pub fn iio_buffer_foreach_sample(
3272 buf: *mut iio_buffer,
3273 callback: ::std::option::Option<
3274 unsafe extern "C" fn(
3275 chn: *const iio_channel,
3276 src: *mut ::std::os::raw::c_void,
3277 bytes: usize,
3278 d: *mut ::std::os::raw::c_void,
3279 ) -> isize,
3280 >,
3281 data: *mut ::std::os::raw::c_void,
3282 ) -> isize;
3283}
3284extern "C" {
3285 #[doc = " @brief Associate a pointer to an iio_buffer structure\n @param buf A pointer to an iio_buffer structure\n @param data The pointer to be associated"]
3286 pub fn iio_buffer_set_data(buf: *mut iio_buffer, data: *mut ::std::os::raw::c_void);
3287}
3288extern "C" {
3289 #[doc = " @brief Retrieve a previously associated pointer of an iio_buffer structure\n @param buf A pointer to an iio_buffer structure\n @return The pointer previously associated if present, or NULL"]
3290 pub fn iio_buffer_get_data(buf: *const iio_buffer) -> *mut ::std::os::raw::c_void;
3291}
3292pub const hwmon_chan_type_HWMON_VOLTAGE: hwmon_chan_type = 0;
3293pub const hwmon_chan_type_HWMON_FAN: hwmon_chan_type = 1;
3294pub const hwmon_chan_type_HWMON_PWM: hwmon_chan_type = 2;
3295pub const hwmon_chan_type_HWMON_TEMP: hwmon_chan_type = 3;
3296pub const hwmon_chan_type_HWMON_CURRENT: hwmon_chan_type = 4;
3297pub const hwmon_chan_type_HWMON_POWER: hwmon_chan_type = 5;
3298pub const hwmon_chan_type_HWMON_ENERGY: hwmon_chan_type = 6;
3299pub const hwmon_chan_type_HWMON_HUMIDITY: hwmon_chan_type = 7;
3300pub const hwmon_chan_type_HWMON_INTRUSION: hwmon_chan_type = 8;
3301pub const hwmon_chan_type_HWMON_CHAN_TYPE_UNKNOWN: hwmon_chan_type = 2147483647;
3302#[doc = " @defgroup Hwmon Compatibility with hardware monitoring (hwmon) devices\n @{\n @enum hwmon_chan_type\n @brief Hwmon channel type\n\n Libiio support hardware-monitoring (hwmon) devices as well. This enum\n specifies the type of data associated with the hwmon channel.\n\n NOTE: as of 2021 only the current hwmon API is supported. The old\n and deprecated APIs are not supported, and won't be supported unless we\n have a case where updating a hwmon driver is not possible."]
3303pub type hwmon_chan_type = ::std::os::raw::c_uint;
3304#[doc = " @defgroup Debug Debug and low-level functions\n @{\n @struct iio_data_format\n @brief Contains the format of a data sample.\n\n The different fields inform about the correct way to convert one sample from\n its raw format (as read from / generated by the hardware) to its real-world\n value."]
3305#[repr(C)]
3306#[derive(Debug, Copy, Clone)]
3307pub struct iio_data_format {
3308 #[doc = " @brief Total length of the sample, in bits"]
3309 pub length: ::std::os::raw::c_uint,
3310 #[doc = " @brief Length of valuable data in the sample, in bits"]
3311 pub bits: ::std::os::raw::c_uint,
3312 #[doc = " @brief Right-shift to apply when converting sample"]
3313 pub shift: ::std::os::raw::c_uint,
3314 #[doc = " @brief Contains True if the sample is signed"]
3315 pub is_signed: bool,
3316 #[doc = " @brief Contains True if the sample is fully defined, sign extended, etc."]
3317 pub is_fully_defined: bool,
3318 #[doc = " @brief Contains True if the sample is in big-endian format"]
3319 pub is_be: bool,
3320 #[doc = " @brief Contains True if the sample should be scaled when converted"]
3321 pub with_scale: bool,
3322 #[doc = " @brief Contains the scale to apply if with_scale is set"]
3323 pub scale: f64,
3324 #[doc = " @brief Number of times length repeats (added in v0.8)"]
3325 pub repeat: ::std::os::raw::c_uint,
3326}
3327#[test]
3328fn bindgen_test_layout_iio_data_format() {
3329 const UNINIT: ::std::mem::MaybeUninit<iio_data_format> = ::std::mem::MaybeUninit::uninit();
3330 let ptr = UNINIT.as_ptr();
3331 assert_eq!(
3332 ::std::mem::size_of::<iio_data_format>(),
3333 32usize,
3334 concat!("Size of: ", stringify!(iio_data_format))
3335 );
3336 assert_eq!(
3337 ::std::mem::align_of::<iio_data_format>(),
3338 8usize,
3339 concat!("Alignment of ", stringify!(iio_data_format))
3340 );
3341 assert_eq!(
3342 unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize },
3343 0usize,
3344 concat!(
3345 "Offset of field: ",
3346 stringify!(iio_data_format),
3347 "::",
3348 stringify!(length)
3349 )
3350 );
3351 assert_eq!(
3352 unsafe { ::std::ptr::addr_of!((*ptr).bits) as usize - ptr as usize },
3353 4usize,
3354 concat!(
3355 "Offset of field: ",
3356 stringify!(iio_data_format),
3357 "::",
3358 stringify!(bits)
3359 )
3360 );
3361 assert_eq!(
3362 unsafe { ::std::ptr::addr_of!((*ptr).shift) as usize - ptr as usize },
3363 8usize,
3364 concat!(
3365 "Offset of field: ",
3366 stringify!(iio_data_format),
3367 "::",
3368 stringify!(shift)
3369 )
3370 );
3371 assert_eq!(
3372 unsafe { ::std::ptr::addr_of!((*ptr).is_signed) as usize - ptr as usize },
3373 12usize,
3374 concat!(
3375 "Offset of field: ",
3376 stringify!(iio_data_format),
3377 "::",
3378 stringify!(is_signed)
3379 )
3380 );
3381 assert_eq!(
3382 unsafe { ::std::ptr::addr_of!((*ptr).is_fully_defined) as usize - ptr as usize },
3383 13usize,
3384 concat!(
3385 "Offset of field: ",
3386 stringify!(iio_data_format),
3387 "::",
3388 stringify!(is_fully_defined)
3389 )
3390 );
3391 assert_eq!(
3392 unsafe { ::std::ptr::addr_of!((*ptr).is_be) as usize - ptr as usize },
3393 14usize,
3394 concat!(
3395 "Offset of field: ",
3396 stringify!(iio_data_format),
3397 "::",
3398 stringify!(is_be)
3399 )
3400 );
3401 assert_eq!(
3402 unsafe { ::std::ptr::addr_of!((*ptr).with_scale) as usize - ptr as usize },
3403 15usize,
3404 concat!(
3405 "Offset of field: ",
3406 stringify!(iio_data_format),
3407 "::",
3408 stringify!(with_scale)
3409 )
3410 );
3411 assert_eq!(
3412 unsafe { ::std::ptr::addr_of!((*ptr).scale) as usize - ptr as usize },
3413 16usize,
3414 concat!(
3415 "Offset of field: ",
3416 stringify!(iio_data_format),
3417 "::",
3418 stringify!(scale)
3419 )
3420 );
3421 assert_eq!(
3422 unsafe { ::std::ptr::addr_of!((*ptr).repeat) as usize - ptr as usize },
3423 24usize,
3424 concat!(
3425 "Offset of field: ",
3426 stringify!(iio_data_format),
3427 "::",
3428 stringify!(repeat)
3429 )
3430 );
3431}
3432extern "C" {
3433 #[doc = " @brief Get the current sample size\n @param dev A pointer to an iio_device structure\n @return On success, the sample size in bytes\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b> The sample size is not constant and will change when channels\n get enabled or disabled."]
3434 pub fn iio_device_get_sample_size(dev: *const iio_device) -> isize;
3435}
3436extern "C" {
3437 #[doc = " @brief Get the index of the given channel\n @param chn A pointer to an iio_channel structure\n @return On success, the index of the specified channel\n @return On error, a negative errno code is returned"]
3438 pub fn iio_channel_get_index(chn: *const iio_channel) -> ::std::os::raw::c_long;
3439}
3440extern "C" {
3441 #[doc = " @brief Get a pointer to a channel's data format structure\n @param chn A pointer to an iio_channel structure\n @return A pointer to the channel's iio_data_format structure"]
3442 pub fn iio_channel_get_data_format(chn: *const iio_channel) -> *const iio_data_format;
3443}
3444extern "C" {
3445 #[doc = " @brief Convert the sample from hardware format to host format\n @param chn A pointer to an iio_channel structure\n @param dst A pointer to the destination buffer where the converted sample\n should be written\n @param src A pointer to the source buffer containing the sample"]
3446 pub fn iio_channel_convert(
3447 chn: *const iio_channel,
3448 dst: *mut ::std::os::raw::c_void,
3449 src: *const ::std::os::raw::c_void,
3450 );
3451}
3452extern "C" {
3453 #[doc = " @brief Convert the sample from host format to hardware format\n @param chn A pointer to an iio_channel structure\n @param dst A pointer to the destination buffer where the converted sample\n should be written\n @param src A pointer to the source buffer containing the sample"]
3454 pub fn iio_channel_convert_inverse(
3455 chn: *const iio_channel,
3456 dst: *mut ::std::os::raw::c_void,
3457 src: *const ::std::os::raw::c_void,
3458 );
3459}
3460extern "C" {
3461 #[doc = " @brief Enumerate the debug attributes of the given device\n @param dev A pointer to an iio_device structure\n @return The number of debug attributes found"]
3462 pub fn iio_device_get_debug_attrs_count(dev: *const iio_device) -> ::std::os::raw::c_uint;
3463}
3464extern "C" {
3465 #[doc = " @brief Get the debug attribute present at the given index\n @param dev A pointer to an iio_device structure\n @param index The index corresponding to the debug attribute\n @return On success, a pointer to a static NULL-terminated string\n @return If the index is invalid, NULL is returned"]
3466 pub fn iio_device_get_debug_attr(
3467 dev: *const iio_device,
3468 index: ::std::os::raw::c_uint,
3469 ) -> *const ::std::os::raw::c_char;
3470}
3471extern "C" {
3472 #[doc = " @brief Try to find a debug attribute by its name\n @param dev A pointer to an iio_device structure\n @param name A NULL-terminated string corresponding to the name of the\n debug attribute\n @return On success, a pointer to a static NULL-terminated string\n @return If the name does not correspond to any known debug attribute of the\n given device, NULL is returned\n\n <b>NOTE:</b> This function is useful to detect the presence of a debug\n attribute.\n It can also be used to retrieve the name of a debug attribute as a pointer\n to a static string from a dynamically allocated string."]
3473 pub fn iio_device_find_debug_attr(
3474 dev: *const iio_device,
3475 name: *const ::std::os::raw::c_char,
3476 ) -> *const ::std::os::raw::c_char;
3477}
3478extern "C" {
3479 #[doc = " @brief Read the content of the given debug attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n debug attribute\n @param dst A pointer to the memory area where the NULL-terminated string\n corresponding to the value read will be stored\n @param len The available length of the memory area, in bytes\n @return On success, the number of bytes written to the buffer\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b>By passing NULL as the \"attr\" argument to\n iio_device_debug_attr_read, it is now possible to read all of the debug\n attributes of a device.\n\n The buffer is filled with one block of data per debug attribute of the\n device, by the order they appear in the iio_device structure.\n\n The first four bytes of one block correspond to a 32-bit signed value in\n network order. If negative, it corresponds to the errno code that were\n returned when reading the debug attribute; if positive, it corresponds\n to the length of the data read. In that case, the rest of the block contains\n the data."]
3480 pub fn iio_device_debug_attr_read(
3481 dev: *const iio_device,
3482 attr: *const ::std::os::raw::c_char,
3483 dst: *mut ::std::os::raw::c_char,
3484 len: usize,
3485 ) -> isize;
3486}
3487extern "C" {
3488 #[doc = " @brief Read the content of all debug attributes\n @param dev A pointer to an iio_device structure\n @param cb A pointer to a callback function\n @param data A pointer that will be passed to the callback function\n @return On success, 0 is returned\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b> This function is especially useful when used with the network\n backend, as all the debug attributes are read in one single command."]
3489 pub fn iio_device_debug_attr_read_all(
3490 dev: *mut iio_device,
3491 cb: ::std::option::Option<
3492 unsafe extern "C" fn(
3493 dev: *mut iio_device,
3494 attr: *const ::std::os::raw::c_char,
3495 value: *const ::std::os::raw::c_char,
3496 len: usize,
3497 d: *mut ::std::os::raw::c_void,
3498 ) -> ::std::os::raw::c_int,
3499 >,
3500 data: *mut ::std::os::raw::c_void,
3501 ) -> ::std::os::raw::c_int;
3502}
3503extern "C" {
3504 #[doc = " @brief Set the value of the given debug attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n debug attribute\n @param src A NULL-terminated string to set the debug attribute to\n @return On success, the number of bytes written\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b>By passing NULL as the \"attr\" argument to\n iio_device_debug_attr_write, it is now possible to write all of the\n debug attributes of a device.\n\n The buffer must contain one block of data per debug attribute of the device,\n by the order they appear in the iio_device structure.\n\n The first four bytes of one block correspond to a 32-bit signed value in\n network order. If negative, the debug attribute is not written; if positive,\n it corresponds to the length of the data to write. In that case, the rest\n of the block must contain the data."]
3505 pub fn iio_device_debug_attr_write(
3506 dev: *const iio_device,
3507 attr: *const ::std::os::raw::c_char,
3508 src: *const ::std::os::raw::c_char,
3509 ) -> isize;
3510}
3511extern "C" {
3512 #[doc = " @brief Set the value of the given debug attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n debug attribute\n @param src A pointer to the data to be written\n @param len The number of bytes that should be written\n @return On success, the number of bytes written\n @return On error, a negative errno code is returned"]
3513 pub fn iio_device_debug_attr_write_raw(
3514 dev: *const iio_device,
3515 attr: *const ::std::os::raw::c_char,
3516 src: *const ::std::os::raw::c_void,
3517 len: usize,
3518 ) -> isize;
3519}
3520extern "C" {
3521 #[doc = " @brief Set the values of all debug attributes\n @param dev A pointer to an iio_device structure\n @param cb A pointer to a callback function\n @param data A pointer that will be passed to the callback function\n @return On success, 0 is returned\n @return On error, a negative errno code is returned\n\n <b>NOTE:</b> This function is especially useful when used with the network\n backend, as all the debug attributes are written in one single command."]
3522 pub fn iio_device_debug_attr_write_all(
3523 dev: *mut iio_device,
3524 cb: ::std::option::Option<
3525 unsafe extern "C" fn(
3526 dev: *mut iio_device,
3527 attr: *const ::std::os::raw::c_char,
3528 buf: *mut ::std::os::raw::c_void,
3529 len: usize,
3530 d: *mut ::std::os::raw::c_void,
3531 ) -> isize,
3532 >,
3533 data: *mut ::std::os::raw::c_void,
3534 ) -> ::std::os::raw::c_int;
3535}
3536extern "C" {
3537 #[doc = " @brief Read the content of the given debug attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n debug attribute\n @param val A pointer to a bool variable where the value should be stored\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
3538 pub fn iio_device_debug_attr_read_bool(
3539 dev: *const iio_device,
3540 attr: *const ::std::os::raw::c_char,
3541 val: *mut bool,
3542 ) -> ::std::os::raw::c_int;
3543}
3544extern "C" {
3545 #[doc = " @brief Read the content of the given debug attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n debug attribute\n @param val A pointer to a long long variable where the value should be stored\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
3546 pub fn iio_device_debug_attr_read_longlong(
3547 dev: *const iio_device,
3548 attr: *const ::std::os::raw::c_char,
3549 val: *mut ::std::os::raw::c_longlong,
3550 ) -> ::std::os::raw::c_int;
3551}
3552extern "C" {
3553 #[doc = " @brief Read the content of the given debug attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n debug attribute\n @param val A pointer to a double variable where the value should be stored\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
3554 pub fn iio_device_debug_attr_read_double(
3555 dev: *const iio_device,
3556 attr: *const ::std::os::raw::c_char,
3557 val: *mut f64,
3558 ) -> ::std::os::raw::c_int;
3559}
3560extern "C" {
3561 #[doc = " @brief Set the value of the given debug attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n debug attribute\n @param val A bool value to set the debug attribute to\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
3562 pub fn iio_device_debug_attr_write_bool(
3563 dev: *const iio_device,
3564 attr: *const ::std::os::raw::c_char,
3565 val: bool,
3566 ) -> ::std::os::raw::c_int;
3567}
3568extern "C" {
3569 #[doc = " @brief Set the value of the given debug attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n debug attribute\n @param val A long long value to set the debug attribute to\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
3570 pub fn iio_device_debug_attr_write_longlong(
3571 dev: *const iio_device,
3572 attr: *const ::std::os::raw::c_char,
3573 val: ::std::os::raw::c_longlong,
3574 ) -> ::std::os::raw::c_int;
3575}
3576extern "C" {
3577 #[doc = " @brief Set the value of the given debug attribute\n @param dev A pointer to an iio_device structure\n @param attr A NULL-terminated string corresponding to the name of the\n debug attribute\n @param val A double value to set the debug attribute to\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
3578 pub fn iio_device_debug_attr_write_double(
3579 dev: *const iio_device,
3580 attr: *const ::std::os::raw::c_char,
3581 val: f64,
3582 ) -> ::std::os::raw::c_int;
3583}
3584extern "C" {
3585 #[doc = " @brief Identify the channel or debug attribute corresponding to a filename\n @param dev A pointer to an iio_device structure\n @param filename A NULL-terminated string corresponding to the filename\n @param chn A pointer to a pointer of an iio_channel structure. The pointed\n pointer will be set to the address of the iio_channel structure if the\n filename correspond to the attribute of a channel, or NULL otherwise.\n @param attr A pointer to a NULL-terminated string. The pointer\n pointer will be set to point to the name of the attribute corresponding to\n the filename.\n @return On success, 0 is returned, and *chn and *attr are modified.\n @return On error, a negative errno code is returned. *chn and *attr are not\n modified."]
3586 pub fn iio_device_identify_filename(
3587 dev: *const iio_device,
3588 filename: *const ::std::os::raw::c_char,
3589 chn: *mut *mut iio_channel,
3590 attr: *mut *const ::std::os::raw::c_char,
3591 ) -> ::std::os::raw::c_int;
3592}
3593extern "C" {
3594 #[doc = " @brief Set the value of a hardware register\n @param dev A pointer to an iio_device structure\n @param address The address of the register\n @param value The value to set the register to\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
3595 pub fn iio_device_reg_write(
3596 dev: *mut iio_device,
3597 address: u32,
3598 value: u32,
3599 ) -> ::std::os::raw::c_int;
3600}
3601extern "C" {
3602 #[doc = " @brief Get the value of a hardware register\n @param dev A pointer to an iio_device structure\n @param address The address of the register\n @param value A pointer to the variable where the value will be written\n @return On success, 0 is returned\n @return On error, a negative errno code is returned"]
3603 pub fn iio_device_reg_read(
3604 dev: *mut iio_device,
3605 address: u32,
3606 value: *mut u32,
3607 ) -> ::std::os::raw::c_int;
3608}