193 files changed, 80411 insertions, 44563 deletions
diff --git a/include/ntfs-3g/device_io.h b/include/ntfs-3g/device_io.h index 8437cc2..24f8d9b 100755 --- a/include/ntfs-3g/device_io.h +++ b/include/ntfs-3g/device_io.h @@ -28,12 +28,18 @@ #ifndef NO_NTFS_DEVICE_DEFAULT_IO_OPS -#ifndef __CYGWIN32__ +#if defined(linux) || defined(__uClinux__) || defined(__sun) \ + || defined(__APPLE__) || defined(__DARWIN__) + /* Make sure the presence of <windows.h> means compiling for Windows */ +#undef HAVE_WINDOWS_H +#endif + +#ifndef HAVE_WINDOWS_H -/* Not on Cygwin; use standard Unix style low level device operations. */ +/* Not for Windows use standard Unix style low level device operations. */ #define ntfs_device_default_io_ops ntfs_device_unix_io_ops -#else /* __CYGWIN32__ */ +#else /* HAVE_WINDOWS_H */ #ifndef HDIO_GETGEO # define HDIO_GETGEO 0x301 @@ -60,10 +66,15 @@ struct hd_geometry { # define BLKBSZSET 0x40041271 #endif -/* On Cygwin; use Win32 low level device operations. */ +/* On Windows (and Cygwin) : use Win32 low level device operations. */ #define ntfs_device_default_io_ops ntfs_device_win32_io_ops -#endif /* __CYGWIN32__ */ +/* A few useful functions */ +int ntfs_win32_set_sparse(int); +int ntfs_win32_ftruncate(int fd, s64 size); +int ntfs_win32_device_ftruncate(struct ntfs_device*, s64); + +#endif /* HAVE_WINDOWS_H */ /* Forward declaration. */ |