From c57c1526a411097f7d44aebf3c601e7af669f04e Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 15 May 2016 12:04:31 +0200 Subject: [PATCH] Changed: LZMA updated to 16.00 --- code/ryzom/client/src/seven_zip/7zArcIn.cpp | 10 +++------- code/ryzom/client/src/seven_zip/7zVersion.h | 12 ++++++------ code/ryzom/client/src/seven_zip/CpuArch.cpp | 13 ++++++++++--- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/code/ryzom/client/src/seven_zip/7zArcIn.cpp b/code/ryzom/client/src/seven_zip/7zArcIn.cpp index 06e35de0d..ca2d5f6eb 100644 --- a/code/ryzom/client/src/seven_zip/7zArcIn.cpp +++ b/code/ryzom/client/src/seven_zip/7zArcIn.cpp @@ -1,5 +1,5 @@ /* 7zArcIn.c -- 7z Input functions -2015-11-18 : Igor Pavlov : Public domain */ +2016-03-31 : Igor Pavlov : Public domain */ #include "Precomp.h" @@ -788,13 +788,9 @@ static SRes ReadUnpackInfo(CSzAr *p, numCodersOutStreams += numCoders; if (numCodersOutStreams < numCoders) return SZ_ERROR_UNSUPPORTED; - - packStreamIndex += numPackStreams; - if (packStreamIndex < numPackStreams) - return SZ_ERROR_UNSUPPORTED; - - if (packStreamIndex > p->NumPackStreams) + if (numPackStreams > p->NumPackStreams - packStreamIndex) return SZ_ERROR_ARCHIVE; + packStreamIndex += numPackStreams; } } diff --git a/code/ryzom/client/src/seven_zip/7zVersion.h b/code/ryzom/client/src/seven_zip/7zVersion.h index c4f5c8e94..d4c603678 100644 --- a/code/ryzom/client/src/seven_zip/7zVersion.h +++ b/code/ryzom/client/src/seven_zip/7zVersion.h @@ -1,14 +1,14 @@ -#define MY_VER_MAJOR 15 -#define MY_VER_MINOR 14 +#define MY_VER_MAJOR 16 +#define MY_VER_MINOR 00 #define MY_VER_BUILD 0 -#define MY_VERSION_NUMBERS "15.14" -#define MY_VERSION "15.14" -#define MY_DATE "2015-12-31" +#define MY_VERSION_NUMBERS "16.00" +#define MY_VERSION "16.00" +#define MY_DATE "2016-05-10" #undef MY_COPYRIGHT #undef MY_VERSION_COPYRIGHT_DATE #define MY_AUTHOR_NAME "Igor Pavlov" #define MY_COPYRIGHT_PD "Igor Pavlov : Public domain" -#define MY_COPYRIGHT_CR "Copyright (c) 1999-2015 Igor Pavlov" +#define MY_COPYRIGHT_CR "Copyright (c) 1999-2016 Igor Pavlov" #ifdef USE_COPYRIGHT_CR #define MY_COPYRIGHT MY_COPYRIGHT_CR diff --git a/code/ryzom/client/src/seven_zip/CpuArch.cpp b/code/ryzom/client/src/seven_zip/CpuArch.cpp index 36fc5bb49..554ffa4fc 100644 --- a/code/ryzom/client/src/seven_zip/CpuArch.cpp +++ b/code/ryzom/client/src/seven_zip/CpuArch.cpp @@ -1,5 +1,5 @@ /* CpuArch.c -- CPU specific code -2015-03-25: Igor Pavlov : Public domain */ +2016-02-25: Igor Pavlov : Public domain */ #include "Precomp.h" @@ -45,7 +45,8 @@ static UInt32 CheckFlag(UInt32 flag) "push %%EDX\n\t" "popf\n\t" "andl %%EAX, %0\n\t": - "=c" (flag) : "c" (flag)); + "=c" (flag) : "c" (flag) : + "%eax", "%edx"); #endif return flag; } @@ -79,7 +80,13 @@ void MyCPUID(UInt32 function, UInt32 *a, UInt32 *b, UInt32 *c, UInt32 *d) #else __asm__ __volatile__ ( - #if defined(MY_CPU_X86) && defined(__PIC__) + #if defined(MY_CPU_AMD64) && defined(__PIC__) + "mov %%rbx, %%rdi;" + "cpuid;" + "xchg %%rbx, %%rdi;" + : "=a" (*a) , + "=D" (*b) , + #elif defined(MY_CPU_X86) && defined(__PIC__) "mov %%ebx, %%edi;" "cpuid;" "xchgl %%ebx, %%edi;"