X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Flfs.h;h=3896c0e61d2655d4b1b0224f54a1593ad04495dd;hb=b5f9a4654516e0ec37373e198e6b3a6f6a2a186d;hp=fcd64d76deb4598958da4748c1a63b0f8923b4b4;hpb=cad27e97e6370f96903d42aaf345c099af0a03bd;p=libucw.git diff --git a/lib/lfs.h b/lib/lfs.h index fcd64d76..3896c0e6 100644 --- a/lib/lfs.h +++ b/lib/lfs.h @@ -13,7 +13,7 @@ #include #include -#ifdef CONFIG_LARGE_FILES +#ifdef CONFIG_LFS #define sh_open open64 #define sh_seek lseek64 @@ -23,8 +23,11 @@ #define sh_mmap(a,l,p,f,d,o) mmap64(a,l,p,f,d,o) #define sh_pread pread64 #define sh_pwrite pwrite64 +#define sh_stat stat64 +#define sh_fstat fstat64 +typedef struct stat64 sh_stat_t; -#else /* !CONFIG_LARGE_FILES */ +#else /* !CONFIG_LFS */ #define sh_open open #define sh_seek(f,o,w) lseek(f,o,w) @@ -32,8 +35,17 @@ #define sh_mmap(a,l,p,f,d,o) mmap(a,l,p,f,d,o) #define sh_pread pread #define sh_pwrite pwrite +#define sh_stat stat +#define sh_fstat fstat +typedef struct stat sh_stat_t; -#endif /* !CONFIG_LARGE_FILES */ +#endif /* !CONFIG_LFS */ + +#if defined(_POSIX_SYNCHRONIZED_IO) && (_POSIX_SYNCHRONIZED_IO > 0) +#define sh_fdatasync fdatasync +#else +#define sh_fdatasync fsync +#endif #define HAVE_PREAD