193 files changed, 80411 insertions, 44563 deletions
diff --git a/libntfs-3g/unix_io.c b/libntfs-3g/unix_io.c index c24f00b..4f2c18b 100755 --- a/libntfs-3g/unix_io.c +++ b/libntfs-3g/unix_io.c @@ -61,19 +61,12 @@ #include "logging.h" #include "misc.h" - +#define DEV_FD(dev) (*(int *)dev->d_private) #ifdef __USE_FILE_OFFSET64 #include <unistd.h> -#define lseek lseek64 -#define pread pread64 -#define pwrite pwrite64 -#define fcntl __fcntl64 #endif - -#define DEV_FD(dev) (*(int *)dev->d_private) - /* Define to nothing if not present on this system. */ #ifndef O_EXCL # define O_EXCL 0 @@ -234,7 +227,7 @@ static int ntfs_device_unix_io_close(struct ntfs_device *dev) static s64 ntfs_device_unix_io_seek(struct ntfs_device *dev, s64 offset, int whence) { - return lseek(DEV_FD(dev), offset, whence); + return lseek64(DEV_FD(dev), offset, whence); } /** @@ -288,7 +281,7 @@ static s64 ntfs_device_unix_io_write(struct ntfs_device *dev, const void *buf, static s64 ntfs_device_unix_io_pread(struct ntfs_device *dev, void *buf, s64 count, s64 offset) { - return pread(DEV_FD(dev), buf, count, offset); + return pread64(DEV_FD(dev), buf, count, offset); } /** @@ -310,7 +303,7 @@ static s64 ntfs_device_unix_io_pwrite(struct ntfs_device *dev, const void *buf, return -1; } NDevSetDirty(dev); - return pwrite(DEV_FD(dev), buf, count, offset); + return pwrite64(DEV_FD(dev), buf, count, offset); } /** @@ -365,10 +358,6 @@ static int ntfs_device_unix_io_ioctl(struct ntfs_device *dev, int request, return ioctl(DEV_FD(dev), request, argp); } -#ifdef __USE_FILE_OFFSET64 -#define pread pread -#define pwrite pwrite -#endif /** * Device operations for working with unix style devices and files. */ |