aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakayuki Matsuoka <t-mat@users.noreply.github.com>2022-08-12 23:59:34 +0900
committerTakayuki Matsuoka <t-mat@users.noreply.github.com>2022-08-12 23:59:34 +0900
commitaf0d7c0cb811e83a89d0ded3ba3bdea1895a2f8a (patch)
tree1859b7d1165491a70ee6d045d6af19d0ca088d7f
parent0fc36f1bc758e3d66cbbf863a5701d0ec006cd1a (diff)
downloadlz4-af0d7c0cb811e83a89d0ded3ba3bdea1895a2f8a.tar.gz
Suppress warning from rc.exe
Since rc.exe (the resource compiler) is legacy compiler, it truncates preprocessor symbol name length to 32 chars. And it reports the following warning lz4\build\VS2022\..\..\lib\lz4.h(314): warning RC4011: identifier truncated to 'LZ4_STATIC_LINKING_ONLY_DISABLE' lz4\build\VS2022\..\..\lib\lz4.h(401): warning RC4011: identifier truncated to 'LZ4_STATIC_LINKING_ONLY_DISABLE' This patch detects rc.exe and just skips long symbol.
-rw-r--r--lib/lz4.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/lz4.h b/lib/lz4.h
index c9a59e36..383d9666 100644
--- a/lib/lz4.h
+++ b/lib/lz4.h
@@ -311,10 +311,12 @@ LZ4LIB_API int LZ4_decompress_safe_partial (const char* src, char* dst, int srcS
***********************************************/
typedef union LZ4_stream_u LZ4_stream_t; /* incomplete type (defined later) */
+#if !defined(RC_INVOKED) /* https://docs.microsoft.com/en-us/windows/win32/menurc/predefined-macros */
#if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)
LZ4LIB_API LZ4_stream_t* LZ4_createStream(void);
LZ4LIB_API int LZ4_freeStream (LZ4_stream_t* streamPtr);
#endif /* !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) */
+#endif
/*! LZ4_resetStream_fast() : v1.9.0+
* Use this to prepare an LZ4_stream_t for a new chain of dependent blocks
@@ -398,10 +400,12 @@ typedef union LZ4_streamDecode_u LZ4_streamDecode_t; /* tracking context */
* creation / destruction of streaming decompression tracking context.
* A tracking context can be re-used multiple times.
*/
+#if !defined(RC_INVOKED) /* https://docs.microsoft.com/en-us/windows/win32/menurc/predefined-macros */
#if !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION)
LZ4LIB_API LZ4_streamDecode_t* LZ4_createStreamDecode(void);
LZ4LIB_API int LZ4_freeStreamDecode (LZ4_streamDecode_t* LZ4_stream);
#endif /* !defined(LZ4_STATIC_LINKING_ONLY_DISABLE_MEMORY_ALLOCATION) */
+#endif
/*! LZ4_setStreamDecode() :
* An LZ4_streamDecode_t context can be allocated once and re-used multiple times.