MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0011780 | CMake | CMake | public | 2011-02-01 03:07 | 2015-07-08 08:57 |
Reporter | Dongsheng Song | ||||
Assigned To | Stephen Kelly | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | Windows | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | CMake 3.2 | |||
Summary | 0011780: CMake cannot building by VC6 with PSDK | ||||
Description | Tested 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 Reproduce | O:\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. | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|