Add upstreamed change to miniz.h

pull/2389/head
Charlie Gettys 2019-03-27 11:28:37 -04:00 committed by GitHub
parent bb11f90983
commit ab92f50fa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -281,10 +281,15 @@
#define MINIZ_LITTLE_ENDIAN 1 #define MINIZ_LITTLE_ENDIAN 1
#endif #endif
/* Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES only if not set */
#if !defined(MINIZ_USE_UNALIGNED_LOADS_AND_STORES)
#if MINIZ_X86_OR_X64_CPU #if MINIZ_X86_OR_X64_CPU
// Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient /* Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient integer loads and stores from unaligned addresses. */
// integer loads and stores from unaligned addresses.
#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1 #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1
#define MINIZ_UNALIGNED_USE_MEMCPY
#else
#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 0
#endif
#endif #endif
#if defined(_M_X64) || defined(_WIN64) || defined(__MINGW64__) || \ #if defined(_M_X64) || defined(_WIN64) || defined(__MINGW64__) || \