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