1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-24 19:52:37 +01:00

7z: Update from 21.07 to 22.01

This commit is contained in:
Ani 2022-08-28 18:11:03 +01:00
parent 591159c4a9
commit 4a3a24dcc1
5 changed files with 34 additions and 26 deletions

View File

@ -1,5 +1,5 @@
/* 7zTypes.h -- Basic types /* 7zTypes.h -- Basic types
2021-12-25 : Igor Pavlov : Public domain */ 2022-04-01 : Igor Pavlov : Public domain */
#ifndef __7Z_TYPES_H #ifndef __7Z_TYPES_H
#define __7Z_TYPES_H #define __7Z_TYPES_H
@ -133,10 +133,6 @@ typedef int WRes;
#define MY__E_ERROR_NEGATIVE_SEEK MY_HRESULT_FROM_errno_CONST_ERROR(EINVAL) #define MY__E_ERROR_NEGATIVE_SEEK MY_HRESULT_FROM_errno_CONST_ERROR(EINVAL)
*/ */
// gcc / clang : (sizeof(long) == sizeof(void*)) in 32/64 bits
typedef long INT_PTR;
typedef unsigned long UINT_PTR;
#define TEXT(quote) quote #define TEXT(quote) quote
#define FILE_ATTRIBUTE_READONLY 0x0001 #define FILE_ATTRIBUTE_READONLY 0x0001
@ -520,6 +516,14 @@ struct ISzAlloc
#endif #endif
#define k_PropVar_TimePrec_0 0
#define k_PropVar_TimePrec_Unix 1
#define k_PropVar_TimePrec_DOS 2
#define k_PropVar_TimePrec_HighPrec 3
#define k_PropVar_TimePrec_Base 16
#define k_PropVar_TimePrec_100ns (k_PropVar_TimePrec_Base + 7)
#define k_PropVar_TimePrec_1ns (k_PropVar_TimePrec_Base + 9)
EXTERN_C_END EXTERN_C_END
#endif #endif

View File

@ -1,7 +1,7 @@
#define MY_VER_MAJOR 21 #define MY_VER_MAJOR 22
#define MY_VER_MINOR 07 #define MY_VER_MINOR 01
#define MY_VER_BUILD 0 #define MY_VER_BUILD 0
#define MY_VERSION_NUMBERS "21.07" #define MY_VERSION_NUMBERS "22.01"
#define MY_VERSION MY_VERSION_NUMBERS #define MY_VERSION MY_VERSION_NUMBERS
#ifdef MY_CPU_NAME #ifdef MY_CPU_NAME
@ -10,12 +10,12 @@
#define MY_VERSION_CPU MY_VERSION #define MY_VERSION_CPU MY_VERSION
#endif #endif
#define MY_DATE "2021-12-26" #define MY_DATE "2022-07-15"
#undef MY_COPYRIGHT #undef MY_COPYRIGHT
#undef MY_VERSION_COPYRIGHT_DATE #undef MY_VERSION_COPYRIGHT_DATE
#define MY_AUTHOR_NAME "Igor Pavlov" #define MY_AUTHOR_NAME "Igor Pavlov"
#define MY_COPYRIGHT_PD "Igor Pavlov : Public domain" #define MY_COPYRIGHT_PD "Igor Pavlov : Public domain"
#define MY_COPYRIGHT_CR "Copyright (c) 1999-2021 Igor Pavlov" #define MY_COPYRIGHT_CR "Copyright (c) 1999-2022 Igor Pavlov"
#ifdef USE_COPYRIGHT_CR #ifdef USE_COPYRIGHT_CR
#define MY_COPYRIGHT MY_COPYRIGHT_CR #define MY_COPYRIGHT MY_COPYRIGHT_CR

View File

@ -1,5 +1,5 @@
/* CpuArch.h -- CPU specific code /* CpuArch.h -- CPU specific code
2021-07-13 : Igor Pavlov : Public domain */ 2022-07-15 : Igor Pavlov : Public domain */
#ifndef __CPU_ARCH_H #ifndef __CPU_ARCH_H
#define __CPU_ARCH_H #define __CPU_ARCH_H
@ -123,12 +123,15 @@ MY_CPU_64BIT means that processor can work with 64-bit registers.
#endif #endif
#if defined(__sparc64__) #if defined(__riscv) \
#define MY_CPU_NAME "sparc64" || defined(__riscv__)
#define MY_CPU_64BIT #if __riscv_xlen == 32
#elif defined(__sparc__) #define MY_CPU_NAME "riscv32"
#define MY_CPU_NAME "sparc" #elif __riscv_xlen == 64
/* #define MY_CPU_32BIT */ #define MY_CPU_NAME "riscv64"
#else
#define MY_CPU_NAME "riscv"
#endif
#endif #endif

View File

@ -1,5 +1,5 @@
/* DllSecur.c -- DLL loading security /* DllSecur.c -- DLL loading security
2021-12-25 : Igor Pavlov : Public domain */ 2022-07-15 : Igor Pavlov : Public domain */
#include "Precomp.h" #include "Precomp.h"
@ -11,6 +11,10 @@
#ifndef UNDER_CE #ifndef UNDER_CE
#if defined(__GNUC__) && (__GNUC__ >= 8)
#pragma GCC diagnostic ignored "-Wcast-function-type"
#endif
typedef BOOL (WINAPI *Func_SetDefaultDllDirectories)(DWORD DirectoryFlags); typedef BOOL (WINAPI *Func_SetDefaultDllDirectories)(DWORD DirectoryFlags);
#define MY_LOAD_LIBRARY_SEARCH_USER_DIRS 0x400 #define MY_LOAD_LIBRARY_SEARCH_USER_DIRS 0x400
@ -34,7 +38,7 @@ static const char * const g_Dlls =
#endif #endif
// #define MY_CAST_FUNC (void(*)()) // #define MY_CAST_FUNC (void(*)())
#define MY_CAST_FUNC #define MY_CAST_FUNC
void My_SetDefaultDllDirectories() void My_SetDefaultDllDirectories()
{ {

View File

@ -1,5 +1,5 @@
/* LzmaEnc.c -- LZMA Encoder /* LzmaEnc.c -- LZMA Encoder
2021-11-18: Igor Pavlov : Public domain */ 2022-07-15: Igor Pavlov : Public domain */
#include "Precomp.h" #include "Precomp.h"
@ -2970,6 +2970,7 @@ const Byte *LzmaEnc_GetCurBuf(CLzmaEncHandle pp)
} }
// (desiredPackSize == 0) is not allowed
SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit, SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit,
Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize) Byte *dest, size_t *destLen, UInt32 desiredPackSize, UInt32 *unpackSize)
{ {
@ -2990,14 +2991,10 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit,
if (reInit) if (reInit)
LzmaEnc_Init(p); LzmaEnc_Init(p);
LzmaEnc_InitPrices(p); LzmaEnc_InitPrices(p);
nowPos64 = p->nowPos64;
RangeEnc_Init(&p->rc); RangeEnc_Init(&p->rc);
p->rc.outStream = &outStream.vt; p->rc.outStream = &outStream.vt;
nowPos64 = p->nowPos64;
if (desiredPackSize == 0)
return SZ_ERROR_OUTPUT_EOF;
res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize); res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize);
*unpackSize = (UInt32)(p->nowPos64 - nowPos64); *unpackSize = (UInt32)(p->nowPos64 - nowPos64);