From ae179a9c16aba4dc3b6adefd440c9b77bda1a785 Mon Sep 17 00:00:00 2001 From: Takayuki Matsuoka Date: Sat, 13 Aug 2022 05:39:25 +0900 Subject: Add note about RC_INVOKED --- lib/lz4.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/lz4.h b/lib/lz4.h index 383d966..491c608 100644 --- a/lib/lz4.h +++ b/lib/lz4.h @@ -311,6 +311,19 @@ 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) */ +/** + Note about RC_INVOKED + + - RC_INVOKED is predefined symbol of rc.exe (the resource compiler which is part of MSVC/Visual Studio). + https://docs.microsoft.com/en-us/windows/win32/menurc/predefined-macros + + - Since rc.exe is a legacy compiler, it truncates long symbol (> 30 chars) + and reports warning "RC4011: identifier truncated". + + - To eliminate the warning, we surround long preprocessor symbol with + "#if !defined(RC_INVOKED) ... #endif" block that means + "skip this block when rc.exe is trying to read it". +*/ #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); -- cgit v0.12