View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011780CMakeCMakepublic2011-02-01 03:072015-07-08 08:57
ReporterDongsheng Song 
Assigned ToStephen Kelly 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSWindowsOS Version
Product Version 
Target VersionFixed in VersionCMake 3.2 
Summary0011780: CMake cannot building by VC6 with PSDK
DescriptionTested with PSDK February 2003 edition.

C:\>set inc
INCLUDE=C:\Program Files\Microsoft SDK\include;C:\opt\vs1998\vc98\include

C:\>set lib
LIB=C:\Program Files\Microsoft SDK\lib;C:\opt\vs1998\vc98\lib

In Utilities\cmlibarchive\libarchive\archive_windows.c, the following code is not correct:

#if defined(_MSC_VER) && _MSC_VER < 1300
/* VS 6 does not provide SetFilePointerEx, so define it here. */
static BOOL SetFilePointerEx(HANDLE hFile,
                             LARGE_INTEGER liDistanceToMove,
                             PLARGE_INTEGER lpNewFilePointer,
                             DWORD dwMoveMethod)
{
  LARGE_INTEGER li;
  li.QuadPart = liDistanceToMove.QuadPart;
  li.LowPart = SetFilePointer(hFile, li.LowPart, &li.HighPart, dwMoveMethod);
  if(lpNewFilePointer) { lpNewFilePointer->QuadPart = li.QuadPart; }
  return li.LowPart != -1 || GetLastError() == NO_ERROR;
}
#endif

Because VC6 with PSDK have SetFilePointerEx, we should use VER_PRODUCTBUILD which defined in <ntverp.h>:

#include <ntverp.h>

/* Windows 2000/XP or later have SetFilePointerEx defined */
#if (_MSC_VER < 1300) && (VER_PRODUCTBUILD < 2600)
static BOOL SetFilePointerEx(HANDLE hFile,
                             LARGE_INTEGER liDistanceToMove,
                             PLARGE_INTEGER lpNewFilePointer,
                             DWORD dwMoveMethod)
{
  LARGE_INTEGER li;
  li.QuadPart = liDistanceToMove.QuadPart;
  li.LowPart = SetFilePointer(hFile, li.LowPart, &li.HighPart, dwMoveMethod);
  if(lpNewFilePointer) { lpNewFilePointer->QuadPart = li.QuadPart; }
  return li.LowPart != -1 || GetLastError() == NO_ERROR;
}
#endif
Steps To ReproduceO:\vcs\git\cmake\Utilities\cmlibarchive\libarchive\archive_windows.c(74) : error C2373: 'SetFilePointerEx' : redefinition; different type modifiers
        C:\Program Files\Microsoft SDK\include\winbase.h(3393) : see declaration of 'SetFilePointerEx'
NMAKE : fatal error U1077: 'C:\opt\vs1998\VC98\Bin\CL.EXE' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\opt\vs1998\vc98\bin\NMAKE.EXE' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'C:\opt\vs1998\vc98\bin\NMAKE.EXE' : return code '0x2'
Stop.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0030226)
David Cole (manager)
2012-08-11 11:09

Sending old, never assigned issues to the backlog.

(The age of the bug, plus the fact that it's never been assigned to anyone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0038086)
Stephen Kelly (developer)
2015-02-26 15:22

CMake 3.2 is not expected to build with MSVC6 at all. Use an alternative compiler to build cmake itself on Windows.
(0039074)
Robert Maynard (manager)
2015-07-08 08:57

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2011-02-01 03:07 Dongsheng Song New Issue
2012-08-11 11:09 David Cole Status new => backlog
2012-08-11 11:09 David Cole Note Added: 0030226
2015-02-26 15:22 Stephen Kelly Note Added: 0038086
2015-02-26 15:22 Stephen Kelly Status backlog => resolved
2015-02-26 15:22 Stephen Kelly Fixed in Version => CMake 3.2
2015-02-26 15:22 Stephen Kelly Resolution open => fixed
2015-02-26 15:22 Stephen Kelly Assigned To => Stephen Kelly
2015-07-08 08:57 Robert Maynard Note Added: 0039074
2015-07-08 08:57 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team