1
2
3
/* automatically generated by rust-bindgen */

pub const _DIRENT_H : u32 = 1 ; pub const _FEATURES_H : u32 = 1 ; pub const _DEFAULT_SOURCE : u32 = 1 ; pub const __USE_ISOC11 : u32 = 1 ; pub const __USE_ISOC99 : u32 = 1 ; pub const __USE_ISOC95 : u32 = 1 ; pub const __USE_POSIX_IMPLICITLY : u32 = 1 ; pub const _POSIX_SOURCE : u32 = 1 ; pub const _POSIX_C_SOURCE : u32 = 200809 ; pub const __USE_POSIX : u32 = 1 ; pub const __USE_POSIX2 : u32 = 1 ; pub const __USE_POSIX199309 : u32 = 1 ; pub const __USE_POSIX199506 : u32 = 1 ; pub const __USE_XOPEN2K : u32 = 1 ; pub const __USE_XOPEN2K8 : u32 = 1 ; pub const _ATFILE_SOURCE : u32 = 1 ; pub const __USE_MISC : u32 = 1 ; pub const __USE_ATFILE : u32 = 1 ; pub const __USE_FORTIFY_LEVEL : u32 = 0 ; pub const _STDC_PREDEF_H : u32 = 1 ; pub const __STDC_IEC_559__ : u32 = 1 ; pub const __STDC_IEC_559_COMPLEX__ : u32 = 1 ; pub const __STDC_ISO_10646__ : u32 = 201605 ; pub const __STDC_NO_THREADS__ : u32 = 1 ; pub const __GNU_LIBRARY__ : u32 = 6 ; pub const __GLIBC__ : u32 = 2 ; pub const __GLIBC_MINOR__ : u32 = 24 ; pub const _SYS_CDEFS_H : u32 = 1 ; pub const __WORDSIZE : u32 = 64 ; pub const __WORDSIZE_TIME64_COMPAT32 : u32 = 1 ; pub const __SYSCALL_WORDSIZE : u32 = 64 ; pub const _BITS_TYPES_H : u32 = 1 ; pub const _BITS_TYPESIZES_H : u32 = 1 ; pub const __OFF_T_MATCHES_OFF64_T : u32 = 1 ; pub const __INO_T_MATCHES_INO64_T : u32 = 1 ; pub const __FD_SETSIZE : u32 = 1024 ; pub const _DIRENT_MATCHES_DIRENT64 : u32 = 1 ; pub const _BITS_POSIX1_LIM_H : u32 = 1 ; pub const _POSIX_AIO_LISTIO_MAX : u32 = 2 ; pub const _POSIX_AIO_MAX : u32 = 1 ; pub const _POSIX_ARG_MAX : u32 = 4096 ; pub const _POSIX_CHILD_MAX : u32 = 25 ; pub const _POSIX_DELAYTIMER_MAX : u32 = 32 ; pub const _POSIX_HOST_NAME_MAX : u32 = 255 ; pub const _POSIX_LINK_MAX : u32 = 8 ; pub const _POSIX_LOGIN_NAME_MAX : u32 = 9 ; pub const _POSIX_MAX_CANON : u32 = 255 ; pub const _POSIX_MAX_INPUT : u32 = 255 ; pub const _POSIX_MQ_OPEN_MAX : u32 = 8 ; pub const _POSIX_MQ_PRIO_MAX : u32 = 32 ; pub const _POSIX_NAME_MAX : u32 = 14 ; pub const _POSIX_NGROUPS_MAX : u32 = 8 ; pub const _POSIX_OPEN_MAX : u32 = 20 ; pub const _POSIX_PATH_MAX : u32 = 256 ; pub const _POSIX_PIPE_BUF : u32 = 512 ; pub const _POSIX_RE_DUP_MAX : u32 = 255 ; pub const _POSIX_RTSIG_MAX : u32 = 8 ; pub const _POSIX_SEM_NSEMS_MAX : u32 = 256 ; pub const _POSIX_SEM_VALUE_MAX : u32 = 32767 ; pub const _POSIX_SIGQUEUE_MAX : u32 = 32 ; pub const _POSIX_SSIZE_MAX : u32 = 32767 ; pub const _POSIX_STREAM_MAX : u32 = 8 ; pub const _POSIX_SYMLINK_MAX : u32 = 255 ; pub const _POSIX_SYMLOOP_MAX : u32 = 8 ; pub const _POSIX_TIMER_MAX : u32 = 32 ; pub const _POSIX_TTY_NAME_MAX : u32 = 9 ; pub const _POSIX_TZNAME_MAX : u32 = 6 ; pub const _POSIX_CLOCKRES_MIN : u32 = 20000000 ; pub const NR_OPEN : u32 = 1024 ; pub const NGROUPS_MAX : u32 = 65536 ; pub const ARG_MAX : u32 = 131072 ; pub const LINK_MAX : u32 = 127 ; pub const MAX_CANON : u32 = 255 ; pub const MAX_INPUT : u32 = 255 ; pub const NAME_MAX : u32 = 255 ; pub const PATH_MAX : u32 = 4096 ; pub const PIPE_BUF : u32 = 4096 ; pub const XATTR_NAME_MAX : u32 = 255 ; pub const XATTR_SIZE_MAX : u32 = 65536 ; pub const XATTR_LIST_MAX : u32 = 65536 ; pub const RTSIG_MAX : u32 = 32 ; pub const _POSIX_THREAD_KEYS_MAX : u32 = 128 ; pub const PTHREAD_KEYS_MAX : u32 = 1024 ; pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS : u32 = 4 ; pub const PTHREAD_DESTRUCTOR_ITERATIONS : u32 = 4 ; pub const _POSIX_THREAD_THREADS_MAX : u32 = 64 ; pub const AIO_PRIO_DELTA_MAX : u32 = 20 ; pub const PTHREAD_STACK_MIN : u32 = 16384 ; pub const DELAYTIMER_MAX : u32 = 2147483647 ; pub const TTY_NAME_MAX : u32 = 32 ; pub const LOGIN_NAME_MAX : u32 = 256 ; pub const HOST_NAME_MAX : u32 = 64 ; pub const MQ_PRIO_MAX : u32 = 32768 ; pub const SEM_VALUE_MAX : u32 = 2147483647 ; pub const MAXNAMLEN : u32 = 255 ; pub type __u_char = :: std :: os :: raw :: c_uchar ; pub type __u_short = :: std :: os :: raw :: c_ushort ; pub type __u_int = :: std :: os :: raw :: c_uint ; pub type __u_long = :: std :: os :: raw :: c_ulong ; pub type __int8_t = :: std :: os :: raw :: c_schar ; pub type __uint8_t = :: std :: os :: raw :: c_uchar ; pub type __int16_t = :: std :: os :: raw :: c_short ; pub type __uint16_t = :: std :: os :: raw :: c_ushort ; pub type __int32_t = :: std :: os :: raw :: c_int ; pub type __uint32_t = :: std :: os :: raw :: c_uint ; pub type __int64_t = :: std :: os :: raw :: c_long ; pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __quad_t = :: std :: os :: raw :: c_long ; pub type __u_quad_t = :: std :: os :: raw :: c_ulong ; pub type __dev_t = :: std :: os :: raw :: c_ulong ; pub type __uid_t = :: std :: os :: raw :: c_uint ; pub type __gid_t = :: std :: os :: raw :: c_uint ; pub type __ino_t = :: std :: os :: raw :: c_ulong ; pub type __ino64_t = :: std :: os :: raw :: c_ulong ; pub type __mode_t = :: std :: os :: raw :: c_uint ; pub type __nlink_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __pid_t = :: std :: os :: raw :: c_int ; # [ repr ( C ) ] # [ derive ( Debug , Default , Copy , Clone , Hash , PartialOrd , Ord , PartialEq , Eq ) ] pub struct __fsid_t { pub __val : [ :: std :: os :: raw :: c_int ; 2usize ] , } # [ test ] fn bindgen_test_layout___fsid_t ( ) { assert_eq ! ( :: std :: mem :: size_of :: < __fsid_t > ( ) , 8usize , concat ! ( "Size of: " , stringify ! ( __fsid_t ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < __fsid_t > ( ) , 4usize , concat ! ( "Alignment of " , stringify ! ( __fsid_t ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < __fsid_t > ( ) ) ) . __val as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( __fsid_t ) , "::" , stringify ! ( __val ) ) ) ; } pub type __clock_t = :: std :: os :: raw :: c_long ; pub type __rlim_t = :: std :: os :: raw :: c_ulong ; pub type __rlim64_t = :: std :: os :: raw :: c_ulong ; pub type __id_t = :: std :: os :: raw :: c_uint ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type __useconds_t = :: std :: os :: raw :: c_uint ; pub type __suseconds_t = :: std :: os :: raw :: c_long ; pub type __daddr_t = :: std :: os :: raw :: c_int ; pub type __key_t = :: std :: os :: raw :: c_int ; pub type __clockid_t = :: std :: os :: raw :: c_int ; pub type __timer_t = * mut :: std :: os :: raw :: c_void ; pub type __blksize_t = :: std :: os :: raw :: c_long ; pub type __blkcnt_t = :: std :: os :: raw :: c_long ; pub type __blkcnt64_t = :: std :: os :: raw :: c_long ; pub type __fsblkcnt_t = :: std :: os :: raw :: c_ulong ; pub type __fsblkcnt64_t = :: std :: os :: raw :: c_ulong ; pub type __fsfilcnt_t = :: std :: os :: raw :: c_ulong ; pub type __fsfilcnt64_t = :: std :: os :: raw :: c_ulong ; pub type __fsword_t = :: std :: os :: raw :: c_long ; pub type __ssize_t = :: std :: os :: raw :: c_long ; pub type __syscall_slong_t = :: std :: os :: raw :: c_long ; pub type __syscall_ulong_t = :: std :: os :: raw :: c_ulong ; pub type __loff_t = __off64_t ; pub type __qaddr_t = * mut __quad_t ; pub type __caddr_t = * mut :: std :: os :: raw :: c_char ; pub type __intptr_t = :: std :: os :: raw :: c_long ; pub type __socklen_t = :: std :: os :: raw :: c_uint ; # [ repr ( C ) ] # [ derive ( Copy , Clone ) ] pub struct dirent { pub d_ino : __ino_t , pub d_off : __off_t , pub d_reclen : :: std :: os :: raw :: c_ushort , pub d_type : :: std :: os :: raw :: c_uchar , pub d_name : [ :: std :: os :: raw :: c_char ; 256usize ] , } # [ test ] fn bindgen_test_layout_dirent ( ) { assert_eq ! ( :: std :: mem :: size_of :: < dirent > ( ) , 280usize , concat ! ( "Size of: " , stringify ! ( dirent ) ) ) ; assert_eq ! ( :: std :: mem :: align_of :: < dirent > ( ) , 8usize , concat ! ( "Alignment of " , stringify ! ( dirent ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < dirent > ( ) ) ) . d_ino as * const _ as usize } , 0usize , concat ! ( "Offset of field: " , stringify ! ( dirent ) , "::" , stringify ! ( d_ino ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < dirent > ( ) ) ) . d_off as * const _ as usize } , 8usize , concat ! ( "Offset of field: " , stringify ! ( dirent ) , "::" , stringify ! ( d_off ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < dirent > ( ) ) ) . d_reclen as * const _ as usize } , 16usize , concat ! ( "Offset of field: " , stringify ! ( dirent ) , "::" , stringify ! ( d_reclen ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < dirent > ( ) ) ) . d_type as * const _ as usize } , 18usize , concat ! ( "Offset of field: " , stringify ! ( dirent ) , "::" , stringify ! ( d_type ) ) ) ; assert_eq ! ( unsafe { & ( * ( :: std :: ptr :: null :: < dirent > ( ) ) ) . d_name as * const _ as usize } , 19usize , concat ! ( "Offset of field: " , stringify ! ( dirent ) , "::" , stringify ! ( d_name ) ) ) ; } impl Default for dirent { fn default ( ) -> Self { unsafe { :: std :: mem :: zeroed ( ) } } } impl :: std :: fmt :: Debug for dirent { fn fmt ( & self , f : & mut :: std :: fmt :: Formatter ) -> :: std :: fmt :: Result { write ! ( f , "dirent {{ d_ino: {:?}, d_off: {:?}, d_reclen: {:?}, d_type: {:?}, d_name: [{}] }}" , self . d_ino , self . d_off , self . d_reclen , self . d_type , self . d_name . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) ) } } impl :: std :: cmp :: PartialEq for dirent { fn eq ( & self , other : & dirent ) -> bool { self . d_ino == other . d_ino && self . d_off == other . d_off && self . d_reclen == other . d_reclen && self . d_type == other . d_type && & self . d_name [ .. ] == & other . d_name [ .. ] } } pub const DT_UNKNOWN : _bindgen_ty_1 = 0 ; pub const DT_FIFO : _bindgen_ty_1 = 1 ; pub const DT_CHR : _bindgen_ty_1 = 2 ; pub const DT_DIR : _bindgen_ty_1 = 4 ; pub const DT_BLK : _bindgen_ty_1 = 6 ; pub const DT_REG : _bindgen_ty_1 = 8 ; pub const DT_LNK : _bindgen_ty_1 = 10 ; pub const DT_SOCK : _bindgen_ty_1 = 12 ; pub const DT_WHT : _bindgen_ty_1 = 14 ; pub type _bindgen_ty_1 = u32 ; # [ repr ( C ) ] # [ derive ( Debug , Copy , Clone ) ] pub struct __dirstream { _unused : [ u8 ; 0 ] , } pub type DIR = __dirstream ; extern "C" { pub fn opendir ( __name : * const :: std :: os :: raw :: c_char ) -> * mut DIR ; } extern "C" { pub fn fdopendir ( __fd : :: std :: os :: raw :: c_int ) -> * mut DIR ; } extern "C" { pub fn closedir ( __dirp : * mut DIR ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn readdir ( __dirp : * mut DIR ) -> * mut dirent ; } extern "C" { pub fn readdir_r ( __dirp : * mut DIR , __entry : * mut dirent , __result : * mut * mut dirent ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn rewinddir ( __dirp : * mut DIR ) ; } extern "C" { pub fn seekdir ( __dirp : * mut DIR , __pos : :: std :: os :: raw :: c_long ) ; } extern "C" { pub fn telldir ( __dirp : * mut DIR ) -> :: std :: os :: raw :: c_long ; } extern "C" { pub fn dirfd ( __dirp : * mut DIR ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn scandir ( __dir : * const :: std :: os :: raw :: c_char , __namelist : * mut * mut * mut dirent , __selector : :: std :: option :: Option < unsafe extern "C" fn ( arg1 : * const dirent ) -> :: std :: os :: raw :: c_int > , __cmp : :: std :: option :: Option < unsafe extern "C" fn ( arg1 : * mut * const dirent , arg2 : * mut * const dirent ) -> :: std :: os :: raw :: c_int > ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn alphasort ( __e1 : * mut * const dirent , __e2 : * mut * const dirent ) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn getdirentries ( __fd : :: std :: os :: raw :: c_int , __buf : * mut :: std :: os :: raw :: c_char , __nbytes : usize , __basep : * mut __off_t ) -> __ssize_t ; }