Alexandru Gagniuc (mr.nuke.me@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4835
-gerrit
commit 1cefd376a62265e02514652acad5fe0e9c3ed5b9 Author: Alexandru Gagniuc mr.nuke.me@gmail.com Date: Mon Jan 27 14:25:19 2014 -0600
cbfstool/lzma: Remove C++ remnants
The original lzma code was probably designed as a library, and had tons of checks for __cplusplus and extern "C". They were not removed when imported, but remove then now.
Change-Id: I4ae6e7739d191093c57130de8ae40da835e81bd1 Signed-off-by: Alexandru Gagniuc mr.nuke.me@gmail.com --- util/cbfstool/lzma/C/LzFind.h | 8 -------- util/cbfstool/lzma/C/LzmaDec.h | 8 -------- util/cbfstool/lzma/C/LzmaEnc.h | 8 -------- util/cbfstool/lzma/C/Types.h | 20 -------------------- 4 files changed, 44 deletions(-)
diff --git a/util/cbfstool/lzma/C/LzFind.h b/util/cbfstool/lzma/C/LzFind.h index 1e5b491..6962032 100644 --- a/util/cbfstool/lzma/C/LzFind.h +++ b/util/cbfstool/lzma/C/LzFind.h @@ -6,10 +6,6 @@
#include "Types.h"
-#ifdef __cplusplus -extern "C" { -#endif - typedef uint32_t CLzRef;
typedef struct _CMatchFinder @@ -108,8 +104,4 @@ uint32_t Hc3Zip_MatchFinder_GetMatches(CMatchFinder *p, uint32_t *distances); void Bt3Zip_MatchFinder_Skip(CMatchFinder *p, uint32_t num); void Hc3Zip_MatchFinder_Skip(CMatchFinder *p, uint32_t num);
-#ifdef __cplusplus -} -#endif - #endif diff --git a/util/cbfstool/lzma/C/LzmaDec.h b/util/cbfstool/lzma/C/LzmaDec.h index 3d06b58..a38a714 100644 --- a/util/cbfstool/lzma/C/LzmaDec.h +++ b/util/cbfstool/lzma/C/LzmaDec.h @@ -6,10 +6,6 @@
#include "Types.h"
-#ifdef __cplusplus -extern "C" { -#endif - /* #define _LZMA_PROB32 */ /* _LZMA_PROB32 can increase the speed on some CPUs, but memory usage for CLzmaDec::probs will be doubled in that case */ @@ -224,8 +220,4 @@ SRes LzmaDecode(uint8_t *dest, size_t *destLen, const uint8_t *src, size_t *srcL const uint8_t *propData, unsigned propSize, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc);
-#ifdef __cplusplus -} -#endif - #endif diff --git a/util/cbfstool/lzma/C/LzmaEnc.h b/util/cbfstool/lzma/C/LzmaEnc.h index 7a6cb59..376baf2 100644 --- a/util/cbfstool/lzma/C/LzmaEnc.h +++ b/util/cbfstool/lzma/C/LzmaEnc.h @@ -6,10 +6,6 @@
#include "Types.h"
-#ifdef __cplusplus -extern "C" { -#endif - #define LZMA_PROPS_SIZE 5
typedef struct _CLzmaEncProps @@ -73,8 +69,4 @@ SRes LzmaEncode(uint8_t *dest, size_t *destLen, const uint8_t *src, size_t srcLe const CLzmaEncProps *props, uint8_t *propsEncoded, size_t *propsSize, int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig);
-#ifdef __cplusplus -} -#endif - #endif diff --git a/util/cbfstool/lzma/C/Types.h b/util/cbfstool/lzma/C/Types.h index b761133..0834844 100644 --- a/util/cbfstool/lzma/C/Types.h +++ b/util/cbfstool/lzma/C/Types.h @@ -12,18 +12,6 @@ #include <windows.h> #endif
-#ifndef EXTERN_C_BEGIN -#ifdef __cplusplus -#define EXTERN_C_BEGIN extern "C" { -#define EXTERN_C_END } -#else -#define EXTERN_C_BEGIN -#define EXTERN_C_END -#endif -#endif - -EXTERN_C_BEGIN - #define SZ_OK 0
#define SZ_ERROR_DATA 1 @@ -97,9 +85,6 @@ typedef struct ISeqInStream SRes (*Read)(void *p, void *buf, size_t *size); /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream. (output(*size) < input(*size)) is allowed */ -#ifdef __cplusplus - ISeqInStream(): Read() { } // -Weffc++ -#endif } ISeqInStream;
/* it can return SZ_ERROR_INPUT_EOF */ @@ -112,9 +97,6 @@ typedef struct ISeqOutStream size_t (*Write)(void *p, const void *buf, size_t size); /* Returns: result - the number of actually written bytes. (result < size) means error */ -#ifdef __cplusplus - ISeqOutStream(): Write() { } // -Weffc++ -#endif } ISeqOutStream;
typedef enum @@ -197,6 +179,4 @@ typedef struct #define IAlloc_Alloc(p, size) (p)->Alloc((p), size) #define IAlloc_Free(p, a) (p)->Free((p), a)
-EXTERN_C_END - #endif