Skip to content

Commit

Permalink
Don't be too enthusiastic
Browse files Browse the repository at this point in the history
  • Loading branch information
bossmc committed May 28, 2023
1 parent 65338d5 commit 04f8a60
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions src/unix/linux_like/linux/musl/lfs64.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#[inline(always)]
#[inline]
pub unsafe extern "C" fn creat64(path: *const ::c_char, mode: ::mode_t) -> ::c_int {
::creat(path, mode)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn fallocate64(
fd: ::c_int,
mode: ::c_int,
Expand All @@ -13,17 +13,17 @@ pub unsafe extern "C" fn fallocate64(
::fallocate(fd, mode, offset, len)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn fgetpos64(stream: *mut ::FILE, pos: *mut ::fpos64_t) -> ::c_int {
::fgetpos(stream, pos.cast())
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn fopen64(pathname: *const ::c_char, mode: *const ::c_char) -> *mut ::FILE {
::fopen(pathname, mode)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn freopen64(
pathname: *const ::c_char,
mode: *const ::c_char,
Expand All @@ -32,7 +32,7 @@ pub unsafe extern "C" fn freopen64(
::freopen(pathname, mode, stream)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn fseeko64(
stream: *mut ::FILE,
offset: ::off64_t,
Expand All @@ -41,17 +41,17 @@ pub unsafe extern "C" fn fseeko64(
::fseeko(stream, offset, whence)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn fsetpos64(stream: *mut ::FILE, pos: *const ::fpos64_t) -> ::c_int {
::fsetpos(stream, pos.cast())
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn fstat64(fildes: ::c_int, buf: *mut ::stat64) -> ::c_int {
::fstat(fildes, buf.cast())
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn fstatat64(
fd: ::c_int,
path: *const ::c_char,
Expand All @@ -61,42 +61,42 @@ pub unsafe extern "C" fn fstatat64(
::fstatat(fd, path, buf.cast(), flag)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn fstatfs64(fd: ::c_int, buf: *mut ::statfs64) -> ::c_int {
::fstatfs(fd, buf.cast())
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn fstatvfs64(fd: ::c_int, buf: *mut ::statvfs64) -> ::c_int {
::fstatvfs(fd, buf.cast())
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn ftello64(stream: *mut ::FILE) -> ::off64_t {
::ftello(stream)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn ftruncate64(fd: ::c_int, length: ::off64_t) -> ::c_int {
::ftruncate(fd, length)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn getrlimit64(resource: ::c_int, rlim: *mut ::rlimit64) -> ::c_int {
::getrlimit(resource, rlim.cast())
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn lseek64(fd: ::c_int, offset: ::off64_t, whence: ::c_int) -> ::off64_t {
::lseek(fd, offset, whence)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn lstat64(path: *const ::c_char, buf: *mut ::stat64) -> ::c_int {
::lstat(path, buf.cast())
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn mmap64(
addr: *mut ::c_void,
length: ::size_t,
Expand All @@ -108,7 +108,7 @@ pub unsafe extern "C" fn mmap64(
::mmap(addr, length, prot, flags, fd, offset)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn open64(
pathname: *const ::c_char,
flags: ::c_int,
Expand All @@ -117,7 +117,7 @@ pub unsafe extern "C" fn open64(
::open(pathname, flags | ::O_LARGEFILE, mode)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn openat64(
dirfd: ::c_int,
pathname: *const ::c_char,
Expand All @@ -127,7 +127,7 @@ pub unsafe extern "C" fn openat64(
::openat(dirfd, pathname, flags | ::O_LARGEFILE, mode)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn posix_fadvise64(
fd: ::c_int,
offset: ::off64_t,
Expand All @@ -137,7 +137,7 @@ pub unsafe extern "C" fn posix_fadvise64(
::posix_fadvise(fd, offset, len, advice)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn posix_fallocate64(
fd: ::c_int,
offset: ::off64_t,
Expand All @@ -146,7 +146,7 @@ pub unsafe extern "C" fn posix_fallocate64(
::posix_fallocate(fd, offset, len)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn pread64(
fd: ::c_int,
buf: *mut ::c_void,
Expand All @@ -156,7 +156,7 @@ pub unsafe extern "C" fn pread64(
::pread(fd, buf, count, offset)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn preadv64(
fd: ::c_int,
iov: *const ::iovec,
Expand All @@ -166,7 +166,7 @@ pub unsafe extern "C" fn preadv64(
::preadv(fd, iov, iovcnt, offset)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn prlimit64(
pid: ::pid_t,
resource: ::c_int,
Expand All @@ -176,7 +176,7 @@ pub unsafe extern "C" fn prlimit64(
::prlimit(pid, resource, new_limit.cast(), old_limit.cast())
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn pwrite64(
fd: ::c_int,
buf: *const ::c_void,
Expand All @@ -186,7 +186,7 @@ pub unsafe extern "C" fn pwrite64(
::pwrite(fd, buf, count, offset)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn pwritev64(
fd: ::c_int,
iov: *const ::iovec,
Expand All @@ -196,12 +196,12 @@ pub unsafe extern "C" fn pwritev64(
::pwritev(fd, iov, iovcnt, offset)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64 {
::readdir(dirp).cast()
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn readdir64_r(
dirp: *mut ::DIR,
entry: *mut ::dirent64,
Expand All @@ -210,7 +210,7 @@ pub unsafe extern "C" fn readdir64_r(
::readdir_r(dirp, entry.cast(), result.cast())
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn sendfile64(
out_fd: ::c_int,
in_fd: ::c_int,
Expand All @@ -220,32 +220,32 @@ pub unsafe extern "C" fn sendfile64(
::sendfile(out_fd, in_fd, offset, count)
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn setrlimit64(resource: ::c_int, rlim: *const ::rlimit64) -> ::c_int {
::setrlimit(resource, rlim.cast())
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn stat64(pathname: *const ::c_char, statbuf: *mut ::stat64) -> ::c_int {
::stat(pathname, statbuf.cast())
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn statfs64(pathname: *const ::c_char, buf: *mut ::statfs64) -> ::c_int {
::statfs(pathname, buf.cast())
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn statvfs64(path: *const ::c_char, buf: *mut ::statvfs64) -> ::c_int {
::statvfs(path, buf.cast())
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn tmpfile64() -> *mut ::FILE {
::tmpfile()
}

#[inline(always)]
#[inline]
pub unsafe extern "C" fn truncate64(path: *const ::c_char, length: ::off64_t) -> ::c_int {
::truncate(path, length)
}

0 comments on commit 04f8a60

Please sign in to comment.