mirror of
				https://github.com/isar/libmdbx.git
				synced 2025-10-31 03:29:01 +08:00 
			
		
		
		
	mdbx-test: portability - define bswap() macros conditionally.
Change-Id: I44d7daf71bd4dd66f8821af926f0c26578624e92
This commit is contained in:
		| @@ -26,9 +26,14 @@ | ||||
| #endif | ||||
|  | ||||
| #if __GNUC_PREREQ(4, 4) || defined(__clang__) | ||||
| #ifndef bswap64 | ||||
| #define bswap64(v) __builtin_bswap64(v) | ||||
| #endif | ||||
| #ifndef bswap32 | ||||
| #define bswap32(v) __builtin_bswap32(v) | ||||
| #if __GNUC_PREREQ(4, 8) || __has_builtin(__builtin_bswap16) | ||||
| #endif | ||||
| #if (__GNUC_PREREQ(4, 8) || __has_builtin(__builtin_bswap16)) &&               \ | ||||
|     !defined(bswap16) | ||||
| #define bswap16(v) __builtin_bswap16(v) | ||||
| #endif | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user