From 56951ba7eea46a51e81aaf6fcb88111090c397a6 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 6 Sep 2015 15:48:02 +0200 Subject: [PATCH] (deps/7zip) Get rid of EXTERN_C_BEGIN/EXTERN_C_END --- deps/7zip/7z.h | 8 ++++++-- deps/7zip/7zCrc.h | 8 ++++++-- deps/7zip/7zFile.h | 8 ++++++-- deps/7zip/CpuArch.h | 8 ++++++-- deps/7zip/Types.h | 14 ++++---------- 5 files changed, 28 insertions(+), 18 deletions(-) diff --git a/deps/7zip/7z.h b/deps/7zip/7z.h index bde452da3a..4f2ee95d88 100644 --- a/deps/7zip/7z.h +++ b/deps/7zip/7z.h @@ -6,7 +6,9 @@ #include "7zBuf.h" -EXTERN_C_BEGIN +#ifdef __cplusplus +extern "C" { +#endif #define k7zStartHeaderSize 0x20 #define k7zSignatureSize 6 @@ -198,6 +200,8 @@ SZ_ERROR_FAIL SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream, ISzAlloc *allocMain, ISzAlloc *allocTemp); -EXTERN_C_END +#ifdef __cplusplus +} +#endif #endif diff --git a/deps/7zip/7zCrc.h b/deps/7zip/7zCrc.h index 5062d642c1..9c11923500 100644 --- a/deps/7zip/7zCrc.h +++ b/deps/7zip/7zCrc.h @@ -6,7 +6,9 @@ #include "Types.h" -EXTERN_C_BEGIN +#ifdef __cplusplus +extern "C" { +#endif extern uint32_t g_CrcTable[]; @@ -20,6 +22,8 @@ void MY_FAST_CALL CrcGenerateTable(void); uint32_t MY_FAST_CALL CrcUpdate(uint32_t crc, const void *data, size_t size); uint32_t MY_FAST_CALL CrcCalc(const void *data, size_t size); -EXTERN_C_END +#ifdef __cplusplus +} +#endif #endif diff --git a/deps/7zip/7zFile.h b/deps/7zip/7zFile.h index 77018cc4c8..73d2ff0440 100644 --- a/deps/7zip/7zFile.h +++ b/deps/7zip/7zFile.h @@ -16,7 +16,9 @@ #include "Types.h" -EXTERN_C_BEGIN +#ifdef __cplusplus +extern "C" { +#endif /* ---------- File ---------- */ @@ -78,6 +80,8 @@ typedef struct void FileOutStream_CreateVTable(CFileOutStream *p); -EXTERN_C_END +#ifdef __cplusplus +} +#endif #endif diff --git a/deps/7zip/CpuArch.h b/deps/7zip/CpuArch.h index cac72b818e..a51e873167 100644 --- a/deps/7zip/CpuArch.h +++ b/deps/7zip/CpuArch.h @@ -6,7 +6,9 @@ #include "Types.h" -EXTERN_C_BEGIN +#ifdef __cplusplus +extern "C" { +#endif /* MY_CPU_LE means that CPU is LITTLE ENDIAN. @@ -120,6 +122,8 @@ Stop_Compiling_Bad_Endian Bool CPU_Is_InOrder(); -EXTERN_C_END +#ifdef __cplusplus +} +#endif #endif diff --git a/deps/7zip/Types.h b/deps/7zip/Types.h index e29dd3eb42..5cbed1e18e 100644 --- a/deps/7zip/Types.h +++ b/deps/7zip/Types.h @@ -10,17 +10,9 @@ #include #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 +extern "C" { #endif -#endif - -EXTERN_C_BEGIN #define SZ_OK 0 @@ -221,6 +213,8 @@ typedef struct #endif -EXTERN_C_END +#ifdef __cplusplus +} +#endif #endif