mirror of
				https://github.com/eledio-devices/thirdparty-miniz.git
				synced 2025-10-31 16:14:16 +01:00 
			
		
		
		
	Add !defined check on MINIZ_USE_ALIGNED_LOADS_AND_STORES
Add !defined check so that one can override MINIZ_USE_ALIGNED_LOADS_AND_STORES in case a given compiler does not support it (this issue has been seen in the wild, #assimp/assimp#2389
This commit is contained in:
		
							
								
								
									
										3
									
								
								miniz.h
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								miniz.h
									
									
									
									
									
								
							| @@ -170,6 +170,8 @@ | |||||||
| #define MINIZ_LITTLE_ENDIAN 0 | #define MINIZ_LITTLE_ENDIAN 0 | ||||||
| #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 integer loads and stores from unaligned addresses. */ | /* Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient integer loads and stores from unaligned addresses. */ | ||||||
| #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1 | #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1 | ||||||
| @@ -177,6 +179,7 @@ | |||||||
| #else | #else | ||||||
| #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 0 | #define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 0 | ||||||
| #endif | #endif | ||||||
|  | #endif | ||||||
|  |  | ||||||
| #if defined(_M_X64) || defined(_WIN64) || defined(__MINGW64__) || defined(_LP64) || defined(__LP64__) || defined(__ia64__) || defined(__x86_64__) | #if defined(_M_X64) || defined(_WIN64) || defined(__MINGW64__) || defined(_LP64) || defined(__LP64__) || defined(__ia64__) || defined(__x86_64__) | ||||||
| /* Set MINIZ_HAS_64BIT_REGISTERS to 1 if operations on 64-bit integers are reasonably fast (and don't involve compiler generated calls to helper functions). */ | /* Set MINIZ_HAS_64BIT_REGISTERS to 1 if operations on 64-bit integers are reasonably fast (and don't involve compiler generated calls to helper functions). */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user