]>
git.proxmox.com Git - rustc.git/blob - vendor/libc/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs
1 // APIs that changed in FreeBSD12
3 pub type nlink_t
= u64;
5 pub type ino_t
= ::c_ulong
;
6 pub type shmatt_t
= ::c_uint
;
10 pub shm_perm
: ::ipc_perm
,
11 pub shm_segsz
: ::size_t
,
12 pub shm_lpid
: ::pid_t
,
13 pub shm_cpid
: ::pid_t
,
14 pub shm_nattch
: ::shmatt_t
,
15 pub shm_atime
: ::time_t
,
16 pub shm_dtime
: ::time_t
,
17 pub shm_ctime
: ::time_t
,
21 pub ident
: ::uintptr_t
,
22 pub filter
: ::c_short
,
23 pub flags
: ::c_ushort
,
26 pub udata
: *mut ::c_void
,
33 pub d_fileno
: ::ino_t
,
40 pub d_name
: [::c_char
; 256],
54 pub f_syncwrites
: u64,
55 pub f_asyncwrites
: u64,
57 pub f_asyncreads
: u64,
62 f_charspare
: [::c_char
; 80],
63 pub f_fstypename
: [::c_char
; 16],
64 pub f_mntfromname
: [::c_char
; 1024],
65 pub f_mntonname
: [::c_char
; 1024],
70 if #[cfg(feature = "extra_traits")] {
71 impl PartialEq
for statfs
{
72 fn eq(&self, other
: &statfs
) -> bool
{
73 self.f_version
== other
.f_version
74 && self.f_type
== other
.f_type
75 && self.f_flags
== other
.f_flags
76 && self.f_bsize
== other
.f_bsize
77 && self.f_iosize
== other
.f_iosize
78 && self.f_blocks
== other
.f_blocks
79 && self.f_bfree
== other
.f_bfree
80 && self.f_bavail
== other
.f_bavail
81 && self.f_files
== other
.f_files
82 && self.f_ffree
== other
.f_ffree
83 && self.f_syncwrites
== other
.f_syncwrites
84 && self.f_asyncwrites
== other
.f_asyncwrites
85 && self.f_syncreads
== other
.f_syncreads
86 && self.f_asyncreads
== other
.f_asyncreads
87 && self.f_namemax
== other
.f_namemax
88 && self.f_owner
== other
.f_owner
89 && self.f_fsid
== other
.f_fsid
90 && self.f_fstypename
== other
.f_fstypename
94 .zip(other
.f_mntfromname
.iter())
99 .zip(other
.f_mntonname
.iter())
103 impl Eq
for statfs {}
104 impl ::fmt
::Debug
for statfs
{
105 fn fmt(&self, f
: &mut ::fmt
::Formatter
) -> ::fmt
::Result
{
106 f
.debug_struct("statfs")
107 .field("f_bsize", &self.f_bsize
)
108 .field("f_iosize", &self.f_iosize
)
109 .field("f_blocks", &self.f_blocks
)
110 .field("f_bfree", &self.f_bfree
)
111 .field("f_bavail", &self.f_bavail
)
112 .field("f_files", &self.f_files
)
113 .field("f_ffree", &self.f_ffree
)
114 .field("f_syncwrites", &self.f_syncwrites
)
115 .field("f_asyncwrites", &self.f_asyncwrites
)
116 .field("f_syncreads", &self.f_syncreads
)
117 .field("f_asyncreads", &self.f_asyncreads
)
118 .field("f_namemax", &self.f_namemax
)
119 .field("f_owner", &self.f_owner
)
120 .field("f_fsid", &self.f_fsid
)
121 .field("f_fstypename", &self.f_fstypename
)
122 .field("f_mntfromname", &&self.f_mntfromname
[..])
123 .field("f_mntonname", &&self.f_mntonname
[..])
127 impl ::hash
::Hash
for statfs
{
128 fn hash
<H
: ::hash
::Hasher
>(&self, state
: &mut H
) {
129 self.f_version
.hash(state
);
130 self.f_type
.hash(state
);
131 self.f_flags
.hash(state
);
132 self.f_bsize
.hash(state
);
133 self.f_iosize
.hash(state
);
134 self.f_blocks
.hash(state
);
135 self.f_bfree
.hash(state
);
136 self.f_bavail
.hash(state
);
137 self.f_files
.hash(state
);
138 self.f_ffree
.hash(state
);
139 self.f_syncwrites
.hash(state
);
140 self.f_asyncwrites
.hash(state
);
141 self.f_syncreads
.hash(state
);
142 self.f_asyncreads
.hash(state
);
143 self.f_namemax
.hash(state
);
144 self.f_owner
.hash(state
);
145 self.f_fsid
.hash(state
);
146 self.f_charspare
.hash(state
);
147 self.f_fstypename
.hash(state
);
148 self.f_mntfromname
.hash(state
);
149 self.f_mntonname
.hash(state
);
153 impl PartialEq
for dirent
{
154 fn eq(&self, other
: &dirent
) -> bool
{
155 self.d_fileno
== other
.d_fileno
156 && self.d_off
== other
.d_off
157 && self.d_reclen
== other
.d_reclen
158 && self.d_type
== other
.d_type
159 && self.d_namlen
== other
.d_namlen
161 .d_name
[..self.d_namlen
as _
]
163 .zip(other
.d_name
.iter())
167 impl Eq
for dirent {}
168 impl ::fmt
::Debug
for dirent
{
169 fn fmt(&self, f
: &mut ::fmt
::Formatter
) -> ::fmt
::Result
{
170 f
.debug_struct("dirent")
171 .field("d_fileno", &self.d_fileno
)
172 .field("d_off", &self.d_off
)
173 .field("d_reclen", &self.d_reclen
)
174 .field("d_type", &self.d_type
)
175 .field("d_namlen", &self.d_namlen
)
176 .field("d_name", &&self.d_name
[..self.d_namlen
as _
])
180 impl ::hash
::Hash
for dirent
{
181 fn hash
<H
: ::hash
::Hasher
>(&self, state
: &mut H
) {
182 self.d_fileno
.hash(state
);
183 self.d_off
.hash(state
);
184 self.d_reclen
.hash(state
);
185 self.d_type
.hash(state
);
186 self.d_namlen
.hash(state
);
187 self.d_name
[..self.d_namlen
as _
].hash(state
);
194 if #[cfg(not(freebsd13))] {
195 pub const ELAST
: ::c_int
= 96;
197 pub const EINTEGRITY
: ::c_int
= 97;
198 pub const ELAST
: ::c_int
= 97;
204 pub fn mprotect(addr
: *mut ::c_void
, len
: ::size_t
, prot
: ::c_int
)
206 pub fn freelocale(loc
: ::locale_t
);
207 pub fn msgrcv(msqid
: ::c_int
, msgp
: *mut ::c_void
, msgsz
: ::size_t
,
208 msgtyp
: ::c_long
, msgflg
: ::c_int
) -> ::ssize_t
;
212 if #[cfg(target_arch = "x86_64")] {
214 pub use self::x86_64
::*;