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>
30 lseek_largefile(int fildes
, off_t offset
, int whence
) {
31 return lseek(fildes
, offset
, whence
);
35 truncate_largefile(const char *path
, off_t length
) {
36 return truncate(path
, length
);
40 ftruncate_largefile(int fd
, off_t length
) {
41 return ftruncate(fd
, length
);
45 mmap_largefile(void *start
, size_t length
, int prot
, int flags
, int fd
, off_t offset
) {
46 return mmap(start
, length
, prot
, flags
, fd
, offset
);
50 stat_largefile(const char *file_name
, struct stat
*buf
) {
51 return stat(file_name
, buf
);
55 fstat_largefile(int filedes
, struct stat
*buf
) {
56 return fstat(filedes
, buf
);
60 lstat_largefile(const char *file_name
, struct stat
*buf
) {
61 return lstat(file_name
, buf
);
65 readdir_largefile(DIR *dir
) {
66 return readdir64(dir
);