1 #[inline]
creat64(path: *const ::c_char, mode: ::mode_t) -> ::c_int2 pub unsafe extern "C" fn creat64(path: *const ::c_char, mode: ::mode_t) -> ::c_int {
3 ::creat(path, mode)
4 }
5
6 #[inline]
fallocate64( fd: ::c_int, mode: ::c_int, offset: ::off64_t, len: ::off64_t, ) -> ::c_int7 pub unsafe extern "C" fn fallocate64(
8 fd: ::c_int,
9 mode: ::c_int,
10 offset: ::off64_t,
11 len: ::off64_t,
12 ) -> ::c_int {
13 ::fallocate(fd, mode, offset, len)
14 }
15
16 #[inline]
fgetpos64(stream: *mut ::FILE, pos: *mut ::fpos64_t) -> ::c_int17 pub unsafe extern "C" fn fgetpos64(stream: *mut ::FILE, pos: *mut ::fpos64_t) -> ::c_int {
18 ::fgetpos(stream, pos as *mut _)
19 }
20
21 #[inline]
fopen64(pathname: *const ::c_char, mode: *const ::c_char) -> *mut ::FILE22 pub unsafe extern "C" fn fopen64(pathname: *const ::c_char, mode: *const ::c_char) -> *mut ::FILE {
23 ::fopen(pathname, mode)
24 }
25
26 #[inline]
freopen64( pathname: *const ::c_char, mode: *const ::c_char, stream: *mut ::FILE, ) -> *mut ::FILE27 pub unsafe extern "C" fn freopen64(
28 pathname: *const ::c_char,
29 mode: *const ::c_char,
30 stream: *mut ::FILE,
31 ) -> *mut ::FILE {
32 ::freopen(pathname, mode, stream)
33 }
34
35 #[inline]
fseeko64( stream: *mut ::FILE, offset: ::off64_t, whence: ::c_int, ) -> ::c_int36 pub unsafe extern "C" fn fseeko64(
37 stream: *mut ::FILE,
38 offset: ::off64_t,
39 whence: ::c_int,
40 ) -> ::c_int {
41 ::fseeko(stream, offset, whence)
42 }
43
44 #[inline]
fsetpos64(stream: *mut ::FILE, pos: *const ::fpos64_t) -> ::c_int45 pub unsafe extern "C" fn fsetpos64(stream: *mut ::FILE, pos: *const ::fpos64_t) -> ::c_int {
46 ::fsetpos(stream, pos as *mut _)
47 }
48
49 #[inline]
fstat64(fildes: ::c_int, buf: *mut ::stat64) -> ::c_int50 pub unsafe extern "C" fn fstat64(fildes: ::c_int, buf: *mut ::stat64) -> ::c_int {
51 ::fstat(fildes, buf as *mut _)
52 }
53
54 #[inline]
fstatat64( fd: ::c_int, path: *const ::c_char, buf: *mut ::stat64, flag: ::c_int, ) -> ::c_int55 pub unsafe extern "C" fn fstatat64(
56 fd: ::c_int,
57 path: *const ::c_char,
58 buf: *mut ::stat64,
59 flag: ::c_int,
60 ) -> ::c_int {
61 ::fstatat(fd, path, buf as *mut _, flag)
62 }
63
64 #[inline]
fstatfs64(fd: ::c_int, buf: *mut ::statfs64) -> ::c_int65 pub unsafe extern "C" fn fstatfs64(fd: ::c_int, buf: *mut ::statfs64) -> ::c_int {
66 ::fstatfs(fd, buf as *mut _)
67 }
68
69 #[inline]
fstatvfs64(fd: ::c_int, buf: *mut ::statvfs64) -> ::c_int70 pub unsafe extern "C" fn fstatvfs64(fd: ::c_int, buf: *mut ::statvfs64) -> ::c_int {
71 ::fstatvfs(fd, buf as *mut _)
72 }
73
74 #[inline]
ftello64(stream: *mut ::FILE) -> ::off64_t75 pub unsafe extern "C" fn ftello64(stream: *mut ::FILE) -> ::off64_t {
76 ::ftello(stream)
77 }
78
79 #[inline]
ftruncate64(fd: ::c_int, length: ::off64_t) -> ::c_int80 pub unsafe extern "C" fn ftruncate64(fd: ::c_int, length: ::off64_t) -> ::c_int {
81 ::ftruncate(fd, length)
82 }
83
84 #[inline]
getrlimit64(resource: ::c_int, rlim: *mut ::rlimit64) -> ::c_int85 pub unsafe extern "C" fn getrlimit64(resource: ::c_int, rlim: *mut ::rlimit64) -> ::c_int {
86 ::getrlimit(resource, rlim as *mut _)
87 }
88
89 #[inline]
lseek64(fd: ::c_int, offset: ::off64_t, whence: ::c_int) -> ::off64_t90 pub unsafe extern "C" fn lseek64(fd: ::c_int, offset: ::off64_t, whence: ::c_int) -> ::off64_t {
91 ::lseek(fd, offset, whence)
92 }
93
94 #[inline]
lstat64(path: *const ::c_char, buf: *mut ::stat64) -> ::c_int95 pub unsafe extern "C" fn lstat64(path: *const ::c_char, buf: *mut ::stat64) -> ::c_int {
96 ::lstat(path, buf as *mut _)
97 }
98
99 #[inline]
mmap64( addr: *mut ::c_void, length: ::size_t, prot: ::c_int, flags: ::c_int, fd: ::c_int, offset: ::off64_t, ) -> *mut ::c_void100 pub unsafe extern "C" fn mmap64(
101 addr: *mut ::c_void,
102 length: ::size_t,
103 prot: ::c_int,
104 flags: ::c_int,
105 fd: ::c_int,
106 offset: ::off64_t,
107 ) -> *mut ::c_void {
108 ::mmap(addr, length, prot, flags, fd, offset)
109 }
110
111 // These functions are variadic in the C ABI since the `mode` argument is "optional". Variadic
112 // `extern "C"` functions are unstable in Rust so we cannot write a shim function for these
113 // entrypoints. See https://github.com/rust-lang/rust/issues/44930.
114 //
115 // These aliases are mostly fine though, neither function takes a LFS64-namespaced type as an
116 // argument, nor do their names clash with any declared types.
117 pub use open as open64;
118 pub use openat as openat64;
119
120 #[inline]
posix_fadvise64( fd: ::c_int, offset: ::off64_t, len: ::off64_t, advice: ::c_int, ) -> ::c_int121 pub unsafe extern "C" fn posix_fadvise64(
122 fd: ::c_int,
123 offset: ::off64_t,
124 len: ::off64_t,
125 advice: ::c_int,
126 ) -> ::c_int {
127 ::posix_fadvise(fd, offset, len, advice)
128 }
129
130 #[inline]
posix_fallocate64( fd: ::c_int, offset: ::off64_t, len: ::off64_t, ) -> ::c_int131 pub unsafe extern "C" fn posix_fallocate64(
132 fd: ::c_int,
133 offset: ::off64_t,
134 len: ::off64_t,
135 ) -> ::c_int {
136 ::posix_fallocate(fd, offset, len)
137 }
138
139 #[inline]
pread64( fd: ::c_int, buf: *mut ::c_void, count: ::size_t, offset: ::off64_t, ) -> ::ssize_t140 pub unsafe extern "C" fn pread64(
141 fd: ::c_int,
142 buf: *mut ::c_void,
143 count: ::size_t,
144 offset: ::off64_t,
145 ) -> ::ssize_t {
146 ::pread(fd, buf, count, offset)
147 }
148
149 #[inline]
preadv64( fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off64_t, ) -> ::ssize_t150 pub unsafe extern "C" fn preadv64(
151 fd: ::c_int,
152 iov: *const ::iovec,
153 iovcnt: ::c_int,
154 offset: ::off64_t,
155 ) -> ::ssize_t {
156 ::preadv(fd, iov, iovcnt, offset)
157 }
158
159 #[inline]
prlimit64( pid: ::pid_t, resource: ::c_int, new_limit: *const ::rlimit64, old_limit: *mut ::rlimit64, ) -> ::c_int160 pub unsafe extern "C" fn prlimit64(
161 pid: ::pid_t,
162 resource: ::c_int,
163 new_limit: *const ::rlimit64,
164 old_limit: *mut ::rlimit64,
165 ) -> ::c_int {
166 ::prlimit(pid, resource, new_limit as *mut _, old_limit as *mut _)
167 }
168
169 #[inline]
pwrite64( fd: ::c_int, buf: *const ::c_void, count: ::size_t, offset: ::off64_t, ) -> ::ssize_t170 pub unsafe extern "C" fn pwrite64(
171 fd: ::c_int,
172 buf: *const ::c_void,
173 count: ::size_t,
174 offset: ::off64_t,
175 ) -> ::ssize_t {
176 ::pwrite(fd, buf, count, offset)
177 }
178
179 #[inline]
pwritev64( fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off64_t, ) -> ::ssize_t180 pub unsafe extern "C" fn pwritev64(
181 fd: ::c_int,
182 iov: *const ::iovec,
183 iovcnt: ::c_int,
184 offset: ::off64_t,
185 ) -> ::ssize_t {
186 ::pwritev(fd, iov, iovcnt, offset)
187 }
188
189 #[inline]
readdir64(dirp: *mut ::DIR) -> *mut ::dirent64190 pub unsafe extern "C" fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64 {
191 ::readdir(dirp) as *mut _
192 }
193
194 #[inline]
readdir64_r( dirp: *mut ::DIR, entry: *mut ::dirent64, result: *mut *mut ::dirent64, ) -> ::c_int195 pub unsafe extern "C" fn readdir64_r(
196 dirp: *mut ::DIR,
197 entry: *mut ::dirent64,
198 result: *mut *mut ::dirent64,
199 ) -> ::c_int {
200 ::readdir_r(dirp, entry as *mut _, result as *mut _)
201 }
202
203 #[inline]
sendfile64( out_fd: ::c_int, in_fd: ::c_int, offset: *mut ::off64_t, count: ::size_t, ) -> ::ssize_t204 pub unsafe extern "C" fn sendfile64(
205 out_fd: ::c_int,
206 in_fd: ::c_int,
207 offset: *mut ::off64_t,
208 count: ::size_t,
209 ) -> ::ssize_t {
210 ::sendfile(out_fd, in_fd, offset, count)
211 }
212
213 #[inline]
setrlimit64(resource: ::c_int, rlim: *const ::rlimit64) -> ::c_int214 pub unsafe extern "C" fn setrlimit64(resource: ::c_int, rlim: *const ::rlimit64) -> ::c_int {
215 ::setrlimit(resource, rlim as *mut _)
216 }
217
218 #[inline]
stat64(pathname: *const ::c_char, statbuf: *mut ::stat64) -> ::c_int219 pub unsafe extern "C" fn stat64(pathname: *const ::c_char, statbuf: *mut ::stat64) -> ::c_int {
220 ::stat(pathname, statbuf as *mut _)
221 }
222
223 #[inline]
statfs64(pathname: *const ::c_char, buf: *mut ::statfs64) -> ::c_int224 pub unsafe extern "C" fn statfs64(pathname: *const ::c_char, buf: *mut ::statfs64) -> ::c_int {
225 ::statfs(pathname, buf as *mut _)
226 }
227
228 #[inline]
statvfs64(path: *const ::c_char, buf: *mut ::statvfs64) -> ::c_int229 pub unsafe extern "C" fn statvfs64(path: *const ::c_char, buf: *mut ::statvfs64) -> ::c_int {
230 ::statvfs(path, buf as *mut _)
231 }
232
233 #[inline]
tmpfile64() -> *mut ::FILE234 pub unsafe extern "C" fn tmpfile64() -> *mut ::FILE {
235 ::tmpfile()
236 }
237
238 #[inline]
truncate64(path: *const ::c_char, length: ::off64_t) -> ::c_int239 pub unsafe extern "C" fn truncate64(path: *const ::c_char, length: ::off64_t) -> ::c_int {
240 ::truncate(path, length)
241 }
242