aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: SVN-20080522+ (Win32) - compilation error (and fix)  (Read 2815 times)

Radek

  • Full Member
  • ***
  • Karma: 5
  • Offline Offline
  • Posts: 149
SVN-20080522+ (Win32) - compilation error (and fix)
« 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
Logged
There are 10 kinds of people - those who are able to understand binary numbers and those who aren't...

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: SVN-20080522+ (Win32) - compilation error (and fix)
« Reply #1 on: May 23, 2008, 07:39:48 PM »

There was a change to support Sparce with MSVC - breaking MINGW obviously...
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: SVN-20080522+ (Win32) - compilation error (and fix)
« Reply #2 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)
Logged
concordia cum veritate

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: SVN-20080522+ (Win32) - compilation error (and fix)
« Reply #3 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
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon