diff options
author | Przemyslaw Skibinski <inikep@gmail.com> | 2016-11-09 10:45:55 (GMT) |
---|---|---|
committer | Przemyslaw Skibinski <inikep@gmail.com> | 2016-11-09 10:45:55 (GMT) |
commit | fe5148417feea3d984ef792fb420f1329dbe8542 (patch) | |
tree | 00445d7a71a0ebc822c5f47b320938c0894f2d7c /lib | |
parent | 96ea2e36308da93dd89fc47dfdf9e6cc2ba730b6 (diff) | |
download | lz4-fe5148417feea3d984ef792fb420f1329dbe8542.zip lz4-fe5148417feea3d984ef792fb420f1329dbe8542.tar.gz lz4-fe5148417feea3d984ef792fb420f1329dbe8542.tar.bz2 |
introduced LZ4_COMPILED_AS_DLL
Diffstat (limited to 'lib')
-rw-r--r-- | lib/lz4frame.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/lz4frame.c b/lib/lz4frame.c index a946f29..93657aa 100644 --- a/lib/lz4frame.c +++ b/lib/lz4frame.c @@ -67,6 +67,12 @@ You can contact the author at : /*-************************************ +* Common Utils +**************************************/ +#define LZ4_STATIC_ASSERT(c) { enum { LZ4_static_assert = 1/(int)(!!(c)) }; } /* use only *after* variable declarations */ + + +/*-************************************ * Basic Types **************************************/ #if !defined (__VMS) && (defined (__cplusplus) || (defined (__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 */) ) @@ -378,6 +384,7 @@ size_t LZ4F_compressBegin(LZ4F_cctx* cctxPtr, void* dstBuffer, size_t dstMaxSize BYTE* headerStart; size_t requiredBuffSize; + LZ4_STATIC_ASSERT(sizeof(ptrdiff_t) >= sizeof(size_t)); /* A compilation error here means sizeof(ptrdiff_t) is not large enough */ if (dstMaxSize < maxFHSize) return err0r(LZ4F_ERROR_dstMaxSize_tooSmall); if (cctxPtr->cStage != 0) return err0r(LZ4F_ERROR_GENERIC); memset(&prefNull, 0, sizeof(prefNull)); |