aMule Forum

English => Compilation problems => Topic started by: Radek on May 23, 2008, 02:08:29 PM

Title: SVN-20080522+ (Win32) - compilation error (and fix)
Post by: Radek on May 23, 2008, 02:08:29 PM
Hi!

Starting with yesterday, there is a problem in PlatformSpecific::CreateSparseFile() (src/PlatformSpecific.cpp, Line 91):

FSCTL_SET_ZERO_DATA is not to be found in WinIoCtl.h. I located it in ddk/ntifs.h instead. After making the change as shown below, the compilation went through without further problems.

Code: [Select]
// 20080523/Radek - changed include file for definition of FSCTL_SET_ZERO_DATA
//#include <WinIoCtl.h>
#include <ddk/ntifs.h>

Cheers
Title: Re: SVN-20080522+ (Win32) - compilation error (and fix)
Post by: Stu Redman on May 23, 2008, 07:39:48 PM
There was a change to support Sparce with MSVC - breaking MINGW obviously...
Title: Re: SVN-20080522+ (Win32) - compilation error (and fix)
Post by: GonoszTopi on May 24, 2008, 02:53:27 AM
The definitions for FSCTL_SET_SPARSE are different on winioctl.h and ddk/ntifs.h. Now which should be used?
Code: [Select]
./ddk/ntifs.h:#define FSCTL_SET_SPARSE                CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 49, METHOD_BUFFERED, FILE_WRITE_DATA)
./winioctl.h:#define FSCTL_SET_SPARSE   CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 49, METHOD_BUFFERED, FILE_SPECIAL_ACCESS)
Title: Re: SVN-20080522+ (Win32) - compilation error (and fix)
Post by: Stu Redman on May 24, 2008, 03:36:16 PM
Whatever. Your patch fixes compilation, and sparse files work both with MINGW and MSVC as I just verified. Good work!  :D