2 * Wrapper functions for SUSv2 large file support. Linux defaults to a
3 * 32-bit off_t and hides the largefile-capable versions of the
4 * syscalls behind preprocessor magic, rather than making them
5 * reliably available using dlsym.
9 * This software is part of the SBCL system. See the README file for
12 * This software is derived from the CMU CL system, which was
13 * written at Carnegie Mellon University and released into the
14 * public domain. The software is in the public domain and is
15 * provided with absolutely no warranty. See the COPYING and CREDITS
16 * files for more information.
19 #include <genesis/config.h>
21 #ifdef LISP_FEATURE_LARGEFILE
24 #include <sys/types.h>
29 lseek_largefile(int fildes, off_t offset, int whence) {
30 return lseek(fildes, offset, whence);
34 truncate_largefile(const char *path, off_t length) {
35 return truncate(path, length);
39 ftruncate_largefile(int fd, off_t length) {
40 return ftruncate(fd, length);
44 mmap_largefile(void *start, size_t length, int prot, int flags, int fd, off_t offset) {
45 return mmap(start, length, prot, flags, fd, offset);
49 stat_largefile(const char *file_name, struct stat *buf) {
50 return stat(file_name, buf);
54 fstat_largefile(int filedes, struct stat *buf) {
55 return fstat(filedes, buf);
59 lstat_largefile(const char *file_name, struct stat *buf) {
60 return lstat(file_name, buf);