drive: win: add 64 bits support.

This commit is contained in:
Zhang Zhaolong 2014-02-12 17:52:28 +08:00
parent f67fa72386
commit 0adb22f305
2 changed files with 5 additions and 3 deletions

View File

@ -482,9 +482,11 @@ BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UIN
/* http://msdn.microsoft.com/en-us/library/cc232067.aspx */
case FileAllocationInformation:
/* http://msdn.microsoft.com/en-us/library/cc232076.aspx */
#ifndef _WIN32
Stream_Read_UINT64(input, size);
if (ftruncate(file->fd, size) != 0)
return FALSE;
#endif
break;
case FileDispositionInformation:

View File

@ -40,13 +40,13 @@
#endif
#ifdef _WIN32
#define STAT stat
#define STAT __stat64
#define OPEN _open
#define close _close
#define read _read
#define write _write
#define LSEEK _lseek
#define FSTAT fstat
#define LSEEK _lseeki64
#define FSTAT _fstat64
#define STATVFS statvfs
#define mkdir(a,b) _mkdir(a)
#define rmdir _rmdir