Menu

#245 Patch for compiling 7zip/LZMA Souce on Windows

open
nobody
None
5
2014-12-14
2014-09-15
Babalonso
No

There is a problem when compiling 7zip source. The problem is due to the GetVersionEx function which is deprecated on Windows 8. The problem can be solved by using the windows helper functions Version helper functions.
//in file CpuArch.c
static Bool CPU_Sys_Is_SSE_Supported()
{
OSVERSIONINFO vi;
vi.dwOSVersionInfoSize = sizeof(vi);
if (!GetVersionEx(&vi))
return False;
return (vi.dwMajorVersion >= 5);
}
//should be replaced by
static Bool CPU_Sys_Is_SSE_Supported()
{
if (!IsWindowsXPOrGreater())
{
return False;
}
return True
}

Similar procedure should also be done for the file NtCheck.h in the Windows directory

Discussion

  • Igor Pavlov

    Igor Pavlov - 2014-09-16

    I don't like new functions.
    Note that someone still want to compile the code for Win95/98/NT/2000.
    So we must find another solution for that problem.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.