Alexandru Gagniuc (mr.nuke.me@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4836
-gerrit
commit 594a6bfcc25e9fc5e2f2d5d740c5e248f7d54eb2 Author: Alexandru Gagniuc mr.nuke.me@gmail.com Date: Mon Jan 27 16:16:47 2014 -0600
cbfstool/lzma: Remove windows-specific remnants
Remove checks for MSVC version and references to windows types and calling conventions. Calling conventions are not needed as functions are not exported, like in a library.
Change-Id: I884a1502cf56b193de254f017a97275c8612c670 Signed-off-by: Alexandru Gagniuc mr.nuke.me@gmail.com --- util/cbfstool/lzma/C/LzmaDec.c | 6 +++--- util/cbfstool/lzma/C/LzmaEnc.c | 4 ++-- util/cbfstool/lzma/C/Types.h | 36 +----------------------------------- 3 files changed, 6 insertions(+), 40 deletions(-)
diff --git a/util/cbfstool/lzma/C/LzmaDec.c b/util/cbfstool/lzma/C/LzmaDec.c index 7ba32b9..af55858 100644 --- a/util/cbfstool/lzma/C/LzmaDec.c +++ b/util/cbfstool/lzma/C/LzmaDec.c @@ -128,7 +128,7 @@ Out: = kMatchSpecLenStart + 2 : State Init Marker */
-static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, size_t limit_parm, const uint8_t *bufLimit) +static int LzmaDec_DecodeReal(CLzmaDec *p, size_t limit_parm, const uint8_t *bufLimit) { CLzmaProb *probs = p->probs;
@@ -425,7 +425,7 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, size_t limit_parm, const return SZ_OK; }
-static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, size_t limit) +static void LzmaDec_WriteRem(CLzmaDec *p, size_t limit) { if (p->remainLen != 0 && p->remainLen < kMatchSpecLenStart) { @@ -451,7 +451,7 @@ static void MY_FAST_CALL LzmaDec_WriteRem(CLzmaDec *p, size_t limit) } }
-static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, size_t limit, const uint8_t *bufLimit) +static int LzmaDec_DecodeReal2(CLzmaDec *p, size_t limit, const uint8_t *bufLimit) { do { diff --git a/util/cbfstool/lzma/C/LzmaEnc.c b/util/cbfstool/lzma/C/LzmaEnc.c index 318b0ab..83012d8 100644 --- a/util/cbfstool/lzma/C/LzmaEnc.c +++ b/util/cbfstool/lzma/C/LzmaEnc.c @@ -506,7 +506,7 @@ static void RangeEnc_FlushStream(CRangeEnc *p) p->buf = p->bufBase; }
-static void MY_FAST_CALL RangeEnc_ShiftLow(CRangeEnc *p) +static void RangeEnc_ShiftLow(CRangeEnc *p) { if ((uint32_t)p->low < (uint32_t)0xFF000000 || (int)(p->low >> 32) != 0) { @@ -776,7 +776,7 @@ static void LenEnc_SetPrices(CLenEnc *p, uint32_t posState, uint32_t numSymbols, prices[i] = b1 + RcTree_GetPrice(p->high, kLenNumHighBits, i - kLenNumLowSymbols - kLenNumMidSymbols, ProbPrices); }
-static void MY_FAST_CALL LenPriceEnc_UpdateTable(CLenPriceEnc *p, uint32_t posState, uint32_t *ProbPrices) +static void LenPriceEnc_UpdateTable(CLenPriceEnc *p, uint32_t posState, uint32_t *ProbPrices) { LenEnc_SetPrices(&p->p, posState, p->tableSize, p->prices[posState], ProbPrices); p->counters[posState] = p->tableSize; diff --git a/util/cbfstool/lzma/C/Types.h b/util/cbfstool/lzma/C/Types.h index 0834844..e655f32 100644 --- a/util/cbfstool/lzma/C/Types.h +++ b/util/cbfstool/lzma/C/Types.h @@ -8,9 +8,6 @@ #include <stdint.h> #include <stdbool.h>
-#ifdef _WIN32 -#include <windows.h> -#endif
#define SZ_OK 0
@@ -31,43 +28,12 @@ #define SZ_ERROR_NO_ARCHIVE 17
typedef int SRes; - -#ifdef _WIN32 -typedef DWORD WRes; -#else -typedef int WRes; -#endif +typedef int WRes; /* This was DWORD for _WIN32. That's uint32_t */
#ifndef RINOK #define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; } #endif
- -#ifdef _WIN32 -#define MY_STD_CALL __stdcall -#else -#define MY_STD_CALL -#endif - -#ifdef _MSC_VER - -#if _MSC_VER >= 1300 -#define MY_NO_INLINE __declspec(noinline) -#else -#define MY_NO_INLINE -#endif - -#define MY_CDECL __cdecl -#define MY_FAST_CALL __fastcall - -#else - -#define MY_CDECL -#define MY_FAST_CALL - -#endif - - /* The following interfaces use first parameter as pointer to structure */
typedef struct