mirror of
				https://github.com/msgpack/msgpack-python.git
				synced 2025-11-04 03:20:56 +00:00 
			
		
		
		
	Fix build error caused by ntohs, ntohl (#514)
This commit is contained in:
		
							parent
							
								
									9d45926a59
								
							
						
					
					
						commit
						edca770071
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -61,6 +61,8 @@ typedef unsigned int _msgpack_atomic_counter_t;
 | 
			
		|||
#endif
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#else /* _WIN32 */
 | 
			
		||||
#include <arpa/inet.h> /* ntohs, ntohl */
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
 | 
			
		||||
| 
						 | 
				
			
			@ -93,7 +95,7 @@ typedef unsigned int _msgpack_atomic_counter_t;
 | 
			
		|||
#ifdef _WIN32
 | 
			
		||||
#  if defined(ntohl)
 | 
			
		||||
#    define _msgpack_be32(x) ntohl(x)
 | 
			
		||||
#  elif defined(_byteswap_ulong) || (defined(_MSC_VER) && _MSC_VER >= 1400)
 | 
			
		||||
#  elif defined(_byteswap_ulong) || defined(_MSC_VER)
 | 
			
		||||
#    define _msgpack_be32(x) ((uint32_t)_byteswap_ulong((unsigned long)x))
 | 
			
		||||
#  else
 | 
			
		||||
#    define _msgpack_be32(x) \
 | 
			
		||||
| 
						 | 
				
			
			@ -106,7 +108,7 @@ typedef unsigned int _msgpack_atomic_counter_t;
 | 
			
		|||
#  define _msgpack_be32(x) ntohl(x)
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#if defined(_byteswap_uint64) || (defined(_MSC_VER) && _MSC_VER >= 1400)
 | 
			
		||||
#if defined(_byteswap_uint64) || defined(_MSC_VER)
 | 
			
		||||
#  define _msgpack_be64(x) (_byteswap_uint64(x))
 | 
			
		||||
#elif defined(bswap_64)
 | 
			
		||||
#  define _msgpack_be64(x) bswap_64(x)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue