]> mj.ucw.cz Git - libucw.git/blob - lib/lfs.h
Added bopen_tmp() for opening of temporary files.
[libucw.git] / lib / lfs.h
1 /*
2  *      Sherlock Library -- Large File Support
3  *
4  *      (c) 1999--2002 Martin Mares <mj@ucw.cz>
5  */
6
7 #ifndef _SHERLOCK_LFS_H
8 #define _SHERLOCK_LFS_H
9
10 #include <fcntl.h>
11 #include <unistd.h>
12
13 #ifdef SHERLOCK_CONFIG_LFS
14
15 #define sh_open open64
16 #define sh_seek lseek64
17 #define sh_pread pread64
18 #define sh_pwrite pwrite64
19 #define sh_ftruncate ftruncate64
20 #define sh_mmap(a,l,p,f,d,o) mmap64(a,l,p,f,d,o)
21 #define sh_pread pread64
22 #define sh_pwrite pwrite64
23
24 #else   /* !SHERLOCK_CONFIG_LFS */
25
26 #define sh_open open
27 #define sh_seek(f,o,w) lseek(f,o,w)
28 #define sh_ftruncate(f,o) ftruncate(f,o)
29 #define sh_mmap(a,l,p,f,d,o) mmap(a,l,p,f,d,o)
30 #define sh_pread pread
31 #define sh_pwrite pwrite
32
33 #endif  /* !SHERLOCK_CONFIG_LFS */
34
35 #endif  /* !_SHERLOCK_LFS_H */